mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Release calc version 2.12.4.9
This commit is contained in:
8
BUGS
8
BUGS
@@ -84,7 +84,7 @@ Problems that have known work-a-rounds:
|
|||||||
|
|
||||||
mis-features in calc:
|
mis-features in calc:
|
||||||
|
|
||||||
Some problems are not bugs but rarther mis-features / things that could
|
Some problems are not bugs but rather mis-features / things that could
|
||||||
work better. The following is a list of mis-features that should be
|
work better. The following is a list of mis-features that should be
|
||||||
addressed and improved someday.
|
addressed and improved someday.
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ mis-features in calc:
|
|||||||
|
|
||||||
will not.
|
will not.
|
||||||
|
|
||||||
## Copyright (C) 1999-2007 Landon Curt Noll
|
## Copyright (C) 1999-2013 Landon Curt Noll
|
||||||
##
|
##
|
||||||
## Calc is open software; you can redistribute it and/or modify it under
|
## 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
|
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
@@ -145,8 +145,8 @@ mis-features in calc:
|
|||||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
##
|
##
|
||||||
## @(#) $Revision: 30.1 $
|
## @(#) $Revision: 30.2 $
|
||||||
## @(#) $Id: BUGS,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
## @(#) $Id: BUGS,v 30.2 2013/08/11 01:09:27 chongo Exp $
|
||||||
## @(#) $Source: /usr/local/src/cmd/calc/RCS/BUGS,v $
|
## @(#) $Source: /usr/local/src/cmd/calc/RCS/BUGS,v $
|
||||||
##
|
##
|
||||||
## Under source code control: 1994/03/18 14:06:13
|
## Under source code control: 1994/03/18 14:06:13
|
||||||
|
126
CHANGES
126
CHANGES
@@ -1,4 +1,77 @@
|
|||||||
The following are the changes from calc version 2.12.4.0 to date:
|
The following are the changes from calc version 2.12.4.6 to date:
|
||||||
|
|
||||||
|
Updated RPM build process to remove use of deprecated flags.
|
||||||
|
|
||||||
|
Applied a number of fixes to calc.spec and rpm.mk file.
|
||||||
|
See calc.spec.in for details. Changed rpm release to 2.1.
|
||||||
|
|
||||||
|
Set MACOSX_DEPLOYMENT_TARGET=10.8 as we upgraded all of
|
||||||
|
our development Mac OS X to 10.8.
|
||||||
|
|
||||||
|
Libraries are chmodded as 0644 to allow for building rpms
|
||||||
|
without root.
|
||||||
|
|
||||||
|
Silenced annoying warning about unused variable 'intp'
|
||||||
|
while compiline endian.c under some circumstances.
|
||||||
|
|
||||||
|
Fixed typo in redeclaration warnings. Thanks to
|
||||||
|
Christoph Zurnieden <czurnieden at gmx dot de> for this report.
|
||||||
|
|
||||||
|
Added a number of calc resource functions by
|
||||||
|
Christoph Zurnieden <czurnieden at gmx dot de> including:
|
||||||
|
|
||||||
|
bernpoly.cal - Computes the nth Bernoulli polynomial at z for any n,z
|
||||||
|
brentsolve.cal - root-finder implementwed with the Brent-Dekker trick
|
||||||
|
factorial.cal - product of the positive integers
|
||||||
|
factorial2.cal - variety of integer functions quasi-related to factoral
|
||||||
|
lambertw.cal - Computes Lambert's W-function at "z" at branch "branch"
|
||||||
|
lnseries.cal - Calculates a series of natural logarithms at 1,2,3,4...n
|
||||||
|
specialfunctions.cal - Calculates the value of the beta function
|
||||||
|
statistics.cal - a wide vareity of stastical functions
|
||||||
|
toomcook.cal - Multiply by way of the Toom-Cook algorithm
|
||||||
|
zeta2.cal - Calculate the value of the Hurwitz Zeta function
|
||||||
|
|
||||||
|
Improved the formatting of the output from:
|
||||||
|
|
||||||
|
help resource
|
||||||
|
|
||||||
|
Cleaned up old DOS-like CRLF line terminators in some
|
||||||
|
help files. Thanks goes to to Michael Somos
|
||||||
|
<somos at harary dot math dot georgetown dot edu>
|
||||||
|
for pointing this out.
|
||||||
|
|
||||||
|
We replaced COPYING-LGPL with the version that is found at
|
||||||
|
http://www.gnu.org/licenses/lgpl-2.1.txt because that version
|
||||||
|
contans some whitespace formatting cleanup. Otherwise the
|
||||||
|
license is the same.
|
||||||
|
|
||||||
|
We fixed a number of places where "the the" was used
|
||||||
|
when just "the" should be used.
|
||||||
|
|
||||||
|
NOTE: Fixes to grammar, spelling and minor formatting
|
||||||
|
problems are welcome. Please send us your patches!
|
||||||
|
|
||||||
|
|
||||||
|
The following are the changes from calc version 2.12.4.3 to 2.12.4.5:
|
||||||
|
|
||||||
|
Added gvec.cal resource script.
|
||||||
|
|
||||||
|
Added calc-symlink make rule to setup symlinks from stardard locations
|
||||||
|
into a tree specified by a non-empty ${T} makefile variable. Added
|
||||||
|
calc-unsymlink to remove any symlinks that may have been created by
|
||||||
|
the calc-symlink rule.
|
||||||
|
|
||||||
|
If is OK for the calc-symlink make rule to pre-remove a symlink.
|
||||||
|
|
||||||
|
Fixed bug was uncovered in calc that caused script failures when calc
|
||||||
|
is called within a while loop in BASH if the while loop is fed from
|
||||||
|
stdin due to calc's redirection/inheritance of stdin and no option
|
||||||
|
to change this behavior. Thanks gores to David C. Rankin
|
||||||
|
<drankinatty at gmail dot com> for the bug fix and to David Haller
|
||||||
|
<dnh at opensuse dot org> for helping debug this problem.
|
||||||
|
|
||||||
|
|
||||||
|
The following are the changes from calc version 2.12.4.0 to 2.12.4.2:
|
||||||
|
|
||||||
Fixed a documentation bug for the sgn() builtin.
|
Fixed a documentation bug for the sgn() builtin.
|
||||||
|
|
||||||
@@ -32,6 +105,35 @@ The following are the changes from calc version 2.12.4.0 to date:
|
|||||||
Fixed a bug where an certains typos (e.g., calling an unknown
|
Fixed a bug where an certains typos (e.g., calling an unknown
|
||||||
function) would previously cause calc to exit.
|
function) would previously cause calc to exit.
|
||||||
|
|
||||||
|
Updated the COPYING file to reflect the new filenames associated
|
||||||
|
with the SHA1 hash function, and removed mention of files related
|
||||||
|
to the SHA (SHA0, not SHA1) and the MD5 hash functions (which is
|
||||||
|
no longer supported in calc).
|
||||||
|
|
||||||
|
Fixed a bug where a calling vsnprintf() twice created problems.
|
||||||
|
The thanks for this fix goes to Matthew Miller (mattdm at mattdm
|
||||||
|
dot org) for this patch.
|
||||||
|
|
||||||
|
Michael Penk (mpenk at wuska dot com) reported success in installs
|
||||||
|
under windoz via Cygwin by making a change to the Cygwin target.
|
||||||
|
These changes have been folded into the main calc Makefile.
|
||||||
|
The old recommendation of using 'make win32_hsrc' is no longer
|
||||||
|
required for Cygwin. See the README.WINDOWS file for details.
|
||||||
|
|
||||||
|
Added dms.cal and hms.cal resource files. The dms.cal is a more
|
||||||
|
functional version of deg.cal. It is a superset except that increment
|
||||||
|
and decrement is on the arc second level. The hms.cal is for
|
||||||
|
24-hour cycle instread of the 360 degree cycle of dms.cal.
|
||||||
|
|
||||||
|
Changed deg.cal object name from dms to deg so that the more functional
|
||||||
|
dms.cal can own the dms object name.
|
||||||
|
|
||||||
|
Updated 'help obj' to reflect changes to 'show objfunctions' and
|
||||||
|
resource file example list since 1999.
|
||||||
|
|
||||||
|
Fixed problem where CALC_BYTE_ORDER refering to CALC_BIG_ENDIAN
|
||||||
|
and CALC_LITTLE_ENDIAN instead of BIG_ENDIAN and LITTLE_ENDIAN.
|
||||||
|
|
||||||
|
|
||||||
The following are the changes from calc version 2.12.3.0 to 2.12.3.3:
|
The following are the changes from calc version 2.12.3.0 to 2.12.3.3:
|
||||||
|
|
||||||
@@ -2060,7 +2162,7 @@ The following are the changes from calc version 2.11.1 to 2.11.1t2.2:
|
|||||||
Cleaned up help display system. Help file lines that begin with
|
Cleaned up help display system. Help file lines that begin with
|
||||||
'##' are not displayed.
|
'##' are not displayed.
|
||||||
|
|
||||||
Calc source and documentation now uses the the these terms:
|
Calc source and documentation now uses these terms:
|
||||||
|
|
||||||
*.cal files calc resource file
|
*.cal files calc resource file
|
||||||
*.a files calc binary link library
|
*.a files calc binary link library
|
||||||
@@ -2098,7 +2200,7 @@ The following are the changes from calc version 2.11.0t10 to 2.11.0t11:
|
|||||||
Fixed whitespace to make the best use of 8 character tabs.
|
Fixed whitespace to make the best use of 8 character tabs.
|
||||||
|
|
||||||
Fixed some bugs relating to '// and %' in combination with some
|
Fixed some bugs relating to '// and %' in combination with some
|
||||||
of the the rounding modes based on a patch from Ernest Bowen
|
of the rounding modes based on a patch from Ernest Bowen
|
||||||
<ernie at turing dot une dot edu dot au>.
|
<ernie at turing dot une dot edu dot au>.
|
||||||
|
|
||||||
A patch from Klaus Alexander Seistrup <klaus at seistrup dot dk>, when
|
A patch from Klaus Alexander Seistrup <klaus at seistrup dot dk>, when
|
||||||
@@ -2292,7 +2394,7 @@ The following are the changes from calc version 2.11.0t10 to 2.11.0t11:
|
|||||||
|
|
||||||
Where ``/usr/local/bin/calc'' is the path to the calc binary.
|
Where ``/usr/local/bin/calc'' is the path to the calc binary.
|
||||||
Additional -options may be added to the line, but it MUST
|
Additional -options may be added to the line, but it MUST
|
||||||
start with -S. For example, the the executable file ``plus''
|
start with -S. For example, the executable file ``plus''
|
||||||
contain the following:
|
contain the following:
|
||||||
|
|
||||||
#!/usr/local/bin/calc -S -e
|
#!/usr/local/bin/calc -S -e
|
||||||
@@ -4755,7 +4857,7 @@ The following are the changes from calc version 2.10.3t0 to 2.10.3t2:
|
|||||||
|
|
||||||
global variable: to the end of the session with calc
|
global variable: to the end of the session with calc
|
||||||
|
|
||||||
static within a function definition: to the the first of:
|
static within a function definition: to the first of:
|
||||||
|
|
||||||
an end of a global, static or local declaration (including
|
an end of a global, static or local declaration (including
|
||||||
initialization code) with the same identifier
|
initialization code) with the same identifier
|
||||||
@@ -4853,7 +4955,7 @@ The following are the changes from calc version 2.10.3t0 to 2.10.3t2:
|
|||||||
|
|
||||||
global a, b, mat A, B[2] = {3,4}, C[2] = {4,5}, obj point P = {5,6}, Q
|
global a, b, mat A, B[2] = {3,4}, C[2] = {4,5}, obj point P = {5,6}, Q
|
||||||
|
|
||||||
Fixed some bugs related to global and static scoping. See the the
|
Fixed some bugs related to global and static scoping. See the
|
||||||
5200 regress test and lib/test5200.cal for details.
|
5200 regress test and lib/test5200.cal for details.
|
||||||
|
|
||||||
Optimized opcode generator so that functions defined using '=' do not
|
Optimized opcode generator so that functions defined using '=' do not
|
||||||
@@ -5350,7 +5452,7 @@ The following are the changes from calc version 2.10.2t4 to 2.10.2t24:
|
|||||||
ILDFLAGS are flags given to ${CC} for linking .o files
|
ILDFLAGS are flags given to ${CC} for linking .o files
|
||||||
for intermediate progs
|
for intermediate progs
|
||||||
|
|
||||||
CC is how the the C compiler is invoked
|
CC is how the C compiler is invoked
|
||||||
|
|
||||||
Added more tests to regress.cal.
|
Added more tests to regress.cal.
|
||||||
|
|
||||||
@@ -5575,7 +5677,7 @@ The following are the changes from calc version 2.10.2t1 to 2.10.2t3:
|
|||||||
Some systems has a libc symbolic qadd() that conflicted with calc's
|
Some systems has a libc symbolic qadd() that conflicted with calc's
|
||||||
qadd function. To avoid this, qadd() has been renamed to qqadd().
|
qadd function. To avoid this, qadd() has been renamed to qqadd().
|
||||||
|
|
||||||
The calc error codes are produced from the the calcerr.tbl file.
|
The calc error codes are produced from the calcerr.tbl file.
|
||||||
Instead of changing #defines in value.h, one can not edit calcerr.tbl.
|
Instead of changing #defines in value.h, one can not edit calcerr.tbl.
|
||||||
The Makefile builds calcerr.h from this file.
|
The Makefile builds calcerr.h from this file.
|
||||||
|
|
||||||
@@ -6118,7 +6220,7 @@ The following are the changes from calc version 2.9.3t11 to 2.10.0t12:
|
|||||||
LDFLAGS are flags given to ${CC} for linking .o files
|
LDFLAGS are flags given to ${CC} for linking .o files
|
||||||
ILDFLAGS are given to ${CC} for linking .o's for intermediate progs
|
ILDFLAGS are given to ${CC} for linking .o's for intermediate progs
|
||||||
|
|
||||||
CC is how the the C compiler is invoked
|
CC is how the C compiler is invoked
|
||||||
|
|
||||||
The syntax error:
|
The syntax error:
|
||||||
|
|
||||||
@@ -6769,9 +6871,9 @@ 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.
|
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
##
|
##
|
||||||
## @(#) $Revision: 30.18 $
|
## @(#) $Revision: 30.28 $
|
||||||
## @(#) $Id: CHANGES,v 30.18 2008/10/24 09:55:12 chongo Exp $
|
## @(#) $Id: CHANGES,v 30.28 2013/08/11 01:18:56 chongo Exp chongo $
|
||||||
## @(#) $Source: /usr/local/src/cmd/calc/RCS/CHANGES,v $
|
## @(#) $Source: /usr/local/src/bin/calc/RCS/CHANGES,v $
|
||||||
##
|
##
|
||||||
## Under source code control: 1993/06/02 18:12:57
|
## Under source code control: 1993/06/02 18:12:57
|
||||||
## File existed as early as: 1989
|
## File existed as early as: 1989
|
||||||
|
20
COPYING
20
COPYING
@@ -6,15 +6,15 @@ This file is Copyrighted
|
|||||||
|
|
||||||
This file is covered under the following Copyright:
|
This file is covered under the following Copyright:
|
||||||
|
|
||||||
Copyright (C) 1999 Landon Curt Noll
|
Copyright (C) 1999-2008 Landon Curt Noll
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
# @(#) $Revision: 30.1 $
|
# @(#) $Revision: 30.2 $
|
||||||
# @(#) $Id: COPYING,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
# @(#) $Id: COPYING,v 30.2 2008/10/24 10:46:52 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/RCS/COPYING,v $
|
# @(#) $Source: /usr/local/src/bin/calc/RCS/COPYING,v $
|
||||||
|
|
||||||
=-=
|
=-=
|
||||||
|
|
||||||
@@ -168,9 +168,8 @@ Calc copyrights and exception files
|
|||||||
|
|
||||||
These files are not covered under one of the Copyrights listed above:
|
These files are not covered under one of the Copyrights listed above:
|
||||||
|
|
||||||
shs1.c shs1.h shs.c shs.h
|
sha1.c sha1.h COPYING
|
||||||
md5.c md5.h COPYING COPYING-LGPL
|
COPYING-LGPL cal/qtime.cal cal/screen.cal
|
||||||
cal/qtime.cal cal/screen.cal
|
|
||||||
|
|
||||||
The file COPYING-LGPL, which contains a copy of the version 2.1
|
The file COPYING-LGPL, which contains a copy of the version 2.1
|
||||||
GNU Lesser General Public License, is itself Copyrighted by the
|
GNU Lesser General Public License, is itself Copyrighted by the
|
||||||
@@ -182,11 +181,8 @@ Calc copyrights and exception files
|
|||||||
top of this file. It is important to note that you may distribute
|
top of this file. It is important to note that you may distribute
|
||||||
verbatim copies of this file but you may not modify this file.
|
verbatim copies of this file but you may not modify this file.
|
||||||
|
|
||||||
Some of these exception files are in the public domain. The md5.c
|
Some of these exception files are in the public domain. Other files
|
||||||
and md5.h files were "derived from the RSA Data Security, Inc. MD5
|
are under the LGPL but have different authors that those listed above.
|
||||||
Message-Digest Algorithm" and are under a copyright that allows these
|
|
||||||
two files to be freely used and distributed. Other files are under
|
|
||||||
the LGPL but have different authors that those listed above.
|
|
||||||
|
|
||||||
In all cases one may use and distribute these exception files freely.
|
In all cases one may use and distribute these exception files freely.
|
||||||
And because one may freely distribute the LGPL covered files, the
|
And because one may freely distribute the LGPL covered files, the
|
||||||
|
18
COPYING-LGPL
18
COPYING-LGPL
@@ -1,8 +1,8 @@
|
|||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
Version 2.1, February 1999
|
Version 2.1, February 1999
|
||||||
|
|
||||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
as the successor of the GNU Library Public License, version 2, hence
|
as the successor of the GNU Library Public License, version 2, hence
|
||||||
the version number 2.1.]
|
the version number 2.1.]
|
||||||
|
|
||||||
Preamble
|
Preamble
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
The licenses for most software are designed to take away your
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
@@ -112,7 +112,7 @@ modification follow. Pay close attention to the difference between a
|
|||||||
former contains code derived from the library, whereas the latter must
|
former contains code derived from the library, whereas the latter must
|
||||||
be combined with the library in order to run.
|
be combined with the library in order to run.
|
||||||
|
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
0. This License Agreement applies to any software library or other
|
0. This License Agreement applies to any software library or other
|
||||||
@@ -432,7 +432,7 @@ decision will be guided by the two goals of preserving the free status
|
|||||||
of all derivatives of our free software and of promoting the sharing
|
of all derivatives of our free software and of promoting the sharing
|
||||||
and reuse of software generally.
|
and reuse of software generally.
|
||||||
|
|
||||||
NO WARRANTY
|
NO WARRANTY
|
||||||
|
|
||||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||||
@@ -455,7 +455,7 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
|||||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
DAMAGES.
|
DAMAGES.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
How to Apply These Terms to Your New Libraries
|
How to Apply These Terms to Your New Libraries
|
||||||
|
|
||||||
@@ -485,7 +485,7 @@ convey the exclusion of warranty; and each file should have at least the
|
|||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
You should have received a copy of the GNU Lesser General Public
|
||||||
License along with this library; if not, write to the Free Software
|
License along with this library; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
@@ -500,5 +500,3 @@ necessary. Here is a sample; alter the names:
|
|||||||
Ty Coon, President of Vice
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
That's all there is to it!
|
That's all there is to it!
|
||||||
|
|
||||||
|
|
||||||
|
@@ -206,7 +206,7 @@ the calc help subsystem. See the README file for details.
|
|||||||
##
|
##
|
||||||
## @(#) $Revision: 30.6 $
|
## @(#) $Revision: 30.6 $
|
||||||
## @(#) $Id: HOWTO.INSTALL,v 30.6 2007/10/16 12:22:22 chongo Exp $
|
## @(#) $Id: HOWTO.INSTALL,v 30.6 2007/10/16 12:22:22 chongo Exp $
|
||||||
## @(#) $Source: /usr/local/src/cmd/calc/RCS/HOWTO.INSTALL,v $
|
## @(#) $Source: /usr/local/src/bin/calc/RCS/HOWTO.INSTALL,v $
|
||||||
##
|
##
|
||||||
## Under source code control: 1999/09/27 20:48:44
|
## Under source code control: 1999/09/27 20:48:44
|
||||||
## File existed as early as: 1999
|
## File existed as early as: 1999
|
||||||
|
2
LIBRARY
2
LIBRARY
@@ -640,7 +640,7 @@ need call libcalc_call_me_last() only once.
|
|||||||
##
|
##
|
||||||
## @(#) $Revision: 30.1 $
|
## @(#) $Revision: 30.1 $
|
||||||
## @(#) $Id: LIBRARY,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
## @(#) $Id: LIBRARY,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||||
## @(#) $Source: /usr/local/src/cmd/calc/RCS/LIBRARY,v $
|
## @(#) $Source: /usr/local/src/bin/calc/RCS/LIBRARY,v $
|
||||||
##
|
##
|
||||||
## Under source code control: 1993/07/30 19:44:49
|
## Under source code control: 1993/07/30 19:44:49
|
||||||
## File existed as early as: 1993
|
## File existed as early as: 1993
|
||||||
|
147
Makefile
147
Makefile
@@ -39,8 +39,8 @@
|
|||||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#
|
#
|
||||||
MAKEFILE_REV= $$Revision: 30.41 $$
|
MAKEFILE_REV= $$Revision: 30.53 $$
|
||||||
# @(#) $Id: Makefile.ship,v 30.41 2008/10/24 09:20:09 chongo Exp $
|
# @(#) $Id: Makefile.ship,v 30.53 2013/08/11 01:16:36 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/RCS/Makefile.ship,v $
|
# @(#) $Source: /usr/local/src/cmd/calc/RCS/Makefile.ship,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 1990/02/15 01:48:41
|
# Under source code control: 1990/02/15 01:48:41
|
||||||
@@ -132,8 +132,8 @@ HAVE_VSPRINTF=
|
|||||||
# Select CALC_BYTE_ORDER= -DCALC_LITTLE_ENDIAN for DJGPP.
|
# Select CALC_BYTE_ORDER= -DCALC_LITTLE_ENDIAN for DJGPP.
|
||||||
#
|
#
|
||||||
CALC_BYTE_ORDER=
|
CALC_BYTE_ORDER=
|
||||||
#CALC_BYTE_ORDER= -DCALC_BIG_ENDIAN
|
#CALC_BYTE_ORDER= -DBIG_ENDIAN
|
||||||
#CALC_BYTE_ORDER= -DCALC_LITTLE_ENDIAN
|
#CALC_BYTE_ORDER= -DLITTLE_ENDIAN
|
||||||
|
|
||||||
# Determine the number of bits in a long
|
# Determine the number of bits in a long
|
||||||
#
|
#
|
||||||
@@ -983,11 +983,12 @@ MKDIR_ARG= -p
|
|||||||
|
|
||||||
# Some out of date operating systems require / want an executable to
|
# Some out of date operating systems require / want an executable to
|
||||||
# end with a certain file extension. Some compile systems such as
|
# end with a certain file extension. Some compile systems such as
|
||||||
# Cygwin build calc as calc.exe. The EXT variable is used to denote
|
# windoz build calc as calc.exe. The EXT variable is used to denote
|
||||||
# the extension required by such.
|
# the extension required by such. Note that Cygwin requires EXT to be
|
||||||
|
# the same as Linux/Un*x/GNU, even though it runs under windoz.
|
||||||
#
|
#
|
||||||
# EXT= # normal Un*x / Linux / GNU/Linux systems
|
# EXT= # normal Un*x / Linux / GNU/Linux / Cygwin
|
||||||
# EXT=.exe # windoz / Cygwin
|
# EXT=.exe # windoz
|
||||||
#
|
#
|
||||||
# If in doubt, use EXT=
|
# If in doubt, use EXT=
|
||||||
#
|
#
|
||||||
@@ -996,7 +997,7 @@ EXT=
|
|||||||
|
|
||||||
# The default calc versions
|
# The default calc versions
|
||||||
#
|
#
|
||||||
VERSION= 2.12.4.0
|
VERSION= 2.12.4.9
|
||||||
VERS= 2.12.4
|
VERS= 2.12.4
|
||||||
VER= 2.12
|
VER= 2.12
|
||||||
VE= 2
|
VE= 2
|
||||||
@@ -1118,8 +1119,8 @@ COMMON_LDFLAGS= ${EXTRA_LDFLAGS}
|
|||||||
# to abort on warnings, then leave CCWERR blank.
|
# to abort on warnings, then leave CCWERR blank.
|
||||||
# CCMISC are misc flags given to ${CC}
|
# CCMISC are misc flags given to ${CC}
|
||||||
#
|
#
|
||||||
# LCC how the the C compiler is invoked on locally executed intermediate progs
|
# LCC how the C compiler is invoked on locally executed intermediate progs
|
||||||
# CC is how the the C compiler is invoked (with an optional Purify)
|
# CC is how the C compiler is invoked (with an optional Purify)
|
||||||
#
|
#
|
||||||
# Specific target overrides or modifications to default values
|
# Specific target overrides or modifications to default values
|
||||||
|
|
||||||
@@ -1211,7 +1212,7 @@ LDCONFIG:=
|
|||||||
# DARWIN_ARCH= -arch i386 # Intel binary
|
# DARWIN_ARCH= -arch i386 # Intel binary
|
||||||
# DARWIN_ARCH= -arch ppc # PPC binary
|
# DARWIN_ARCH= -arch ppc # PPC binary
|
||||||
DARWIN_ARCH= # native binary
|
DARWIN_ARCH= # native binary
|
||||||
MACOSX_DEPLOYMENT_TARGET=10.4
|
MACOSX_DEPLOYMENT_TARGET=10.8
|
||||||
#
|
#
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -1334,6 +1335,40 @@ CC= ${PURIFY} ${LCC} ${CCWERR}
|
|||||||
#
|
#
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#################
|
||||||
|
# Cygwin target #
|
||||||
|
#################
|
||||||
|
|
||||||
|
ifeq ($(target),Cygwin)
|
||||||
|
#
|
||||||
|
BLD_TYPE= calc-static-only
|
||||||
|
#
|
||||||
|
CC_SHARE= -fPIC
|
||||||
|
DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
|
||||||
|
LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
|
||||||
|
"-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
|
||||||
|
LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
|
||||||
|
ifdef ALLOW_CUSTOM
|
||||||
|
LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
|
||||||
|
else
|
||||||
|
LIBCUSTCALC_SHLIB=
|
||||||
|
endif
|
||||||
|
#
|
||||||
|
CC_STATIC=
|
||||||
|
LIBCALC_STATIC=
|
||||||
|
LIBCUSTCALC_STATIC=
|
||||||
|
LD_STATIC=
|
||||||
|
#
|
||||||
|
CCWARN= -Wall -W -Wno-comment
|
||||||
|
CCWERR=
|
||||||
|
CCOPT= ${DEBUG}
|
||||||
|
CCMISC=
|
||||||
|
#
|
||||||
|
LCC= gcc
|
||||||
|
CC= ${PURIFY} ${LCC} ${CCWERR}
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
#######################################################
|
#######################################################
|
||||||
# simple target - values used to form Makefile.simple #
|
# simple target - values used to form Makefile.simple #
|
||||||
#######################################################
|
#######################################################
|
||||||
@@ -4081,9 +4116,14 @@ gdb:
|
|||||||
#
|
#
|
||||||
###
|
###
|
||||||
|
|
||||||
rpm: clobber rpm.mk calc.spec.in
|
rpm: clobber rpm-preclean rpm.mk calc.spec.in
|
||||||
${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
||||||
${MAKE} -f rpm.mk V=${V}
|
${MAKE} -f rpm.mk all V=${V} RPM_TOP="${RPM_TOP}"
|
||||||
|
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
||||||
|
|
||||||
|
rpm-preclean:
|
||||||
|
${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
||||||
|
${MAKE} -f rpm.mk $@ V=${V} RPM_TOP="${RPM_TOP}"
|
||||||
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
||||||
|
|
||||||
# rpm static rules
|
# rpm static rules
|
||||||
@@ -4441,9 +4481,9 @@ endif
|
|||||||
else \
|
else \
|
||||||
${RM} -f ${T}${LIBDIR}/libcalc.a.new; \
|
${RM} -f ${T}${LIBDIR}/libcalc.a.new; \
|
||||||
${CP} -f libcalc.a ${T}${LIBDIR}/libcalc.a.new; \
|
${CP} -f libcalc.a ${T}${LIBDIR}/libcalc.a.new; \
|
||||||
|
${CHMOD} 0644 ${T}${LIBDIR}/libcalc.a.new; \
|
||||||
${MV} -f ${T}${LIBDIR}/libcalc.a.new ${T}${LIBDIR}/libcalc.a; \
|
${MV} -f ${T}${LIBDIR}/libcalc.a.new ${T}${LIBDIR}/libcalc.a; \
|
||||||
${RANLIB} ${T}${LIBDIR}/libcalc.a; \
|
${RANLIB} ${T}${LIBDIR}/libcalc.a; \
|
||||||
${CHMOD} 0444 ${T}${LIBDIR}/libcalc.a; \
|
|
||||||
echo "installed ${T}${LIBDIR}/libcalc.a"; \
|
echo "installed ${T}${LIBDIR}/libcalc.a"; \
|
||||||
fi; \
|
fi; \
|
||||||
fi
|
fi
|
||||||
@@ -4459,6 +4499,7 @@ endif
|
|||||||
${RM} -f ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new; \
|
${RM} -f ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new; \
|
||||||
${CP} -f libcalc${LIB_EXT_VERSION} \
|
${CP} -f libcalc${LIB_EXT_VERSION} \
|
||||||
${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new; \
|
${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new; \
|
||||||
|
${CHMOD} 0644 ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new; \
|
||||||
${MV} -f ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new \
|
${MV} -f ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new \
|
||||||
${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}; \
|
${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}; \
|
||||||
echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}"; \
|
echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}"; \
|
||||||
@@ -4477,6 +4518,7 @@ endif
|
|||||||
${RM} -f ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new; \
|
${RM} -f ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new; \
|
||||||
${CP} -f custom/libcustcalc${LIB_EXT_VERSION} \
|
${CP} -f custom/libcustcalc${LIB_EXT_VERSION} \
|
||||||
${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new; \
|
${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new; \
|
||||||
|
${CHMOD} 0644 ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new; \
|
||||||
${MV} -f ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new \
|
${MV} -f ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new \
|
||||||
${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}; \
|
${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}; \
|
||||||
echo "installed ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}"; \
|
echo "installed ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}"; \
|
||||||
@@ -4776,6 +4818,81 @@ strip:
|
|||||||
done
|
done
|
||||||
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
||||||
|
|
||||||
|
# calc-symlink - setup symlinks from stardard locations into the ${T} tree
|
||||||
|
#
|
||||||
|
calc-symlink:
|
||||||
|
${Q}if [ -z "${T}" ]; then \
|
||||||
|
echo "cannot use $@ make rule when T make var is empty" 1>&2; \
|
||||||
|
echo "aborting" 1>&2; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
-${Q} for i in ${BINDIR}/calc${EXT} \
|
||||||
|
${BINDIR}/calc-static${EXT} \
|
||||||
|
${SCRIPTDIR} \
|
||||||
|
${LIBDIR}/libcalc${LIB_EXT_VERSION} \
|
||||||
|
${LIBDIR}/libcustcalc${LIB_EXT_VERSION} \
|
||||||
|
${MANDIR}/calc.${MANEXT} \
|
||||||
|
${CALC_SHAREDIR} \
|
||||||
|
${CALC_INCDIR} \
|
||||||
|
; do \
|
||||||
|
if [ -e "${T}$$i" ]; then \
|
||||||
|
if [ ! -L "$$i" -a "${T}$$i" -ef "$$i" ]; then \
|
||||||
|
echo "ERROR: ${T}$$i is the same as $$i" 1>&2; \
|
||||||
|
else \
|
||||||
|
if [ -e "$$i" ]; then \
|
||||||
|
echo ${RM} -f "$$i"; \
|
||||||
|
${RM} -f "$$i"; \
|
||||||
|
fi; \
|
||||||
|
echo ${LN} -s "${T}$$i" "$$i"; \
|
||||||
|
${LN} -s "${T}$$i" "$$i"; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
echo "Warning: not found: ${T}$$i" 1>&2; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
-${Q} if [ -n "${CATDIR}" ]; then \
|
||||||
|
if [ -e "${T}${CATDIR}/calc.${CATEXT}" ]; then \
|
||||||
|
if [ ! -L "${CATDIR}/calc.${CATEXT}" -a "${T}${CATDIR}/calc.${CATEXT}" -ef "${CATDIR}/calc.${CATEXT}" ]; then \
|
||||||
|
echo "ERROR: ${T}${CATDIR}/calc.${CATEXT} is the same as ${CATDIR}/calc.${CATEXT}" 1>&2; \
|
||||||
|
else \
|
||||||
|
if [ -e "${CATDIR}/calc.${CATEXT}" ]; then \
|
||||||
|
echo ${RM} -f "${CATDIR}/calc.${CATEXT}"; \
|
||||||
|
${RM} -f "${CATDIR}/calc.${CATEXT}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${LN} -s "${T}${CATDIR}/calc.${CATEXT}" "${CATDIR}/calc.${CATEXT}"; \
|
||||||
|
${LN} -s "${T}${CATDIR}/calc.${CATEXT}" "${CATDIR}/calc.${CATEXT}"; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
# remove any symlinks that may have been created by calc-symlink
|
||||||
|
#
|
||||||
|
calc-unsymlink:
|
||||||
|
-${Q} for i in ${BINDIR}/calc${EXT} \
|
||||||
|
${BINDIR}/calc-static${EXT} \
|
||||||
|
${SCRIPTDIR} \
|
||||||
|
${LIBDIR}/libcalc${LIB_EXT_VERSION} \
|
||||||
|
${LIBDIR}/libcustcalc${LIB_EXT_VERSION} \
|
||||||
|
${MANDIR}/calc.${MANEXT} \
|
||||||
|
${CALC_SHAREDIR} \
|
||||||
|
${CALC_INCDIR} \
|
||||||
|
; do \
|
||||||
|
if [ -L "$$i" ]; then \
|
||||||
|
echo ${RM} -f "$$i"; \
|
||||||
|
${RM} -f "$$i"; \
|
||||||
|
else \
|
||||||
|
echo "Warning: ignoring non-symlink: $$i" 1>&2; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
-${Q} if [ -n "${CATDIR}" ]; then \
|
||||||
|
if [ -L "${CATDIR}/calc.${CATEXT}" ]; then \
|
||||||
|
echo ${RM} -f "${CATDIR}/calc.${CATEXT}"; \
|
||||||
|
${RM} -f "${CATDIR}/calc.${CATEXT}"; \
|
||||||
|
else \
|
||||||
|
echo "Warning: ignoring non-symlink: ${CATDIR}/calc.${CATEXT}" 1>&2; \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
|
|
||||||
###
|
###
|
||||||
#
|
#
|
||||||
# make depend stuff
|
# make depend stuff
|
||||||
|
111
Makefile.simple
111
Makefile.simple
@@ -39,8 +39,8 @@
|
|||||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#
|
#
|
||||||
MAKEFILE_REV= $$Revision: 30.41 $$
|
MAKEFILE_REV= $$Revision: 30.53 $$
|
||||||
# @(#) $Id: Makefile.ship,v 30.41 2008/10/24 09:20:09 chongo Exp $
|
# @(#) $Id: Makefile.ship,v 30.53 2013/08/11 01:16:36 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/RCS/Makefile.ship,v $
|
# @(#) $Source: /usr/local/src/cmd/calc/RCS/Makefile.ship,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 1990/02/15 01:48:41
|
# Under source code control: 1990/02/15 01:48:41
|
||||||
@@ -117,8 +117,8 @@ HAVE_VSPRINTF=
|
|||||||
# Select CALC_BYTE_ORDER= -DCALC_LITTLE_ENDIAN for DJGPP.
|
# Select CALC_BYTE_ORDER= -DCALC_LITTLE_ENDIAN for DJGPP.
|
||||||
#
|
#
|
||||||
CALC_BYTE_ORDER=
|
CALC_BYTE_ORDER=
|
||||||
#CALC_BYTE_ORDER= -DCALC_BIG_ENDIAN
|
#CALC_BYTE_ORDER= -DBIG_ENDIAN
|
||||||
#CALC_BYTE_ORDER= -DCALC_LITTLE_ENDIAN
|
#CALC_BYTE_ORDER= -DLITTLE_ENDIAN
|
||||||
|
|
||||||
# Determine the number of bits in a long
|
# Determine the number of bits in a long
|
||||||
#
|
#
|
||||||
@@ -960,11 +960,12 @@ MKDIR_ARG= -p
|
|||||||
|
|
||||||
# Some out of date operating systems require / want an executable to
|
# Some out of date operating systems require / want an executable to
|
||||||
# end with a certain file extension. Some compile systems such as
|
# end with a certain file extension. Some compile systems such as
|
||||||
# Cygwin build calc as calc.exe. The EXT variable is used to denote
|
# windoz build calc as calc.exe. The EXT variable is used to denote
|
||||||
# the extension required by such.
|
# the extension required by such. Note that Cygwin requires EXT to be
|
||||||
|
# the same as Linux/Un*x/GNU, even though it runs under windoz.
|
||||||
#
|
#
|
||||||
# EXT= # normal Un*x / Linux / GNU/Linux systems
|
# EXT= # normal Un*x / Linux / GNU/Linux / Cygwin
|
||||||
# EXT=.exe # windoz / Cygwin
|
# EXT=.exe # windoz
|
||||||
#
|
#
|
||||||
# If in doubt, use EXT=
|
# If in doubt, use EXT=
|
||||||
#
|
#
|
||||||
@@ -973,7 +974,7 @@ EXT=
|
|||||||
|
|
||||||
# The default calc versions
|
# The default calc versions
|
||||||
#
|
#
|
||||||
VERSION= 2.12.4.0
|
VERSION= 2.12.4.9
|
||||||
VERS= 2.12.4
|
VERS= 2.12.4
|
||||||
VER= 2.12
|
VER= 2.12
|
||||||
VE= 2
|
VE= 2
|
||||||
@@ -1087,8 +1088,8 @@ COMMON_LDFLAGS= ${EXTRA_LDFLAGS}
|
|||||||
# to abort on warnings, then leave CCWERR blank.
|
# to abort on warnings, then leave CCWERR blank.
|
||||||
# CCMISC are misc flags given to ${CC}
|
# CCMISC are misc flags given to ${CC}
|
||||||
#
|
#
|
||||||
# LCC how the the C compiler is invoked on locally executed intermediate progs
|
# LCC how the C compiler is invoked on locally executed intermediate progs
|
||||||
# CC is how the the C compiler is invoked (with an optional Purify)
|
# CC is how the C compiler is invoked (with an optional Purify)
|
||||||
#
|
#
|
||||||
# Specific target overrides or modifications to default values
|
# Specific target overrides or modifications to default values
|
||||||
|
|
||||||
@@ -3652,9 +3653,14 @@ gdb:
|
|||||||
#
|
#
|
||||||
###
|
###
|
||||||
|
|
||||||
rpm: clobber rpm.mk calc.spec.in
|
rpm: clobber rpm-preclean rpm.mk calc.spec.in
|
||||||
${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
||||||
${MAKE} -f rpm.mk V=${V}
|
${MAKE} -f rpm.mk all V=${V} RPM_TOP="${RPM_TOP}"
|
||||||
|
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
||||||
|
|
||||||
|
rpm-preclean:
|
||||||
|
${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
||||||
|
${MAKE} -f rpm.mk $@ V=${V} RPM_TOP="${RPM_TOP}"
|
||||||
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
||||||
|
|
||||||
# rpm static rules
|
# rpm static rules
|
||||||
@@ -3995,9 +4001,9 @@ install: custom/Makefile ${LIB_H_SRC} ${BUILD_H_SRC} calc.1 all
|
|||||||
else \
|
else \
|
||||||
${RM} -f ${T}${LIBDIR}/libcalc.a.new; \
|
${RM} -f ${T}${LIBDIR}/libcalc.a.new; \
|
||||||
${CP} -f libcalc.a ${T}${LIBDIR}/libcalc.a.new; \
|
${CP} -f libcalc.a ${T}${LIBDIR}/libcalc.a.new; \
|
||||||
|
${CHMOD} 0644 ${T}${LIBDIR}/libcalc.a.new; \
|
||||||
${MV} -f ${T}${LIBDIR}/libcalc.a.new ${T}${LIBDIR}/libcalc.a; \
|
${MV} -f ${T}${LIBDIR}/libcalc.a.new ${T}${LIBDIR}/libcalc.a; \
|
||||||
${RANLIB} ${T}${LIBDIR}/libcalc.a; \
|
${RANLIB} ${T}${LIBDIR}/libcalc.a; \
|
||||||
${CHMOD} 0444 ${T}${LIBDIR}/libcalc.a; \
|
|
||||||
echo "installed ${T}${LIBDIR}/libcalc.a"; \
|
echo "installed ${T}${LIBDIR}/libcalc.a"; \
|
||||||
fi; \
|
fi; \
|
||||||
fi
|
fi
|
||||||
@@ -4013,6 +4019,7 @@ install: custom/Makefile ${LIB_H_SRC} ${BUILD_H_SRC} calc.1 all
|
|||||||
${RM} -f ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new; \
|
${RM} -f ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new; \
|
||||||
${CP} -f libcalc${LIB_EXT_VERSION} \
|
${CP} -f libcalc${LIB_EXT_VERSION} \
|
||||||
${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new; \
|
${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new; \
|
||||||
|
${CHMOD} 0644 ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new; \
|
||||||
${MV} -f ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new \
|
${MV} -f ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}.new \
|
||||||
${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}; \
|
${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}; \
|
||||||
echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}"; \
|
echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION}"; \
|
||||||
@@ -4031,6 +4038,7 @@ install: custom/Makefile ${LIB_H_SRC} ${BUILD_H_SRC} calc.1 all
|
|||||||
${RM} -f ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new; \
|
${RM} -f ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new; \
|
||||||
${CP} -f custom/libcustcalc${LIB_EXT_VERSION} \
|
${CP} -f custom/libcustcalc${LIB_EXT_VERSION} \
|
||||||
${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new; \
|
${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new; \
|
||||||
|
${CHMOD} 0644 ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new; \
|
||||||
${MV} -f ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new \
|
${MV} -f ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}.new \
|
||||||
${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}; \
|
${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}; \
|
||||||
echo "installed ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}"; \
|
echo "installed ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}"; \
|
||||||
@@ -4330,6 +4338,81 @@ strip:
|
|||||||
done
|
done
|
||||||
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
||||||
|
|
||||||
|
# calc-symlink - setup symlinks from stardard locations into the ${T} tree
|
||||||
|
#
|
||||||
|
calc-symlink:
|
||||||
|
${Q}if [ -z "${T}" ]; then \
|
||||||
|
echo "cannot use $@ make rule when T make var is empty" 1>&2; \
|
||||||
|
echo "aborting" 1>&2; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
-${Q} for i in ${BINDIR}/calc${EXT} \
|
||||||
|
${BINDIR}/calc-static${EXT} \
|
||||||
|
${SCRIPTDIR} \
|
||||||
|
${LIBDIR}/libcalc${LIB_EXT_VERSION} \
|
||||||
|
${LIBDIR}/libcustcalc${LIB_EXT_VERSION} \
|
||||||
|
${MANDIR}/calc.${MANEXT} \
|
||||||
|
${CALC_SHAREDIR} \
|
||||||
|
${CALC_INCDIR} \
|
||||||
|
; do \
|
||||||
|
if [ -e "${T}$$i" ]; then \
|
||||||
|
if [ ! -L "$$i" -a "${T}$$i" -ef "$$i" ]; then \
|
||||||
|
echo "ERROR: ${T}$$i is the same as $$i" 1>&2; \
|
||||||
|
else \
|
||||||
|
if [ -e "$$i" ]; then \
|
||||||
|
echo ${RM} -f "$$i"; \
|
||||||
|
${RM} -f "$$i"; \
|
||||||
|
fi; \
|
||||||
|
echo ${LN} -s "${T}$$i" "$$i"; \
|
||||||
|
${LN} -s "${T}$$i" "$$i"; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
echo "Warning: not found: ${T}$$i" 1>&2; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
-${Q} if [ -n "${CATDIR}" ]; then \
|
||||||
|
if [ -e "${T}${CATDIR}/calc.${CATEXT}" ]; then \
|
||||||
|
if [ ! -L "${CATDIR}/calc.${CATEXT}" -a "${T}${CATDIR}/calc.${CATEXT}" -ef "${CATDIR}/calc.${CATEXT}" ]; then \
|
||||||
|
echo "ERROR: ${T}${CATDIR}/calc.${CATEXT} is the same as ${CATDIR}/calc.${CATEXT}" 1>&2; \
|
||||||
|
else \
|
||||||
|
if [ -e "${CATDIR}/calc.${CATEXT}" ]; then \
|
||||||
|
echo ${RM} -f "${CATDIR}/calc.${CATEXT}"; \
|
||||||
|
${RM} -f "${CATDIR}/calc.${CATEXT}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${LN} -s "${T}${CATDIR}/calc.${CATEXT}" "${CATDIR}/calc.${CATEXT}"; \
|
||||||
|
${LN} -s "${T}${CATDIR}/calc.${CATEXT}" "${CATDIR}/calc.${CATEXT}"; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
# remove any symlinks that may have been created by calc-symlink
|
||||||
|
#
|
||||||
|
calc-unsymlink:
|
||||||
|
-${Q} for i in ${BINDIR}/calc${EXT} \
|
||||||
|
${BINDIR}/calc-static${EXT} \
|
||||||
|
${SCRIPTDIR} \
|
||||||
|
${LIBDIR}/libcalc${LIB_EXT_VERSION} \
|
||||||
|
${LIBDIR}/libcustcalc${LIB_EXT_VERSION} \
|
||||||
|
${MANDIR}/calc.${MANEXT} \
|
||||||
|
${CALC_SHAREDIR} \
|
||||||
|
${CALC_INCDIR} \
|
||||||
|
; do \
|
||||||
|
if [ -L "$$i" ]; then \
|
||||||
|
echo ${RM} -f "$$i"; \
|
||||||
|
${RM} -f "$$i"; \
|
||||||
|
else \
|
||||||
|
echo "Warning: ignoring non-symlink: $$i" 1>&2; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
-${Q} if [ -n "${CATDIR}" ]; then \
|
||||||
|
if [ -L "${CATDIR}/calc.${CATEXT}" ]; then \
|
||||||
|
echo ${RM} -f "${CATDIR}/calc.${CATEXT}"; \
|
||||||
|
${RM} -f "${CATDIR}/calc.${CATEXT}"; \
|
||||||
|
else \
|
||||||
|
echo "Warning: ignoring non-symlink: ${CATDIR}/calc.${CATEXT}" 1>&2; \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
|
|
||||||
###
|
###
|
||||||
#
|
#
|
||||||
# make depend stuff
|
# make depend stuff
|
||||||
|
2
README
2
README
@@ -136,7 +136,7 @@ The calc web site is located at:
|
|||||||
##
|
##
|
||||||
## @(#) $Revision: 30.1 $
|
## @(#) $Revision: 30.1 $
|
||||||
## @(#) $Id: README,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
## @(#) $Id: README,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||||
## @(#) $Source: /usr/local/src/cmd/calc/RCS/README,v $
|
## @(#) $Source: /usr/local/src/bin/calc/RCS/README,v $
|
||||||
##
|
##
|
||||||
## Under source code control: 1995/10/25 05:27:59
|
## Under source code control: 1995/10/25 05:27:59
|
||||||
## File existed as early as: 1995
|
## File existed as early as: 1995
|
||||||
|
109
README.WINDOWS
109
README.WINDOWS
@@ -10,6 +10,63 @@ NOTE: The main developers do not have access to a Windoz based platform.
|
|||||||
Of course you are welcome to send us any patches that fix your
|
Of course you are welcome to send us any patches that fix your
|
||||||
Windoz build environment.
|
Windoz build environment.
|
||||||
|
|
||||||
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||||
|
=-= compiling with Cygwin =-=
|
||||||
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||||
|
|
||||||
|
An effort is being made to allow windows users to compile calc using the
|
||||||
|
Cygwin project (http://sources.redhat.com/cygwin/) with the GCC compiler
|
||||||
|
and Un*x tools for Windows.
|
||||||
|
|
||||||
|
The major porting work for Cygwin was performed by Thomas Jones-Low
|
||||||
|
(tjoneslo at softstart dot com).
|
||||||
|
|
||||||
|
In March 2009, Michael Penk (mpenk at wuska dot com) reported success in
|
||||||
|
installs under Cygwin:
|
||||||
|
|
||||||
|
On my fairly complete Cygwin installs, everything compiles,
|
||||||
|
checks, and installs correctly. My Cygwin is configured
|
||||||
|
in a very standard way (out of the box, using all of Cygwin's
|
||||||
|
defaults). The install worked on 5 different machines with
|
||||||
|
Cygwin on them: one XP home, one XP professional, and three
|
||||||
|
Vista professionals.
|
||||||
|
|
||||||
|
Using the calc Makefile, he did the following:
|
||||||
|
|
||||||
|
make all target=Cygwin
|
||||||
|
make check
|
||||||
|
make install
|
||||||
|
|
||||||
|
He also reports:
|
||||||
|
|
||||||
|
Of course, one should be logged in as an Administrator when
|
||||||
|
one builds and installs calc.
|
||||||
|
|
||||||
|
He was compiling calc 2.12.4.0 with Cygwin version 1.5.25-15.
|
||||||
|
|
||||||
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||||
|
=-= If all else fails, for Cygwin =-=
|
||||||
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||||
|
|
||||||
|
Much earlier (2001?) Thomas Jones-Low (tjoneslo at softstart dot com)
|
||||||
|
recommended that you generate by hand all of the header files that
|
||||||
|
by the Makefile. This has been done for you via the makefile rule:
|
||||||
|
|
||||||
|
make win32_hsrc
|
||||||
|
|
||||||
|
which uses the Makefile variables in win32.mkdef to form these header
|
||||||
|
files under win32 directory.
|
||||||
|
|
||||||
|
You will find generated versions of these files located in the win32
|
||||||
|
sub-directory. These files may be appropriate for your Cygwin building
|
||||||
|
needs.
|
||||||
|
|
||||||
|
In particular:
|
||||||
|
|
||||||
|
Just copy the win32/*.[ch] files up into the top level calc
|
||||||
|
source directory, edit them (if needed) and build using the
|
||||||
|
Cygwin GCC compiler and Cygwin build environment.
|
||||||
|
|
||||||
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||||
=-= compiling under DJGPP =-=
|
=-= compiling under DJGPP =-=
|
||||||
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||||
@@ -68,52 +125,8 @@ Look for Makefile comments of the form:
|
|||||||
Follow those recommendations. In cases where they conflict with
|
Follow those recommendations. In cases where they conflict with
|
||||||
the above Makefile list, follow the recommendation in the Makefile.
|
the above Makefile list, follow the recommendation in the Makefile.
|
||||||
|
|
||||||
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
||||||
=-= compiling with Cygwin =-=
|
|
||||||
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
||||||
|
|
||||||
An effort is being made to allow windows users to compile calc using the
|
## Copyright (C) 2002-2009 Landon Curt Noll and Thomas Jones-Low
|
||||||
Cygwin project (http://sources.redhat.com/cygwin/) with the GCC compiler
|
|
||||||
and Un*x tools for Windows.
|
|
||||||
|
|
||||||
The major porting work was performed by Thomas Jones-Low
|
|
||||||
(tjoneslo at softstart dot com). He said:
|
|
||||||
|
|
||||||
I had previous stated to this group that I have successfully managed
|
|
||||||
to port a version of Calc to Windows, and promised some point to
|
|
||||||
post what was required, so here it is.
|
|
||||||
|
|
||||||
One obvious manner of doing this port is to get the latest version
|
|
||||||
of the Cygwin project (http://sources.redhat.com/cygwin/) with the
|
|
||||||
GCC compiler and Un*x tools for Windows and recompile.
|
|
||||||
|
|
||||||
I built my working version using Calc ... I am using Visual C++
|
|
||||||
version 7.0, which is an older version of the Microsoft development
|
|
||||||
tools. The make file provided with Calc is not compatible with
|
|
||||||
NMAKE, so I used the Visual Studio tools to generate another one
|
|
||||||
(not included). Calc is built in two parts, calc.dll, which is the
|
|
||||||
library, and calc.exe which is the command line interface.
|
|
||||||
|
|
||||||
He recommended that you generate by hand all of the header files that
|
|
||||||
by the Makefile. This has been done for you via the makefile rule:
|
|
||||||
|
|
||||||
make win32_hsrc
|
|
||||||
|
|
||||||
which uses the Makefile variables in win32.mkdef to form these header
|
|
||||||
files under win32 directory.
|
|
||||||
|
|
||||||
You will find generated versions of these files located in the win32
|
|
||||||
sub-directory. These files may be appropriate for your Cygwin building
|
|
||||||
needs.
|
|
||||||
|
|
||||||
In particular:
|
|
||||||
|
|
||||||
Just copy the win32/*.[ch] files up into the top level calc
|
|
||||||
source directory, edit them (if needed) and build using the
|
|
||||||
Cygwin GCC compiler and Cygwin build environment.
|
|
||||||
|
|
||||||
|
|
||||||
## Copyright (C) 2002-2007 Landon Curt Noll and Thomas Jones-Low
|
|
||||||
##
|
##
|
||||||
## Calc is open software; you can redistribute it and/or modify it under
|
## 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
|
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
@@ -129,9 +142,9 @@ In particular:
|
|||||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
##
|
##
|
||||||
## @(#) $Revision: 30.1 $
|
## @(#) $Revision: 30.2 $
|
||||||
## @(#) $Id: README.WINDOWS,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
## @(#) $Id: README.WINDOWS,v 30.2 2009/03/14 02:29:31 chongo Exp $
|
||||||
## @(#) $Source: /usr/local/src/cmd/calc/RCS/README.WINDOWS,v $
|
## @(#) $Source: /usr/local/src/bin/calc/RCS/README.WINDOWS,v $
|
||||||
##
|
##
|
||||||
## Under source code control: 2001/02/25 14:00:05
|
## Under source code control: 2001/02/25 14:00:05
|
||||||
## File existed as early as: 2001
|
## File existed as early as: 2001
|
||||||
|
2
addop.c
2
addop.c
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: addop.c,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
* @(#) $Id: addop.c,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/addop.c,v $
|
* @(#) $Source: /usr/local/src/bin/calc/RCS/addop.c,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:48:10
|
* Under source code control: 1990/02/15 01:48:10
|
||||||
* File existed as early as: before 1990
|
* File existed as early as: before 1990
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: align32.c,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
* @(#) $Id: align32.c,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/align32.c,v $
|
* @(#) $Source: /usr/local/src/bin/calc/RCS/align32.c,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1995/11/23 05:18:06
|
* Under source code control: 1995/11/23 05:18:06
|
||||||
* File existed as early as: 1995
|
* File existed as early as: 1995
|
||||||
|
2
alloc.h
2
alloc.h
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.2 $
|
* @(#) $Revision: 30.2 $
|
||||||
* @(#) $Id: alloc.h,v 30.2 2008/04/15 21:17:57 chongo Exp $
|
* @(#) $Id: alloc.h,v 30.2 2008/04/15 21:17:57 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/alloc.h,v $
|
* @(#) $Source: /usr/local/src/bin/calc/RCS/alloc.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:48:29
|
* Under source code control: 1990/02/15 01:48:29
|
||||||
* File existed as early as: before 1990
|
* File existed as early as: before 1990
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: assocfunc.c,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
* @(#) $Id: assocfunc.c,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/assocfunc.c,v $
|
* @(#) $Source: /usr/local/src/bin/calc/RCS/assocfunc.c,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1993/07/20 23:04:27
|
* Under source code control: 1993/07/20 23:04:27
|
||||||
* File existed as early as: 1993
|
* File existed as early as: 1993
|
||||||
|
2
blkcpy.c
2
blkcpy.c
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: blkcpy.c,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
* @(#) $Id: blkcpy.c,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/blkcpy.c,v $
|
* @(#) $Source: /usr/local/src/bin/calc/RCS/blkcpy.c,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1997/04/18 20:41:26
|
* Under source code control: 1997/04/18 20:41:26
|
||||||
* File existed as early as: 1997
|
* File existed as early as: 1997
|
||||||
|
2
blkcpy.h
2
blkcpy.h
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: blkcpy.h,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
* @(#) $Id: blkcpy.h,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/blkcpy.h,v $
|
* @(#) $Source: /usr/local/src/bin/calc/RCS/blkcpy.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1997/04/18 20:41:25
|
* Under source code control: 1997/04/18 20:41:25
|
||||||
* File existed as early as: 1997
|
* File existed as early as: 1997
|
||||||
|
2
block.c
2
block.c
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: block.c,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
* @(#) $Id: block.c,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/block.c,v $
|
* @(#) $Source: /usr/local/src/bin/calc/RCS/block.c,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1997/02/27 00:29:40
|
* Under source code control: 1997/02/27 00:29:40
|
||||||
* File existed as early as: 1997
|
* File existed as early as: 1997
|
||||||
|
2
block.h
2
block.h
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: block.h,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
* @(#) $Id: block.h,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/block.h,v $
|
* @(#) $Source: /usr/local/src/bin/calc/RCS/block.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1997/02/21 05:03:39
|
* Under source code control: 1997/02/21 05:03:39
|
||||||
* File existed as early as: 1997
|
* File existed as early as: 1997
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: byteswap.c,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
* @(#) $Id: byteswap.c,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/byteswap.c,v $
|
* @(#) $Source: /usr/local/src/bin/calc/RCS/byteswap.c,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1995/10/11 04:44:01
|
* Under source code control: 1995/10/11 04:44:01
|
||||||
* File existed as early as: 1995
|
* File existed as early as: 1995
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: byteswap.h,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
* @(#) $Id: byteswap.h,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/byteswap.h,v $
|
* @(#) $Source: /usr/local/src/bin/calc/RCS/byteswap.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1995/10/11 04:44:01
|
* Under source code control: 1995/10/11 04:44:01
|
||||||
* File existed as early as: 1995
|
* File existed as early as: 1995
|
||||||
|
@@ -18,9 +18,9 @@
|
|||||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#
|
#
|
||||||
# @(#) $Revision: 30.3 $
|
# @(#) $Revision: 30.5 $
|
||||||
# @(#) $Id: Makefile,v 30.3 2007/09/21 01:27:27 chongo Exp $
|
# @(#) $Id: Makefile,v 30.5 2011/05/23 22:50:18 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/Makefile,v $
|
# @(#) $Source: /usr/local/src/bin/calc/cal/RCS/Makefile,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 1991/07/21 05:00:54
|
# Under source code control: 1991/07/21 05:00:54
|
||||||
# File existed as early as: 1991
|
# File existed as early as: 1991
|
||||||
@@ -193,7 +193,8 @@ CALC_FILES= README bigprime.cal deg.cal ellip.cal lucas.cal lucas_chk.cal \
|
|||||||
beer.cal hello.cal test5100.cal test5200.cal randombitrun.cal \
|
beer.cal hello.cal test5100.cal test5200.cal randombitrun.cal \
|
||||||
randomrun.cal repeat.cal xx_print.cal natnumset.cal qtime.cal \
|
randomrun.cal repeat.cal xx_print.cal natnumset.cal qtime.cal \
|
||||||
test8400.cal test8500.cal test8600.cal chi.cal intfile.cal screen.cal \
|
test8400.cal test8500.cal test8600.cal chi.cal intfile.cal screen.cal \
|
||||||
dotest.cal set8700.cal set8700.line alg_config.cal sumtimes.cal
|
dotest.cal set8700.cal set8700.line alg_config.cal sumtimes.cal \
|
||||||
|
dms.cal hms.cal gvec.cal
|
||||||
|
|
||||||
# These files are found (but not built) in the distribution
|
# These files are found (but not built) in the distribution
|
||||||
#
|
#
|
||||||
|
653
cal/README
653
cal/README
@@ -173,7 +173,8 @@ alg_config.cal
|
|||||||
|
|
||||||
beer.cal
|
beer.cal
|
||||||
|
|
||||||
Calc's contribution to the 99 Bottles of Beer web page:
|
This calc resource is calc's contribution to the 99 Bottles of Beer
|
||||||
|
web page:
|
||||||
|
|
||||||
http://www.ionet.net/~timtroyr/funhouse/beer.html#calc
|
http://www.ionet.net/~timtroyr/funhouse/beer.html#calc
|
||||||
|
|
||||||
@@ -191,6 +192,18 @@ bernoulli.cal
|
|||||||
the builtin function.
|
the builtin function.
|
||||||
|
|
||||||
|
|
||||||
|
bernpoly.cal
|
||||||
|
|
||||||
|
bernpoly(n,z)
|
||||||
|
|
||||||
|
Computes the nth Bernoulli polynomial at z for arbitrary n,z. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Bernoulli_polynomials
|
||||||
|
http://mathworld.wolfram.com/BernoulliPolynomial.html
|
||||||
|
|
||||||
|
for further information
|
||||||
|
|
||||||
|
|
||||||
bigprime.cal
|
bigprime.cal
|
||||||
|
|
||||||
bigprime(a, m, p)
|
bigprime(a, m, p)
|
||||||
@@ -198,6 +211,34 @@ bigprime.cal
|
|||||||
A prime test, base a, on p*2^x+1 for even x>m.
|
A prime test, base a, on p*2^x+1 for even x>m.
|
||||||
|
|
||||||
|
|
||||||
|
brentsolve.cal
|
||||||
|
|
||||||
|
brentsolve(low, high,eps)
|
||||||
|
|
||||||
|
A root-finder implementwed with the Brent-Dekker trick.
|
||||||
|
|
||||||
|
brentsolve2(low, high,which,eps)
|
||||||
|
|
||||||
|
The second function, brentsolve2(low, high,which,eps) has some lines
|
||||||
|
added to make it easier to hardcode the name of the helper function
|
||||||
|
different from the obligatory "f".
|
||||||
|
|
||||||
|
See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Brent%27s_method
|
||||||
|
http://mathworld.wolfram.com/BrentsMethod.html
|
||||||
|
|
||||||
|
to find out more about the Brent-Dekker method.
|
||||||
|
|
||||||
|
|
||||||
|
constants.cal
|
||||||
|
|
||||||
|
e()
|
||||||
|
G()
|
||||||
|
|
||||||
|
An implementation of different constants to arbitrary precision.
|
||||||
|
|
||||||
|
|
||||||
chi.cal
|
chi.cal
|
||||||
|
|
||||||
Z(x[, eps])
|
Z(x[, eps])
|
||||||
@@ -226,14 +267,37 @@ chrem.cal
|
|||||||
|
|
||||||
deg.cal
|
deg.cal
|
||||||
|
|
||||||
|
deg(deg, min, sec)
|
||||||
|
deg_add(a, b)
|
||||||
|
deg_neg(a)
|
||||||
|
deg_sub(a, b)
|
||||||
|
deg_mul(a, b)
|
||||||
|
deg_print(a)
|
||||||
|
|
||||||
|
Calculate in degrees, minutes, and seconds. For a more functional
|
||||||
|
version see dms.cal.
|
||||||
|
|
||||||
|
|
||||||
|
dms.cal
|
||||||
|
|
||||||
dms(deg, min, sec)
|
dms(deg, min, sec)
|
||||||
dms_add(a, b)
|
dms_add(a, b)
|
||||||
dms_neg(a)
|
dms_neg(a)
|
||||||
dms_sub(a, b)
|
dms_sub(a, b)
|
||||||
dms_mul(a, b)
|
dms_mul(a, b)
|
||||||
dms_print(a)
|
dms_print(a)
|
||||||
|
dms_abs(a)
|
||||||
|
dms_norm(a)
|
||||||
|
dms_test(a)
|
||||||
|
dms_int(a)
|
||||||
|
dms_frac(a)
|
||||||
|
dms_rel(a,b)
|
||||||
|
dms_cmp(a,b)
|
||||||
|
dms_inc(a)
|
||||||
|
dms_dec(a)
|
||||||
|
|
||||||
Calculate in degrees, minutes, and seconds.
|
Calculate in degrees, minutes, and seconds. Unlike deg.cal, increments
|
||||||
|
are on the arc second level. See also hms.cal.
|
||||||
|
|
||||||
|
|
||||||
dotest.cal
|
dotest.cal
|
||||||
@@ -268,6 +332,166 @@ dotest.cal
|
|||||||
dotest("set8700.line");
|
dotest("set8700.line");
|
||||||
|
|
||||||
|
|
||||||
|
factorial.cal
|
||||||
|
|
||||||
|
factorial(n)
|
||||||
|
|
||||||
|
Calculates the product of the positive integers up to and including n.
|
||||||
|
|
||||||
|
See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Factorial
|
||||||
|
|
||||||
|
for information on the factorial. This function depends on the script
|
||||||
|
toomcook.cal.
|
||||||
|
|
||||||
|
|
||||||
|
primorial(a,b)
|
||||||
|
|
||||||
|
Calculates the product of the primes between a and b. If a is not prime
|
||||||
|
the next higher prime is taken as the starting point. If b is not prime
|
||||||
|
the next lower prime is taking as the end point b. The end point b must
|
||||||
|
not exceed 4294967291. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Primorial
|
||||||
|
|
||||||
|
for information on the primorial.
|
||||||
|
|
||||||
|
|
||||||
|
factorial2.cal
|
||||||
|
|
||||||
|
This file contents a small variety of integer functions that can, with
|
||||||
|
more or less pressure, be related to the factorial.
|
||||||
|
|
||||||
|
doublefactorial(n)
|
||||||
|
|
||||||
|
Calculates the double factorial n!! with different algorithms for
|
||||||
|
- n odd
|
||||||
|
- n even and positive
|
||||||
|
- n (real|complex) sans the negative half integers
|
||||||
|
|
||||||
|
See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Double_factorial
|
||||||
|
http://mathworld.wolfram.com/DoubleFactorial.html
|
||||||
|
|
||||||
|
for information on the double factorial. This function depends on
|
||||||
|
the script toomcook.cal, factorial.cal and specialfunctions.cal.
|
||||||
|
|
||||||
|
|
||||||
|
binomial(n,k)
|
||||||
|
|
||||||
|
Calculates the binomial coefficients for n large and k = k \pm
|
||||||
|
n/2. Defaults to the built-in function for smaller and/or different
|
||||||
|
values. Meant as a complete replacement for comb(n,k) with only a
|
||||||
|
very small overhead. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Binomial_coefficient
|
||||||
|
|
||||||
|
for information on the binomial. This function depends on the script
|
||||||
|
toomcook.cal factorial.cal and specialfunctions.cal.
|
||||||
|
|
||||||
|
|
||||||
|
bigcatalan(n)
|
||||||
|
|
||||||
|
Calculates the n-th Catalan number for n large. It is usefull
|
||||||
|
above n~50,000 but defaults to the builtin function for smaller
|
||||||
|
values.Meant as a complete replacement for catalan(n) with only a
|
||||||
|
very small overhead. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Catalan_number
|
||||||
|
http://mathworld.wolfram.com/CatalanNumber.html
|
||||||
|
|
||||||
|
for information on Catalan numbers. This function depends on the scripts
|
||||||
|
toomcook.cal, factorial.cal and specialfunctions.cal.
|
||||||
|
|
||||||
|
|
||||||
|
stirling1(n,m)
|
||||||
|
|
||||||
|
Calculates the Stirling number of the first kind. It does so with
|
||||||
|
building a list of all of the smaller results. It might be a good
|
||||||
|
idea, though, to run it once for the highest n,m first if many
|
||||||
|
Stirling numbers are needed at once, for example in a series. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Stirling_numbers_of_the_first_kind
|
||||||
|
http://mathworld.wolfram.com/StirlingNumberoftheFirstKind.html
|
||||||
|
Algorithm 3.17, Donald Kreher and Douglas Simpson, "Combinatorial
|
||||||
|
Algorithms", CRC Press, 1998, page 89.
|
||||||
|
|
||||||
|
for information on Stirling numbers of the first kind.
|
||||||
|
|
||||||
|
|
||||||
|
stirling2(n,m)
|
||||||
|
stirling2caching(n,m)
|
||||||
|
|
||||||
|
Calculate the Stirling number of the second kind.
|
||||||
|
The first function stirling2(n,m) does it with the sum
|
||||||
|
m
|
||||||
|
====
|
||||||
|
1 \ n m - k
|
||||||
|
-- > k (- 1) binomial(m, k)
|
||||||
|
m! /
|
||||||
|
====
|
||||||
|
k = 0
|
||||||
|
|
||||||
|
The other function stirling2caching(n,m) does it by way of the
|
||||||
|
reccurence relation and keeps all earlier results. This function
|
||||||
|
is much slower for computing a single value than stirling2(n,m) but
|
||||||
|
is very usefull if many Stirling numbers are needed, for example in
|
||||||
|
a series. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind
|
||||||
|
http://mathworld.wolfram.com/StirlingNumberoftheSecondKind.html
|
||||||
|
|
||||||
|
Algorithm 3.17, Donald Kreher and Douglas Simpson, "Combinatorial
|
||||||
|
Algorithms", CRC Press, 1998, page 89.
|
||||||
|
|
||||||
|
for information on Stirling numbers of the second kind.
|
||||||
|
|
||||||
|
|
||||||
|
bell(n)
|
||||||
|
|
||||||
|
Calculate the n-th Bell number. This may take some time for large n.
|
||||||
|
See:
|
||||||
|
|
||||||
|
http://oeis.org/A000110
|
||||||
|
http://en.wikipedia.org/wiki/Bell_number
|
||||||
|
http://mathworld.wolfram.com/BellNumber.html
|
||||||
|
|
||||||
|
for information on Bell numbers.
|
||||||
|
|
||||||
|
|
||||||
|
subfactorial(n)
|
||||||
|
|
||||||
|
Calculate the n-th subfactorial or derangement. This may take some
|
||||||
|
time for large n. See:
|
||||||
|
|
||||||
|
http://mathworld.wolfram.com/Derangement.html
|
||||||
|
http://en.wikipedia.org/wiki/Derangement
|
||||||
|
|
||||||
|
for information on subfactorials.
|
||||||
|
|
||||||
|
|
||||||
|
risingfactorial(x,n)
|
||||||
|
|
||||||
|
Calculates the rising factorial or Pochammer symbol of almost arbitrary
|
||||||
|
x,n. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Pochhammer_symbol
|
||||||
|
http://mathworld.wolfram.com/PochhammerSymbol.html
|
||||||
|
|
||||||
|
for information on rising factorials.
|
||||||
|
|
||||||
|
fallingfactorial(x,n)
|
||||||
|
|
||||||
|
Calculates the rising factorial of almost arbitrary x,n. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Pochhammer_symbol
|
||||||
|
http://mathworld.wolfram.com/PochhammerSymbol.html
|
||||||
|
|
||||||
|
for information on falling factorials.
|
||||||
|
|
||||||
|
|
||||||
ellip.cal
|
ellip.cal
|
||||||
|
|
||||||
efactor(iN, ia, B, force)
|
efactor(iN, ia, B, force)
|
||||||
@@ -275,6 +499,13 @@ ellip.cal
|
|||||||
Attempt to factor using the elliptic functions: y^2 = x^3 + a*x + b.
|
Attempt to factor using the elliptic functions: y^2 = x^3 + a*x + b.
|
||||||
|
|
||||||
|
|
||||||
|
gvec.cal
|
||||||
|
|
||||||
|
gvec(function, vector)
|
||||||
|
|
||||||
|
Vectorize any single-input function or trailing operator.
|
||||||
|
|
||||||
|
|
||||||
hello.cal
|
hello.cal
|
||||||
|
|
||||||
Calc's contribution to the Hello World! page:
|
Calc's contribution to the Hello World! page:
|
||||||
@@ -285,6 +516,27 @@ hello.cal
|
|||||||
NOTE: This resource produces a lot of output. :-)
|
NOTE: This resource produces a lot of output. :-)
|
||||||
|
|
||||||
|
|
||||||
|
hms.cal
|
||||||
|
|
||||||
|
hms(hour, min, sec)
|
||||||
|
hms_add(a, b)
|
||||||
|
hms_neg(a)
|
||||||
|
hms_sub(a, b)
|
||||||
|
hms_mul(a, b)
|
||||||
|
hms_print(a)
|
||||||
|
hms_abs(a)
|
||||||
|
hms_norm(a)
|
||||||
|
hms_test(a)
|
||||||
|
hms_int(a)
|
||||||
|
hms_frac(a)
|
||||||
|
hms_rel(a,b)
|
||||||
|
hms_cmp(a,b)
|
||||||
|
hms_inc(a)
|
||||||
|
hms_dec(a)
|
||||||
|
|
||||||
|
Calculate in hours, minutes, and seconds. See also dmscal.
|
||||||
|
|
||||||
|
|
||||||
intfile.cal
|
intfile.cal
|
||||||
|
|
||||||
file2be(filename)
|
file2be(filename)
|
||||||
@@ -312,6 +564,37 @@ intfile.cal
|
|||||||
of the integer become the last octets of the file.
|
of the integer become the last octets of the file.
|
||||||
|
|
||||||
|
|
||||||
|
lambertw.cal
|
||||||
|
|
||||||
|
lambertw(z,branch)
|
||||||
|
|
||||||
|
Computes Lambert's W-function at "z" at branch "branch". See
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Lambert_W_function
|
||||||
|
http://mathworld.wolfram.com/LambertW-Function.html
|
||||||
|
https://cs.uwaterloo.ca/research/tr/1993/03/W.pdf
|
||||||
|
http://arxiv.org/abs/1003.1628
|
||||||
|
|
||||||
|
to get more information.
|
||||||
|
|
||||||
|
This file includes also an implementation for the series described in
|
||||||
|
Corless et al. (1996) eq. 4.22 (W-pdf) and Verebic (2010) (arxive link)
|
||||||
|
eqs.35-37.
|
||||||
|
|
||||||
|
The series has been implemented to get a different algorithm
|
||||||
|
for checking the results. This was necessary because the results
|
||||||
|
of the implementation in Maxima, the only program with a general
|
||||||
|
lambert-w implementation at hand at that time, differed slightly. The
|
||||||
|
Maxima versions tested were: Maxima 5.21.1 and 5.29.1. The current
|
||||||
|
version of this code concurs with the results of Mathematica`s(tm)
|
||||||
|
ProductLog[branch,z] with the tested values.
|
||||||
|
|
||||||
|
The series is only valid for the branches 0,-1, real z, converges
|
||||||
|
for values of z _very_ near the branchpoint -exp(-1) only, and must
|
||||||
|
be given the branches explicitly. See the code in lambertw.cal
|
||||||
|
for further information.
|
||||||
|
|
||||||
|
|
||||||
linear.cal
|
linear.cal
|
||||||
|
|
||||||
linear(x0, y0, x1, y1, x)
|
linear(x0, y0, x1, y1, x)
|
||||||
@@ -320,6 +603,24 @@ linear.cal
|
|||||||
Requires x0 != y0.
|
Requires x0 != y0.
|
||||||
|
|
||||||
|
|
||||||
|
lnseries.cal
|
||||||
|
|
||||||
|
lnseries(limit)
|
||||||
|
lnfromseries(n)
|
||||||
|
deletelnseries()
|
||||||
|
|
||||||
|
Calculates a series of n natural logarithms at 1,2,3,4...n. It
|
||||||
|
does so by computing the prime factorization of all of the number
|
||||||
|
sequence 1,2,3...n, calculates the natural logarithms of the primes
|
||||||
|
in 1,2,3...n and uses the above factorization to build the natural
|
||||||
|
logarithms of the rest of the sequence by sadding the logarithms of
|
||||||
|
the primes in the factorization. This is faster for high precision
|
||||||
|
of the logarithms and/or long sequences.
|
||||||
|
|
||||||
|
The sequence need to be initiated by running either lnseries(n) or
|
||||||
|
lnfromseries(n) once with n the upper limit of the sequence.
|
||||||
|
|
||||||
|
|
||||||
lucas.cal
|
lucas.cal
|
||||||
|
|
||||||
lucas(h, n)
|
lucas(h, n)
|
||||||
@@ -365,6 +666,7 @@ mfactor.cal
|
|||||||
fastest even thought the initial startup overhead is larger than
|
fastest even thought the initial startup overhead is larger than
|
||||||
for p_elim == 13.
|
for p_elim == 13.
|
||||||
|
|
||||||
|
|
||||||
mod.cal
|
mod.cal
|
||||||
|
|
||||||
lmod(a)
|
lmod(a)
|
||||||
@@ -454,6 +756,7 @@ pi.cal
|
|||||||
Lambert Meertens. See also the ABC Programmer's Handbook, by Geurts,
|
Lambert Meertens. See also the ABC Programmer's Handbook, by Geurts,
|
||||||
Meertens & Pemberton, published by Prentice-Hall (UK) Ltd., 1990.
|
Meertens & Pemberton, published by Prentice-Hall (UK) Ltd., 1990.
|
||||||
|
|
||||||
|
|
||||||
pix.cal
|
pix.cal
|
||||||
|
|
||||||
pi_of_x(x)
|
pi_of_x(x)
|
||||||
@@ -536,10 +839,10 @@ randmprime.cal
|
|||||||
|
|
||||||
randmprime(bits, seed [,dbg])
|
randmprime(bits, seed [,dbg])
|
||||||
|
|
||||||
Find a prime of the form h*2^n-1 >= 2^bits for some given x. The initial
|
Find a prime of the form h*2^n-1 >= 2^bits for some given x. The
|
||||||
search points for 'h' and 'n' are selected by a cryptographic pseudo-random
|
initial search points for 'h' and 'n' are selected by a cryptographic
|
||||||
number generator. The optional argument, dbg, if set to 1, 2 or 3
|
pseudo-random number generator. The optional argument, dbg, if set
|
||||||
turn on various debugging print statements.
|
to 1, 2 or 3 turn on various debugging print statements.
|
||||||
|
|
||||||
|
|
||||||
randombitrun.cal
|
randombitrun.cal
|
||||||
@@ -591,8 +894,8 @@ repeat.cal
|
|||||||
|
|
||||||
regress.cal
|
regress.cal
|
||||||
|
|
||||||
Test the correct execution of the calculator by reading this resource file.
|
Test the correct execution of the calculator by reading this resource
|
||||||
Errors are reported with '****' messages, or worse. :-)
|
file. Errors are reported with '****' messages, or worse. :-)
|
||||||
|
|
||||||
|
|
||||||
screen.cal
|
screen.cal
|
||||||
@@ -638,15 +941,17 @@ screen.cal
|
|||||||
Cyan
|
Cyan
|
||||||
White
|
White
|
||||||
|
|
||||||
Define ANSI control sequences providing (i.e., cursor movement, changing
|
Define ANSI control sequences providing (i.e., cursor movement,
|
||||||
foreground or background color, etc.) for VT100 terminals and terminal
|
changing foreground or background color, etc.) for VT100 terminals
|
||||||
window emulators (i.e., xterm, Apple OS/X Terminal, etc.) that support them.
|
and terminal window emulators (i.e., xterm, Apple OS/X Terminal,
|
||||||
|
etc.) that support them.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
read screen
|
read screen
|
||||||
print green:"This is green. ":red:"This is red.":black
|
print green:"This is green. ":red:"This is red.":black
|
||||||
|
|
||||||
|
|
||||||
seedrandom.cal
|
seedrandom.cal
|
||||||
|
|
||||||
seedrandom(seed1, seed2, bitsize [,trials])
|
seedrandom(seed1, seed2, bitsize [,trials])
|
||||||
@@ -688,8 +993,247 @@ solve.cal
|
|||||||
solve(low, high, epsilon)
|
solve(low, high, epsilon)
|
||||||
|
|
||||||
Solve the equation f(x) = 0 to within the desired error value for x.
|
Solve the equation f(x) = 0 to within the desired error value for x.
|
||||||
The function 'f' must be defined outside of this routine, and the low
|
The function 'f' must be defined outside of this routine, and the
|
||||||
and high values are guesses which must produce values with opposite signs.
|
low and high values are guesses which must produce values with
|
||||||
|
opposite signs.
|
||||||
|
|
||||||
|
|
||||||
|
specialfunctions.cal
|
||||||
|
|
||||||
|
beta(a,b)
|
||||||
|
|
||||||
|
Calculates the value of the beta function. See:
|
||||||
|
|
||||||
|
https://en.wikipedia.org/wiki/Beta_function
|
||||||
|
http://mathworld.wolfram.com/BetaFunction.html
|
||||||
|
http://dlmf.nist.gov/5.12
|
||||||
|
|
||||||
|
for information on the beta function.
|
||||||
|
|
||||||
|
|
||||||
|
betainc(a,b,z)
|
||||||
|
|
||||||
|
Calculates the value of the regularized incomplete beta function. See:
|
||||||
|
|
||||||
|
https://en.wikipedia.org/wiki/Beta_function
|
||||||
|
http://mathworld.wolfram.com/RegularizedBetaFunction.html
|
||||||
|
http://dlmf.nist.gov/8.17
|
||||||
|
|
||||||
|
for information on the regularized incomplete beta function.
|
||||||
|
|
||||||
|
|
||||||
|
expoint(z)
|
||||||
|
|
||||||
|
Calculates the value of the exponential integral Ei(z) function at z.
|
||||||
|
See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Exponential_integral
|
||||||
|
http://www.cs.utah.edu/~vpegorar/research/2011_JGT/
|
||||||
|
|
||||||
|
for information on the exponential integral Ei(z) function.
|
||||||
|
|
||||||
|
|
||||||
|
erf(z)
|
||||||
|
|
||||||
|
Calculates the value of the error function at z. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Error_function
|
||||||
|
|
||||||
|
for information on the error function function.
|
||||||
|
|
||||||
|
|
||||||
|
erfc(z)
|
||||||
|
|
||||||
|
Calculates the value of the complementary error function at z. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Error_function
|
||||||
|
|
||||||
|
for information on the complementary error function function.
|
||||||
|
|
||||||
|
|
||||||
|
erfi(z)
|
||||||
|
|
||||||
|
Calculates the value of the imaginary error function at z. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Error_function
|
||||||
|
|
||||||
|
for information on the imaginary error function function.
|
||||||
|
|
||||||
|
|
||||||
|
erfinv(x)
|
||||||
|
|
||||||
|
Calculates the inverse of the error function at x. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Error_function
|
||||||
|
|
||||||
|
for information on the inverse of the error function function.
|
||||||
|
|
||||||
|
|
||||||
|
faddeeva(z)
|
||||||
|
|
||||||
|
Calculates the value of the complex error function at z. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Faddeeva_function
|
||||||
|
|
||||||
|
for information on the complex error function function.
|
||||||
|
|
||||||
|
|
||||||
|
gamma(z)
|
||||||
|
|
||||||
|
Calculates the value of the Euler gamma function at z. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Gamma_function
|
||||||
|
http://dlmf.nist.gov/5
|
||||||
|
|
||||||
|
for information on the Euler gamma function.
|
||||||
|
|
||||||
|
|
||||||
|
gammainc(a,z)
|
||||||
|
|
||||||
|
Calculates the value of the lower incomplete gamma function for
|
||||||
|
arbitrary a, z. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Incomplete_gamma_function
|
||||||
|
|
||||||
|
for information on the lower incomplete gamma function.
|
||||||
|
|
||||||
|
gammap(a,z)
|
||||||
|
|
||||||
|
Calculates the value of the regularized lower incomplete gamma
|
||||||
|
function for a, z with a not in -N. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Incomplete_gamma_function
|
||||||
|
|
||||||
|
for information on the regularized lower incomplete gamma function.
|
||||||
|
|
||||||
|
gammaq(a,z)
|
||||||
|
|
||||||
|
Calculates the value of the regularized upper incomplete gamma
|
||||||
|
function for a, z with a not in -N. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Incomplete_gamma_function
|
||||||
|
|
||||||
|
for information on the regularized upper incomplete gamma function.
|
||||||
|
|
||||||
|
|
||||||
|
heavisidestep(x)
|
||||||
|
|
||||||
|
Computes the Heaviside stepp function (1+sign(x))/2
|
||||||
|
|
||||||
|
|
||||||
|
harmonic(limit)
|
||||||
|
|
||||||
|
Calculates partial values of the harmonic series up to limit. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Harmonic_series_(mathematics)
|
||||||
|
http://mathworld.wolfram.com/HarmonicSeries.html
|
||||||
|
|
||||||
|
for information on the harmonic series.
|
||||||
|
|
||||||
|
|
||||||
|
lnbeta(a,b)
|
||||||
|
|
||||||
|
Calculates the natural logarithm of the beta function. See:
|
||||||
|
|
||||||
|
https://en.wikipedia.org/wiki/Beta_function
|
||||||
|
http://mathworld.wolfram.com/BetaFunction.html
|
||||||
|
http://dlmf.nist.gov/5.12
|
||||||
|
|
||||||
|
for information on the beta function.
|
||||||
|
|
||||||
|
lngamma(z)
|
||||||
|
|
||||||
|
Calculates the value of the logarithm of the Euler gamma function
|
||||||
|
at z. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Gamma_function
|
||||||
|
http://dlmf.nist.gov/5.15
|
||||||
|
|
||||||
|
for information on the derivatives of the the Euler gamma function.
|
||||||
|
|
||||||
|
|
||||||
|
polygamma(m,z)
|
||||||
|
|
||||||
|
Calculates the value of the m-th derivative of the Euler gamma
|
||||||
|
function at z. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Polygamma
|
||||||
|
http://dlmf.nist.gov/5
|
||||||
|
|
||||||
|
for information on the n-th derivative ofthe Euler gamma function. This
|
||||||
|
function depends on the script zeta2.cal.
|
||||||
|
|
||||||
|
|
||||||
|
psi(z)
|
||||||
|
|
||||||
|
Calculates the value of the first derivative of the Euler gamma
|
||||||
|
function at z. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Digamma_function
|
||||||
|
http://dlmf.nist.gov/5
|
||||||
|
|
||||||
|
for information on the first derivative of the Euler gamma function.
|
||||||
|
|
||||||
|
|
||||||
|
zeta(s)
|
||||||
|
|
||||||
|
Calculates the value of the Rieman Zeta function at s. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Riemann_zeta_function
|
||||||
|
http://dlmf.nist.gov/25.2
|
||||||
|
|
||||||
|
for information on the Riemann zeta function. This function depends
|
||||||
|
on the script zeta2.cal.
|
||||||
|
|
||||||
|
|
||||||
|
statistics.cal
|
||||||
|
|
||||||
|
gammaincoctave(z,a)
|
||||||
|
|
||||||
|
Computes the regularized incomplete gamma function in a way to
|
||||||
|
correspond with the function in Octave.
|
||||||
|
|
||||||
|
invbetainc(x,a,b)
|
||||||
|
|
||||||
|
Computes the inverse of the regularized beta function. Does so the
|
||||||
|
brute-force way wich makes it a bit slower.
|
||||||
|
|
||||||
|
betapdf(x,a,b)
|
||||||
|
betacdf(x,a,b)
|
||||||
|
betacdfinv(x,a,b)
|
||||||
|
betamedian(a,b)
|
||||||
|
betamode(a,b)
|
||||||
|
betavariance(a,b)
|
||||||
|
betalnvariance(a,b)
|
||||||
|
betaskewness(a,b)
|
||||||
|
betakurtosis(a,b)
|
||||||
|
betaentropy(a,b)
|
||||||
|
normalpdf(x,mu,sigma)
|
||||||
|
normalcdf(x,mu,sigma)
|
||||||
|
probit(p)
|
||||||
|
normalcdfinv(p,mu,sigma)
|
||||||
|
normalmean(mu,sigma)
|
||||||
|
normalmedian(mu,sigma)
|
||||||
|
normalmode(mu,sigma)
|
||||||
|
normalvariance(mu,sigma)
|
||||||
|
normalskewness(mu,sigma)
|
||||||
|
normalkurtosis(mu,sigma)
|
||||||
|
normalentropy(mu,sigma)
|
||||||
|
normalmgf(mu,sigma,t)
|
||||||
|
normalcf(mu,sigma,t)
|
||||||
|
chisquaredpdf(x,k)
|
||||||
|
chisquaredpcdf(x,k)
|
||||||
|
chisquaredmean(x,k)
|
||||||
|
chisquaredmedian(x,k)
|
||||||
|
chisquaredmode(x,k)
|
||||||
|
chisquaredvariance(x,k)
|
||||||
|
chisquaredskewness(x,k)
|
||||||
|
chisquaredkurtosis(x,k)
|
||||||
|
chisquaredentropy(x,k)
|
||||||
|
chisquaredmfg(k,t)
|
||||||
|
chisquaredcf(k,t)
|
||||||
|
|
||||||
|
Calculates a bunch of (hopefully) aptly named statistical functions.
|
||||||
|
|
||||||
|
|
||||||
sumsq.cal
|
sumsq.cal
|
||||||
@@ -751,7 +1295,8 @@ test1700.cal
|
|||||||
|
|
||||||
value
|
value
|
||||||
|
|
||||||
This resource files is used by regress.cal to test the read and use keywords.
|
This resource files is used by regress.cal to test the read and
|
||||||
|
use keywords.
|
||||||
|
|
||||||
|
|
||||||
test2600.cal
|
test2600.cal
|
||||||
@@ -776,8 +1321,8 @@ test2600.cal
|
|||||||
checkresult(x, y, z, a)
|
checkresult(x, y, z, a)
|
||||||
test2600(verbose, tnum)
|
test2600(verbose, tnum)
|
||||||
|
|
||||||
This resource files is used by regress.cal to test some of builtin functions
|
This resource files is used by regress.cal to test some of builtin
|
||||||
in terms of accuracy and roundoff.
|
functions in terms of accuracy and roundoff.
|
||||||
|
|
||||||
|
|
||||||
test2700.cal
|
test2700.cal
|
||||||
@@ -814,7 +1359,8 @@ test3100.cal
|
|||||||
res_inv(a)
|
res_inv(a)
|
||||||
res(x)
|
res(x)
|
||||||
|
|
||||||
This resource file is used by regress.cal to test determinants of a matrix
|
This resource file is used by regress.cal to test determinants of
|
||||||
|
a matrix.
|
||||||
|
|
||||||
|
|
||||||
test3300.cal
|
test3300.cal
|
||||||
@@ -825,8 +1371,9 @@ test3300.cal
|
|||||||
testr(str, n, N, verbose)
|
testr(str, n, N, verbose)
|
||||||
test3300(verbose, tnum)
|
test3300(verbose, tnum)
|
||||||
|
|
||||||
This resource file is used by regress.cal to provide for more determinant
|
This resource file is used by regress.cal to provide for more
|
||||||
tests.
|
determinant tests.
|
||||||
|
|
||||||
|
|
||||||
test3400.cal
|
test3400.cal
|
||||||
|
|
||||||
@@ -857,6 +1404,7 @@ test3500.cal
|
|||||||
This resource file is used by regress.cal to test the functions frem,
|
This resource file is used by regress.cal to test the functions frem,
|
||||||
fcnt, gcdrem.
|
fcnt, gcdrem.
|
||||||
|
|
||||||
|
|
||||||
test4000.cal
|
test4000.cal
|
||||||
|
|
||||||
global defaultverbose
|
global defaultverbose
|
||||||
@@ -889,6 +1437,7 @@ test4000.cal
|
|||||||
This resource file is used by regress.cal to test ptest, nextcand and
|
This resource file is used by regress.cal to test ptest, nextcand and
|
||||||
prevcand builtins.
|
prevcand builtins.
|
||||||
|
|
||||||
|
|
||||||
test4100.cal
|
test4100.cal
|
||||||
|
|
||||||
global defaultverbose
|
global defaultverbose
|
||||||
@@ -908,6 +1457,7 @@ test4100.cal
|
|||||||
|
|
||||||
This resource file is used by regress.cal to test REDC operations.
|
This resource file is used by regress.cal to test REDC operations.
|
||||||
|
|
||||||
|
|
||||||
test4600.cal
|
test4600.cal
|
||||||
|
|
||||||
stest(str [, verbose]) defined
|
stest(str [, verbose]) defined
|
||||||
@@ -919,6 +1469,7 @@ test4600.cal
|
|||||||
|
|
||||||
This resource file is used by regress.cal to test searching in files.
|
This resource file is used by regress.cal to test searching in files.
|
||||||
|
|
||||||
|
|
||||||
test5100.cal
|
test5100.cal
|
||||||
|
|
||||||
global a5100
|
global a5100
|
||||||
@@ -928,6 +1479,7 @@ test5100.cal
|
|||||||
This resource file is used by regress.cal to test the new code generator
|
This resource file is used by regress.cal to test the new code generator
|
||||||
declaration scope and order.
|
declaration scope and order.
|
||||||
|
|
||||||
|
|
||||||
test5200.cal
|
test5200.cal
|
||||||
|
|
||||||
global a5200
|
global a5200
|
||||||
@@ -939,6 +1491,7 @@ test5200.cal
|
|||||||
This resource file is used by regress.cal to test the fix of a
|
This resource file is used by regress.cal to test the fix of a
|
||||||
global/static bug.
|
global/static bug.
|
||||||
|
|
||||||
|
|
||||||
test8400.cal
|
test8400.cal
|
||||||
|
|
||||||
test8400() defined
|
test8400() defined
|
||||||
@@ -946,6 +1499,7 @@ test8400.cal
|
|||||||
This resource file is used by regress.cal to check for quit-based
|
This resource file is used by regress.cal to check for quit-based
|
||||||
memory leaks.
|
memory leaks.
|
||||||
|
|
||||||
|
|
||||||
test8500.cal
|
test8500.cal
|
||||||
|
|
||||||
global err_8500
|
global err_8500
|
||||||
@@ -958,6 +1512,7 @@ test8500.cal
|
|||||||
|
|
||||||
This resource file is used by regress.cal to the // and % operators.
|
This resource file is used by regress.cal to the // and % operators.
|
||||||
|
|
||||||
|
|
||||||
test8600.cal
|
test8600.cal
|
||||||
|
|
||||||
global min_8600
|
global min_8600
|
||||||
@@ -968,6 +1523,25 @@ test8600.cal
|
|||||||
This resource file is used by regress.cal to test a change of
|
This resource file is used by regress.cal to test a change of
|
||||||
allowing up to 1024 args to be passed to a builtin function.
|
allowing up to 1024 args to be passed to a builtin function.
|
||||||
|
|
||||||
|
|
||||||
|
test8900.cal
|
||||||
|
|
||||||
|
This function tests a number of calc resource functions contributed
|
||||||
|
by Christoph Zurnieden. These include:
|
||||||
|
|
||||||
|
bernpoly.cal
|
||||||
|
brentsolve.cal
|
||||||
|
constants.cal
|
||||||
|
factorial2.cal
|
||||||
|
factorial.cal
|
||||||
|
lambertw.cal
|
||||||
|
lnseries.cal
|
||||||
|
specialfunctions.cal
|
||||||
|
statistics.cal
|
||||||
|
toomcook.cal
|
||||||
|
zeta2.cal
|
||||||
|
|
||||||
|
|
||||||
unitfrac.cal
|
unitfrac.cal
|
||||||
|
|
||||||
unitfrac(x)
|
unitfrac(x)
|
||||||
@@ -975,6 +1549,29 @@ unitfrac.cal
|
|||||||
Represent a fraction as sum of distinct unit fractions.
|
Represent a fraction as sum of distinct unit fractions.
|
||||||
|
|
||||||
|
|
||||||
|
toomcook.cal
|
||||||
|
|
||||||
|
|
||||||
|
toomcook3(a,b)
|
||||||
|
toomcook4(a,b)
|
||||||
|
|
||||||
|
Toom-Cook multiplication algorithm. Multiply two integers a,b by
|
||||||
|
way of the Toom-Cook algorithm. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Toom%E2%80%93Cook_multiplication
|
||||||
|
|
||||||
|
toomcook3square(a)
|
||||||
|
toomcook4square(a)
|
||||||
|
|
||||||
|
Square the integer a by way of the Toom-Cook algorithm. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Toom%E2%80%93Cook_multiplication
|
||||||
|
|
||||||
|
The function toomCook4(a,b) calls the function toomCook3(a,b) which
|
||||||
|
calls built-in multiplication at a specific cut-off point. The
|
||||||
|
squaring functions act in the same way.
|
||||||
|
|
||||||
|
|
||||||
varargs.cal
|
varargs.cal
|
||||||
|
|
||||||
sc(a, b, ...)
|
sc(a, b, ...)
|
||||||
@@ -982,6 +1579,7 @@ varargs.cal
|
|||||||
Example program to use 'varargs'. Program to sum the cubes of all
|
Example program to use 'varargs'. Program to sum the cubes of all
|
||||||
the specified numbers.
|
the specified numbers.
|
||||||
|
|
||||||
|
|
||||||
xx_print.cal
|
xx_print.cal
|
||||||
|
|
||||||
is_octet(a) defined
|
is_octet(a) defined
|
||||||
@@ -996,6 +1594,19 @@ xx_print.cal
|
|||||||
|
|
||||||
Demo for the xx_print object routines.
|
Demo for the xx_print object routines.
|
||||||
|
|
||||||
|
|
||||||
|
zeta2.cal
|
||||||
|
|
||||||
|
hurwitzzeta(s,a)
|
||||||
|
|
||||||
|
Calculate the value of the Hurwitz Zeta function. See:
|
||||||
|
|
||||||
|
http://en.wikipedia.org/wiki/Hurwitz_zeta_function
|
||||||
|
http://dlmf.nist.gov/25.11
|
||||||
|
|
||||||
|
for information on this special zeta function.
|
||||||
|
|
||||||
|
|
||||||
## Copyright (C) 2000 David I. Bell and Landon Curt Noll
|
## Copyright (C) 2000 David I. Bell and Landon Curt Noll
|
||||||
##
|
##
|
||||||
## Primary author: Landon Curt Noll
|
## Primary author: Landon Curt Noll
|
||||||
@@ -1014,8 +1625,8 @@ xx_print.cal
|
|||||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
##
|
##
|
||||||
## @(#) $Revision: 30.1 $
|
## @(#) $Revision: 30.5 $
|
||||||
## @(#) $Id: README,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
## @(#) $Id: README,v 30.5 2013/08/11 03:26:46 chongo Exp $
|
||||||
## @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/README,v $
|
## @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/README,v $
|
||||||
##
|
##
|
||||||
## Under source code control: 1990/02/15 01:50:32
|
## Under source code control: 1990/02/15 01:50:32
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: alg_config.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: alg_config.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/alg_config.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/alg_config.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 2006/06/07 14:10:11
|
* Under source code control: 2006/06/07 14:10:11
|
||||||
* File existed as early as: 2006
|
* File existed as early as: 2006
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: beer.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: beer.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/beer.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/beer.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1996/11/13 13:21:05
|
* Under source code control: 1996/11/13 13:21:05
|
||||||
* File existed as early as: 1996
|
* File existed as early as: 1996
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: bernoulli.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: bernoulli.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/bernoulli.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/bernoulli.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1991/09/30 11:18:41
|
* Under source code control: 1991/09/30 11:18:41
|
||||||
* File existed as early as: 1991
|
* File existed as early as: 1991
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: bigprime.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: bigprime.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/bigprime.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/bigprime.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1991/05/22 21:56:32
|
* Under source code control: 1991/05/22 21:56:32
|
||||||
* File existed as early as: 1991
|
* File existed as early as: 1991
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
#
|
#
|
||||||
# @(#) $Revision: 30.1 $
|
# @(#) $Revision: 30.1 $
|
||||||
# @(#) $Id: bindings,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
# @(#) $Id: bindings,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/bindings,v $
|
# @(#) $Source: /usr/local/src/bin/calc/cal/RCS/bindings,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 1993/05/02 20:09:19
|
# Under source code control: 1993/05/02 20:09:19
|
||||||
# File existed as early as: 1993
|
# File existed as early as: 1993
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: chi.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: chi.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/chi.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/chi.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 2001/03/27 14:10:11
|
* Under source code control: 2001/03/27 14:10:11
|
||||||
* File existed as early as: 2001
|
* File existed as early as: 2001
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: chrem.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: chrem.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/chrem.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/chrem.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1992/09/26 01:00:47
|
* Under source code control: 1992/09/26 01:00:47
|
||||||
* File existed as early as: 1992
|
* File existed as early as: 1992
|
||||||
|
40
cal/deg.cal
40
cal/deg.cal
@@ -17,9 +17,9 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.2 $
|
||||||
* @(#) $Id: deg.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: deg.cal,v 30.2 2010/09/02 06:01:14 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/deg.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/deg.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:50:33
|
* Under source code control: 1990/02/15 01:50:33
|
||||||
* File existed as early as: before 1990
|
* File existed as early as: before 1990
|
||||||
@@ -28,9 +28,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
obj dms {deg, min, sec};
|
obj deg {deg, min, sec};
|
||||||
|
|
||||||
define dms(deg, min, sec)
|
define deg(deg, min, sec)
|
||||||
{
|
{
|
||||||
local ans;
|
local ans;
|
||||||
|
|
||||||
@@ -38,18 +38,18 @@ define dms(deg, min, sec)
|
|||||||
sec = 0;
|
sec = 0;
|
||||||
if (isnull(min))
|
if (isnull(min))
|
||||||
min = 0;
|
min = 0;
|
||||||
obj dms ans;
|
obj deg ans;
|
||||||
ans.deg = deg;
|
ans.deg = deg;
|
||||||
ans.min = min;
|
ans.min = min;
|
||||||
ans.sec = sec;
|
ans.sec = sec;
|
||||||
fixdms(ans);
|
fixdeg(ans);
|
||||||
return ans;
|
return ans;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
define dms_add(a, b)
|
define deg_add(a, b)
|
||||||
{
|
{
|
||||||
local obj dms ans;
|
local obj deg ans;
|
||||||
|
|
||||||
ans.deg = 0;
|
ans.deg = 0;
|
||||||
ans.min = 0;
|
ans.min = 0;
|
||||||
@@ -66,14 +66,14 @@ define dms_add(a, b)
|
|||||||
ans.sec += b.sec;
|
ans.sec += b.sec;
|
||||||
} else
|
} else
|
||||||
ans.deg += b;
|
ans.deg += b;
|
||||||
fixdms(ans);
|
fixdeg(ans);
|
||||||
return ans;
|
return ans;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
define dms_neg(a)
|
define deg_neg(a)
|
||||||
{
|
{
|
||||||
local obj dms ans;
|
local obj deg ans;
|
||||||
|
|
||||||
ans.deg = -a.deg;
|
ans.deg = -a.deg;
|
||||||
ans.min = -a.min;
|
ans.min = -a.min;
|
||||||
@@ -82,15 +82,15 @@ define dms_neg(a)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
define dms_sub(a, b)
|
define deg_sub(a, b)
|
||||||
{
|
{
|
||||||
return a - b;
|
return a - b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
define dms_mul(a, b)
|
define deg_mul(a, b)
|
||||||
{
|
{
|
||||||
local obj dms ans;
|
local obj deg ans;
|
||||||
|
|
||||||
if (istype(a, ans) && istype(b, ans))
|
if (istype(a, ans) && istype(b, ans))
|
||||||
quit "Cannot multiply degrees together";
|
quit "Cannot multiply degrees together";
|
||||||
@@ -103,24 +103,24 @@ define dms_mul(a, b)
|
|||||||
ans.min = b.min * a;
|
ans.min = b.min * a;
|
||||||
ans.sec = b.sec * a;
|
ans.sec = b.sec * a;
|
||||||
}
|
}
|
||||||
fixdms(ans);
|
fixdeg(ans);
|
||||||
return ans;
|
return ans;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
define dms_print(a)
|
define deg_print(a)
|
||||||
{
|
{
|
||||||
print a.deg : 'd' : a.min : 'm' : a.sec : 's' :;
|
print a.deg : 'd' : a.min : 'm' : a.sec : 's' :;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
define dms_abs(a)
|
define deg_abs(a)
|
||||||
{
|
{
|
||||||
return a.deg + a.min / 60 + a.sec / 3600;
|
return a.deg + a.min / 60 + a.sec / 3600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
define fixdms(a)
|
define fixdeg(a)
|
||||||
{
|
{
|
||||||
a.min += frac(a.deg) * 60;
|
a.min += frac(a.deg) * 60;
|
||||||
a.deg = int(a.deg);
|
a.deg = int(a.deg);
|
||||||
@@ -134,5 +134,5 @@ define fixdms(a)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (config("resource_debug") & 3) {
|
if (config("resource_debug") & 3) {
|
||||||
print "obj dms {deg, min, sec} defined";
|
print "obj deg {deg, min, sec} defined";
|
||||||
}
|
}
|
||||||
|
384
cal/dms.cal
Normal file
384
cal/dms.cal
Normal file
@@ -0,0 +1,384 @@
|
|||||||
|
/*
|
||||||
|
* dms - calculate in degrees, minutes, and seconds (based on deg)
|
||||||
|
*
|
||||||
|
* Copyright (C) 1999,2010 David I. Bell and 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.
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
* @(#) $Revision: 30.2 $
|
||||||
|
* @(#) $Id: dms.cal,v 30.2 2010/09/02 06:14:16 chongo Exp $
|
||||||
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/dms.cal,v $
|
||||||
|
*
|
||||||
|
* Under source code control: 1990/02/15 01:50:33
|
||||||
|
* File existed as early as: before 1990
|
||||||
|
*
|
||||||
|
* Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
obj dms {deg, min, sec};
|
||||||
|
|
||||||
|
define dms(deg, min, sec)
|
||||||
|
{
|
||||||
|
local obj dms ans; /* return value */
|
||||||
|
|
||||||
|
/* default missing args to 0 */
|
||||||
|
if (isnull(sec)) {
|
||||||
|
sec = 0;
|
||||||
|
}
|
||||||
|
if (isnull(min)) {
|
||||||
|
min = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* load object */
|
||||||
|
ans.deg = deg;
|
||||||
|
ans.min = min;
|
||||||
|
ans.sec = sec;
|
||||||
|
|
||||||
|
/* return properly formed object */
|
||||||
|
ans = fixdms(ans);
|
||||||
|
return ans;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define dms_add(a, b)
|
||||||
|
{
|
||||||
|
local obj dms ans; /* return value */
|
||||||
|
|
||||||
|
/* initalize value to 1st arg */
|
||||||
|
if (istype(a, ans)) {
|
||||||
|
/* 1st arg is dms object, load it */
|
||||||
|
ans.deg = a.deg;
|
||||||
|
ans.min = a.min;
|
||||||
|
ans.sec = a.sec;
|
||||||
|
} else {
|
||||||
|
/* 1st arg is not dms, assume scalar degrees */
|
||||||
|
ans.deg = a;
|
||||||
|
ans.min = 0;
|
||||||
|
ans.sec = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* add value of 2nd arg */
|
||||||
|
if (istype(b, ans)) {
|
||||||
|
/* 2nd arg is dms object, add it */
|
||||||
|
ans.deg += b.deg;
|
||||||
|
ans.min += b.min;
|
||||||
|
ans.sec += b.sec;
|
||||||
|
} else {
|
||||||
|
/* 2nd arg is not dms, add scalar degrees */
|
||||||
|
ans.deg += b;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* return normalized result */
|
||||||
|
ans = fixdms(ans);
|
||||||
|
return ans;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define dms_neg(a)
|
||||||
|
{
|
||||||
|
local obj dms ans; /* return value */
|
||||||
|
|
||||||
|
/* negate argument */
|
||||||
|
if (istype(a, ans)) {
|
||||||
|
/* 1st arg is dms object, load it */
|
||||||
|
ans.deg = -a.deg;
|
||||||
|
ans.min = -a.min;
|
||||||
|
ans.sec = -a.sec;
|
||||||
|
} else {
|
||||||
|
/* 2nd arg is not dms, negate scalar degrees */
|
||||||
|
ans.deg = -a;
|
||||||
|
ans.min = 0;
|
||||||
|
ans.sec = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* return normalized result */
|
||||||
|
ans = fixdms(ans);
|
||||||
|
return ans;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define dms_sub(a, b)
|
||||||
|
{
|
||||||
|
local obj dms ans; /* return value */
|
||||||
|
|
||||||
|
/* initalize value to 1st arg */
|
||||||
|
if (istype(a, ans)) {
|
||||||
|
/* 1st arg is dms object, load it */
|
||||||
|
ans.deg = a.deg;
|
||||||
|
ans.min = a.min;
|
||||||
|
ans.sec = a.sec;
|
||||||
|
} else {
|
||||||
|
/* 1st arg is not dms, assume scalar degrees */
|
||||||
|
ans.deg = a;
|
||||||
|
ans.min = 0;
|
||||||
|
ans.sec = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* subtract value of 2nd arg */
|
||||||
|
if (istype(b, ans)) {
|
||||||
|
/* 2nd arg is dms object, subtract it */
|
||||||
|
ans.deg -= b.deg;
|
||||||
|
ans.min -= b.min;
|
||||||
|
ans.sec -= b.sec;
|
||||||
|
} else {
|
||||||
|
/* 2nd arg is not dms, subtract scalar degrees */
|
||||||
|
ans.deg -= b;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* return normalized result */
|
||||||
|
ans = fixdms(ans);
|
||||||
|
return ans;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define dms_mul(a, b)
|
||||||
|
{
|
||||||
|
local obj dms ans; /* return value */
|
||||||
|
|
||||||
|
/* dms object multiplication */
|
||||||
|
if (istype(a, ans) && istype(b, ans)) {
|
||||||
|
ans.deg = dms_abs(a) * dms_abs(b);
|
||||||
|
ans.min = 0;
|
||||||
|
ans.sec = 0;
|
||||||
|
|
||||||
|
/* scalar multiplication */
|
||||||
|
} else if (istype(a, ans)) {
|
||||||
|
ans.deg = a.deg * b;
|
||||||
|
ans.min = a.min * b;
|
||||||
|
ans.sec = a.sec * b;
|
||||||
|
} else {
|
||||||
|
ans.deg = b.deg * a;
|
||||||
|
ans.min = b.min * a;
|
||||||
|
ans.sec = b.sec * a;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* return normalized result */
|
||||||
|
ans = fixdms(ans);
|
||||||
|
return ans;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define dms_print(a)
|
||||||
|
{
|
||||||
|
local obj dms ans; /* temp object for dms type testing */
|
||||||
|
|
||||||
|
/* firewall - arg must be a dms object */
|
||||||
|
if (! istype(a, ans)) {
|
||||||
|
quit "dms_print called with non dms object";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* print in dms form */
|
||||||
|
print a.deg : 'd' : a.min : 'm' : a.sec : 's' :;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define dms_abs(a)
|
||||||
|
{
|
||||||
|
local obj dms ans; /* temp object for dms type testing */
|
||||||
|
local deg; /* return scalar value */
|
||||||
|
|
||||||
|
/* firewall - just absolute value non dms objects */
|
||||||
|
if (! istype(a, ans)) {
|
||||||
|
return abs(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* compute degrees */
|
||||||
|
deg = a.deg + a.min / 60 + a.sec / 3600;
|
||||||
|
|
||||||
|
/* return degrees */
|
||||||
|
return deg;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define dms_norm(a)
|
||||||
|
{
|
||||||
|
local obj dms ans; /* temp object for dms type testing */
|
||||||
|
local deg; /* degrees */
|
||||||
|
|
||||||
|
/* firewall - arg must be a dms object */
|
||||||
|
if (! istype(a, ans)) {
|
||||||
|
quit "dms_norm called with non dms object";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* square degrees (norm is the square of absolute value */
|
||||||
|
deg = dms_abs(a);
|
||||||
|
|
||||||
|
/* return degrees */
|
||||||
|
return deg*deg;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define dms_test(a)
|
||||||
|
{
|
||||||
|
local obj dms ans; /* temp value */
|
||||||
|
|
||||||
|
/* firewall - arg must be a dms object */
|
||||||
|
if (! istype(a, ans)) {
|
||||||
|
quit "dms_test called with non dms object";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* return false of non-zero */
|
||||||
|
ans = fixdms(a);
|
||||||
|
if (ans.deg == 0 && ans.min == 0 && ans.sec == 0) {
|
||||||
|
/* false */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
/* true */
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define dms_int(a)
|
||||||
|
{
|
||||||
|
local obj dms ans; /* return value */
|
||||||
|
|
||||||
|
/* firewall - arg must be a dms object */
|
||||||
|
if (! istype(a, ans)) {
|
||||||
|
quit "dms_int called with non dms object";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* normalize the argument */
|
||||||
|
ans = fixdms(a);
|
||||||
|
|
||||||
|
/* truncate to the nearest second */
|
||||||
|
ans.sec = int(ans.sec);
|
||||||
|
|
||||||
|
/* return value to the nearest second */
|
||||||
|
return ans;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define dms_frac(a)
|
||||||
|
{
|
||||||
|
local obj dms ans; /* return value */
|
||||||
|
|
||||||
|
/* firewall - arg must be a dms object */
|
||||||
|
if (! istype(a, ans)) {
|
||||||
|
quit "dms_frac called with non dms object";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* normalize the argument */
|
||||||
|
ans = fixdms(a);
|
||||||
|
|
||||||
|
/* remove all but fractional seconds */
|
||||||
|
ans.deg = 0;
|
||||||
|
ans.min = 0;
|
||||||
|
ans.sec = frac(ans.sec);
|
||||||
|
|
||||||
|
/* return value to the second fraction */
|
||||||
|
return ans;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define dms_rel(a,b)
|
||||||
|
{
|
||||||
|
local abs_a, abs_b; /* scalars of the arguments */
|
||||||
|
|
||||||
|
/* compute scalars of the arguments */
|
||||||
|
abs_a = dms_abs(a);
|
||||||
|
abs_b = dms_abs(b);
|
||||||
|
|
||||||
|
/* return the comparison */
|
||||||
|
return cmp(abs_a, abs_b);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define dms_cmp(a,b)
|
||||||
|
{
|
||||||
|
local abs_a, abs_b; /* scalars of the arguments */
|
||||||
|
|
||||||
|
/* compute scalars of the arguments */
|
||||||
|
abs_a = dms_abs(a);
|
||||||
|
abs_b = dms_abs(b);
|
||||||
|
|
||||||
|
/* return the equality comparison */
|
||||||
|
return (abs_a == abs_b);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define dms_inc(a)
|
||||||
|
{
|
||||||
|
local obj dms ans; /* return value */
|
||||||
|
|
||||||
|
/* increment a dms object */
|
||||||
|
if (istype(a, ans)) {
|
||||||
|
ans = a;
|
||||||
|
++ans.sec;
|
||||||
|
|
||||||
|
/* return normalized result */
|
||||||
|
ans = fixdms(ans);
|
||||||
|
return ans;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* increment a scalar */
|
||||||
|
return a+1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define dms_dec(a)
|
||||||
|
{
|
||||||
|
local obj dms ans; /* return value */
|
||||||
|
|
||||||
|
/* decrement a dms object */
|
||||||
|
if (istype(a, ans)) {
|
||||||
|
ans = a;
|
||||||
|
--ans.sec;
|
||||||
|
|
||||||
|
/* return normalized result */
|
||||||
|
ans = fixdms(ans);
|
||||||
|
return ans;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* decrement a scalar */
|
||||||
|
return a-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define fixdms(a)
|
||||||
|
{
|
||||||
|
local obj dms ans; /* temp value */
|
||||||
|
|
||||||
|
/* firewall */
|
||||||
|
if (! istype(a, ans)) {
|
||||||
|
quit "attempt to fix a non dms object";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* force minutes to be intergral */
|
||||||
|
a.min += frac(a.deg) * 60;
|
||||||
|
a.deg = int(a.deg);
|
||||||
|
|
||||||
|
/* force degrees to be intergral */
|
||||||
|
a.sec += frac(a.min) * 60;
|
||||||
|
a.min = int(a.min);
|
||||||
|
|
||||||
|
/* carry excess seconds into minutes */
|
||||||
|
a.min += a.sec // 60;
|
||||||
|
a.sec %= 60;
|
||||||
|
|
||||||
|
/* carry excess minutes into degrees */
|
||||||
|
a.deg += a.min // 60;
|
||||||
|
a.min %= 60;
|
||||||
|
|
||||||
|
/* round degrees :-) */
|
||||||
|
a.deg %= 360;
|
||||||
|
|
||||||
|
/* return normalized result */
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config("resource_debug") & 3) {
|
||||||
|
print "obj dms {deg, min, sec} defined";
|
||||||
|
}
|
@@ -18,7 +18,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.2 $
|
* @(#) $Revision: 30.2 $
|
||||||
* @(#) $Id: dotest.cal,v 30.2 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: dotest.cal,v 30.2 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/dotest.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/dotest.cal,v $
|
||||||
*
|
*
|
||||||
* This file is not covered under version 2.1 of the GNU LGPL.
|
* This file is not covered under version 2.1 of the GNU LGPL.
|
||||||
*
|
*
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: ellip.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: ellip.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/ellip.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/ellip.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:50:33
|
* Under source code control: 1990/02/15 01:50:33
|
||||||
* File existed as early as: before 1990
|
* File existed as early as: before 1990
|
||||||
|
107
cal/gvec.cal
Normal file
107
cal/gvec.cal
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
/*
|
||||||
|
* gvec - vectorize any single-input function or trailing operator
|
||||||
|
*
|
||||||
|
* This version accepts arbitrary number of arguments, but of course
|
||||||
|
* they must all be same length vectors.
|
||||||
|
*
|
||||||
|
* The gvec function is for use in either a two-arg function or a two-arg
|
||||||
|
* operation "function" must be first; calc doesn't care how many more
|
||||||
|
* arguments there actually are.
|
||||||
|
*
|
||||||
|
* @(#) $Revision: 30.3 $
|
||||||
|
* @(#) $Id: gvec.cal,v 30.3 2011/05/23 23:00:55 chongo Exp $
|
||||||
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/gvec.cal,v $
|
||||||
|
*
|
||||||
|
* Under source code control: 2011/03/31 17:54:55
|
||||||
|
* File existed as early as: 2010
|
||||||
|
*
|
||||||
|
* By Carl Witthoft carl at witthoft dot com
|
||||||
|
*/
|
||||||
|
|
||||||
|
define gvec(function, vector)
|
||||||
|
{
|
||||||
|
local xlen,y,foo;
|
||||||
|
local precx = 1e-50; /* default for now */
|
||||||
|
local argc = param(0)-1;
|
||||||
|
local old_tilde; /* previous config("tilde") */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* parse args
|
||||||
|
*/
|
||||||
|
local plist = mat[argc];
|
||||||
|
if (config("resource_debug") & 8) {
|
||||||
|
print "plist=", plist;
|
||||||
|
print "argc=", argc;
|
||||||
|
}
|
||||||
|
for(local i = 0; i< argc; i++) {
|
||||||
|
local ii = i + 2;
|
||||||
|
if (config("resource_debug") & 8) {
|
||||||
|
print "ii=", ii;
|
||||||
|
print "param(" : ii : "}=", param(ii);
|
||||||
|
print "size(param(" : ii : ")=", size(param(ii));
|
||||||
|
}
|
||||||
|
plist[i] = size(param(ii));
|
||||||
|
}
|
||||||
|
local slist=sort(plist);
|
||||||
|
if (config("resource_debug") & 8) {
|
||||||
|
print "plist=", plist;
|
||||||
|
}
|
||||||
|
local argm = argc-1;
|
||||||
|
if (config("resource_debug") & 8) {
|
||||||
|
print "argm=", argm;
|
||||||
|
}
|
||||||
|
if (slist[0] != slist[argm]) {
|
||||||
|
quit "lengths don't match";
|
||||||
|
}
|
||||||
|
xlen = size(vector);
|
||||||
|
y = mat[xlen];
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We can't do str(vector[j]) outside loop, eval() petulantly refuses to
|
||||||
|
* look at local variables.
|
||||||
|
*
|
||||||
|
* Also we need to config("tilde",0) to turn off lead tilde
|
||||||
|
* (so str(vector[j]) looks like a number.
|
||||||
|
*/
|
||||||
|
old_tilde = config("tilde",0);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Ok, now check to see if "function" is a function. If not, it's an
|
||||||
|
* operation and it's up to user to make it valid
|
||||||
|
*/
|
||||||
|
if (isdefined(function)) {
|
||||||
|
|
||||||
|
/* yep, it's a function, either builtin or user-defined */
|
||||||
|
for (local j=0; j<xlen; j++) {
|
||||||
|
|
||||||
|
/* build the function call */
|
||||||
|
foo = strcat(function, "(");
|
||||||
|
for (local jj = 0; jj<argc; jj++) {
|
||||||
|
foo = strcat(foo , str(param(jj+2)[j]), ",");
|
||||||
|
}
|
||||||
|
foo = strcat(foo, str(precx), ")");
|
||||||
|
if (config("resource_debug") & 8) {
|
||||||
|
print "foo=", foo;
|
||||||
|
}
|
||||||
|
y[j] = eval(foo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* it is an operator -- multi-argument operator makes no sense
|
||||||
|
*/
|
||||||
|
} else {
|
||||||
|
if (argc > 1) {
|
||||||
|
quit "Error: operator can accept only one argument";
|
||||||
|
}
|
||||||
|
for (j=0; j<xlen; j++) {
|
||||||
|
foo = strcat(str(vector[j]), function);
|
||||||
|
y[j] = eval(foo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* restore tilde mode if needed */
|
||||||
|
config("tilde", old_tilde);
|
||||||
|
|
||||||
|
/* return result */
|
||||||
|
return y;
|
||||||
|
}
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: hello.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: hello.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/hello.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/hello.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1996/11/13 13:25:43
|
* Under source code control: 1996/11/13 13:25:43
|
||||||
* File existed as early as: 1996
|
* File existed as early as: 1996
|
||||||
|
384
cal/hms.cal
Normal file
384
cal/hms.cal
Normal file
@@ -0,0 +1,384 @@
|
|||||||
|
/*
|
||||||
|
* hms - calculate in hours, minutes, and seconds
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010 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.
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
* @(#) $Revision: 30.2 $
|
||||||
|
* @(#) $Id: hms.cal,v 30.2 2010/09/02 06:14:16 chongo Exp $
|
||||||
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/hms.cal,v $
|
||||||
|
*
|
||||||
|
* Under source code control: 2010/09/01 17:14:55
|
||||||
|
* File existed as early as: 2010
|
||||||
|
*
|
||||||
|
* Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
obj hms {hour, min, sec};
|
||||||
|
|
||||||
|
define hms(hour, min, sec)
|
||||||
|
{
|
||||||
|
local obj hms ans; /* return value */
|
||||||
|
|
||||||
|
/* default missing args to 0 */
|
||||||
|
if (isnull(sec)) {
|
||||||
|
sec = 0;
|
||||||
|
}
|
||||||
|
if (isnull(min)) {
|
||||||
|
min = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* load object */
|
||||||
|
ans.hour = hour;
|
||||||
|
ans.min = min;
|
||||||
|
ans.sec = sec;
|
||||||
|
|
||||||
|
/* return properly formed object */
|
||||||
|
ans = fixhms(ans);
|
||||||
|
return ans;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define hms_add(a, b)
|
||||||
|
{
|
||||||
|
local obj hms ans; /* return value */
|
||||||
|
|
||||||
|
/* initalize value to 1st arg */
|
||||||
|
if (istype(a, ans)) {
|
||||||
|
/* 1st arg is hms object, load it */
|
||||||
|
ans.hour = a.hour;
|
||||||
|
ans.min = a.min;
|
||||||
|
ans.sec = a.sec;
|
||||||
|
} else {
|
||||||
|
/* 1st arg is not hms, assume scalar hours */
|
||||||
|
ans.hour = a;
|
||||||
|
ans.min = 0;
|
||||||
|
ans.sec = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* add value of 2nd arg */
|
||||||
|
if (istype(b, ans)) {
|
||||||
|
/* 2nd arg is hms object, add it */
|
||||||
|
ans.hour += b.hour;
|
||||||
|
ans.min += b.min;
|
||||||
|
ans.sec += b.sec;
|
||||||
|
} else {
|
||||||
|
/* 2nd arg is not hms, add scalar hours */
|
||||||
|
ans.hour += b;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* return normalized result */
|
||||||
|
ans = fixhms(ans);
|
||||||
|
return ans;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define hms_neg(a)
|
||||||
|
{
|
||||||
|
local obj hms ans; /* return value */
|
||||||
|
|
||||||
|
/* negate argument */
|
||||||
|
if (istype(a, ans)) {
|
||||||
|
/* 1st arg is hms object, load it */
|
||||||
|
ans.hour = -a.hour;
|
||||||
|
ans.min = -a.min;
|
||||||
|
ans.sec = -a.sec;
|
||||||
|
} else {
|
||||||
|
/* 2nd arg is not hms, negate scalar hours */
|
||||||
|
ans.hour = -a;
|
||||||
|
ans.min = 0;
|
||||||
|
ans.sec = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* return normalized result */
|
||||||
|
ans = fixhms(ans);
|
||||||
|
return ans;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define hms_sub(a, b)
|
||||||
|
{
|
||||||
|
local obj hms ans; /* return value */
|
||||||
|
|
||||||
|
/* initalize value to 1st arg */
|
||||||
|
if (istype(a, ans)) {
|
||||||
|
/* 1st arg is hms object, load it */
|
||||||
|
ans.hour = a.hour;
|
||||||
|
ans.min = a.min;
|
||||||
|
ans.sec = a.sec;
|
||||||
|
} else {
|
||||||
|
/* 1st arg is not hms, assume scalar hours */
|
||||||
|
ans.hour = a;
|
||||||
|
ans.min = 0;
|
||||||
|
ans.sec = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* subtract value of 2nd arg */
|
||||||
|
if (istype(b, ans)) {
|
||||||
|
/* 2nd arg is hms object, subtract it */
|
||||||
|
ans.hour -= b.hour;
|
||||||
|
ans.min -= b.min;
|
||||||
|
ans.sec -= b.sec;
|
||||||
|
} else {
|
||||||
|
/* 2nd arg is not hms, subtract scalar hours */
|
||||||
|
ans.hour -= b;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* return normalized result */
|
||||||
|
ans = fixhms(ans);
|
||||||
|
return ans;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define hms_mul(a, b)
|
||||||
|
{
|
||||||
|
local obj hms ans; /* return value */
|
||||||
|
|
||||||
|
/* hms object multiplication */
|
||||||
|
if (istype(a, ans) && istype(b, ans)) {
|
||||||
|
ans.hour = hms_abs(a) * hms_abs(b);
|
||||||
|
ans.min = 0;
|
||||||
|
ans.sec = 0;
|
||||||
|
|
||||||
|
/* scalar multiplication */
|
||||||
|
} else if (istype(a, ans)) {
|
||||||
|
ans.hour = a.hour * b;
|
||||||
|
ans.min = a.min * b;
|
||||||
|
ans.sec = a.sec * b;
|
||||||
|
} else {
|
||||||
|
ans.hour = b.hour * a;
|
||||||
|
ans.min = b.min * a;
|
||||||
|
ans.sec = b.sec * a;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* return normalized result */
|
||||||
|
ans = fixhms(ans);
|
||||||
|
return ans;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define hms_print(a)
|
||||||
|
{
|
||||||
|
local obj hms ans; /* temp object for hms type testing */
|
||||||
|
|
||||||
|
/* firewall - arg must be a hms object */
|
||||||
|
if (! istype(a, ans)) {
|
||||||
|
quit "hms_print called with non hms object";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* print in hms form */
|
||||||
|
print a.hour : ':' : a.min : ':' : a.sec :;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define hms_abs(a)
|
||||||
|
{
|
||||||
|
local obj hms ans; /* temp object for hms type testing */
|
||||||
|
local hour; /* return scalar value */
|
||||||
|
|
||||||
|
/* firewall - just absolute value non hms objects */
|
||||||
|
if (! istype(a, ans)) {
|
||||||
|
return abs(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* compute hours */
|
||||||
|
hour = a.hour + a.min / 60 + a.sec / 3600;
|
||||||
|
|
||||||
|
/* return hours */
|
||||||
|
return hour;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define hms_norm(a)
|
||||||
|
{
|
||||||
|
local obj hms ans; /* temp object for hms type testing */
|
||||||
|
local hour; /* hours */
|
||||||
|
|
||||||
|
/* firewall - arg must be a hms object */
|
||||||
|
if (! istype(a, ans)) {
|
||||||
|
quit "hms_norm called with non hms object";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* square hours (norm is the square of absolute value */
|
||||||
|
hour = hms_abs(a);
|
||||||
|
|
||||||
|
/* return hours */
|
||||||
|
return hour*hour;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define hms_test(a)
|
||||||
|
{
|
||||||
|
local obj hms ans; /* temp value */
|
||||||
|
|
||||||
|
/* firewall - arg must be a hms object */
|
||||||
|
if (! istype(a, ans)) {
|
||||||
|
quit "hms_test called with non hms object";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* return false of non-zero */
|
||||||
|
ans = fixhms(a);
|
||||||
|
if (ans.hour == 0 && ans.min == 0 && ans.sec == 0) {
|
||||||
|
/* false */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
/* true */
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define hms_int(a)
|
||||||
|
{
|
||||||
|
local obj hms ans; /* return value */
|
||||||
|
|
||||||
|
/* firewall - arg must be a hms object */
|
||||||
|
if (! istype(a, ans)) {
|
||||||
|
quit "hms_int called with non hms object";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* normalize the argument */
|
||||||
|
ans = fixhms(a);
|
||||||
|
|
||||||
|
/* truncate to the nearest second */
|
||||||
|
ans.sec = int(ans.sec);
|
||||||
|
|
||||||
|
/* return value to the nearest second */
|
||||||
|
return ans;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define hms_frac(a)
|
||||||
|
{
|
||||||
|
local obj hms ans; /* return value */
|
||||||
|
|
||||||
|
/* firewall - arg must be a hms object */
|
||||||
|
if (! istype(a, ans)) {
|
||||||
|
quit "hms_frac called with non hms object";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* normalize the argument */
|
||||||
|
ans = fixhms(a);
|
||||||
|
|
||||||
|
/* remove all but fractional seconds */
|
||||||
|
ans.hour = 0;
|
||||||
|
ans.min = 0;
|
||||||
|
ans.sec = frac(ans.sec);
|
||||||
|
|
||||||
|
/* return value to the second fraction */
|
||||||
|
return ans;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define hms_rel(a,b)
|
||||||
|
{
|
||||||
|
local abs_a, abs_b; /* scalars of the arguments */
|
||||||
|
|
||||||
|
/* compute scalars of the arguments */
|
||||||
|
abs_a = hms_abs(a);
|
||||||
|
abs_b = hms_abs(b);
|
||||||
|
|
||||||
|
/* return the comparison */
|
||||||
|
return cmp(abs_a, abs_b);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define hms_cmp(a,b)
|
||||||
|
{
|
||||||
|
local abs_a, abs_b; /* scalars of the arguments */
|
||||||
|
|
||||||
|
/* compute scalars of the arguments */
|
||||||
|
abs_a = hms_abs(a);
|
||||||
|
abs_b = hms_abs(b);
|
||||||
|
|
||||||
|
/* return the equality comparison */
|
||||||
|
return (abs_a == abs_b);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define hms_inc(a)
|
||||||
|
{
|
||||||
|
local obj hms ans; /* return value */
|
||||||
|
|
||||||
|
/* increment a hms object */
|
||||||
|
if (istype(a, ans)) {
|
||||||
|
ans = a;
|
||||||
|
++ans.sec;
|
||||||
|
|
||||||
|
/* return normalized result */
|
||||||
|
ans = fixhms(ans);
|
||||||
|
return ans;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* increment a scalar */
|
||||||
|
return a+1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define hms_dec(a)
|
||||||
|
{
|
||||||
|
local obj hms ans; /* return value */
|
||||||
|
|
||||||
|
/* decrement a hms object */
|
||||||
|
if (istype(a, ans)) {
|
||||||
|
ans = a;
|
||||||
|
--ans.sec;
|
||||||
|
|
||||||
|
/* return normalized result */
|
||||||
|
ans = fixhms(ans);
|
||||||
|
return ans;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* decrement a scalar */
|
||||||
|
return a-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define fixhms(a)
|
||||||
|
{
|
||||||
|
local obj hms ans; /* temp value */
|
||||||
|
|
||||||
|
/* firewall */
|
||||||
|
if (! istype(a, ans)) {
|
||||||
|
quit "attempt to fix a non hms object";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* force minutes to be intergral */
|
||||||
|
a.min += frac(a.hour) * 60;
|
||||||
|
a.hour = int(a.hour);
|
||||||
|
|
||||||
|
/* force hours to be intergral */
|
||||||
|
a.sec += frac(a.min) * 60;
|
||||||
|
a.min = int(a.min);
|
||||||
|
|
||||||
|
/* carry excess seconds into minutes */
|
||||||
|
a.min += a.sec // 60;
|
||||||
|
a.sec %= 60;
|
||||||
|
|
||||||
|
/* carry excess minutes into hours */
|
||||||
|
a.hour += a.min // 60;
|
||||||
|
a.min %= 60;
|
||||||
|
|
||||||
|
/* round hours by day */
|
||||||
|
a.hour %= 24;
|
||||||
|
|
||||||
|
/* return normalized result */
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config("resource_debug") & 3) {
|
||||||
|
print "obj hms {hour, min, sec} defined";
|
||||||
|
}
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: intfile.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: intfile.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/intfile.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/intfile.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 2001/03/31 08:13:11
|
* Under source code control: 2001/03/31 08:13:11
|
||||||
* File existed as early as: 2001
|
* File existed as early as: 2001
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.2 $
|
* @(#) $Revision: 30.2 $
|
||||||
* @(#) $Id: linear.cal,v 30.2 2007/03/17 05:57:42 chongo Exp $
|
* @(#) $Id: linear.cal,v 30.2 2007/03/17 05:57:42 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/linear.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/linear.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 2005/12/12 06:41:50
|
* Under source code control: 2005/12/12 06:41:50
|
||||||
* File existed as early as: 2005
|
* File existed as early as: 2005
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: lucas.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: lucas.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/lucas.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/lucas.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/05/03 16:49:51
|
* Under source code control: 1990/05/03 16:49:51
|
||||||
* File existed as early as: 1990
|
* File existed as early as: 1990
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: lucas_chk.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: lucas_chk.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/lucas_chk.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/lucas_chk.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1991/01/11 05:41:43
|
* Under source code control: 1991/01/11 05:41:43
|
||||||
* File existed as early as: 1991
|
* File existed as early as: 1991
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: lucas_tbl.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: lucas_tbl.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/lucas_tbl.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/lucas_tbl.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1991/01/26 02:43:43
|
* Under source code control: 1991/01/26 02:43:43
|
||||||
* File existed as early as: 1991
|
* File existed as early as: 1991
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: mersenne.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: mersenne.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/mersenne.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/mersenne.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1991/05/22 21:56:36
|
* Under source code control: 1991/05/22 21:56:36
|
||||||
* File existed as early as: 1991
|
* File existed as early as: 1991
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: mfactor.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: mfactor.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/mfactor.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/mfactor.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1996/07/06 06:09:40
|
* Under source code control: 1996/07/06 06:09:40
|
||||||
* File existed as early as: 1996
|
* File existed as early as: 1996
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: mod.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: mod.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/mod.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/mod.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:50:34
|
* Under source code control: 1990/02/15 01:50:34
|
||||||
* File existed as early as: before 1990
|
* File existed as early as: before 1990
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: natnumset.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: natnumset.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/natnumset.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/natnumset.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1997/09/07 23:53:51
|
* Under source code control: 1997/09/07 23:53:51
|
||||||
* File existed as early as: 1997
|
* File existed as early as: 1997
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: pell.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: pell.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/pell.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/pell.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:50:34
|
* Under source code control: 1990/02/15 01:50:34
|
||||||
* File existed as early as: before 1990
|
* File existed as early as: before 1990
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: pi.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: pi.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/pi.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/pi.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1991/05/22 21:56:37
|
* Under source code control: 1991/05/22 21:56:37
|
||||||
* File existed as early as: 1991
|
* File existed as early as: 1991
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: pix.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: pix.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/pix.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/pix.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1996/07/09 03:14:14
|
* Under source code control: 1996/07/09 03:14:14
|
||||||
* File existed as early as: 1996
|
* File existed as early as: 1996
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: pollard.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: pollard.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/pollard.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/pollard.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1991/05/22 21:56:37
|
* Under source code control: 1991/05/22 21:56:37
|
||||||
* File existed as early as: 1991
|
* File existed as early as: 1991
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: poly.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: poly.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/poly.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/poly.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:50:35
|
* Under source code control: 1990/02/15 01:50:35
|
||||||
* File existed as early as: before 1990
|
* File existed as early as: before 1990
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: prompt.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: prompt.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/prompt.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/prompt.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1995/12/18 04:43:25
|
* Under source code control: 1995/12/18 04:43:25
|
||||||
* File existed as early as: 1995
|
* File existed as early as: 1995
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: psqrt.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: psqrt.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/psqrt.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/psqrt.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:50:35
|
* Under source code control: 1990/02/15 01:50:35
|
||||||
* File existed as early as: before 1990
|
* File existed as early as: before 1990
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: qtime.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: qtime.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/qtime.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/qtime.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1999/10/13 04:10:33
|
* Under source code control: 1999/10/13 04:10:33
|
||||||
* File existed as early as: 1999
|
* File existed as early as: 1999
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: quat.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: quat.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/quat.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/quat.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:50:35
|
* Under source code control: 1990/02/15 01:50:35
|
||||||
* File existed as early as: before 1990
|
* File existed as early as: before 1990
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: randbitrun.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: randbitrun.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/randbitrun.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/randbitrun.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1995/02/13 03:43:11
|
* Under source code control: 1995/02/13 03:43:11
|
||||||
* File existed as early as: 1995
|
* File existed as early as: 1995
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: randmprime.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: randmprime.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/randmprime.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/randmprime.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1994/03/14 23:11:21
|
* Under source code control: 1994/03/14 23:11:21
|
||||||
* File existed as early as: 1994
|
* File existed as early as: 1994
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: randombitrun.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: randombitrun.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/randombitrun.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/randombitrun.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1995/02/13 03:43:11
|
* Under source code control: 1995/02/13 03:43:11
|
||||||
* File existed as early as: 1995
|
* File existed as early as: 1995
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: randomrun.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: randomrun.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/randomrun.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/randomrun.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1997/02/19 03:35:59
|
* Under source code control: 1997/02/19 03:35:59
|
||||||
* File existed as early as: 1997
|
* File existed as early as: 1997
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: randrun.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: randrun.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/randrun.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/randrun.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1995/02/12 20:00:06
|
* Under source code control: 1995/02/12 20:00:06
|
||||||
* File existed as early as: 1995
|
* File existed as early as: 1995
|
||||||
|
@@ -17,9 +17,9 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 30.5 $
|
* @(#) $Revision: 30.7 $
|
||||||
* @(#) $Id: regress.cal,v 30.5 2008/10/24 07:09:41 chongo Exp $
|
* @(#) $Id: regress.cal,v 30.7 2013/08/11 02:57:22 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/regress.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/regress.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:50:36
|
* Under source code control: 1990/02/15 01:50:36
|
||||||
* File existed as early as: before 1990
|
* File existed as early as: before 1990
|
||||||
@@ -7914,6 +7914,19 @@ return test_exponentiation();
|
|||||||
/* 88xx: test exponentiation */
|
/* 88xx: test exponentiation */
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* calc resource functions by Christoph Zurnieden
|
||||||
|
*/
|
||||||
|
print;
|
||||||
|
print '8900: Starting test of calc resource functions by Christoph Zurnieden';
|
||||||
|
print '8901: read -once "test8900"';
|
||||||
|
read -once "test8900";
|
||||||
|
print '8902: about to run test8900(1,,8903)';
|
||||||
|
testnum = test8900(1,,8903);
|
||||||
|
print testnum: ": End of test of calc resource functions by Christoph Zurnieden";
|
||||||
|
/* 89xx: test calc resource functions by Christoph Zurnieden */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* read various calc resource files
|
* read various calc resource files
|
||||||
*
|
*
|
||||||
@@ -8012,7 +8025,11 @@ print '9838: skipping read -once hello.cal because it is an infinite loop';
|
|||||||
print '9839: skipping read -once xx_print.cal because it is a printing demo';
|
print '9839: skipping read -once xx_print.cal because it is a printing demo';
|
||||||
read -once sumtimes;
|
read -once sumtimes;
|
||||||
print '9840: read -once sumtimes';
|
print '9840: read -once sumtimes';
|
||||||
print '9841: Ending read of selected calc resource files';
|
read -once dms;
|
||||||
|
print '9841: read -once dms';
|
||||||
|
read -once hms;
|
||||||
|
print '9842: read -once hms';
|
||||||
|
print '9843: Ending read of selected calc resource files';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: repeat.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: repeat.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/repeat.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/repeat.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 2003/01/05 00:00:01
|
* Under source code control: 2003/01/05 00:00:01
|
||||||
* File existed as early as: 2003
|
* File existed as early as: 2003
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.2 $
|
* @(#) $Revision: 30.2 $
|
||||||
* @(#) $Id: screen.cal,v 30.2 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: screen.cal,v 30.2 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/screen.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/screen.cal,v $
|
||||||
*
|
*
|
||||||
* This file is not covered under version 2.1 of the GNU LGPL.
|
* This file is not covered under version 2.1 of the GNU LGPL.
|
||||||
*
|
*
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: seedrandom.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: seedrandom.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/seedrandom.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/seedrandom.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1996/01/01 08:21:00
|
* Under source code control: 1996/01/01 08:21:00
|
||||||
* File existed as early as: 1996
|
* File existed as early as: 1996
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: set8700.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: set8700.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/set8700.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/set8700.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 2006/05/20 14:10:11
|
* Under source code control: 2006/05/20 14:10:11
|
||||||
* File existed as early as: 2006
|
* File existed as early as: 2006
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
##
|
##
|
||||||
## @(#) $Revision: 30.1 $
|
## @(#) $Revision: 30.1 $
|
||||||
## @(#) $Id: set8700.line,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
## @(#) $Id: set8700.line,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
## @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/set8700.line,v $
|
## @(#) $Source: /usr/local/src/bin/calc/cal/RCS/set8700.line,v $
|
||||||
##
|
##
|
||||||
## Under source code control: 2006/05/20 14:10:11
|
## Under source code control: 2006/05/20 14:10:11
|
||||||
## File existed as early as: 2006
|
## File existed as early as: 2006
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.2 $
|
* @(#) $Revision: 30.2 $
|
||||||
* @(#) $Id: solve.cal,v 30.2 2008/05/10 13:30:00 chongo Exp $
|
* @(#) $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 $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/solve.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:50:37
|
* Under source code control: 1990/02/15 01:50:37
|
||||||
* File existed as early as: before 1990
|
* File existed as early as: before 1990
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: sumsq.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: sumsq.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/sumsq.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/sumsq.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:50:37
|
* Under source code control: 1990/02/15 01:50:37
|
||||||
* File existed as early as: before 1990
|
* File existed as early as: before 1990
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: sumtimes.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: sumtimes.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/sumtimes.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/sumtimes.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 2006/06/22 17:29
|
* Under source code control: 2006/06/22 17:29
|
||||||
* File existed as early as: 2006
|
* File existed as early as: 2006
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: surd.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: surd.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/surd.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/surd.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:50:38
|
* Under source code control: 1990/02/15 01:50:38
|
||||||
* File existed as early as: before 1990
|
* File existed as early as: before 1990
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: test1700.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: test1700.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test1700.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/test1700.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1994/03/14 23:12:51
|
* Under source code control: 1994/03/14 23:12:51
|
||||||
* File existed as early as: 1994
|
* File existed as early as: 1994
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: test2300.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: test2300.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test2300.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/test2300.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1995/07/09 06:12:13
|
* Under source code control: 1995/07/09 06:12:13
|
||||||
* File existed as early as: 1995
|
* File existed as early as: 1995
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.2 $
|
* @(#) $Revision: 30.2 $
|
||||||
* @(#) $Id: test2600.cal,v 30.2 2007/07/11 22:57:23 chongo Exp $
|
* @(#) $Id: test2600.cal,v 30.2 2007/07/11 22:57:23 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test2600.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/test2600.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1995/10/13 00:13:14
|
* Under source code control: 1995/10/13 00:13:14
|
||||||
* File existed as early as: 1995
|
* File existed as early as: 1995
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: test2700.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: test2700.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test2700.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/test2700.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1995/11/01 22:52:25
|
* Under source code control: 1995/11/01 22:52:25
|
||||||
* File existed as early as: 1995
|
* File existed as early as: 1995
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: test3100.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: test3100.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test3100.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/test3100.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1995/11/28 11:56:57
|
* Under source code control: 1995/11/28 11:56:57
|
||||||
* File existed as early as: 1995
|
* File existed as early as: 1995
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: test3300.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: test3300.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test3300.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/test3300.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1995/12/02 04:27:41
|
* Under source code control: 1995/12/02 04:27:41
|
||||||
* File existed as early as: 1995
|
* File existed as early as: 1995
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: test3400.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: test3400.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test3400.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/test3400.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1995/12/02 05:20:11
|
* Under source code control: 1995/12/02 05:20:11
|
||||||
* File existed as early as: 1995
|
* File existed as early as: 1995
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: test3500.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: test3500.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test3500.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/test3500.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1995/12/18 22:50:46
|
* Under source code control: 1995/12/18 22:50:46
|
||||||
* File existed as early as: 1995
|
* File existed as early as: 1995
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: test4000.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: test4000.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test4000.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/test4000.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1996/03/13 02:38:45
|
* Under source code control: 1996/03/13 02:38:45
|
||||||
* File existed as early as: 1996
|
* File existed as early as: 1996
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: test4100.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: test4100.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test4100.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/test4100.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1996/03/13 03:53:22
|
* Under source code control: 1996/03/13 03:53:22
|
||||||
* File existed as early as: 1996
|
* File existed as early as: 1996
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: test4600.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: test4600.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test4600.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/test4600.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1996/07/02 20:04:40
|
* Under source code control: 1996/07/02 20:04:40
|
||||||
* File existed as early as: 1996
|
* File existed as early as: 1996
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: test5100.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: test5100.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test5100.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/test5100.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1996/12/02 23:57:10
|
* Under source code control: 1996/12/02 23:57:10
|
||||||
* File existed as early as: 1996
|
* File existed as early as: 1996
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: test5200.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: test5200.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test5200.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/test5200.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1997/02/07 02:48:10
|
* Under source code control: 1997/02/07 02:48:10
|
||||||
* File existed as early as: 1997
|
* File existed as early as: 1997
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: test8400.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: test8400.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test8400.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/test8400.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1999/10/31 01:00:03
|
* Under source code control: 1999/10/31 01:00:03
|
||||||
* File existed as early as: 1999
|
* File existed as early as: 1999
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: test8500.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: test8500.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test8500.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/test8500.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1999/11/12 20:59:59
|
* Under source code control: 1999/11/12 20:59:59
|
||||||
* File existed as early as: 1999
|
* File existed as early as: 1999
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: test8600.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: test8600.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test8600.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/test8600.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 2000/12/04 19:57:02
|
* Under source code control: 2000/12/04 19:57:02
|
||||||
* File existed as early as: 2000
|
* File existed as early as: 2000
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: unitfrac.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: unitfrac.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/unitfrac.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/unitfrac.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:50:38
|
* Under source code control: 1990/02/15 01:50:38
|
||||||
* File existed as early as: before 1990
|
* File existed as early as: before 1990
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: varargs.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: varargs.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/varargs.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/varargs.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1991/05/22 21:56:34
|
* Under source code control: 1991/05/22 21:56:34
|
||||||
* File existed as early as: 1991
|
* File existed as early as: 1991
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: xx_print.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
* @(#) $Id: xx_print.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/xx_print.cal,v $
|
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/xx_print.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1997/04/17 00:08:50
|
* Under source code control: 1997/04/17 00:08:50
|
||||||
* File existed as early as: 1997
|
* File existed as early as: 1997
|
||||||
|
11
calc.c
11
calc.c
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* calc - arbitrary precision calculator
|
* calc - arbitrary precision calculator
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999-2007 David I. Bell, Landon Curt Noll and Ernest Bowen
|
* Copyright (C) 1999-2013 David I. Bell, Landon Curt Noll and Ernest Bowen
|
||||||
*
|
*
|
||||||
* Primary author: David I. Bell
|
* Primary author: David I. Bell
|
||||||
*
|
*
|
||||||
@@ -19,9 +19,9 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 30.4 $
|
* @(#) $Revision: 30.6 $
|
||||||
* @(#) $Id: calc.c,v 30.4 2008/04/15 21:17:57 chongo Exp $
|
* @(#) $Id: calc.c,v 30.6 2013/03/25 21:39:57 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/calc.c,v $
|
* @(#) $Source: /usr/local/src/bin/calc/RCS/calc.c,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:48:11
|
* Under source code control: 1990/02/15 01:48:11
|
||||||
* File existed as early as: before 1990
|
* File existed as early as: before 1990
|
||||||
@@ -487,6 +487,9 @@ main(int argc, char **argv)
|
|||||||
if (havecommands) {
|
if (havecommands) {
|
||||||
cmdbuf[cmdlen++] = '\n';
|
cmdbuf[cmdlen++] = '\n';
|
||||||
cmdbuf[cmdlen] = '\0';
|
cmdbuf[cmdlen] = '\0';
|
||||||
|
if (fclose(stdin)) {
|
||||||
|
perror("main(): fclose(stdin) failed:");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
argc_value = argc - maxindex;
|
argc_value = argc - maxindex;
|
||||||
|
2
calc.h
2
calc.h
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.2 $
|
* @(#) $Revision: 30.2 $
|
||||||
* @(#) $Id: calc.h,v 30.2 2007/07/10 17:44:52 chongo Exp $
|
* @(#) $Id: calc.h,v 30.2 2007/07/10 17:44:52 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/calc.h,v $
|
* @(#) $Source: /usr/local/src/bin/calc/RCS/calc.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:48:31
|
* Under source code control: 1990/02/15 01:48:31
|
||||||
* File existed as early as: before 1990
|
* File existed as early as: before 1990
|
||||||
|
6
calc.man
6
calc.man
@@ -15,8 +15,8 @@
|
|||||||
.\" received a copy with calc; if not, write to Free Software Foundation, Inc.
|
.\" received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
.\"
|
.\"
|
||||||
.\" @(#) $Revision: 30.3 $
|
.\" @(#) $Revision: 30.4 $
|
||||||
.\" @(#) $Id: calc.man,v 30.3 2007/09/08 02:53:09 chongo Exp $
|
.\" @(#) $Id: calc.man,v 30.4 2013/08/11 01:09:56 chongo Exp $
|
||||||
.\" @(#) $Source: /usr/local/src/cmd/calc/RCS/calc.man,v $
|
.\" @(#) $Source: /usr/local/src/cmd/calc/RCS/calc.man,v $
|
||||||
.\"
|
.\"
|
||||||
.\" Under source code control: 1991/07/23 05:48:26
|
.\" Under source code control: 1991/07/23 05:48:26
|
||||||
@@ -1196,7 +1196,7 @@ for more information about bug reporting.
|
|||||||
.SH "CALC WEB SITE"
|
.SH "CALC WEB SITE"
|
||||||
\&
|
\&
|
||||||
.br
|
.br
|
||||||
Landon Noll maintains the the
|
Landon Noll maintains the
|
||||||
.B calc
|
.B calc
|
||||||
web site is located at:
|
web site is located at:
|
||||||
.sp
|
.sp
|
||||||
|
79
calc.spec.in
79
calc.spec.in
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# calc.spec.in - template specfile for calc
|
# calc.spec.in - template specfile for calc
|
||||||
#
|
#
|
||||||
# Copyright (C) 2003-2007 Petteri Kettunen and Landon Curt Noll
|
# Copyright (C) 2003-2013 Petteri Kettunen and Landon Curt Noll
|
||||||
#
|
#
|
||||||
# Calc is open software; you can redistribute it and/or modify it under
|
# 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
|
# the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
@@ -18,9 +18,9 @@
|
|||||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#
|
#
|
||||||
# @(#) $Revision: 30.6 $
|
# @(#) $Revision: 30.10 $
|
||||||
# @(#) $Id: calc.spec.in,v 30.6 2007/10/16 12:22:22 chongo Exp $
|
# @(#) $Id: calc.spec.in,v 30.10 2013/05/05 11:57:44 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/RCS/calc.spec.in,v $
|
# @(#) $Source: /usr/local/src/bin/calc/RCS/calc.spec.in,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 2003/02/16 20:21:39
|
# Under source code control: 2003/02/16 20:21:39
|
||||||
# File existed as early as: 2003
|
# File existed as early as: 2003
|
||||||
@@ -37,14 +37,16 @@
|
|||||||
Summary: Arbitrary precision calculator.
|
Summary: Arbitrary precision calculator.
|
||||||
Name: calc
|
Name: calc
|
||||||
Version: <<<PROJECT_VERSION>>>
|
Version: <<<PROJECT_VERSION>>>
|
||||||
Release: 1.1
|
Release: 10
|
||||||
License: LGPL
|
License: LGPL
|
||||||
Group: Applications/Engineering
|
Group: Applications/Engineering
|
||||||
Source: %{name}-%{version}.tar.bz2
|
Source: http://www.isthe.com/chongo/src/calc/%{name}-%{version}.tar.bz2
|
||||||
URL: http://www.isthe.com/chongo/tech/comp/calc/index.html
|
URL: http://www.isthe.com/chongo/tech/comp/calc/index.html
|
||||||
Requires: ncurses >= 5.2-26, readline >= 4.2, less >= 358
|
Vendor: Landon Noll and Associates
|
||||||
BuildRequires: ncurses-devel >= 5.2-26, readline-devel >= 4.2
|
Packager: Landon Noll and Associates (http://www.isthe.com/chongo/index.html)
|
||||||
BuildRoot: %{_tmppath}/%{name}-root
|
Requires: ncurses >= 5.5-24, readline >= 5.1-3, less >= 358
|
||||||
|
BuildRequires: ncurses-devel >= 5.5-24, readline-devel >= 5.1-3
|
||||||
|
BuildRoot: %{_tmppath}/build-root
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Calc is arbitrary precision C-like arithmetic system that is a
|
Calc is arbitrary precision C-like arithmetic system that is a
|
||||||
@@ -58,8 +60,8 @@ For the latest calc release, see the calc project home page:
|
|||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files and documentation for calc.
|
Summary: Development files and documentation for calc.
|
||||||
Group: Development/Libraries
|
Group: Applications/Engineering
|
||||||
PreReq: %{name} = %{version}-%{release}
|
Requires: calc = %{version}-%{release}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
This package contains the header files and static libraries for developing
|
This package contains the header files and static libraries for developing
|
||||||
@@ -70,46 +72,46 @@ For the latest calc release, see the project home page:
|
|||||||
http://www.isthe.com/chongo/tech/comp/calc/index.html
|
http://www.isthe.com/chongo/tech/comp/calc/index.html
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -T -b 0
|
||||||
|
|
||||||
%build
|
%build
|
||||||
echo '-=- calc.spec beginning make clobber -=-'
|
echo '-=- calc.spec beginning make clobber -=-'
|
||||||
make %{?_smp_mflags} T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ clobber
|
make %{?_smp_mflags} T=%{_buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ clobber
|
||||||
echo '-=- calc.spec ending make clobber -=-'
|
echo '-=- calc.spec ending make clobber -=-'
|
||||||
echo '-=- calc.spec beginning make calc-static-only -=-'
|
echo '-=- calc.spec beginning make calc-static-only -=-'
|
||||||
make %{?_smp_mflags} T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ calc-static-only BLD_TYPE=calc-static-only
|
make %{?_smp_mflags} T=%{_buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ calc-static-only BLD_TYPE=calc-static-only
|
||||||
echo '-=- calc.spec ending make calc-static-only -=-'
|
echo '-=- calc.spec ending make calc-static-only -=-'
|
||||||
echo '-=- calc.spec beginning make rpm-hide-static -=-'
|
echo '-=- calc.spec beginning make rpm-hide-static -=-'
|
||||||
make %{?_smp_mflags} T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ rpm-hide-static
|
make %{?_smp_mflags} T=%{_buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ rpm-hide-static
|
||||||
echo '-=- calc.spec ending make rpm-hide-static -=-'
|
echo '-=- calc.spec ending make rpm-hide-static -=-'
|
||||||
echo '-=- calc.spec beginning make clobber (again) -=-'
|
echo '-=- calc.spec beginning make clobber (again) -=-'
|
||||||
make %{?_smp_mflags} T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ clobber
|
make %{?_smp_mflags} T=%{_buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ clobber
|
||||||
echo '-=- calc.spec ending make clobber (again) -=-'
|
echo '-=- calc.spec ending make clobber (again) -=-'
|
||||||
echo '-=- calc.spec beginning make calc-dynamic-only -=-'
|
echo '-=- calc.spec beginning make calc-dynamic-only -=-'
|
||||||
make %{?_smp_mflags} T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ calc-dynamic-only BLD_TYPE=calc-dynamic-only LD_SHARE=
|
make %{?_smp_mflags} T=%{_buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ calc-dynamic-only BLD_TYPE=calc-dynamic-only LD_SHARE=
|
||||||
echo '-=- calc.spec ending make calc-dynamic-only -=-'
|
echo '-=- calc.spec ending make calc-dynamic-only -=-'
|
||||||
echo '-=- calc.spec beginning make chk -=-'
|
echo '-=- calc.spec beginning make chk -=-'
|
||||||
make %{?_smp_mflags} T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ chk
|
make %{?_smp_mflags} T=%{_buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ chk
|
||||||
echo '-=- calc.spec ending make chk -=-'
|
echo '-=- calc.spec ending make chk -=-'
|
||||||
echo '-=- calc.spec beginning make rpm-unhide-static -=-'
|
echo '-=- calc.spec beginning make rpm-unhide-static -=-'
|
||||||
make %{?_smp_mflags} T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ rpm-unhide-static
|
make %{?_smp_mflags} T=%{_buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ rpm-unhide-static
|
||||||
echo '-=- calc.spec ending make rpm-unhide-static -=-'
|
echo '-=- calc.spec ending make rpm-unhide-static -=-'
|
||||||
echo '-=- calc.spec beginning make rpm-clean-static -=-'
|
echo '-=- calc.spec beginning make rpm-clean-static -=-'
|
||||||
make %{?_smp_mflags} T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ rpm-clean-static
|
make %{?_smp_mflags} T=%{_buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ rpm-clean-static
|
||||||
echo '-=- calc.spec ending make rpm-clean-static -=-'
|
echo '-=- calc.spec ending make rpm-clean-static -=-'
|
||||||
echo '-=- calc.spec beginning make rpm-chk-static -=-'
|
echo '-=- calc.spec beginning make rpm-chk-static -=-'
|
||||||
make %{?_smp_mflags} T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ rpm-chk-static
|
make %{?_smp_mflags} T=%{_buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ rpm-chk-static
|
||||||
echo '-=- calc.spec ending make rpm-chk-static -=-'
|
echo '-=- calc.spec ending make rpm-chk-static -=-'
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
|
||||||
mkdir -p %{buildroot}
|
|
||||||
echo '-=- calc.spec beginning make install -=-'
|
echo '-=- calc.spec beginning make install -=-'
|
||||||
make T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ install
|
rm -rf %{_buildroot}
|
||||||
|
mkdir -p %{_buildroot}
|
||||||
|
make T=%{_buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ install
|
||||||
echo '-=- calc.spec ending make install -=-'
|
echo '-=- calc.spec ending make install -=-'
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{_buildroot}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
@@ -124,8 +126,10 @@ rm -rf %{buildroot}
|
|||||||
%attr(644, root, root) %{_datadir}/%{name}/help/*
|
%attr(644, root, root) %{_datadir}/%{name}/help/*
|
||||||
%attr(644, root, root) %{_datadir}/%{name}/*.cal
|
%attr(644, root, root) %{_datadir}/%{name}/*.cal
|
||||||
%attr(644, root, root) %{_datadir}/%{name}/*.line
|
%attr(644, root, root) %{_datadir}/%{name}/*.line
|
||||||
%attr(644, root, root) %{_libdir}/libcalc.so.%{version}
|
%attr(644, root, root) %{_libdir}/libcalc.so
|
||||||
%attr(644, root, root) %{_libdir}/libcustcalc.so.%{version}
|
%attr(644, root, root) %{_libdir}/libcalc.so.*
|
||||||
|
%attr(644, root, root) %{_libdir}/libcustcalc.so
|
||||||
|
%attr(644, root, root) %{_libdir}/libcustcalc.so.*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
@@ -136,28 +140,49 @@ rm -rf %{buildroot}
|
|||||||
%attr(644, root, root) %{_libdir}/libcustcalc.a
|
%attr(644, root, root) %{_libdir}/libcustcalc.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat May 05 2013 Landon Curt Noll http://www.isthe.com/chongo
|
||||||
|
- Release: 10
|
||||||
|
- Major bug rpm build process bug fix
|
||||||
|
- Source: is a URL as per rpm requirements
|
||||||
|
- Requires: ncurses >= 5.5-24, readline >= 5.1-3, less >= 358
|
||||||
|
- BuildRequires: ncurses-devel >= 5.5-24, readline-devel >= 5.1-3
|
||||||
|
- BuildRoot: %{_tmppath}/build-root
|
||||||
|
- Fixed use of %{_buildroot}
|
||||||
|
- Fixed permissions so that rpm build services can modify libraries
|
||||||
|
- Added missing files to files section
|
||||||
|
* Mon Mar 25 2013 Landon Curt Noll http://www.isthe.com/chongo
|
||||||
|
- Release: 9 (was 1.1)
|
||||||
|
- Removed deprecated PreReq for calc-devel, using Requires
|
||||||
* Sun Sep 01 2007 Landon Curt Noll http://www.isthe.com/chongo
|
* Sun Sep 01 2007 Landon Curt Noll http://www.isthe.com/chongo
|
||||||
|
- Release: 8
|
||||||
- Release of calc-2.12.2
|
- Release of calc-2.12.2
|
||||||
- Calc builds with shared libraries
|
- Calc builds with shared libraries
|
||||||
* Sun Jun 25 2006 Landon Curt Noll http://www.isthe.com/chongo
|
* Sun Jun 25 2006 Landon Curt Noll http://www.isthe.com/chongo
|
||||||
|
- Release: 7
|
||||||
- Changed Copyright to License as per new rpm v4.4 syntax
|
- Changed Copyright to License as per new rpm v4.4 syntax
|
||||||
* Sun May 20 2006 Landon Curt Noll http://www.isthe.com/chongo
|
* Sun May 20 2006 Landon Curt Noll http://www.isthe.com/chongo
|
||||||
|
- Release: 6
|
||||||
- Release of calc-2.12.0
|
- Release of calc-2.12.0
|
||||||
- Added *.line set files to the list of packaged files
|
- Added *.line set files to the list of packaged files
|
||||||
* Sun Dec 11 2005 Landon Curt Noll http://www.isthe.com/chongo
|
* Sun Dec 11 2005 Landon Curt Noll http://www.isthe.com/chongo
|
||||||
|
- Release: 5
|
||||||
- Release of calc-2.11.11
|
- Release of calc-2.11.11
|
||||||
- Fixed description in spec file
|
- Fixed description in spec file
|
||||||
* Wed Feb 26 2003 Landon Curt Noll http://www.isthe.com/chongo
|
* Wed Feb 26 2003 Landon Curt Noll http://www.isthe.com/chongo
|
||||||
|
- Release: 4
|
||||||
- Release of calc-2.11.7-2
|
- Release of calc-2.11.7-2
|
||||||
- Fixed attributes on include and lib calc-devel files
|
- Fixed attributes on include and lib calc-devel files
|
||||||
- Added BUGS to calc-devel as well as calc
|
- Added BUGS to calc-devel as well as calc
|
||||||
* Tue Feb 25 2003 Landon Curt Noll http://www.isthe.com/chongo
|
* Tue Feb 25 2003 Landon Curt Noll http://www.isthe.com/chongo
|
||||||
|
- Release: 3
|
||||||
- Release of calc-2.11.7-1
|
- Release of calc-2.11.7-1
|
||||||
- Require ncurses, readline and less to install.
|
- Require ncurses, readline and less to install.
|
||||||
- Require ncurses-devel and readline-devel to build.
|
- Require ncurses-devel and readline-devel to build.
|
||||||
* Tue Feb 18 2003 Landon Curt Noll http://www.isthe.com/chongo
|
* Tue Feb 18 2003 Landon Curt Noll http://www.isthe.com/chongo
|
||||||
|
- Release: 2
|
||||||
- Misc changes to fit local directory setup
|
- Misc changes to fit local directory setup
|
||||||
* Sun Feb 16 2003 Petteri Kettunen <petterik@users.sourceforge.net>
|
* Sun Feb 16 2003 Petteri Kettunen <petterik@users.sourceforge.net>
|
||||||
|
- Release: 1
|
||||||
- initial RPM build
|
- initial RPM build
|
||||||
|
|
||||||
#****
|
#****
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
#
|
#
|
||||||
# @(#) $Revision: 30.1 $
|
# @(#) $Revision: 30.1 $
|
||||||
# @(#) $Id: calcerr.tbl,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
# @(#) $Id: calcerr.tbl,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/RCS/calcerr.tbl,v $
|
# @(#) $Source: /usr/local/src/bin/calc/RCS/calcerr.tbl,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 1996/05/23 17:38:44
|
# Under source code control: 1996/05/23 17:38:44
|
||||||
# File existed as early as: 1996
|
# File existed as early as: 1996
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#
|
#
|
||||||
# @(#) $Revision: 30.1 $
|
# @(#) $Revision: 30.1 $
|
||||||
# @(#) $Id: calcerr_c.awk,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
# @(#) $Id: calcerr_c.awk,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/RCS/calcerr_c.awk,v $
|
# @(#) $Source: /usr/local/src/bin/calc/RCS/calcerr_c.awk,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 1996/05/24 03:15:35
|
# Under source code control: 1996/05/24 03:15:35
|
||||||
# File existed as early as: 1996
|
# File existed as early as: 1996
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#
|
#
|
||||||
# @(#) $Revision: 30.1 $
|
# @(#) $Revision: 30.1 $
|
||||||
# @(#) $Id: calcerr_c.sed,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
# @(#) $Id: calcerr_c.sed,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/RCS/calcerr_c.sed,v $
|
# @(#) $Source: /usr/local/src/bin/calc/RCS/calcerr_c.sed,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 1996/05/24 03:15:35
|
# Under source code control: 1996/05/24 03:15:35
|
||||||
# File existed as early as: 1996
|
# File existed as early as: 1996
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#
|
#
|
||||||
# @(#) $Revision: 30.1 $
|
# @(#) $Revision: 30.1 $
|
||||||
# @(#) $Id: calcerr_h.awk,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
# @(#) $Id: calcerr_h.awk,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/RCS/calcerr_h.awk,v $
|
# @(#) $Source: /usr/local/src/bin/calc/RCS/calcerr_h.awk,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 1996/05/23 17:38:44
|
# Under source code control: 1996/05/23 17:38:44
|
||||||
# File existed as early as: 1996
|
# File existed as early as: 1996
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#
|
#
|
||||||
# @(#) $Revision: 30.1 $
|
# @(#) $Revision: 30.1 $
|
||||||
# @(#) $Id: calcerr_h.sed,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
# @(#) $Id: calcerr_h.sed,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/RCS/calcerr_h.sed,v $
|
# @(#) $Source: /usr/local/src/bin/calc/RCS/calcerr_h.sed,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 1996/05/23 17:38:44
|
# Under source code control: 1996/05/23 17:38:44
|
||||||
# File existed as early as: 1996
|
# File existed as early as: 1996
|
||||||
|
@@ -18,8 +18,8 @@
|
|||||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#
|
#
|
||||||
# @(#) $Revision: 30.1 $
|
# @(#) $Revision: 30.2 $
|
||||||
# @(#) $Id: check.awk,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
# @(#) $Id: check.awk,v 30.2 2013/08/11 01:08:32 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/RCS/check.awk,v $
|
# @(#) $Source: /usr/local/src/cmd/calc/RCS/check.awk,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 1996/05/25 22:07:58
|
# Under source code control: 1996/05/25 22:07:58
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
#
|
#
|
||||||
# This awk script will print 3 lines before and after any non-blank line that
|
# This awk script will print 3 lines before and after any non-blank line that
|
||||||
# does not begin with a number. This allows the 'make debug' rule to remove
|
# does not begin with a number. This allows the 'make debug' rule to remove
|
||||||
# all non-interest lines the the 'make check' regression output while providing
|
# all non-interest lines the 'make check' regression output while providing
|
||||||
# 3 lines of context around unexpected output.
|
# 3 lines of context around unexpected output.
|
||||||
#
|
#
|
||||||
BEGIN {
|
BEGIN {
|
||||||
|
2
cmath.h
2
cmath.h
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* @(#) $Revision: 30.1 $
|
* @(#) $Revision: 30.1 $
|
||||||
* @(#) $Id: cmath.h,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
* @(#) $Id: cmath.h,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/cmath.h,v $
|
* @(#) $Source: /usr/local/src/bin/calc/RCS/cmath.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1993/07/30 19:42:45
|
* Under source code control: 1993/07/30 19:42:45
|
||||||
* File existed as early as: 1993
|
* File existed as early as: 1993
|
||||||
|
@@ -19,8 +19,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 30.2 $
|
* @(#) $Revision: 30.3 $
|
||||||
* @(#) $Id: codegen.c,v 30.2 2007/07/05 13:30:38 chongo Exp $
|
* @(#) $Id: codegen.c,v 30.3 2013/07/12 22:41:33 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/codegen.c,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/codegen.c,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:48:13
|
* Under source code control: 1990/02/15 01:48:13
|
||||||
@@ -2605,7 +2605,7 @@ definesymbol(char *name, int symtype)
|
|||||||
break;
|
break;
|
||||||
case SYM_GLOBAL:
|
case SYM_GLOBAL:
|
||||||
if (symtype == SYM_GLOBAL && conf->redecl_warn) {
|
if (symtype == SYM_GLOBAL && conf->redecl_warn) {
|
||||||
warning("redeclaraion of global \"%s\"",
|
warning("redeclaration of global \"%s\"",
|
||||||
name);
|
name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2613,7 +2613,7 @@ definesymbol(char *name, int symtype)
|
|||||||
|
|
||||||
case SYM_LOCAL:
|
case SYM_LOCAL:
|
||||||
if (symtype == SYM_LOCAL && conf->redecl_warn) {
|
if (symtype == SYM_LOCAL && conf->redecl_warn) {
|
||||||
warning("redeclaraion of local \"%s\"",
|
warning("redeclaration of local \"%s\"",
|
||||||
name);
|
name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user