mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
cc2f6f7b85 | ||
|
57a22a6f39 | ||
|
85bfa30897 |
109
CHANGES
109
CHANGES
@@ -1,4 +1,84 @@
|
||||
The following are the changes from calc version 2.12.4.6 to date:
|
||||
The following are the changes from calc version 2.12.4.11 to date:
|
||||
|
||||
Fixed many typos in comments of the Makefile thanks to the review
|
||||
work of Michael Somos.
|
||||
|
||||
Fixed typo in "help sysinfo".
|
||||
|
||||
The Makefile rule, debug, is now more verbose and prints more information
|
||||
about the calc compiled constants.
|
||||
|
||||
Added a more of calc resource files by
|
||||
Christoph Zurnieden <czurnieden at gmx dot de> including:
|
||||
|
||||
infinities.cal - handle infinities symbolically, a little helper file
|
||||
intnum.cal - implementation of tanh sinh and Gauss-Legendre quadrature
|
||||
smallfactors.cal - find the factors of a number < 2^32
|
||||
strings.cal - implementation of isascii() and isblank()
|
||||
|
||||
Reformatted some calc resource files. Cleanup in comment the headers
|
||||
of some calc resource files.
|
||||
|
||||
Minor formatting changes to a few help files.
|
||||
|
||||
No need to be special picky about the test8900.cal calc resource file.
|
||||
|
||||
Added a number of ctype-like builtins:
|
||||
|
||||
isalnum - whether character is alpha-numeric
|
||||
isalpha - whether character is alphabetic
|
||||
iscntrl - whether character is a control character
|
||||
isdigit - whether character is a digit character
|
||||
isgraph - whether character is a graphical character
|
||||
islower - whether character is lower case
|
||||
isprint - whether character is a printable
|
||||
ispunct - whether character is a punctuation
|
||||
isspace - whether character is a space character
|
||||
isupper - whether character is upper case
|
||||
isxdigit - whether character a hexadecimal digit
|
||||
strcasecmp - compare two strings, case independent
|
||||
strncasecmp - compare two strings up to n characters, case independent
|
||||
strtolower - transform an ASCII string to lower case
|
||||
strtoupper - transform an ASCII string to upper case
|
||||
|
||||
For details on these new builtins, see their help messages.
|
||||
Thanks goes to Inge Zurnieden <inge dot zurnieden at gmx dot de> for
|
||||
these new builtins.
|
||||
|
||||
Calc source code is now picky v2.3 clean using:
|
||||
|
||||
picky -s -v file file2 ..
|
||||
|
||||
With the exception of:
|
||||
|
||||
help/errorcodes.sed
|
||||
cal/set8700.line
|
||||
|
||||
Due to the long lines in those files, we use:
|
||||
|
||||
picky -w -s -v help/errorcodes.sed cal/set8700.line
|
||||
|
||||
For more information about the picky tool, see:
|
||||
|
||||
http://cis.csuohio.edu/~somos/picky.html
|
||||
|
||||
Removed functions from strings.cal that have been replaced by
|
||||
the new ctype-like builtin functions.
|
||||
|
||||
Fixed cal/Makefile to include missing intnum.cal file.
|
||||
|
||||
Added detail_help_list make target to cal/Makefile.
|
||||
|
||||
The detaillist make target in help/Makefile is now
|
||||
called detail_help_list.
|
||||
|
||||
Removed requirement of gen_u0(h, n, v1) in lucas.cal that h
|
||||
be odd. While still lucas(h, n) converts even h into an odd h
|
||||
internally by incrementing n, gen_u0(h, n, v1) will output even
|
||||
when h is even.
|
||||
|
||||
|
||||
The following are the changes from calc version 2.12.4.6 to version 2.12.4.10:
|
||||
|
||||
Updated RPM build process to remove use of deprecated flags.
|
||||
|
||||
@@ -20,16 +100,16 @@ The following are the changes from calc version 2.12.4.6 to date:
|
||||
Added a number of calc resource files 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
|
||||
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
|
||||
|
||||
Fixed a makefile bug that prevented the those new calc resource
|
||||
files from being installed.
|
||||
@@ -1216,8 +1296,7 @@ The following are the changes from calc version 2.11.10 to 2.11.10:
|
||||
The following are the changes from calc version 2.11.9 to 2.11.9.3:
|
||||
|
||||
Fixed calc man page examples to move -f to the end of the line.
|
||||
Thanks goes to Michael Somos <somos at grail dot cba dot csuohio
|
||||
dot edu> for pointing this out.
|
||||
Thanks goes to Michael Somos for pointing this out.
|
||||
|
||||
Linux and gcc now compiled with -Wall -W -Wno-comment.
|
||||
|
||||
@@ -6881,8 +6960,8 @@ Following is a list of visible changes to calc from version 1.24.7 to 1.26.1:
|
||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
##
|
||||
## @(#) $Revision: 30.32 $
|
||||
## @(#) $Id: CHANGES,v 30.32 2013/08/11 09:10:11 chongo Exp $
|
||||
## @(#) $Revision: 30.38 $
|
||||
## @(#) $Id: CHANGES,v 30.38 2013/09/27 08:59:43 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/RCS/CHANGES,v $
|
||||
##
|
||||
## Under source code control: 1993/06/02 18:12:57
|
||||
|
17
COPYING
17
COPYING
@@ -12,11 +12,11 @@ This file is Copyrighted
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
# @(#) $Revision: 30.2 $
|
||||
# @(#) $Id: COPYING,v 30.2 2008/10/24 10:46:52 chongo Exp $
|
||||
# @(#) $Revision: 30.4 $
|
||||
# @(#) $Id: COPYING,v 30.4 2013/09/01 20:14:30 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/bin/calc/RCS/COPYING,v $
|
||||
|
||||
=-=
|
||||
-=-
|
||||
|
||||
Calc is covered by the GNU Lesser General Public License
|
||||
--------------------------------------------------------
|
||||
@@ -78,7 +78,7 @@ Calc is covered by the GNU Lesser General Public License
|
||||
|
||||
Feel free to follow the name line with additional EMail text as desired.
|
||||
|
||||
=-=
|
||||
-=-
|
||||
|
||||
Calc bug reports and calc bug fixes should be sent to:
|
||||
|
||||
@@ -93,7 +93,7 @@ Calc is covered by the GNU Lesser General Public License
|
||||
|
||||
You may have additional words in your subject line.
|
||||
|
||||
=-=
|
||||
-=-
|
||||
|
||||
Calc's relationship to the GNU Lesser General Public License
|
||||
------------------------------------------------------------
|
||||
@@ -149,7 +149,7 @@ Calc's relationship to the GNU Lesser General Public License
|
||||
except for the exception files explicitly listed in the ``Calc
|
||||
copyrights and exception files'' section below.
|
||||
|
||||
=-=
|
||||
-=-
|
||||
|
||||
Calc copyrights and exception files
|
||||
-----------------------------------
|
||||
@@ -165,6 +165,7 @@ Calc copyrights and exception files
|
||||
Copyright (C) year Ernest Bowen and Landon Curt Noll
|
||||
Copyright (C) year Ernest Bowen
|
||||
Copyright (C) year Petteri Kettunen and Landon Curt Noll
|
||||
Copyright (C) year Christoph Zurnieden
|
||||
|
||||
These files are not covered under one of the Copyrights listed above:
|
||||
|
||||
@@ -188,7 +189,7 @@ Calc copyrights and exception files
|
||||
And because one may freely distribute the LGPL covered files, the
|
||||
entire calc source may be freely used and distributed.
|
||||
|
||||
=-=
|
||||
-=-
|
||||
|
||||
General Copyleft and License info
|
||||
---------------------------------
|
||||
@@ -202,7 +203,7 @@ General Copyleft and License info
|
||||
http://www.gnu.org/copyleft/lesser.html
|
||||
http://www.gnu.org/copyleft/lesser.txt
|
||||
|
||||
=-=
|
||||
-=-
|
||||
|
||||
Why calc did not use the GNU General Public License
|
||||
---------------------------------------------------
|
||||
|
@@ -485,7 +485,8 @@ 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
|
||||
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.
|
||||
|
||||
|
242
Makefile
242
Makefile
@@ -4,7 +4,7 @@
|
||||
#
|
||||
########################################################################
|
||||
# Gnu makefile: # This is a Gnu make makefile. If your make does not #
|
||||
# Gnu makefile: # understand this makefilkke format, then edit and use #
|
||||
# Gnu makefile: # understand this makefile format, then edit and use #
|
||||
# Gnu makefile: # Makefile.simple instead of this Makefile. #
|
||||
########################################################################
|
||||
#
|
||||
@@ -12,12 +12,12 @@
|
||||
#
|
||||
# NOTE: This is NOT the calc rpm Makefile. This Makefile is a generic
|
||||
# Makefile for the people who build calc from the bzip2-ed tarball.
|
||||
# Without modification, it not assume the system has readline, ncurses
|
||||
# or less. It compiles with gcc -O3 -g3 as well. You can change all
|
||||
# this by modifying the Makefile variables below.
|
||||
# Without modification, it does not assume the system has readline,
|
||||
# ncurses or less. It compiles with gcc -O3 -g3 as well. You can
|
||||
# change all this by modifying the Makefile variables below.
|
||||
#
|
||||
# NOTE: You might want use the READLINE facility if your system
|
||||
# has the GNU readline headers and libaraies:
|
||||
# has the GNU readline headers and libraries:
|
||||
#
|
||||
# USE_READLINE= -DUSE_READLINE
|
||||
# READLINE_LIB= -lreadline
|
||||
@@ -26,7 +26,7 @@
|
||||
# Copyright (C) 1999-2008 Landon Curt Noll
|
||||
#
|
||||
# Calc is open software; you can redistribute it and/or modify it under
|
||||
# the terms of the version 2.1 of the GNU Lesser General Public License
|
||||
# the terms of 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
|
||||
@@ -39,9 +39,9 @@
|
||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
MAKEFILE_REV= $$Revision: 30.54 $$
|
||||
# @(#) $Id: Makefile.ship,v 30.54 2013/08/11 05:40:18 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/cmd/calc/RCS/Makefile.ship,v $
|
||||
MAKEFILE_REV= $$Revision: 30.60 $$
|
||||
# @(#) $Id: Makefile.ship,v 30.60 2013/09/27 08:55:27 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/bin/calc/RCS/Makefile.ship,v $
|
||||
#
|
||||
# Under source code control: 1990/02/15 01:48:41
|
||||
# File existed as early as: before 1990
|
||||
@@ -61,7 +61,7 @@ MAKEFILE_REV= $$Revision: 30.54 $$
|
||||
#
|
||||
# make ...__optional_arguments_... target=value
|
||||
|
||||
# Try uname -s if the target was not alreadhy set on the make command line
|
||||
# Try uname -s if the target was not already set on the make command line
|
||||
#
|
||||
ifeq ($(target),)
|
||||
target=$(shell uname -s 2>/dev/null)
|
||||
@@ -101,13 +101,13 @@ TERMCONTROL=
|
||||
# If you do not have vsprintf(), then calc will try sprintf() and hope
|
||||
# for the best.
|
||||
#
|
||||
# A simular problem occurs if your system does not have a vsnprintf()
|
||||
# A similar problem occurs if your system does not have a vsnprintf()
|
||||
# function. This function is like the vsprintf() function except that
|
||||
# there is an extra second argument that controls the maximum size
|
||||
# string that is produced.
|
||||
#
|
||||
# If HAVE_VSPRINTF is empty, this Makefile will run the have_stdvs.c and/or
|
||||
# have_varvs.c program to determine if vsprintf() is supported. If
|
||||
# have_varvs.c program to determine if vsprintf() is supported. If
|
||||
# HAVE_VSPRINTF is set to -DDONT_HAVE_VSPRINTF then calc will hope that
|
||||
# sprintf() will work.
|
||||
#
|
||||
@@ -243,13 +243,13 @@ INODE_BITS=
|
||||
#INODE_BITS= 64
|
||||
|
||||
# Determine if we have an off_t which one can perform arithmetic operations,
|
||||
# assignments and comparisons. On some systems off_t is some sort of union
|
||||
# assignments and comparisons. On some systems off_t is some sort of union
|
||||
# or struct.
|
||||
#
|
||||
# If HAVE_OFFSCL is empty, this Makefile will run the have_offscl program
|
||||
# to determine if off_t is a scalar. If HAVE_OFFSCL is set to the value
|
||||
# -DOFF_T_NON_SCALAR when calc will assume that off_t some sort of
|
||||
# union or struct which.
|
||||
# union or struct.
|
||||
#
|
||||
# If in doubt, leave HAVE_OFFSCL empty and this Makefile will figure it out.
|
||||
#
|
||||
@@ -257,7 +257,7 @@ HAVE_OFFSCL=
|
||||
#HAVE_OFFSCL= -DOFF_T_NON_SCALAR
|
||||
|
||||
# Determine if we have an fpos_t which one can perform arithmetic operations,
|
||||
# assignments and comparisons. On some systems fpos_t is some sort of union
|
||||
# assignments and comparisons. On some systems fpos_t is some sort of union
|
||||
# or struct. Some systems do not have an fpos_t and long is as a file
|
||||
# offset instead.
|
||||
#
|
||||
@@ -265,7 +265,7 @@ HAVE_OFFSCL=
|
||||
# to determine if off_t is a scalar, or if there is no off_t and long
|
||||
# (a scalar) should be used instead. If HAVE_POSSCL is set to the value
|
||||
# -DFILEPOS_NON_SCALAR when calc will assume that fpos_t exists and is
|
||||
# some sort of union or struct which.
|
||||
# some sort of union or struct.
|
||||
#
|
||||
# If in doubt, leave HAVE_POSSCL empty and this Makefile will figure it out.
|
||||
#
|
||||
@@ -286,7 +286,7 @@ HAVE_CONST=
|
||||
# Determine if we have uid_t
|
||||
#
|
||||
# If HAVE_UID_T is empty, this Makefile will run the have_uid_t program
|
||||
# to determine if const is supported. If HAVE_UID_T is set to -DHAVE_NO_UID_T,
|
||||
# to determine if uid_t is supported. If HAVE_UID_T is set to -DHAVE_NO_UID_T,
|
||||
# then calc will treat uid_t as an unsigned short. This only matters if
|
||||
# $HOME is not set and calc must look up the home directory in /etc/passwd.
|
||||
#
|
||||
@@ -313,7 +313,7 @@ HAVE_NEWSTR=
|
||||
# If HAVE_MEMMOVE is empty, this Makefile will run the have_memmv program
|
||||
# to determine if memmove() is supported. If HAVE_MEMMOVE is set to
|
||||
# -DHAVE_NO_MEMMOVE, then calc will use internal functions to simulate
|
||||
# the memory move function that does correct overlapping memory modes.
|
||||
# the memory move function that does correct overlapping memory moves.
|
||||
#
|
||||
# If in doubt, leave HAVE_MEMMOVE empty and this Makefile will figure it out.
|
||||
#
|
||||
@@ -322,10 +322,10 @@ HAVE_MEMMOVE=
|
||||
|
||||
# Determine if we have ustat()
|
||||
#
|
||||
# If HAVE_USTAT is empty, this Makefile will run the have_memmv program
|
||||
# to determine if ustat() is supported. If HAVE_USTAT is set to
|
||||
# If HAVE_USTAT is empty, this Makefile will run the have_ustat program
|
||||
# to determine if ustat() is supported. If HAVE_USTAT is set to
|
||||
# -DHAVE_NO_USTAT, then calc will use internal functions to simulate
|
||||
# the memory move function that does correct overlapping memory modes.
|
||||
# the ustat() function that gets file system statistics.
|
||||
#
|
||||
# Select HAVE_USTAT= -DHAVE_NO_USTAT for DJGPP.
|
||||
#
|
||||
@@ -336,10 +336,10 @@ HAVE_USTAT=
|
||||
|
||||
# Determine if we have getsid()
|
||||
#
|
||||
# If HAVE_GETSID is empty, this Makefile will run the have_memmv program
|
||||
# If HAVE_GETSID is empty, this Makefile will run the have_getsid program
|
||||
# to determine if getsid() is supported. If HAVE_GETSID is set to
|
||||
# -DHAVE_NO_GETSID, then calc will use internal functions to simulate
|
||||
# the memory move function that does correct overlapping memory modes.
|
||||
# the getsid() function that gets session ID.
|
||||
#
|
||||
# Select HAVE_GETSID= -DHAVE_NO_GETSID for DJGPP.
|
||||
#
|
||||
@@ -350,10 +350,10 @@ HAVE_GETSID=
|
||||
|
||||
# Determine if we have getpgid()
|
||||
#
|
||||
# If HAVE_GETPGID is empty, this Makefile will run the have_memmv program
|
||||
# If HAVE_GETPGID is empty, this Makefile will run the have_getpgid program
|
||||
# to determine if getpgid() is supported. If HAVE_GETPGID is set to
|
||||
# -DHAVE_NO_GETPGID, then calc will use internal functions to simulate
|
||||
# the memory move function that does correct overlapping memory modes.
|
||||
# the getpgid() function that sets the process group ID.
|
||||
#
|
||||
# Select HAVE_GETPGID= -DHAVE_NO_GETPGID for DJGPP.
|
||||
#
|
||||
@@ -364,10 +364,10 @@ HAVE_GETPGID=
|
||||
|
||||
# Determine if we have clock_gettime()
|
||||
#
|
||||
# If HAVE_GETTIME is empty, this Makefile will run the have_memmv program
|
||||
# to determine if clock_gettime() is supported. If HAVE_GETTIME is set to
|
||||
# If HAVE_GETTIME is empty, this Makefile will run the have_gettime program
|
||||
# to determine if clock_gettime() is supported. If HAVE_GETTIME is set to
|
||||
# -DHAVE_NO_GETTIME, then calc will use internal functions to simulate
|
||||
# the memory move function that does correct overlapping memory modes.
|
||||
# the clock_gettime() function.
|
||||
#
|
||||
# Select HAVE_GETTIME= -DHAVE_NO_GETTIME for DJGPP.
|
||||
#
|
||||
@@ -378,10 +378,10 @@ HAVE_GETTIME=
|
||||
|
||||
# Determine if we have getprid()
|
||||
#
|
||||
# If HAVE_GETPRID is empty, this Makefile will run the have_memmv program
|
||||
# If HAVE_GETPRID is empty, this Makefile will run the have_getprid program
|
||||
# to determine if getprid() is supported. If HAVE_GETPRID is set to
|
||||
# -DHAVE_NO_GETPRID, then calc will use internal functions to simulate
|
||||
# the memory move function that does correct overlapping memory modes.
|
||||
# the getprid() function.
|
||||
#
|
||||
# Select HAVE_GETPRID= -DHAVE_NO_GETPRID for DJGPP.
|
||||
#
|
||||
@@ -392,7 +392,7 @@ HAVE_GETPRID=
|
||||
|
||||
# Determine if we have the /dev/urandom
|
||||
#
|
||||
# HAVE_URANDOM_H= let the Makefile look /dev/urandom
|
||||
# HAVE_URANDOM_H= let the Makefile look for /dev/urandom
|
||||
# HAVE_URANDOM_H= YES assume that /dev/urandom exists
|
||||
# HAVE_URANDOM_H= NO assume that /dev/urandom does not exist
|
||||
#
|
||||
@@ -406,10 +406,10 @@ HAVE_URANDOM_H=
|
||||
|
||||
# Determine if we have getrusage()
|
||||
#
|
||||
# If HAVE_GETRUSAGE is empty, this Makefile will run the have_memmv program
|
||||
# If HAVE_GETRUSAGE is empty, this Makefile will run the have_rusage program
|
||||
# to determine if getrusage() is supported. If HAVE_GETRUSAGE is set to
|
||||
# -DHAVE_NO_GETRUSAGE, then calc will use internal functions to simulate
|
||||
# the memory move function that does correct overlapping memory modes.
|
||||
# the getrusage() function.
|
||||
#
|
||||
# If in doubt, leave HAVE_GETRUSAGE empty and this Makefile will figure it out.
|
||||
#
|
||||
@@ -418,10 +418,10 @@ HAVE_GETRUSAGE=
|
||||
|
||||
# Determine if we have strdup()
|
||||
#
|
||||
# If HAVE_STRDUP is empty, this Makefile will run the have_memmv program
|
||||
# If HAVE_STRDUP is empty, this Makefile will run the have_strdup program
|
||||
# to determine if strdup() is supported. If HAVE_STRDUP is set to
|
||||
# -DHAVE_NO_STRDUP, then calc will use internal functions to simulate
|
||||
# the memory move function that does correct overlapping memory modes.
|
||||
# the strdup() function.
|
||||
#
|
||||
# If in doubt, leave HAVE_STRDUP empty and this Makefile will figure it out.
|
||||
#
|
||||
@@ -429,10 +429,10 @@ HAVE_STRDUP=
|
||||
#HAVE_STRDUP= -DHAVE_NO_STRDUP
|
||||
|
||||
# Some architectures such as Sparc do not allow one to access 32 bit values
|
||||
# that are not alligned on a 32 bit boundary.
|
||||
# that are not aligned on a 32 bit boundary.
|
||||
#
|
||||
# The Dec Alpha running OSF/1 will produce alignment error messages when
|
||||
# align32.c tries to figure out if alignment is needed. Use the
|
||||
# align32.c tries to figure out if alignment is needed. Use the
|
||||
# ALIGN32= -DMUST_ALIGN32 to force alignment and avoid such error messages.
|
||||
#
|
||||
# ALIGN32= let align32.c figure out if alignment is needed
|
||||
@@ -587,7 +587,7 @@ HAVE_UNUSED=
|
||||
#INCDIR= /dev/env/DJDIR/include
|
||||
INCDIR= /usr/include
|
||||
|
||||
# Where to install calc realted things
|
||||
# Where to install calc related things
|
||||
#
|
||||
# ${BINDIR} where to install calc binary files
|
||||
# ${LIBDIR} where calc link library (*.a) files are installed
|
||||
@@ -672,7 +672,7 @@ SCRIPTDIR= ${BINDIR}/cscript
|
||||
# T - top level directory under which calc will be installed
|
||||
#
|
||||
# The calc install is performed under ${T}, the calc build is
|
||||
# performed under /. The purpose for ${T} is to allow someone
|
||||
# performed under /. The purpose for ${T} is to allow someone
|
||||
# to install calc somewhere other than into the system area.
|
||||
#
|
||||
# For example, if:
|
||||
@@ -690,7 +690,7 @@ SCRIPTDIR= ${BINDIR}/cscript
|
||||
# calc binary files: /var/tmp/testing/usr/bin
|
||||
# calc link library: /var/tmp/testing/usr/lib
|
||||
# calc help, .cal ...: /var/tmp/testing/usr/share/calc
|
||||
# ... etc ... /var/tmp/testing/...
|
||||
# ... etc ... /var/tmp/testing/...
|
||||
#
|
||||
# If ${T} is empty, calc is installed under /, which is the same
|
||||
# top of tree for which it was built. If ${T} is non-empty, then
|
||||
@@ -754,12 +754,12 @@ CATEXT= 1
|
||||
# If NROFF is non-empty, then
|
||||
#
|
||||
# ${NROFF} ${NROFF_ARG} calc.1 > ${CATDIR}/calc.${CATEXT}
|
||||
# is used to built and install the cat page
|
||||
# is used to build and install the cat page
|
||||
#
|
||||
# else (NROFF is empty)
|
||||
#
|
||||
# ${MANMAKE} calc.1 ${CATDIR}
|
||||
# is used to built and install the cat page
|
||||
# is used to build and install the cat page
|
||||
# else
|
||||
#
|
||||
# The cat page is not built or installed
|
||||
@@ -782,8 +782,8 @@ CATMODE= 0444
|
||||
|
||||
# By default, custom builtin functions may only be executed if calc
|
||||
# is given the -C option. This is because custom builtin functions
|
||||
# may invoke non-standard or non-portable code. One may completely
|
||||
# disable custom builtin functions by not compiling any of code
|
||||
# may invoke non-standard or non-portable code. One may completely
|
||||
# disable custom builtin functions by not compiling any custom code
|
||||
#
|
||||
# ALLOW_CUSTOM= -DCUSTOM # allow custom only if -C is given
|
||||
# ALLOW_CUSTOM= # disable custom even if -C is given
|
||||
@@ -794,7 +794,7 @@ ALLOW_CUSTOM= -DCUSTOM
|
||||
#ALLOW_CUSTOM=
|
||||
|
||||
# If the $CALCPATH environment variable is not defined, then the following
|
||||
# path will be search for calc resource file routines.
|
||||
# path will be searched for calc resource file routines.
|
||||
#
|
||||
# Select CALCPATH= .;./cal;~/.cal;${CALC_SHAREDIR};${CUSTOMCALDIR} for DJGPP.
|
||||
#
|
||||
@@ -809,7 +809,7 @@ endif
|
||||
#endif /* end of skip for non-Gnu makefiles */
|
||||
|
||||
# If the $CALCRC environment variable is not defined, then the following
|
||||
# path will be search for calc resource files.
|
||||
# path will be searched for calc resource files.
|
||||
#
|
||||
# Select CALCRC= ${CALC_SHAREDIR}/startup;~/.calcrc;./.calcinit for DJGPP.
|
||||
#
|
||||
@@ -817,7 +817,7 @@ CALCRC= ${CALC_SHAREDIR}/startup:~/.calcrc:./.calcinit
|
||||
#CALCRC= ${CALC_SHAREDIR}/startup;~/.calcrc;./.calcinit
|
||||
|
||||
# Determine of the GNU-readline facility will be used instead of the
|
||||
# built-in calc binding method.
|
||||
# builtin calc binding method.
|
||||
#
|
||||
# USE_READLINE= Do not use GNU-readline, use calc bindings
|
||||
# USE_READLINE= -DUSE_READLINE Use GNU-readline, do not use calc bindings
|
||||
@@ -831,7 +831,7 @@ CALCRC= ${CALC_SHAREDIR}/startup:~/.calcrc:./.calcinit
|
||||
# READLINE_INCLUDE Where the readline include files reside
|
||||
# (leave blank if they are /usr/include/readline)
|
||||
#
|
||||
# NOTE: The GNU-readline code is not shipped with calc. You must have
|
||||
# NOTE: The GNU-readline code is not shipped with calc. You must have
|
||||
# the appropriate headers and link libs installed on your system in
|
||||
# order to use it.
|
||||
#
|
||||
@@ -908,9 +908,9 @@ RANLIB=ranlib
|
||||
#RANLIB=:
|
||||
|
||||
# Normally certain files depend on the Makefile. If the Makefile is
|
||||
# changed, then certain steps should be redone. If MAKE_FILE is
|
||||
# changed, then certain steps should be redone. If MAKE_FILE is
|
||||
# set to Makefile, then these files will depend on Makefile. If
|
||||
# MAKE_FILE is empty, then they wont.
|
||||
# MAKE_FILE is empty, then they won't.
|
||||
#
|
||||
# If in doubt, set MAKE_FILE to Makefile
|
||||
#
|
||||
@@ -971,9 +971,9 @@ CALC_ENV= CALCPATH=./cal LD_LIBRARY_PATH=.
|
||||
#
|
||||
# ${MKDIR} ${MKDIR_ARG}
|
||||
#
|
||||
# to create directorties. Normall this amounts to usins mkdir -p dir ...
|
||||
# Some older systems may not have mkdir -p. If you system does not
|
||||
# make mkdir -p, then set MKDIR_ARG to empty.
|
||||
# to create directories. Normally this amounts to using mkdir -p dir ...
|
||||
# Some older systems may not have mkdir -p. If your system does not
|
||||
# have mkdir -p, then set MKDIR_ARG to empty.
|
||||
#
|
||||
# MKDIR_ARG= -p # use mkdir -p when creating paths
|
||||
# MKDIR_ARG= # use if system does not understand mkdir -p
|
||||
@@ -981,8 +981,8 @@ CALC_ENV= CALCPATH=./cal LD_LIBRARY_PATH=.
|
||||
MKDIR_ARG= -p
|
||||
#MKDIR_ARG=
|
||||
|
||||
# Some out of date operating systems require / want an executable to
|
||||
# end with a certain file extension. Some compile systems such as
|
||||
# Some out of date operating systems require/want an executable to
|
||||
# end with a certain file extension. Some compiler systems such as
|
||||
# windoz build calc as calc.exe. The EXT variable is used to denote
|
||||
# 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.
|
||||
@@ -997,7 +997,7 @@ EXT=
|
||||
|
||||
# The default calc versions
|
||||
#
|
||||
VERSION= 2.12.4.10
|
||||
VERSION= 2.12.4.13
|
||||
VERS= 2.12.4
|
||||
VER= 2.12
|
||||
VE= 2
|
||||
@@ -1048,11 +1048,11 @@ STRIP= strip
|
||||
# Extra compiling and linking flags
|
||||
#
|
||||
# EXTRA_CFLAGS are flags given to ${CC} when compiling C files
|
||||
# EXTRA_LDFLAGS are flags given to ${CC} when linking progs
|
||||
# EXTRA_LDFLAGS are flags given to ${CC} when linking programs
|
||||
#
|
||||
# Both CFLAGS and LDFLAGS are left blank in this Makefile by
|
||||
# default so that users may use them on the make command line
|
||||
# to always the way that C is compiled and files are linked
|
||||
# to always set the way that C is compiled and files are linked
|
||||
# respectively. For example:
|
||||
#
|
||||
# make all EXTRA_CFLAGS="-DMAGIC" EXTRA_LDFLAGS="-lmagic"
|
||||
@@ -1060,13 +1060,13 @@ STRIP= strip
|
||||
# NOTE: These should be left blank in this Makefile to make it
|
||||
# easier to add stuff on the command line. If you want to
|
||||
# to change the way calc is compiled by this Makefile, change
|
||||
# the appropirate host target section below or a flag above.
|
||||
# the appropriate host target section below or a flag above.
|
||||
#
|
||||
EXTRA_CFLAGS=
|
||||
EXTRA_LDFLAGS=
|
||||
|
||||
# COMMON_CFLAGS are the common ${CC} flags used for all progs, both
|
||||
# intermediate and final calc and calc related progs
|
||||
# COMMON_CFLAGS are the common ${CC} flags used for all programs, both
|
||||
# intermediate and final calc and calc related programs
|
||||
#
|
||||
#if 0 /* start of skip for non-Gnu makefiles */
|
||||
ifdef ALLOW_CUSTOM
|
||||
@@ -1078,8 +1078,8 @@ COMMON_CFLAGS= -DCALC_SRC -UCUSTOM ${CCWARN} ${CCMISC} ${EXTRA_CFLAGS}
|
||||
endif
|
||||
#endif /* end of skip for non-Gnu makefiles */
|
||||
|
||||
# COMMON_LDFLAGS are the common flags used for linking all progs, both
|
||||
# intermediate and final calc and calc related progs
|
||||
# COMMON_LDFLAGS are the common flags used for linking all programs, both
|
||||
# intermediate and final calc and calc related programs
|
||||
#
|
||||
COMMON_LDFLAGS= ${EXTRA_LDFLAGS}
|
||||
|
||||
@@ -1097,16 +1097,16 @@ COMMON_LDFLAGS= ${EXTRA_LDFLAGS}
|
||||
# BLD_TYPE= calc-static-only
|
||||
#
|
||||
# CC_SHARE are flags given to ${CC} to build .o files suitable for shared libs
|
||||
# DEFAULT_LIB_INSTALL_PATH is where calc progs look for calc shared libs
|
||||
# DEFAULT_LIB_INSTALL_PATH is where calc programs look for calc shared libs
|
||||
# LD_SHARE are common flags given to ${CC} to link with shared libraries
|
||||
# LIBCALC_SHLIB are flags given to ${CC} to build libcalc shared lib
|
||||
# LIBCALC_SHLIB are flags given to ${CC} to build libcalc shared libraries
|
||||
# LIBCUSTCALC_SHLIB are flags given to ${CC} to build libcustcalc shared lib
|
||||
#
|
||||
# NOTE: The above 4 values are unused if BLD_TYPE= calc-static-only
|
||||
#
|
||||
# CC_STATIC are flags given to ${CC} to build .o files suitable for static libs
|
||||
# LD_STATIC are common flags given to ${CC} to link with static libraries
|
||||
# LIBCALC_STATIC are flags given to ${CC} to build libcalc static lib
|
||||
# LIBCALC_STATIC are flags given to ${CC} to build libcalc static libraries
|
||||
# LIBCUSTCALC_STATIC are flags given to ${CC} to build libcustcalc static lib
|
||||
#
|
||||
# NOTE: The above 4 values are unused if BLD_TYPE= calc-dynamic-only
|
||||
@@ -1119,7 +1119,7 @@ COMMON_LDFLAGS= ${EXTRA_LDFLAGS}
|
||||
# to abort on warnings, then leave CCWERR blank.
|
||||
# CCMISC are misc flags given to ${CC}
|
||||
#
|
||||
# LCC how the C compiler is invoked on locally executed intermediate progs
|
||||
# LCC is how the C compiler is invoked on locally executed intermediate programs
|
||||
# CC is how the C compiler is invoked (with an optional Purify)
|
||||
#
|
||||
# Specific target overrides or modifications to default values
|
||||
@@ -1200,7 +1200,7 @@ CCMISC= ${DARWIN_ARCH}
|
||||
LCC= MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} gcc
|
||||
CC= ${PURIFY} ${LCC} ${CCWERR}
|
||||
#
|
||||
# Darmin dynamic shared lib filenames
|
||||
# Darwin dynamic shared lib filenames
|
||||
LIB_EXT:= .dylib
|
||||
LIB_EXT_VERSION:= .${VERSION}${LIB_EXT}
|
||||
LIB_EXT_VERS:= .${VERS}${LIB_EXT}
|
||||
@@ -1403,10 +1403,10 @@ CC= ${PURIFY} ${LCC} ${CCWERR}
|
||||
#
|
||||
# The simple makefile forces the use of static ${CC} flags
|
||||
#
|
||||
# ICFLAGS are given to ${CC} for intermediate progs used to help compile calc
|
||||
# CFLAGS are given to ${CC} for calc progs other than intermediate progs
|
||||
# ILDFLAGS for ${CC} in linking intermediate progs used to help compile calc
|
||||
# LDFLAGS for ${CC} in linking calc progs other than intermediate progs
|
||||
# ICFLAGS are given to ${CC} for intermediate programs used to help compile calc
|
||||
# CFLAGS are given to ${CC} for calc programs other than intermediate programs
|
||||
# ILDFLAGS for ${CC} in linking intermediate programs used to help compile calc
|
||||
# LDFLAGS for ${CC} in linking calc programs other than intermediate programs
|
||||
#
|
||||
ICFLAGS= ${COMMON_CFLAGS} ${CC_STATIC}
|
||||
CFLAGS= ${ICFLAGS} ${CCOPT}
|
||||
@@ -1506,8 +1506,8 @@ endif
|
||||
|
||||
# Required flags to compile C files for calc
|
||||
#
|
||||
# ICFLAGS are given to ${CC} for intermediate progs used to help compile calc
|
||||
# CFLAGS are given to ${CC} for calc progs other than intermediate progs
|
||||
# ICFLAGS are given to ${CC} for intermediate programs used to help compile calc
|
||||
# CFLAGS are given to ${CC} for calc programs other than intermediate programs
|
||||
#
|
||||
# NOTE: This does not work for: make-XYZ-only and BLD_TYPE != make-XYZ-only
|
||||
#
|
||||
@@ -1520,8 +1520,8 @@ CFLAGS= ${ICFLAGS} ${CCOPT}
|
||||
|
||||
# Required flags to link files for calc
|
||||
#
|
||||
# ILDFLAGS for ${CC} in linking intermediate progs used to help compile calc
|
||||
# LDFLAGS for ${CC} in linking calc progs other than intermediate progs
|
||||
# ILDFLAGS for ${CC} in linking intermediate programs used to help compile calc
|
||||
# LDFLAGS for ${CC} in linking calc programs other than intermediate programs
|
||||
#
|
||||
ILDFLAGS= ${COMMON_LDFLAGS}
|
||||
LDFLAGS= ${LD_DEBUG} ${ILDFLAGS}
|
||||
@@ -1740,7 +1740,7 @@ CUSTOM_PASSDOWN= \
|
||||
VERSION=${VERSION} \
|
||||
target=${target}
|
||||
|
||||
# The compelte list of Makefile vars passed down to help/Makefile.
|
||||
# The complete list of Makefile vars passed down to help/Makefile.
|
||||
#
|
||||
HELP_PASSDOWN= \
|
||||
AR=${AR} \
|
||||
@@ -1777,7 +1777,7 @@ HELP_PASSDOWN= \
|
||||
TOUCH=${TOUCH} \
|
||||
TRUE=${TRUE}
|
||||
|
||||
# The compelte list of Makefile vars passed down to cal/Makefile.
|
||||
# The complete list of Makefile vars passed down to cal/Makefile.
|
||||
#
|
||||
CAL_PASSDOWN= \
|
||||
AR=${AR} \
|
||||
@@ -1805,7 +1805,7 @@ CAL_PASSDOWN= \
|
||||
TOUCH=${TOUCH} \
|
||||
TRUE=${TRUE}
|
||||
|
||||
# The compelte list of Makefile vars passed down to cscript/Makefile.
|
||||
# The complete list of Makefile vars passed down to cscript/Makefile.
|
||||
#
|
||||
CSCRIPT_PASSDOWN= \
|
||||
AR=${AR} \
|
||||
@@ -1854,7 +1854,7 @@ DISTLIST= ${C_SRC} ${H_SRC} ${MAKE_FILE} BUGS CHANGES LIBRARY README \
|
||||
README.WINDOWS calc.man HOWTO.INSTALL ${UTIL_MISC_SRC} ${LICENSE} \
|
||||
sample.README calc.spec.in rpm.mk
|
||||
|
||||
# These files are used to make (but not built) a calc .a link library
|
||||
# These files are used to make (but not build) a calc .a link library
|
||||
#
|
||||
CALCLIBLIST= ${LIBSRC} ${UTIL_C_SRC} ${LIB_H_SRC} ${MAKE_FILE} \
|
||||
${UTIL_MISC_SRC} BUGS CHANGES LIBRARY
|
||||
@@ -1875,7 +1875,7 @@ CALC_STATIC_LIBS= libcalc.a
|
||||
endif
|
||||
#endif /* end of skip for non-Gnu makefiles */
|
||||
|
||||
# Libaraies created and used to build calc
|
||||
# Libraries created and used to build calc
|
||||
#
|
||||
#if 0 /* start of skip for non-Gnu makefiles */
|
||||
ifdef ALLOW_CUSTOM
|
||||
@@ -1887,7 +1887,7 @@ CALC_DYNAMIC_LIBS= libcalc${LIB_EXT_VERSION}
|
||||
endif
|
||||
#endif /* end of skip for non-Gnu makefiles */
|
||||
|
||||
# Symlinks of dymanic shared libraries
|
||||
# Symlinks of dynamic shared libraries
|
||||
#
|
||||
#if 0 /* start of skip for non-Gnu makefiles */
|
||||
ifdef ALLOW_CUSTOM
|
||||
@@ -1903,7 +1903,7 @@ SYM_DYNAMIC_LIBS= libcalc${LIB_EXT_VER} libcalc${LIB_EXT_VE} libcalc${LIB_EXT} \
|
||||
endif
|
||||
#endif /* end of skip for non-Gnu makefiles */
|
||||
|
||||
# list of sample programs to that need to be built to satisfy sample rule
|
||||
# list of sample programs that need to be built to satisfy sample rule
|
||||
#
|
||||
# NOTE: The ${SAMPLE_TARGETS} and ${SAMPLE_STATIC_TARGETS} are built but
|
||||
# not installed at this time.
|
||||
@@ -1914,7 +1914,7 @@ endif
|
||||
SAMPLE_TARGETS= sample_rand${EXT} sample_many${EXT}
|
||||
SAMPLE_STATIC_TARGETS= sample_rand-static${EXT} sample_many-static${EXT}
|
||||
|
||||
# list of cscript programs to that need to be built to satisfy cscript/.all
|
||||
# list of cscript programs that need to be built to satisfy cscript/.all
|
||||
#
|
||||
# NOTE: This list MUST be coordinated with the ${CSCRIPT_TARGETS} variable
|
||||
# in the cscript/Makefile
|
||||
@@ -1977,7 +1977,7 @@ calc-dynamic-only: ${DYNAMIC_FIRST_TARGETS} ${EARLY_TARGETS} \
|
||||
echo " ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \
|
||||
echo " ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \
|
||||
echo "" 1>&2; \
|
||||
echo "NOTE: It is a very good idea to c first clobber any" 1>&2; \
|
||||
echo "NOTE: It is a very good idea to first clobber any" 1>&2; \
|
||||
echo " previously built .o, libs and executables" 1>&2; \
|
||||
echo " before switching to $$r!" 1>&2; \
|
||||
echo "" 1>&2; \
|
||||
@@ -1993,7 +1993,7 @@ calc-dynamic-only: ${DYNAMIC_FIRST_TARGETS} ${EARLY_TARGETS} \
|
||||
echo " ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \
|
||||
echo " ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \
|
||||
echo "" 1>&2; \
|
||||
echo "to clean out any previously build static files." 1>&2; \
|
||||
echo "to clean out any previously built static files." 1>&2; \
|
||||
echo "" 1>&2; \
|
||||
echo "=== aborting make ===" 1>&2; \
|
||||
exit 2; \
|
||||
@@ -2023,7 +2023,7 @@ calc-static-only: ${STATIC_FIRST_TARGETS} ${EARLY_TARGETS} \
|
||||
echo " ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \
|
||||
echo " ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \
|
||||
echo "" 1>&2; \
|
||||
echo "NOTE: It is a very good idea to c first clobber any" 1>&2; \
|
||||
echo "NOTE: It is a very good idea to first clobber any" 1>&2; \
|
||||
echo " previously built .o, libs and executables" 1>&2; \
|
||||
echo " before switching to $$r!" 1>&2; \
|
||||
echo "" 1>&2; \
|
||||
@@ -2039,7 +2039,7 @@ calc-static-only: ${STATIC_FIRST_TARGETS} ${EARLY_TARGETS} \
|
||||
echo " ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \
|
||||
echo " ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \
|
||||
echo "" 1>&2; \
|
||||
echo "to clean out any previously build dynamic files." 1>&2; \
|
||||
echo "to clean out any previously built dynamic files." 1>&2; \
|
||||
echo "" 1>&2; \
|
||||
echo "=== aborting make ===" 1>&2; \
|
||||
exit 4; \
|
||||
@@ -2135,8 +2135,8 @@ seed.o: seed.c no_implicit.arg ${MAKE_FILE}
|
||||
###
|
||||
#
|
||||
# The next set of rules cause the .h files BUILD_H_SRC files to be built
|
||||
# according tot he system and the Makefile variables above. The hsrc rule
|
||||
# is a convenient rule to invoke to built all of the BUILD_H_SRC.
|
||||
# according to the system and the Makefile variables above. The hsrc rule
|
||||
# is a convenient rule to invoke to build all of the BUILD_H_SRC.
|
||||
#
|
||||
# We add in the BUILD_C_SRC files because they are similar to the
|
||||
# BUILD_H_SRC files in terms of the build process.
|
||||
@@ -3592,7 +3592,7 @@ endif
|
||||
|
||||
###
|
||||
#
|
||||
# building calc-static and static lib*.a libraires
|
||||
# building calc-static and static lib*.a libraries
|
||||
#
|
||||
###
|
||||
|
||||
@@ -3631,10 +3631,10 @@ sample_many-static${EXT}: sample_many.o ${CALC_STATIC_LIBS} ${MAKE_FILE}
|
||||
|
||||
###
|
||||
#
|
||||
# Home grown make dependency rules. Your system make not support
|
||||
# Homegrown make dependency rules. Your system may not support
|
||||
# or have the needed tools. You can ignore this section.
|
||||
#
|
||||
# We will form a skelaton tree of *.c files containing only #include "foo.h"
|
||||
# We will form a skeleton tree of *.c files containing only #include "foo.h"
|
||||
# lines and .h files containing the same lines surrounded by multiple include
|
||||
# prevention lines. This allows us to build a static depend list that will
|
||||
# satisfy all possible cpp symbol definition combinations.
|
||||
@@ -3744,21 +3744,21 @@ h_list:
|
||||
# 1 level version string.
|
||||
#
|
||||
# version:
|
||||
# This rule simply echos the value found in this makefile.
|
||||
# This rule simply echoes the value found in this makefile.
|
||||
# This rule produces the full version string. Note that the
|
||||
# full version could be 4 or 3 levels long depending on the
|
||||
# minor patch number.
|
||||
#
|
||||
# vers:
|
||||
# This rule simply echos the value found in this makefile.
|
||||
# This rule simply echoes the value found in this makefile.
|
||||
# This rule produces only a 3 level version string.
|
||||
#
|
||||
# ver:
|
||||
# This rule simply echos the value found in this makefile.
|
||||
# This rule simply echoes the value found in this makefile.
|
||||
# This rule produces only a 2 level version string.
|
||||
#
|
||||
# ve:
|
||||
# This rule simply echos the value found in this makefile.
|
||||
# This rule simply echoes the value found in this makefile.
|
||||
# This rule produces only a 1 level version string.
|
||||
#
|
||||
###
|
||||
@@ -3876,7 +3876,7 @@ custom/Makefile.simple: custom/Makefile
|
||||
#
|
||||
# Doing a 'make chk' will cause only the context around interesting
|
||||
# (and error) messages to be printed. Unlike 'make check', this
|
||||
# rule does not cause things to be built. I.e., the all rule is
|
||||
# rule does not cause things to be built. i.e., the all rule is
|
||||
# not invoked.
|
||||
#
|
||||
###
|
||||
@@ -4072,34 +4072,38 @@ env:
|
||||
|
||||
mkdebug: env version.c
|
||||
@echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
||||
@echo '=-=-=-=-= Determining the source version =-=-=-=-='
|
||||
@echo '=-=-=-= Determining the source version =-=-=-='
|
||||
@${MAKE} -f Makefile Q= V=@ ver_calc${EXT}
|
||||
-@./ver_calc${EXT}
|
||||
@echo '=-=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ all =-=-=-=-='
|
||||
@echo '=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ all =-=-=-='
|
||||
@${MAKE} -f Makefile Q= V=@ all
|
||||
@echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
|
||||
@echo '=-=-=-=-= Determining the binary version =-=-=-=-='
|
||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||
@echo '=-=-=-= Determining the binary version =-=-=-='
|
||||
-@./calc${EXT} -e -q -v
|
||||
@echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
|
||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||
@echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
||||
|
||||
debug: env
|
||||
@echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
||||
@echo '=-=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ clobber =-=-=-=-='
|
||||
@echo '=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ clobber =-=-=-='
|
||||
@${MAKE} -f Makefile Q= V=@ clobber
|
||||
@echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
|
||||
@echo '=-=-=-=-= Determining the source version =-=-=-=-='
|
||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||
@echo '=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ all =-=-=-='
|
||||
@echo '=-=-= this may take a bit of time =-=-='
|
||||
@${MAKE} -f Makefile Q= V=@ all
|
||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||
@echo '=-=-=-= Determining the source version =-=-=-='
|
||||
@${MAKE} -f Makefile Q= V=@ ver_calc${EXT}
|
||||
-@./ver_calc${EXT}
|
||||
@echo '=-=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ all =-=-=-=-='
|
||||
@${MAKE} -f Makefile Q= V=@ all
|
||||
@echo '=-=-=-=-= Determining the binary version =-=-=-=-='
|
||||
-@./calc${EXT} -e -q -v
|
||||
@echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
|
||||
@echo '=-=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ chk =-=-=-=-='
|
||||
@echo '=-=-=-=-= this may take a while =-=-=-=-='
|
||||
@${MAKE} -f Makefile Q= V=@ chk
|
||||
@echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
|
||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||
@echo -n '=-=-=-= Print #defile values if custom functions '
|
||||
@echo 'are allowed =-=-=-='
|
||||
-@./calc${EXT} -e -q -C 'print custom("sysinfo", 2);'
|
||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||
@echo '=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ check =-=-=-='
|
||||
@echo '=-=-= this may take a while =-=-='
|
||||
@${MAKE} -f Makefile Q= V=@ check
|
||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||
@echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
||||
|
||||
###
|
||||
@@ -4210,7 +4214,7 @@ inst_files: ${MAKE_FILE} help/Makefile cal/Makefile custom/Makefile \
|
||||
${Q} LANG=C ${SORT} -u inst_files -o inst_files
|
||||
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
||||
|
||||
# The olduninstall rule will remove calc files from the older, histroic
|
||||
# The olduninstall rule will remove calc files from the older, historic
|
||||
# locations under the /usr/local directory. If you are using the
|
||||
# new default values for ${BINDIR}, ${CALC_SHAREDIR}, ${INCDIR} and ${LIBDIR}
|
||||
# then you can use this rule to clean out the older calc stuff under
|
||||
@@ -4329,7 +4333,7 @@ clobber: custom/Makefile clean
|
||||
|
||||
# install everything
|
||||
#
|
||||
# NOTE: Keep the uninstall rule in reverse order to the install rule
|
||||
# NOTE: Keep the uninstall rule in the reverse order of the install rule
|
||||
#
|
||||
install: custom/Makefile ${LIB_H_SRC} ${BUILD_H_SRC} calc.1 all
|
||||
${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
||||
@@ -4636,7 +4640,7 @@ endif
|
||||
|
||||
# Try to remove everything that was installed
|
||||
#
|
||||
# NOTE: Keep the uninstall rule in reverse order to the install rule
|
||||
# NOTE: Keep the uninstall rule in the reverse order of the install rule
|
||||
#
|
||||
uninstall: custom/Makefile
|
||||
${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
||||
@@ -4840,7 +4844,7 @@ strip:
|
||||
done
|
||||
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
||||
|
||||
# calc-symlink - setup symlinks from stardard locations into the ${T} tree
|
||||
# calc-symlink - setup symlinks from standard locations into the ${T} tree
|
||||
#
|
||||
calc-symlink:
|
||||
${Q}if [ -z "${T}" ]; then \
|
||||
|
230
Makefile.simple
230
Makefile.simple
@@ -4,7 +4,7 @@
|
||||
#
|
||||
########################################################################
|
||||
# Gnu makefile: # This is a Gnu make makefile. If your make does not #
|
||||
# Gnu makefile: # understand this makefilkke format, then edit and use #
|
||||
# Gnu makefile: # understand this makefile format, then edit and use #
|
||||
# Gnu makefile: # Makefile.simple instead of this Makefile. #
|
||||
########################################################################
|
||||
#
|
||||
@@ -12,12 +12,12 @@
|
||||
#
|
||||
# NOTE: This is NOT the calc rpm Makefile. This Makefile is a generic
|
||||
# Makefile for the people who build calc from the bzip2-ed tarball.
|
||||
# Without modification, it not assume the system has readline, ncurses
|
||||
# or less. It compiles with gcc -O3 -g3 as well. You can change all
|
||||
# this by modifying the Makefile variables below.
|
||||
# Without modification, it does not assume the system has readline,
|
||||
# ncurses or less. It compiles with gcc -O3 -g3 as well. You can
|
||||
# change all this by modifying the Makefile variables below.
|
||||
#
|
||||
# NOTE: You might want use the READLINE facility if your system
|
||||
# has the GNU readline headers and libaraies:
|
||||
# has the GNU readline headers and libraries:
|
||||
#
|
||||
# USE_READLINE= -DUSE_READLINE
|
||||
# READLINE_LIB= -lreadline
|
||||
@@ -26,7 +26,7 @@
|
||||
# Copyright (C) 1999-2008 Landon Curt Noll
|
||||
#
|
||||
# Calc is open software; you can redistribute it and/or modify it under
|
||||
# the terms of the version 2.1 of the GNU Lesser General Public License
|
||||
# the terms of 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
|
||||
@@ -39,9 +39,9 @@
|
||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
MAKEFILE_REV= $$Revision: 30.54 $$
|
||||
# @(#) $Id: Makefile.ship,v 30.54 2013/08/11 05:40:18 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/cmd/calc/RCS/Makefile.ship,v $
|
||||
MAKEFILE_REV= $$Revision: 30.60 $$
|
||||
# @(#) $Id: Makefile.ship,v 30.60 2013/09/27 08:55:27 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/bin/calc/RCS/Makefile.ship,v $
|
||||
#
|
||||
# Under source code control: 1990/02/15 01:48:41
|
||||
# File existed as early as: before 1990
|
||||
@@ -86,13 +86,13 @@ TERMCONTROL=
|
||||
# If you do not have vsprintf(), then calc will try sprintf() and hope
|
||||
# for the best.
|
||||
#
|
||||
# A simular problem occurs if your system does not have a vsnprintf()
|
||||
# A similar problem occurs if your system does not have a vsnprintf()
|
||||
# function. This function is like the vsprintf() function except that
|
||||
# there is an extra second argument that controls the maximum size
|
||||
# string that is produced.
|
||||
#
|
||||
# If HAVE_VSPRINTF is empty, this Makefile will run the have_stdvs.c and/or
|
||||
# have_varvs.c program to determine if vsprintf() is supported. If
|
||||
# have_varvs.c program to determine if vsprintf() is supported. If
|
||||
# HAVE_VSPRINTF is set to -DDONT_HAVE_VSPRINTF then calc will hope that
|
||||
# sprintf() will work.
|
||||
#
|
||||
@@ -228,13 +228,13 @@ INODE_BITS=
|
||||
#INODE_BITS= 64
|
||||
|
||||
# Determine if we have an off_t which one can perform arithmetic operations,
|
||||
# assignments and comparisons. On some systems off_t is some sort of union
|
||||
# assignments and comparisons. On some systems off_t is some sort of union
|
||||
# or struct.
|
||||
#
|
||||
# If HAVE_OFFSCL is empty, this Makefile will run the have_offscl program
|
||||
# to determine if off_t is a scalar. If HAVE_OFFSCL is set to the value
|
||||
# -DOFF_T_NON_SCALAR when calc will assume that off_t some sort of
|
||||
# union or struct which.
|
||||
# union or struct.
|
||||
#
|
||||
# If in doubt, leave HAVE_OFFSCL empty and this Makefile will figure it out.
|
||||
#
|
||||
@@ -242,7 +242,7 @@ HAVE_OFFSCL=
|
||||
#HAVE_OFFSCL= -DOFF_T_NON_SCALAR
|
||||
|
||||
# Determine if we have an fpos_t which one can perform arithmetic operations,
|
||||
# assignments and comparisons. On some systems fpos_t is some sort of union
|
||||
# assignments and comparisons. On some systems fpos_t is some sort of union
|
||||
# or struct. Some systems do not have an fpos_t and long is as a file
|
||||
# offset instead.
|
||||
#
|
||||
@@ -250,7 +250,7 @@ HAVE_OFFSCL=
|
||||
# to determine if off_t is a scalar, or if there is no off_t and long
|
||||
# (a scalar) should be used instead. If HAVE_POSSCL is set to the value
|
||||
# -DFILEPOS_NON_SCALAR when calc will assume that fpos_t exists and is
|
||||
# some sort of union or struct which.
|
||||
# some sort of union or struct.
|
||||
#
|
||||
# If in doubt, leave HAVE_POSSCL empty and this Makefile will figure it out.
|
||||
#
|
||||
@@ -271,7 +271,7 @@ HAVE_CONST=
|
||||
# Determine if we have uid_t
|
||||
#
|
||||
# If HAVE_UID_T is empty, this Makefile will run the have_uid_t program
|
||||
# to determine if const is supported. If HAVE_UID_T is set to -DHAVE_NO_UID_T,
|
||||
# to determine if uid_t is supported. If HAVE_UID_T is set to -DHAVE_NO_UID_T,
|
||||
# then calc will treat uid_t as an unsigned short. This only matters if
|
||||
# $HOME is not set and calc must look up the home directory in /etc/passwd.
|
||||
#
|
||||
@@ -298,7 +298,7 @@ HAVE_NEWSTR=
|
||||
# If HAVE_MEMMOVE is empty, this Makefile will run the have_memmv program
|
||||
# to determine if memmove() is supported. If HAVE_MEMMOVE is set to
|
||||
# -DHAVE_NO_MEMMOVE, then calc will use internal functions to simulate
|
||||
# the memory move function that does correct overlapping memory modes.
|
||||
# the memory move function that does correct overlapping memory moves.
|
||||
#
|
||||
# If in doubt, leave HAVE_MEMMOVE empty and this Makefile will figure it out.
|
||||
#
|
||||
@@ -307,10 +307,10 @@ HAVE_MEMMOVE=
|
||||
|
||||
# Determine if we have ustat()
|
||||
#
|
||||
# If HAVE_USTAT is empty, this Makefile will run the have_memmv program
|
||||
# to determine if ustat() is supported. If HAVE_USTAT is set to
|
||||
# If HAVE_USTAT is empty, this Makefile will run the have_ustat program
|
||||
# to determine if ustat() is supported. If HAVE_USTAT is set to
|
||||
# -DHAVE_NO_USTAT, then calc will use internal functions to simulate
|
||||
# the memory move function that does correct overlapping memory modes.
|
||||
# the ustat() function that gets file system statistics.
|
||||
#
|
||||
# Select HAVE_USTAT= -DHAVE_NO_USTAT for DJGPP.
|
||||
#
|
||||
@@ -321,10 +321,10 @@ HAVE_USTAT=
|
||||
|
||||
# Determine if we have getsid()
|
||||
#
|
||||
# If HAVE_GETSID is empty, this Makefile will run the have_memmv program
|
||||
# If HAVE_GETSID is empty, this Makefile will run the have_getsid program
|
||||
# to determine if getsid() is supported. If HAVE_GETSID is set to
|
||||
# -DHAVE_NO_GETSID, then calc will use internal functions to simulate
|
||||
# the memory move function that does correct overlapping memory modes.
|
||||
# the getsid() function that gets session ID.
|
||||
#
|
||||
# Select HAVE_GETSID= -DHAVE_NO_GETSID for DJGPP.
|
||||
#
|
||||
@@ -335,10 +335,10 @@ HAVE_GETSID=
|
||||
|
||||
# Determine if we have getpgid()
|
||||
#
|
||||
# If HAVE_GETPGID is empty, this Makefile will run the have_memmv program
|
||||
# If HAVE_GETPGID is empty, this Makefile will run the have_getpgid program
|
||||
# to determine if getpgid() is supported. If HAVE_GETPGID is set to
|
||||
# -DHAVE_NO_GETPGID, then calc will use internal functions to simulate
|
||||
# the memory move function that does correct overlapping memory modes.
|
||||
# the getpgid() function that sets the process group ID.
|
||||
#
|
||||
# Select HAVE_GETPGID= -DHAVE_NO_GETPGID for DJGPP.
|
||||
#
|
||||
@@ -349,10 +349,10 @@ HAVE_GETPGID=
|
||||
|
||||
# Determine if we have clock_gettime()
|
||||
#
|
||||
# If HAVE_GETTIME is empty, this Makefile will run the have_memmv program
|
||||
# to determine if clock_gettime() is supported. If HAVE_GETTIME is set to
|
||||
# If HAVE_GETTIME is empty, this Makefile will run the have_gettime program
|
||||
# to determine if clock_gettime() is supported. If HAVE_GETTIME is set to
|
||||
# -DHAVE_NO_GETTIME, then calc will use internal functions to simulate
|
||||
# the memory move function that does correct overlapping memory modes.
|
||||
# the clock_gettime() function.
|
||||
#
|
||||
# Select HAVE_GETTIME= -DHAVE_NO_GETTIME for DJGPP.
|
||||
#
|
||||
@@ -363,10 +363,10 @@ HAVE_GETTIME=
|
||||
|
||||
# Determine if we have getprid()
|
||||
#
|
||||
# If HAVE_GETPRID is empty, this Makefile will run the have_memmv program
|
||||
# If HAVE_GETPRID is empty, this Makefile will run the have_getprid program
|
||||
# to determine if getprid() is supported. If HAVE_GETPRID is set to
|
||||
# -DHAVE_NO_GETPRID, then calc will use internal functions to simulate
|
||||
# the memory move function that does correct overlapping memory modes.
|
||||
# the getprid() function.
|
||||
#
|
||||
# Select HAVE_GETPRID= -DHAVE_NO_GETPRID for DJGPP.
|
||||
#
|
||||
@@ -377,7 +377,7 @@ HAVE_GETPRID=
|
||||
|
||||
# Determine if we have the /dev/urandom
|
||||
#
|
||||
# HAVE_URANDOM_H= let the Makefile look /dev/urandom
|
||||
# HAVE_URANDOM_H= let the Makefile look for /dev/urandom
|
||||
# HAVE_URANDOM_H= YES assume that /dev/urandom exists
|
||||
# HAVE_URANDOM_H= NO assume that /dev/urandom does not exist
|
||||
#
|
||||
@@ -391,10 +391,10 @@ HAVE_URANDOM_H=
|
||||
|
||||
# Determine if we have getrusage()
|
||||
#
|
||||
# If HAVE_GETRUSAGE is empty, this Makefile will run the have_memmv program
|
||||
# If HAVE_GETRUSAGE is empty, this Makefile will run the have_rusage program
|
||||
# to determine if getrusage() is supported. If HAVE_GETRUSAGE is set to
|
||||
# -DHAVE_NO_GETRUSAGE, then calc will use internal functions to simulate
|
||||
# the memory move function that does correct overlapping memory modes.
|
||||
# the getrusage() function.
|
||||
#
|
||||
# If in doubt, leave HAVE_GETRUSAGE empty and this Makefile will figure it out.
|
||||
#
|
||||
@@ -403,10 +403,10 @@ HAVE_GETRUSAGE=
|
||||
|
||||
# Determine if we have strdup()
|
||||
#
|
||||
# If HAVE_STRDUP is empty, this Makefile will run the have_memmv program
|
||||
# If HAVE_STRDUP is empty, this Makefile will run the have_strdup program
|
||||
# to determine if strdup() is supported. If HAVE_STRDUP is set to
|
||||
# -DHAVE_NO_STRDUP, then calc will use internal functions to simulate
|
||||
# the memory move function that does correct overlapping memory modes.
|
||||
# the strdup() function.
|
||||
#
|
||||
# If in doubt, leave HAVE_STRDUP empty and this Makefile will figure it out.
|
||||
#
|
||||
@@ -414,10 +414,10 @@ HAVE_STRDUP=
|
||||
#HAVE_STRDUP= -DHAVE_NO_STRDUP
|
||||
|
||||
# Some architectures such as Sparc do not allow one to access 32 bit values
|
||||
# that are not alligned on a 32 bit boundary.
|
||||
# that are not aligned on a 32 bit boundary.
|
||||
#
|
||||
# The Dec Alpha running OSF/1 will produce alignment error messages when
|
||||
# align32.c tries to figure out if alignment is needed. Use the
|
||||
# align32.c tries to figure out if alignment is needed. Use the
|
||||
# ALIGN32= -DMUST_ALIGN32 to force alignment and avoid such error messages.
|
||||
#
|
||||
# ALIGN32= let align32.c figure out if alignment is needed
|
||||
@@ -572,7 +572,7 @@ HAVE_UNUSED=
|
||||
#INCDIR= /dev/env/DJDIR/include
|
||||
INCDIR= /usr/include
|
||||
|
||||
# Where to install calc realted things
|
||||
# Where to install calc related things
|
||||
#
|
||||
# ${BINDIR} where to install calc binary files
|
||||
# ${LIBDIR} where calc link library (*.a) files are installed
|
||||
@@ -657,7 +657,7 @@ SCRIPTDIR= ${BINDIR}/cscript
|
||||
# T - top level directory under which calc will be installed
|
||||
#
|
||||
# The calc install is performed under ${T}, the calc build is
|
||||
# performed under /. The purpose for ${T} is to allow someone
|
||||
# performed under /. The purpose for ${T} is to allow someone
|
||||
# to install calc somewhere other than into the system area.
|
||||
#
|
||||
# For example, if:
|
||||
@@ -675,7 +675,7 @@ SCRIPTDIR= ${BINDIR}/cscript
|
||||
# calc binary files: /var/tmp/testing/usr/bin
|
||||
# calc link library: /var/tmp/testing/usr/lib
|
||||
# calc help, .cal ...: /var/tmp/testing/usr/share/calc
|
||||
# ... etc ... /var/tmp/testing/...
|
||||
# ... etc ... /var/tmp/testing/...
|
||||
#
|
||||
# If ${T} is empty, calc is installed under /, which is the same
|
||||
# top of tree for which it was built. If ${T} is non-empty, then
|
||||
@@ -739,12 +739,12 @@ CATEXT= 1
|
||||
# If NROFF is non-empty, then
|
||||
#
|
||||
# ${NROFF} ${NROFF_ARG} calc.1 > ${CATDIR}/calc.${CATEXT}
|
||||
# is used to built and install the cat page
|
||||
# is used to build and install the cat page
|
||||
#
|
||||
# else (NROFF is empty)
|
||||
#
|
||||
# ${MANMAKE} calc.1 ${CATDIR}
|
||||
# is used to built and install the cat page
|
||||
# is used to build and install the cat page
|
||||
# else
|
||||
#
|
||||
# The cat page is not built or installed
|
||||
@@ -767,8 +767,8 @@ CATMODE= 0444
|
||||
|
||||
# By default, custom builtin functions may only be executed if calc
|
||||
# is given the -C option. This is because custom builtin functions
|
||||
# may invoke non-standard or non-portable code. One may completely
|
||||
# disable custom builtin functions by not compiling any of code
|
||||
# may invoke non-standard or non-portable code. One may completely
|
||||
# disable custom builtin functions by not compiling any custom code
|
||||
#
|
||||
# ALLOW_CUSTOM= -DCUSTOM # allow custom only if -C is given
|
||||
# ALLOW_CUSTOM= # disable custom even if -C is given
|
||||
@@ -779,14 +779,14 @@ ALLOW_CUSTOM= -DCUSTOM
|
||||
#ALLOW_CUSTOM=
|
||||
|
||||
# If the $CALCPATH environment variable is not defined, then the following
|
||||
# path will be search for calc resource file routines.
|
||||
# path will be searched for calc resource file routines.
|
||||
#
|
||||
# Select CALCPATH= .;./cal;~/.cal;${CALC_SHAREDIR};${CUSTOMCALDIR} for DJGPP.
|
||||
#
|
||||
CALCPATH= .:./cal:~/.cal:${CALC_SHAREDIR}:${CUSTOMCALDIR}
|
||||
|
||||
# If the $CALCRC environment variable is not defined, then the following
|
||||
# path will be search for calc resource files.
|
||||
# path will be searched for calc resource files.
|
||||
#
|
||||
# Select CALCRC= ${CALC_SHAREDIR}/startup;~/.calcrc;./.calcinit for DJGPP.
|
||||
#
|
||||
@@ -794,7 +794,7 @@ CALCRC= ${CALC_SHAREDIR}/startup:~/.calcrc:./.calcinit
|
||||
#CALCRC= ${CALC_SHAREDIR}/startup;~/.calcrc;./.calcinit
|
||||
|
||||
# Determine of the GNU-readline facility will be used instead of the
|
||||
# built-in calc binding method.
|
||||
# builtin calc binding method.
|
||||
#
|
||||
# USE_READLINE= Do not use GNU-readline, use calc bindings
|
||||
# USE_READLINE= -DUSE_READLINE Use GNU-readline, do not use calc bindings
|
||||
@@ -808,7 +808,7 @@ CALCRC= ${CALC_SHAREDIR}/startup:~/.calcrc:./.calcinit
|
||||
# READLINE_INCLUDE Where the readline include files reside
|
||||
# (leave blank if they are /usr/include/readline)
|
||||
#
|
||||
# NOTE: The GNU-readline code is not shipped with calc. You must have
|
||||
# NOTE: The GNU-readline code is not shipped with calc. You must have
|
||||
# the appropriate headers and link libs installed on your system in
|
||||
# order to use it.
|
||||
#
|
||||
@@ -885,9 +885,9 @@ RANLIB=ranlib
|
||||
#RANLIB=:
|
||||
|
||||
# Normally certain files depend on the Makefile. If the Makefile is
|
||||
# changed, then certain steps should be redone. If MAKE_FILE is
|
||||
# changed, then certain steps should be redone. If MAKE_FILE is
|
||||
# set to Makefile, then these files will depend on Makefile. If
|
||||
# MAKE_FILE is empty, then they wont.
|
||||
# MAKE_FILE is empty, then they won't.
|
||||
#
|
||||
# If in doubt, set MAKE_FILE to Makefile
|
||||
#
|
||||
@@ -948,9 +948,9 @@ CALC_ENV= CALCPATH=./cal LD_LIBRARY_PATH=.
|
||||
#
|
||||
# ${MKDIR} ${MKDIR_ARG}
|
||||
#
|
||||
# to create directorties. Normall this amounts to usins mkdir -p dir ...
|
||||
# Some older systems may not have mkdir -p. If you system does not
|
||||
# make mkdir -p, then set MKDIR_ARG to empty.
|
||||
# to create directories. Normally this amounts to using mkdir -p dir ...
|
||||
# Some older systems may not have mkdir -p. If your system does not
|
||||
# have mkdir -p, then set MKDIR_ARG to empty.
|
||||
#
|
||||
# MKDIR_ARG= -p # use mkdir -p when creating paths
|
||||
# MKDIR_ARG= # use if system does not understand mkdir -p
|
||||
@@ -958,8 +958,8 @@ CALC_ENV= CALCPATH=./cal LD_LIBRARY_PATH=.
|
||||
MKDIR_ARG= -p
|
||||
#MKDIR_ARG=
|
||||
|
||||
# Some out of date operating systems require / want an executable to
|
||||
# end with a certain file extension. Some compile systems such as
|
||||
# Some out of date operating systems require/want an executable to
|
||||
# end with a certain file extension. Some compiler systems such as
|
||||
# windoz build calc as calc.exe. The EXT variable is used to denote
|
||||
# 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.
|
||||
@@ -974,7 +974,7 @@ EXT=
|
||||
|
||||
# The default calc versions
|
||||
#
|
||||
VERSION= 2.12.4.10
|
||||
VERSION= 2.12.4.13
|
||||
VERS= 2.12.4
|
||||
VER= 2.12
|
||||
VE= 2
|
||||
@@ -1025,11 +1025,11 @@ STRIP= strip
|
||||
# Extra compiling and linking flags
|
||||
#
|
||||
# EXTRA_CFLAGS are flags given to ${CC} when compiling C files
|
||||
# EXTRA_LDFLAGS are flags given to ${CC} when linking progs
|
||||
# EXTRA_LDFLAGS are flags given to ${CC} when linking programs
|
||||
#
|
||||
# Both CFLAGS and LDFLAGS are left blank in this Makefile by
|
||||
# default so that users may use them on the make command line
|
||||
# to always the way that C is compiled and files are linked
|
||||
# to always set the way that C is compiled and files are linked
|
||||
# respectively. For example:
|
||||
#
|
||||
# make all EXTRA_CFLAGS="-DMAGIC" EXTRA_LDFLAGS="-lmagic"
|
||||
@@ -1037,18 +1037,18 @@ STRIP= strip
|
||||
# NOTE: These should be left blank in this Makefile to make it
|
||||
# easier to add stuff on the command line. If you want to
|
||||
# to change the way calc is compiled by this Makefile, change
|
||||
# the appropirate host target section below or a flag above.
|
||||
# the appropriate host target section below or a flag above.
|
||||
#
|
||||
EXTRA_CFLAGS=
|
||||
EXTRA_LDFLAGS=
|
||||
|
||||
# COMMON_CFLAGS are the common ${CC} flags used for all progs, both
|
||||
# intermediate and final calc and calc related progs
|
||||
# COMMON_CFLAGS are the common ${CC} flags used for all programs, both
|
||||
# intermediate and final calc and calc related programs
|
||||
#
|
||||
COMMON_CFLAGS= -DCALC_SRC ${ALLOW_CUSTOM} ${CCWARN} ${CCMISC} ${EXTRA_CFLAGS}
|
||||
|
||||
# COMMON_LDFLAGS are the common flags used for linking all progs, both
|
||||
# intermediate and final calc and calc related progs
|
||||
# COMMON_LDFLAGS are the common flags used for linking all programs, both
|
||||
# intermediate and final calc and calc related programs
|
||||
#
|
||||
COMMON_LDFLAGS= ${EXTRA_LDFLAGS}
|
||||
|
||||
@@ -1066,16 +1066,16 @@ COMMON_LDFLAGS= ${EXTRA_LDFLAGS}
|
||||
# BLD_TYPE= calc-static-only
|
||||
#
|
||||
# CC_SHARE are flags given to ${CC} to build .o files suitable for shared libs
|
||||
# DEFAULT_LIB_INSTALL_PATH is where calc progs look for calc shared libs
|
||||
# DEFAULT_LIB_INSTALL_PATH is where calc programs look for calc shared libs
|
||||
# LD_SHARE are common flags given to ${CC} to link with shared libraries
|
||||
# LIBCALC_SHLIB are flags given to ${CC} to build libcalc shared lib
|
||||
# LIBCALC_SHLIB are flags given to ${CC} to build libcalc shared libraries
|
||||
# LIBCUSTCALC_SHLIB are flags given to ${CC} to build libcustcalc shared lib
|
||||
#
|
||||
# NOTE: The above 4 values are unused if BLD_TYPE= calc-static-only
|
||||
#
|
||||
# CC_STATIC are flags given to ${CC} to build .o files suitable for static libs
|
||||
# LD_STATIC are common flags given to ${CC} to link with static libraries
|
||||
# LIBCALC_STATIC are flags given to ${CC} to build libcalc static lib
|
||||
# LIBCALC_STATIC are flags given to ${CC} to build libcalc static libraries
|
||||
# LIBCUSTCALC_STATIC are flags given to ${CC} to build libcustcalc static lib
|
||||
#
|
||||
# NOTE: The above 4 values are unused if BLD_TYPE= calc-dynamic-only
|
||||
@@ -1088,7 +1088,7 @@ COMMON_LDFLAGS= ${EXTRA_LDFLAGS}
|
||||
# to abort on warnings, then leave CCWERR blank.
|
||||
# CCMISC are misc flags given to ${CC}
|
||||
#
|
||||
# LCC how the C compiler is invoked on locally executed intermediate progs
|
||||
# LCC is how the C compiler is invoked on locally executed intermediate programs
|
||||
# CC is how the C compiler is invoked (with an optional Purify)
|
||||
#
|
||||
# Specific target overrides or modifications to default values
|
||||
@@ -1128,10 +1128,10 @@ CC= ${PURIFY} ${LCC} ${CCWERR}
|
||||
#
|
||||
# The simple makefile forces the use of static ${CC} flags
|
||||
#
|
||||
# ICFLAGS are given to ${CC} for intermediate progs used to help compile calc
|
||||
# CFLAGS are given to ${CC} for calc progs other than intermediate progs
|
||||
# ILDFLAGS for ${CC} in linking intermediate progs used to help compile calc
|
||||
# LDFLAGS for ${CC} in linking calc progs other than intermediate progs
|
||||
# ICFLAGS are given to ${CC} for intermediate programs used to help compile calc
|
||||
# CFLAGS are given to ${CC} for calc programs other than intermediate programs
|
||||
# ILDFLAGS for ${CC} in linking intermediate programs used to help compile calc
|
||||
# LDFLAGS for ${CC} in linking calc programs other than intermediate programs
|
||||
#
|
||||
ICFLAGS= ${COMMON_CFLAGS} ${CC_STATIC}
|
||||
CFLAGS= ${ICFLAGS} ${CCOPT}
|
||||
@@ -1354,7 +1354,7 @@ CUSTOM_PASSDOWN= \
|
||||
VERSION=${VERSION} \
|
||||
target=${target}
|
||||
|
||||
# The compelte list of Makefile vars passed down to help/Makefile.
|
||||
# The complete list of Makefile vars passed down to help/Makefile.
|
||||
#
|
||||
HELP_PASSDOWN= \
|
||||
AR=${AR} \
|
||||
@@ -1391,7 +1391,7 @@ HELP_PASSDOWN= \
|
||||
TOUCH=${TOUCH} \
|
||||
TRUE=${TRUE}
|
||||
|
||||
# The compelte list of Makefile vars passed down to cal/Makefile.
|
||||
# The complete list of Makefile vars passed down to cal/Makefile.
|
||||
#
|
||||
CAL_PASSDOWN= \
|
||||
AR=${AR} \
|
||||
@@ -1419,7 +1419,7 @@ CAL_PASSDOWN= \
|
||||
TOUCH=${TOUCH} \
|
||||
TRUE=${TRUE}
|
||||
|
||||
# The compelte list of Makefile vars passed down to cscript/Makefile.
|
||||
# The complete list of Makefile vars passed down to cscript/Makefile.
|
||||
#
|
||||
CSCRIPT_PASSDOWN= \
|
||||
AR=${AR} \
|
||||
@@ -1468,7 +1468,7 @@ DISTLIST= ${C_SRC} ${H_SRC} ${MAKE_FILE} BUGS CHANGES LIBRARY README \
|
||||
README.WINDOWS calc.man HOWTO.INSTALL ${UTIL_MISC_SRC} ${LICENSE} \
|
||||
sample.README calc.spec.in rpm.mk
|
||||
|
||||
# These files are used to make (but not built) a calc .a link library
|
||||
# These files are used to make (but not build) a calc .a link library
|
||||
#
|
||||
CALCLIBLIST= ${LIBSRC} ${UTIL_C_SRC} ${LIB_H_SRC} ${MAKE_FILE} \
|
||||
${UTIL_MISC_SRC} BUGS CHANGES LIBRARY
|
||||
@@ -1481,18 +1481,18 @@ OBJS= ${LIBOBJS} ${CALCOBJS} ${UTIL_OBJS} ${SAMPLE_OBJ}
|
||||
#
|
||||
CALC_STATIC_LIBS= libcalc.a libcustcalc.a
|
||||
|
||||
# Libaraies created and used to build calc
|
||||
# Libraries created and used to build calc
|
||||
#
|
||||
CALC_DYNAMIC_LIBS= libcalc${LIB_EXT_VERSION} libcustcalc${LIB_EXT_VERSION}
|
||||
|
||||
# Symlinks of dymanic shared libraries
|
||||
# Symlinks of dynamic shared libraries
|
||||
#
|
||||
SYM_DYNAMIC_LIBS= libcalc${LIB_EXT_VER} libcalc${LIB_EXT_VE} libcalc${LIB_EXT} \
|
||||
libcalc${LIB_EXT_VERS} libcustcalc${LIB_EXT_VERSION} \
|
||||
libcustcalc${LIB_EXT_VERS} libcustcalc${LIB_EXT_VER} \
|
||||
libcustcalc${LIB_EXT_VE} libcustcalc${LIB_EXT}
|
||||
|
||||
# list of sample programs to that need to be built to satisfy sample rule
|
||||
# list of sample programs that need to be built to satisfy sample rule
|
||||
#
|
||||
# NOTE: The ${SAMPLE_TARGETS} and ${SAMPLE_STATIC_TARGETS} are built but
|
||||
# not installed at this time.
|
||||
@@ -1503,7 +1503,7 @@ SYM_DYNAMIC_LIBS= libcalc${LIB_EXT_VER} libcalc${LIB_EXT_VE} libcalc${LIB_EXT} \
|
||||
SAMPLE_TARGETS= sample_rand${EXT} sample_many${EXT}
|
||||
SAMPLE_STATIC_TARGETS= sample_rand-static${EXT} sample_many-static${EXT}
|
||||
|
||||
# list of cscript programs to that need to be built to satisfy cscript/.all
|
||||
# list of cscript programs that need to be built to satisfy cscript/.all
|
||||
#
|
||||
# NOTE: This list MUST be coordinated with the ${CSCRIPT_TARGETS} variable
|
||||
# in the cscript/Makefile
|
||||
@@ -1558,7 +1558,7 @@ calc-dynamic-only: ${DYNAMIC_FIRST_TARGETS} ${EARLY_TARGETS} \
|
||||
echo " ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \
|
||||
echo " ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \
|
||||
echo "" 1>&2; \
|
||||
echo "NOTE: It is a very good idea to c first clobber any" 1>&2; \
|
||||
echo "NOTE: It is a very good idea to first clobber any" 1>&2; \
|
||||
echo " previously built .o, libs and executables" 1>&2; \
|
||||
echo " before switching to $$r!" 1>&2; \
|
||||
echo "" 1>&2; \
|
||||
@@ -1574,7 +1574,7 @@ calc-dynamic-only: ${DYNAMIC_FIRST_TARGETS} ${EARLY_TARGETS} \
|
||||
echo " ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \
|
||||
echo " ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \
|
||||
echo "" 1>&2; \
|
||||
echo "to clean out any previously build static files." 1>&2; \
|
||||
echo "to clean out any previously built static files." 1>&2; \
|
||||
echo "" 1>&2; \
|
||||
echo "=== aborting make ===" 1>&2; \
|
||||
exit 2; \
|
||||
@@ -1604,7 +1604,7 @@ calc-static-only: ${STATIC_FIRST_TARGETS} ${EARLY_TARGETS} \
|
||||
echo " ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \
|
||||
echo " ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \
|
||||
echo "" 1>&2; \
|
||||
echo "NOTE: It is a very good idea to c first clobber any" 1>&2; \
|
||||
echo "NOTE: It is a very good idea to first clobber any" 1>&2; \
|
||||
echo " previously built .o, libs and executables" 1>&2; \
|
||||
echo " before switching to $$r!" 1>&2; \
|
||||
echo "" 1>&2; \
|
||||
@@ -1620,7 +1620,7 @@ calc-static-only: ${STATIC_FIRST_TARGETS} ${EARLY_TARGETS} \
|
||||
echo " ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \
|
||||
echo " ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \
|
||||
echo "" 1>&2; \
|
||||
echo "to clean out any previously build dynamic files." 1>&2; \
|
||||
echo "to clean out any previously built dynamic files." 1>&2; \
|
||||
echo "" 1>&2; \
|
||||
echo "=== aborting make ===" 1>&2; \
|
||||
exit 4; \
|
||||
@@ -1716,8 +1716,8 @@ seed.o: seed.c no_implicit.arg ${MAKE_FILE}
|
||||
###
|
||||
#
|
||||
# The next set of rules cause the .h files BUILD_H_SRC files to be built
|
||||
# according tot he system and the Makefile variables above. The hsrc rule
|
||||
# is a convenient rule to invoke to built all of the BUILD_H_SRC.
|
||||
# according to the system and the Makefile variables above. The hsrc rule
|
||||
# is a convenient rule to invoke to build all of the BUILD_H_SRC.
|
||||
#
|
||||
# We add in the BUILD_C_SRC files because they are similar to the
|
||||
# BUILD_H_SRC files in terms of the build process.
|
||||
@@ -3161,7 +3161,7 @@ libcustcalc${LIB_EXT}: libcustcalc${LIB_EXT_VERSION}
|
||||
|
||||
###
|
||||
#
|
||||
# building calc-static and static lib*.a libraires
|
||||
# building calc-static and static lib*.a libraries
|
||||
#
|
||||
###
|
||||
|
||||
@@ -3194,10 +3194,10 @@ sample_many-static${EXT}: sample_many.o ${CALC_STATIC_LIBS} ${MAKE_FILE}
|
||||
|
||||
###
|
||||
#
|
||||
# Home grown make dependency rules. Your system make not support
|
||||
# Homegrown make dependency rules. Your system may not support
|
||||
# or have the needed tools. You can ignore this section.
|
||||
#
|
||||
# We will form a skelaton tree of *.c files containing only #include "foo.h"
|
||||
# We will form a skeleton tree of *.c files containing only #include "foo.h"
|
||||
# lines and .h files containing the same lines surrounded by multiple include
|
||||
# prevention lines. This allows us to build a static depend list that will
|
||||
# satisfy all possible cpp symbol definition combinations.
|
||||
@@ -3307,21 +3307,21 @@ h_list:
|
||||
# 1 level version string.
|
||||
#
|
||||
# version:
|
||||
# This rule simply echos the value found in this makefile.
|
||||
# This rule simply echoes the value found in this makefile.
|
||||
# This rule produces the full version string. Note that the
|
||||
# full version could be 4 or 3 levels long depending on the
|
||||
# minor patch number.
|
||||
#
|
||||
# vers:
|
||||
# This rule simply echos the value found in this makefile.
|
||||
# This rule simply echoes the value found in this makefile.
|
||||
# This rule produces only a 3 level version string.
|
||||
#
|
||||
# ver:
|
||||
# This rule simply echos the value found in this makefile.
|
||||
# This rule simply echoes the value found in this makefile.
|
||||
# This rule produces only a 2 level version string.
|
||||
#
|
||||
# ve:
|
||||
# This rule simply echos the value found in this makefile.
|
||||
# This rule simply echoes the value found in this makefile.
|
||||
# This rule produces only a 1 level version string.
|
||||
#
|
||||
###
|
||||
@@ -3413,7 +3413,7 @@ calcliblistfmt:
|
||||
#
|
||||
# Doing a 'make chk' will cause only the context around interesting
|
||||
# (and error) messages to be printed. Unlike 'make check', this
|
||||
# rule does not cause things to be built. I.e., the all rule is
|
||||
# rule does not cause things to be built. i.e., the all rule is
|
||||
# not invoked.
|
||||
#
|
||||
###
|
||||
@@ -3609,34 +3609,38 @@ env:
|
||||
|
||||
mkdebug: env version.c
|
||||
@echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
||||
@echo '=-=-=-=-= Determining the source version =-=-=-=-='
|
||||
@echo '=-=-=-= Determining the source version =-=-=-='
|
||||
@${MAKE} -f Makefile Q= V=@ ver_calc${EXT}
|
||||
-@./ver_calc${EXT}
|
||||
@echo '=-=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ all =-=-=-=-='
|
||||
@echo '=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ all =-=-=-='
|
||||
@${MAKE} -f Makefile Q= V=@ all
|
||||
@echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
|
||||
@echo '=-=-=-=-= Determining the binary version =-=-=-=-='
|
||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||
@echo '=-=-=-= Determining the binary version =-=-=-='
|
||||
-@./calc${EXT} -e -q -v
|
||||
@echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
|
||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||
@echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
||||
|
||||
debug: env
|
||||
@echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
||||
@echo '=-=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ clobber =-=-=-=-='
|
||||
@echo '=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ clobber =-=-=-='
|
||||
@${MAKE} -f Makefile Q= V=@ clobber
|
||||
@echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
|
||||
@echo '=-=-=-=-= Determining the source version =-=-=-=-='
|
||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||
@echo '=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ all =-=-=-='
|
||||
@echo '=-=-= this may take a bit of time =-=-='
|
||||
@${MAKE} -f Makefile Q= V=@ all
|
||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||
@echo '=-=-=-= Determining the source version =-=-=-='
|
||||
@${MAKE} -f Makefile Q= V=@ ver_calc${EXT}
|
||||
-@./ver_calc${EXT}
|
||||
@echo '=-=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ all =-=-=-=-='
|
||||
@${MAKE} -f Makefile Q= V=@ all
|
||||
@echo '=-=-=-=-= Determining the binary version =-=-=-=-='
|
||||
-@./calc${EXT} -e -q -v
|
||||
@echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
|
||||
@echo '=-=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ chk =-=-=-=-='
|
||||
@echo '=-=-=-=-= this may take a while =-=-=-=-='
|
||||
@${MAKE} -f Makefile Q= V=@ chk
|
||||
@echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
|
||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||
@echo -n '=-=-=-= Print #defile values if custom functions '
|
||||
@echo 'are allowed =-=-=-='
|
||||
-@./calc${EXT} -e -q -C 'print custom("sysinfo", 2);'
|
||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||
@echo '=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ check =-=-=-='
|
||||
@echo '=-=-= this may take a while =-=-='
|
||||
@${MAKE} -f Makefile Q= V=@ check
|
||||
@echo '=-=-=-= Back to the main Makefile for $@ rule =-=-=-='
|
||||
@echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
||||
|
||||
###
|
||||
@@ -3747,7 +3751,7 @@ inst_files: ${MAKE_FILE} help/Makefile cal/Makefile custom/Makefile \
|
||||
${Q} LANG=C ${SORT} -u inst_files -o inst_files
|
||||
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
||||
|
||||
# The olduninstall rule will remove calc files from the older, histroic
|
||||
# The olduninstall rule will remove calc files from the older, historic
|
||||
# locations under the /usr/local directory. If you are using the
|
||||
# new default values for ${BINDIR}, ${CALC_SHAREDIR}, ${INCDIR} and ${LIBDIR}
|
||||
# then you can use this rule to clean out the older calc stuff under
|
||||
@@ -3861,7 +3865,7 @@ clobber: custom/Makefile clean
|
||||
|
||||
# install everything
|
||||
#
|
||||
# NOTE: Keep the uninstall rule in reverse order to the install rule
|
||||
# NOTE: Keep the uninstall rule in the reverse order of the install rule
|
||||
#
|
||||
install: custom/Makefile ${LIB_H_SRC} ${BUILD_H_SRC} calc.1 all
|
||||
${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
||||
@@ -4156,7 +4160,7 @@ install: custom/Makefile ${LIB_H_SRC} ${BUILD_H_SRC} calc.1 all
|
||||
|
||||
# Try to remove everything that was installed
|
||||
#
|
||||
# NOTE: Keep the uninstall rule in reverse order to the install rule
|
||||
# NOTE: Keep the uninstall rule in the reverse order of the install rule
|
||||
#
|
||||
uninstall: custom/Makefile
|
||||
${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
|
||||
@@ -4360,7 +4364,7 @@ strip:
|
||||
done
|
||||
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
|
||||
|
||||
# calc-symlink - setup symlinks from stardard locations into the ${T} tree
|
||||
# calc-symlink - setup symlinks from standard locations into the ${T} tree
|
||||
#
|
||||
calc-symlink:
|
||||
${Q}if [ -z "${T}" ]; then \
|
||||
|
58
cal/Makefile
58
cal/Makefile
@@ -18,8 +18,8 @@
|
||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# @(#) $Revision: 30.7 $
|
||||
# @(#) $Id: Makefile,v 30.7 2013/08/11 09:07:26 chongo Exp $
|
||||
# @(#) $Revision: 30.10 $
|
||||
# @(#) $Id: Makefile,v 30.10 2013/09/02 03:02:00 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/bin/calc/cal/RCS/Makefile,v $
|
||||
#
|
||||
# Under source code control: 1991/07/21 05:00:54
|
||||
@@ -179,19 +179,32 @@ MV= mv
|
||||
CO= co
|
||||
TRUE= true
|
||||
TOUCH= touch
|
||||
SED= sed
|
||||
SORT= sort
|
||||
FMT= fmt
|
||||
|
||||
# The calc files to install
|
||||
#
|
||||
CALC_FILES= alg_config.cal beer.cal bernoulli.cal bernpoly.cal \
|
||||
bigprime.cal bindings brentsolve.cal chi.cal chrem.cal constants.cal \
|
||||
deg.cal dms.cal dotest.cal ellip.cal factorial2.cal factorial.cal \
|
||||
gvec.cal hello.cal hms.cal intfile.cal lambertw.cal linear.cal \
|
||||
lnseries.cal lucas.cal lucas_chk.cal lucas_tbl.cal mersenne.cal \
|
||||
mfactor.cal mod.cal natnumset.cal pell.cal pi.cal pix.cal pollard.cal \
|
||||
poly.cal prompt.cal psqrt.cal qtime.cal quat.cal randbitrun.cal \
|
||||
randmprime.cal randombitrun.cal randomrun.cal randrun.cal README \
|
||||
regress.cal repeat.cal screen.cal seedrandom.cal set8700.cal \
|
||||
set8700.line solve.cal specialfunctions.cal statistics.cal sumsq.cal \
|
||||
# This list is prodiced by the detaillist rule when no WARNINGS are detected.
|
||||
#
|
||||
# Please use:
|
||||
#
|
||||
# make calc_files_list
|
||||
#
|
||||
# to keep this list in nice sorted order and to check that these
|
||||
# deailed help files are under RCS control.
|
||||
#
|
||||
CALC_FILES= README alg_config.cal beer.cal bernoulli.cal \
|
||||
bernpoly.cal bigprime.cal bindings brentsolve.cal chi.cal chrem.cal \
|
||||
constants.cal deg.cal dms.cal dotest.cal ellip.cal factorial.cal \
|
||||
factorial2.cal gvec.cal hello.cal hms.cal infinities.cal \
|
||||
intfile.cal intnum.cal lambertw.cal linear.cal lnseries.cal \
|
||||
lucas.cal lucas_chk.cal lucas_tbl.cal mersenne.cal mfactor.cal \
|
||||
mod.cal natnumset.cal pell.cal pi.cal pix.cal pollard.cal poly.cal \
|
||||
prompt.cal psqrt.cal qtime.cal quat.cal randbitrun.cal randmprime.cal \
|
||||
randombitrun.cal randomrun.cal randrun.cal regress.cal repeat.cal \
|
||||
screen.cal seedrandom.cal set8700.cal set8700.line smallfactors.cal \
|
||||
solve.cal specialfunctions.cal statistics.cal strings.cal sumsq.cal \
|
||||
sumtimes.cal surd.cal test1700.cal test2300.cal test2600.cal \
|
||||
test2700.cal test3100.cal test3300.cal test3400.cal test3500.cal \
|
||||
test4000.cal test4100.cal test4600.cal test5100.cal test5200.cal \
|
||||
@@ -244,6 +257,27 @@ calcliblist:
|
||||
fi; \
|
||||
done
|
||||
|
||||
# These next rule help form the ${CALC_FILES} makefile variables above.
|
||||
#
|
||||
calc_files_list:
|
||||
${Q} -(find . -mindepth 1 -maxdepth 1 -type f -name '*.cal' -print | \
|
||||
while read i; do \
|
||||
if [ X"$$i" != X"/dev/null" ]; then \
|
||||
if [ ! -f RCS/$$i,v ]; then \
|
||||
echo "WARNING: $$i not under RCS control" 1>&2; \
|
||||
else \
|
||||
echo $$i; \
|
||||
fi; \
|
||||
fi; \
|
||||
done; \
|
||||
echo '--first_line--'; \
|
||||
echo README; \
|
||||
echo set8700.line; \
|
||||
echo bindings) | \
|
||||
${SED} -e 's:^\./::' | LANG=C ${SORT} | ${FMT} -70 | \
|
||||
${SED} -e '1s/--first_line--/CALC_FILES=/' -e '2,$$s/^/ /' \
|
||||
-e 's/$$/ \\/' -e '$$s/ \\$$//'
|
||||
|
||||
##
|
||||
#
|
||||
# rpm rules
|
||||
|
165
cal/README
165
cal/README
@@ -537,6 +537,20 @@ hms.cal
|
||||
Calculate in hours, minutes, and seconds. See also dmscal.
|
||||
|
||||
|
||||
infinities.cal
|
||||
|
||||
isinfinite(x)
|
||||
iscinf(x)
|
||||
ispinf(x)
|
||||
isninf(x)
|
||||
cinf()
|
||||
ninf()
|
||||
pinf()
|
||||
|
||||
The symbolic handling of infinities. Needed for intnum.cal but might be
|
||||
usefull elsewhere, too.
|
||||
|
||||
|
||||
intfile.cal
|
||||
|
||||
file2be(filename)
|
||||
@@ -564,6 +578,127 @@ intfile.cal
|
||||
of the integer become the last octets of the file.
|
||||
|
||||
|
||||
intnum.cal
|
||||
|
||||
quadtsdeletenodes()
|
||||
quadtscomputenodes(order, expo, eps)
|
||||
quadtscore(a, b, n)
|
||||
quadts(a, b, points)
|
||||
quadglcomputenodes(N)
|
||||
quadgldeletenodes()
|
||||
quadglcore(a, b, n)
|
||||
quadgl(a, b, points)
|
||||
quad(a, b, points = -1, method = "tanhsinh")
|
||||
makerange(start, end, steps)
|
||||
makecircle(radius, center, points)
|
||||
makeellipse(angle, a, b, center, points)
|
||||
makepoints()
|
||||
|
||||
This file offers some methods for numerical integration. Implemented are
|
||||
the Gauss-Legendre and the tanh-sinh quadrature.
|
||||
|
||||
All functions are usefull to some extend but the main function for
|
||||
quadrature is quad(), which is not much more than an abstraction layer.
|
||||
|
||||
The main workers are quadgl() for Gauss-legendre and quadts() for the
|
||||
tanh-sinh quadrature. The limits of the integral can be anything in the
|
||||
complex plane and the extended real line. The latter means that infinite
|
||||
limits are supported by way of the smbolic infinities implemented in the
|
||||
file infinities.cal (automatically linked in by intnum.cal).
|
||||
|
||||
Integration in parts and contour is supported by the "points" argument
|
||||
which takes either a number or a list. the functions starting with "make"
|
||||
allow for a less error prone use.
|
||||
|
||||
The function to evaluate must have the name "f".
|
||||
|
||||
Examples (shamelessly stolen from mpmath):
|
||||
|
||||
; define f(x){return sin(x);}
|
||||
f(x) defined
|
||||
; quadts(0,pi()) - 2
|
||||
0.00000000000000000000
|
||||
; quadgl(0,pi()) - 2
|
||||
0.00000000000000000000
|
||||
|
||||
Sometimes rounding errors accumulate, it might be a good idea to crank up
|
||||
the working precision a notch or two.
|
||||
|
||||
; define f(x){ return exp(-x^2);}
|
||||
f(x) redefined
|
||||
; quadts(0,pinf()) - pi()
|
||||
0.00000000000000000000
|
||||
; quadgl(0,pinf()) - pi()
|
||||
0.00000000000000000001
|
||||
|
||||
; define f(x){ return exp(-x^2);}
|
||||
f(x) redefined
|
||||
; quadgl(ninf(),pinf()) - sqrt(pi())
|
||||
0.00000000000000000000
|
||||
; quadts(ninf(),pinf()) - sqrt(pi())
|
||||
-0.00000000000000000000
|
||||
|
||||
Using the "points" parameter is a bit tricky
|
||||
|
||||
; define f(x){ return 1/x; }
|
||||
f(x) redefined
|
||||
; quadts(1,1,mat[3]={1i,-1,-1i}) - 2i*pi()
|
||||
0.00000000000000000001i
|
||||
; quadgl(1,1,mat[3]={1i,-1,-1i}) - 2i*pi()
|
||||
0.00000000000000000001i
|
||||
|
||||
The make* functions make it a bit simpler
|
||||
|
||||
; quadts(1,1,makepoints(1i,-1,-1i)) - 2i*pi()
|
||||
0.00000000000000000001i
|
||||
; quadgl(1,1,makepoints(1i,-1,-1i)) - 2i*pi()
|
||||
0.00000000000000000001i
|
||||
|
||||
; define f(x){ return abs(sin(x));}
|
||||
f(x) redefined
|
||||
; quadts(0,2*pi(),makepoints(pi())) - 4
|
||||
0.00000000000000000000
|
||||
; quadgl(0,2*pi(),makepoints(pi())) - 4
|
||||
0.00000000000000000000
|
||||
|
||||
The quad*core functions do not offer anything fancy but the third parameter
|
||||
controls the so called "order" which is just the number of nodes computed.
|
||||
This can be quite usefull in some circumstances.
|
||||
|
||||
; quadgldeletenodes()
|
||||
; define f(x){ return exp(x);}
|
||||
f(x) redefined
|
||||
; s=usertime();quadglcore(-3,3)- (exp(3)-exp(-3));e=usertime();e-s
|
||||
0.00000000000000000001
|
||||
2.632164
|
||||
; s=usertime();quadglcore(-3,3)- (exp(3)-exp(-3));e=usertime();e-s
|
||||
0.00000000000000000001
|
||||
0.016001
|
||||
; quadgldeletenodes()
|
||||
; s=usertime();quadglcore(-3,3,14)- (exp(3)-exp(-3));e=usertime();e-s
|
||||
-0.00000000000000000000
|
||||
0.024001
|
||||
; s=usertime();quadglcore(-3,3,14)- (exp(3)-exp(-3));e=usertime();e-s
|
||||
-0.00000000000000000000
|
||||
0
|
||||
|
||||
It is not much but can sum up. The tanh-sinh algorithm is not optimizable
|
||||
as much as the Gauss-Legendre algorithm but is per se much faster.
|
||||
|
||||
; s=usertime();quadtscore(-3,3)- (exp(3)-exp(-3));e=usertime();e-s
|
||||
-0.00000000000000000001
|
||||
0.128008
|
||||
; s=usertime();quadtscore(-3,3)- (exp(3)-exp(-3));e=usertime();e-s
|
||||
-0.00000000000000000001
|
||||
0.036002
|
||||
; s=usertime();quadtscore(-3,3,49)- (exp(3)-exp(-3));e=usertime();e-s
|
||||
-0.00000000000000000000
|
||||
0.036002
|
||||
; s=usertime();quadtscore(-3,3,49)- (exp(3)-exp(-3));e=usertime();e-s
|
||||
-0.00000000000000000000
|
||||
0.01200
|
||||
|
||||
|
||||
lambertw.cal
|
||||
|
||||
lambertw(z,branch)
|
||||
@@ -988,6 +1123,15 @@ set8700.line
|
||||
The set8700.cal file (and dotest.cal) should be read first.
|
||||
|
||||
|
||||
smallfactors.cal
|
||||
|
||||
smallfactors(x0)
|
||||
printsmallfactors(flist)
|
||||
|
||||
Lists the prime factors of numbers smaller than 2^32. Try for example:
|
||||
printsmallfactors(smallfactors(10!)).
|
||||
|
||||
|
||||
solve.cal
|
||||
|
||||
solve(low, high, epsilon)
|
||||
@@ -1236,6 +1380,21 @@ statistics.cal
|
||||
Calculates a bunch of (hopefully) aptly named statistical functions.
|
||||
|
||||
|
||||
strings.cal
|
||||
|
||||
isascii(c)
|
||||
isblank(c)
|
||||
|
||||
Implements some of the functions of libc's ctype.h and strings.h.
|
||||
|
||||
NOTE: A number of the ctype.h and strings.h functions are now builtin
|
||||
functions in calc.
|
||||
|
||||
WARNING: If the remaining functions in this calc resource file become
|
||||
calc builtin functions, then strings.cal may be removed in
|
||||
a future release.
|
||||
|
||||
|
||||
sumsq.cal
|
||||
|
||||
ss(p)
|
||||
@@ -1625,9 +1784,9 @@ zeta2.cal
|
||||
## 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.5 $
|
||||
## @(#) $Id: README,v 30.5 2013/08/11 03:26:46 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/README,v $
|
||||
## @(#) $Revision: 30.8 $
|
||||
## @(#) $Id: README,v 30.8 2013/09/02 01:46:05 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/cal/RCS/README,v $
|
||||
##
|
||||
## Under source code control: 1990/02/15 01:50:32
|
||||
## File existed as early as: before 1990
|
||||
|
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
* bernpoly- Bernoully polynomials B_n(z) for arbitrary n,z..
|
||||
* bernpoly - Bernoully polynomials B_n(z) for arbitrary n,z..
|
||||
*
|
||||
* Copyright (C) 2013 Christoph Zurnieden
|
||||
*
|
||||
* bernpoly 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
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* bernpoly is distributed in the hope that it will be useful, but WITHOUT
|
||||
* 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.
|
||||
@@ -17,8 +17,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.3 $
|
||||
* @(#) $Id: bernpoly.cal,v 30.3 2013/08/11 08:41:38 chongo Exp $
|
||||
* @(#) $Revision: 30.4 $
|
||||
* @(#) $Id: bernpoly.cal,v 30.4 2013/08/18 20:01:53 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/bernpoly.cal,v $
|
||||
*
|
||||
* Under source code control: 2013/08/11 01:31:28
|
||||
|
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
* brentsolve- Root finding with the Brent-Dekker trick.
|
||||
* brentsolve - Root finding with the Brent-Dekker trick
|
||||
*
|
||||
* Copyright (C) 2013 Christoph Zurnieden
|
||||
*
|
||||
* brentsolve 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
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* brentsolve is distributed in the hope that it will be useful, but WITHOUT
|
||||
* 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.
|
||||
@@ -17,14 +17,15 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.3 $
|
||||
* @(#) $Id: brentsolve.cal,v 30.3 2013/08/11 08:41:38 chongo Exp $
|
||||
* @(#) $Revision: 30.4 $
|
||||
* @(#) $Id: brentsolve.cal,v 30.4 2013/08/18 20:01:53 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/brentsolve.cal,v $
|
||||
*
|
||||
* Under source code control: 2013/08/11 01:31:28
|
||||
* File existed as early as: 2013
|
||||
*/
|
||||
|
||||
|
||||
static resource_debug_level;
|
||||
resource_debug_level = config("resource_debug", 0);
|
||||
|
||||
|
@@ -3,11 +3,11 @@
|
||||
*
|
||||
* Copyright (C) 2013 Christoph Zurnieden
|
||||
*
|
||||
* constants 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
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* constants is distributed in the hope that it will be useful, but WITHOUT
|
||||
* 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.
|
||||
@@ -17,8 +17,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.3 $
|
||||
* @(#) $Id: constants.cal,v 30.3 2013/08/11 08:41:38 chongo Exp $
|
||||
* @(#) $Revision: 30.4 $
|
||||
* @(#) $Id: constants.cal,v 30.4 2013/08/18 20:01:53 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/constants.cal,v $
|
||||
*
|
||||
* Under source code control: 2013/08/11 01:31:28
|
||||
|
@@ -3,11 +3,11 @@
|
||||
*
|
||||
* Copyright (C) 2013 Christoph Zurnieden
|
||||
*
|
||||
* factorial 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
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* factorial is distributed in the hope that it will be useful, but WITHOUT
|
||||
* 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.
|
||||
@@ -17,8 +17,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.3 $
|
||||
* @(#) $Id: factorial.cal,v 30.3 2013/08/11 08:41:38 chongo Exp $
|
||||
* @(#) $Revision: 30.4 $
|
||||
* @(#) $Id: factorial.cal,v 30.4 2013/08/18 20:01:53 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/factorial.cal,v $
|
||||
*
|
||||
* Under source code control: 2013/08/11 01:31:28
|
||||
|
@@ -3,22 +3,22 @@
|
||||
*
|
||||
* Copyright (C) 2013 Christoph Zurnieden
|
||||
*
|
||||
* factorial2 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
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* factorial2 is distributed in the hope that it will be useful, but WITHOUT
|
||||
* 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 factorial2 under the filename COPYING-LGPL. You should have
|
||||
* 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.3 $
|
||||
* @(#) $Id: factorial2.cal,v 30.3 2013/08/11 08:41:38 chongo Exp $
|
||||
* @(#) $Revision: 30.4 $
|
||||
* @(#) $Id: factorial2.cal,v 30.4 2013/08/18 20:01:53 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/factorial2.cal,v $
|
||||
*
|
||||
* Under source code control: 2013/08/11 01:31:28
|
||||
|
88
cal/infinities.cal
Normal file
88
cal/infinities.cal
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* infinities - handle infinities symbolically, a little helper file
|
||||
*
|
||||
* Copyright (C) 2013 Christoph Zurnieden
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
static resource_debug_level;
|
||||
resource_debug_level = config("resource_debug", 0);
|
||||
|
||||
|
||||
define isinfinite(x)
|
||||
{
|
||||
if (isstr(x)) {
|
||||
if (strncmp(x, "cinf", 4) == 0
|
||||
|| strncmp(x, "pinf", 4) == 0 || strncmp(x, "ninf", 4) == 0)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
define iscinf(x)
|
||||
{
|
||||
if (isstr(x)) {
|
||||
if (strncmp(x, "cinf", 4) == 0)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
define ispinf(x)
|
||||
{
|
||||
if (isstr(x)) {
|
||||
if (strncmp(x, "pinf", 4) == 0)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
define isninf(x)
|
||||
{
|
||||
if (isstr(x)) {
|
||||
if (strncmp(x, "ninf", 4) == 0)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
define cinf()
|
||||
{
|
||||
return "cinf";
|
||||
}
|
||||
|
||||
define ninf()
|
||||
{
|
||||
return "ninf";
|
||||
}
|
||||
|
||||
define pinf()
|
||||
{
|
||||
return "pinf";
|
||||
}
|
||||
|
||||
|
||||
config("resource_debug", resource_debug_level),;
|
||||
if (config("resource_debug") & 3) {
|
||||
print "isinfinite(x)";
|
||||
print "iscinf(x)";
|
||||
print "ispinf(x)";
|
||||
print "isninf(x)";
|
||||
print "cinf()";
|
||||
print "ninf()";
|
||||
print "pinf()";
|
||||
}
|
728
cal/intnum.cal
Normal file
728
cal/intnum.cal
Normal file
@@ -0,0 +1,728 @@
|
||||
/*
|
||||
* intnum - implementation of tanhsinh- and Gauss-Legendre quadrature
|
||||
*
|
||||
* Copyright (C) 2013 Christoph Zurnieden
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
static resource_debug_level;
|
||||
resource_debug_level = config("resource_debug", 0);
|
||||
|
||||
|
||||
read -once infinities;
|
||||
|
||||
static __CZ__tanhsinh_x;
|
||||
static __CZ__tanhsinh_w;
|
||||
static __CZ__tanhsinh_order;
|
||||
static __CZ__tanhsinh_prec;
|
||||
|
||||
define quadtsdeletenodes()
|
||||
{
|
||||
free(__CZ__tanhsinh_x);
|
||||
free(__CZ__tanhsinh_w);
|
||||
free(__CZ__tanhsinh_order);
|
||||
free(__CZ__tanhsinh_prec);
|
||||
}
|
||||
|
||||
define quadtscomputenodes(order, expo, eps)
|
||||
{
|
||||
local t cht sht chp sum k PI places;
|
||||
local h t0 x w;
|
||||
if (__CZ__tanhsinh_order == order && __CZ__tanhsinh_prec == eps)
|
||||
return 1;
|
||||
__CZ__tanhsinh_order = order;
|
||||
__CZ__tanhsinh_prec = eps;
|
||||
__CZ__tanhsinh_x = list();
|
||||
__CZ__tanhsinh_w = list();
|
||||
/* The tanhsinh algorithm needs a slightly higher precision than G-L */
|
||||
eps = epsilon(eps * 1e-2);
|
||||
places = highbit(1 + int (1 / epsilon())) +1;
|
||||
PI = pi();
|
||||
sum = 0;
|
||||
t0 = 2 ^ (-expo);
|
||||
h = 2 * t0;
|
||||
/*
|
||||
* The author wanted to use the mpmath trick here which was
|
||||
* advertised---and reasonably so!---to be faster. Didn't work out
|
||||
* so well with calc.
|
||||
* PI4 = PI/4;
|
||||
* expt0 = bround(exp(t0),places);
|
||||
* a = bround( PI4 * expt0,places);
|
||||
* b = bround(PI4 / expt0,places);
|
||||
* udelta = bround(exp(h),places);
|
||||
* urdelta = bround(1/udelta,places);
|
||||
*/
|
||||
/* make use of x(-t) = -x(t), w(-t) = w(t) */
|
||||
for (k = 0; k < 20 * order + 1; k++) {
|
||||
/*
|
||||
* x = tanh(pi/2 * sinh(t))
|
||||
* w = pi/2 * cosh(t) / cosh(pi/2 * sinh(t))^2
|
||||
*/
|
||||
t = bround(t0 + k * h, places);
|
||||
|
||||
cht = bround(cosh(t), places);
|
||||
sht = bround(sinh(t), places);
|
||||
chp = bround(cosh(0.5 * PI * sht), places);
|
||||
x = bround(tanh(0.5 * PI * sht), places);
|
||||
w = bround((PI * h * cht) / (2 * chp ^ 2), places);
|
||||
/*
|
||||
* c = bround(exp(a-b),places);
|
||||
* d = bround(1/c,places);
|
||||
* co =bround( (c+d)/2,places);
|
||||
* si =bround( (c-d)/2,places);
|
||||
* x = bround(si / co,places);
|
||||
* w = bround((a+b) / co^2,places);
|
||||
*/
|
||||
if (abs(x - 1) <= eps)
|
||||
break;
|
||||
|
||||
append(__CZ__tanhsinh_x, x);
|
||||
append(__CZ__tanhsinh_w, w);
|
||||
/*
|
||||
* a *= udelta;
|
||||
* b *= urdelta;
|
||||
*/
|
||||
}
|
||||
|
||||
/* Normalize the weights to make them add up to 2 (two) */
|
||||
/*
|
||||
* for(k=0;k < size(__CZ__tanhsinh_w);k++)
|
||||
* sum = bround(sum + __CZ__tanhsinh_w[k],places);
|
||||
* sum *= 2;
|
||||
* for(k=0;k < size(__CZ__tanhsinh_w);k++)
|
||||
* __CZ__tanhsinh_w[k] = bround(2.0 * __CZ__tanhsinh_w[k] / sum,places);
|
||||
*/
|
||||
|
||||
epsilon(eps);
|
||||
return 1;
|
||||
}
|
||||
|
||||
define quadtscore(a, b, n)
|
||||
{
|
||||
local k c d order eps places sum ret x x1 x2 xm w w1 w2 m sizel;
|
||||
|
||||
eps = epsilon(epsilon() * 1e-2);
|
||||
places = highbit(1 + int (1 / epsilon())) +1;
|
||||
m = int (4 + max(0, ln(places / 30.0) / ln(2))) + 2;
|
||||
if (!isnull(n)) {
|
||||
order = n;
|
||||
m = ilog(order / 3, 2) + 1;
|
||||
} else
|
||||
order = 3 * 2 ^ (m - 1);
|
||||
|
||||
quadtscomputenodes(order, m, epsilon());
|
||||
sizel = size(__CZ__tanhsinh_w);
|
||||
|
||||
if (isinfinite(a) || isinfinite(b)) {
|
||||
/*
|
||||
* x
|
||||
* t = ------------
|
||||
* 2
|
||||
* sqrt(1 - y )
|
||||
*/
|
||||
if (isninf(a) && ispinf(b)) {
|
||||
for (k = 0; k < sizel; k++) {
|
||||
x1 = __CZ__tanhsinh_x[k];
|
||||
x2 = -__CZ__tanhsinh_x[k];
|
||||
w1 = __CZ__tanhsinh_w[k];
|
||||
|
||||
x = bround(x1 * (1 - x1 ^ 2) ^ (-1 / 2), places);
|
||||
xm = bround(x2 * (1 - x2 ^ 2) ^ (-1 / 2), places);
|
||||
w = bround(w1 * (((1 - x1 ^ 2) ^ (-1 / 2)) / (1 - x1 ^ 2)),
|
||||
places);
|
||||
w2 = bround(w1 * (((1 - x2 ^ 2) ^ (-1 / 2)) / (1 - x2 ^ 2)),
|
||||
places);
|
||||
sum += bround(w * f(x), places);
|
||||
sum += bround(w2 * f(xm), places);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 1
|
||||
* t = - - + b + 1
|
||||
* x
|
||||
*/
|
||||
else if (isninf(a) && !iscinf(b)) {
|
||||
for (k = 0; k < sizel; k++) {
|
||||
x1 = __CZ__tanhsinh_x[k];
|
||||
x2 = -__CZ__tanhsinh_x[k];
|
||||
w1 = __CZ__tanhsinh_w[k];
|
||||
|
||||
x = bround((b + 1) - (2 / (x1 + 1)), places);
|
||||
xm = bround((b + 1) - (2 / (x2 + 1)), places);
|
||||
w = bround(w1 * (1 / 2 * (2 / (x1 + 1)) ^ 2), places);
|
||||
w2 = bround(w1 * (1 / 2 * (2 / (x2 + 1)) ^ 2), places);
|
||||
sum += bround(w * f(x), places);
|
||||
sum += bround(w2 * f(xm), places);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 1
|
||||
* t = - + a - 1
|
||||
* x
|
||||
*/
|
||||
else if (!iscinf(a) && ispinf(b)) {
|
||||
for (k = 0; k < sizel; k++) {
|
||||
x1 = __CZ__tanhsinh_x[k];
|
||||
x2 = -__CZ__tanhsinh_x[k];
|
||||
w1 = __CZ__tanhsinh_w[k];
|
||||
x = bround((a - 1) + (2 / (x1 + 1)), places);
|
||||
xm = bround((a - 1) + (2 / (x2 + 1)), places);
|
||||
w = bround(w1 * (((1 / 2) * (2 / (x1 + 1)) ^ 2)), places);
|
||||
w2 = bround(w1 * (((1 / 2) * (2 / (x2 + 1)) ^ 2)), places);
|
||||
sum += bround(w * f(x), places);
|
||||
sum += bround(w2 * f(xm), places);
|
||||
}
|
||||
} else if (isninf(a) || isninf(b)) {
|
||||
/*TODO: swap(a,b) and negate(w)? Lookup! */
|
||||
return newerror("quadtscore: reverse limits?");
|
||||
} else {
|
||||
return
|
||||
newerror("quadtscore: complex infinity not yet implemented");
|
||||
}
|
||||
ret = sum;
|
||||
} else {
|
||||
/* Avoid rounding errors */
|
||||
if (a == -1 && b == 1) {
|
||||
c = 1;
|
||||
d = 0;
|
||||
} else {
|
||||
c = (b - a) / 2;
|
||||
d = (b + a) / 2;
|
||||
}
|
||||
sum = 0;
|
||||
for (k = 0; k < sizel; k++) {
|
||||
sum +=
|
||||
bround(__CZ__tanhsinh_w[k] * f(c * __CZ__tanhsinh_x[k] + d),
|
||||
places);
|
||||
sum +=
|
||||
bround(__CZ__tanhsinh_w[k] * f(c * -__CZ__tanhsinh_x[k] + d),
|
||||
places);
|
||||
}
|
||||
ret = c * sum;
|
||||
}
|
||||
epsilon(eps);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static __CZ__quadts_error;
|
||||
|
||||
define quadts(a, b, points)
|
||||
{
|
||||
local k sp results epsbits nsect interval length segment slope C ;
|
||||
local x1 x2 y1 y2 sum D1 D2 D3 D4;
|
||||
if (param(0) < 2)
|
||||
return newerror("quadts: not enough arguments");
|
||||
epsbits = highbit(1 + int (1 / epsilon())) +1;
|
||||
if (param(0) < 3 || isnull(points)) {
|
||||
/* return as given */
|
||||
return quadtscore(a, b);
|
||||
} else {
|
||||
if ((isinfinite(a) || isinfinite(b))
|
||||
&& (!ismat(points) && !islist(points)))
|
||||
return
|
||||
newerror(strcat
|
||||
("quadts: segments of infinite length ",
|
||||
"are not yet supported"));
|
||||
if (ismat(points) || islist(points)) {
|
||||
sp = size(points);
|
||||
if (sp == 0)
|
||||
return
|
||||
newerror(strcat
|
||||
("quadts: variable 'points` must be a list or ",
|
||||
"1d-matrix of a length > 0"));
|
||||
/* check if all points are numbers */
|
||||
for (k = 0; k < sp; k++) {
|
||||
if (!isnum(points[k]))
|
||||
return
|
||||
newerror(strcat
|
||||
("quadts: elements of 'points` must be",
|
||||
" numbers only"));
|
||||
}
|
||||
/* We have n-1 intervals and a and b, hence n-1 + 2 results */
|
||||
results = mat[sp + 1];
|
||||
if (a != points[0]) {
|
||||
results[0] = quadtscore(a, points[0]);
|
||||
} else {
|
||||
results[0] = 0;
|
||||
}
|
||||
if (sp == 1) {
|
||||
if (b != points[0]) {
|
||||
results[1] = quadtscore(points[0], b);
|
||||
} else {
|
||||
results[1] = 0;
|
||||
}
|
||||
} else {
|
||||
for (k = 1; k < sp; k++) {
|
||||
results[k] = quadtscore(points[k - 1], points[k]);
|
||||
}
|
||||
if (b != points[k - 1]) {
|
||||
results[k] = quadtscore(points[k - 1], b);
|
||||
} else {
|
||||
results[k] = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!isint(points) || points <= 0)
|
||||
return newerror(strcat("quadts: variable 'points` must be a ",
|
||||
"list or a positive integer"));
|
||||
/* Taking "points" as the number of equally spaced intervals */
|
||||
results = mat[points + 1];
|
||||
/* It is easy if a,b lie on the real line */
|
||||
if (isreal(a) && isreal(b)) {
|
||||
length = abs(a - b);
|
||||
segment = length / points;
|
||||
|
||||
for (k = 1; k <= points; k++) {
|
||||
results[k - 1] =
|
||||
quadtscore(a + (k - 1) * segment, a + k * segment);
|
||||
}
|
||||
} else {
|
||||
/* We have at least one complex limit but treat "points" still
|
||||
* as the number of equally spaced intervals on a straight line
|
||||
* connecting a and b. Computing the segments here is a bit
|
||||
* more complicated but not much, it should have been taught in
|
||||
* highschool.
|
||||
* Other contours by way of a list of points */
|
||||
slope = (im(b) - im(a)) / (re(b) - re(a));
|
||||
C = (im(a) + slope) * re(a);
|
||||
length = abs(re(a) - re(b));
|
||||
segment = length / points;
|
||||
|
||||
/* y = mx+C where m is the slope, x is the real part and y the
|
||||
* imaginary part */
|
||||
if(re(a)>re(b))swap(a,b);
|
||||
for (k = re(a); k <= (re(b)); k+=segment) {
|
||||
x1 = slope*(k) + C;
|
||||
results[k] = quadtscore(k + x1 * 1i);
|
||||
}
|
||||
} /* else of isreal */
|
||||
} /* else of ismat|islist */
|
||||
} /* else of isnull(points) */
|
||||
/* With a bit of undeserved luck we have a result by now. */
|
||||
sp = size(results);
|
||||
for (k = 0; k < sp; k++) {
|
||||
sum += results[k];
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
static __CZ__gl_x;
|
||||
static __CZ__gl_w;
|
||||
static __CZ__gl_order;
|
||||
static __CZ__gl_prec;
|
||||
|
||||
define quadglcomputenodes(N)
|
||||
{
|
||||
local places k l x w t1 t2 t3 t4 t5 r tmp;
|
||||
|
||||
if (__CZ__gl_order == N && __CZ__gl_prec == epsilon())
|
||||
return;
|
||||
|
||||
__CZ__gl_x = mat[N];
|
||||
__CZ__gl_w = mat[N];
|
||||
__CZ__gl_order = N;
|
||||
__CZ__gl_prec = epsilon();
|
||||
|
||||
places = highbit(1 + int (1 / epsilon())) +1;
|
||||
|
||||
/*
|
||||
* Compute roots and weights (doing it inline seems to be fastest)
|
||||
* Trick shamelessly stolen from D. Bailey et .al (program "arprec")
|
||||
*/
|
||||
for (k = 1; k <= N//2; k++) {
|
||||
r = bround(cos(pi() * (k - .25) / (N + .5)), places);
|
||||
while (1) {
|
||||
t1 = 1, t2 = 0;
|
||||
for (l = 1; l <= N; l++) {
|
||||
t3 = t2;
|
||||
t2 = t1;
|
||||
t1 = bround(((2 * l - 1) * r * t2 - (l - 1) * t3) / l, places);
|
||||
}
|
||||
t4 = bround(N * (r * t1 - t2) / ((r ^ 2) - 1), places);
|
||||
t5 = r;
|
||||
tmp = t1 / t4;
|
||||
r = r - tmp;
|
||||
if (abs(tmp) <= epsilon())
|
||||
break;
|
||||
}
|
||||
x = r;
|
||||
w = bround(2 / ((1 - r ^ 2) * t4 ^ 2), places);
|
||||
|
||||
__CZ__gl_x[k - 1] = x;
|
||||
__CZ__gl_w[k - 1] = w;
|
||||
__CZ__gl_x[N - k] = -__CZ__gl_x[k - 1];
|
||||
__CZ__gl_w[N - k] = __CZ__gl_w[k - 1];
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
define quadgldeletenodes()
|
||||
{
|
||||
free(__CZ__gl_x);
|
||||
free(__CZ__gl_w);
|
||||
free(__CZ__gl_order);
|
||||
free(__CZ__gl_prec);
|
||||
}
|
||||
|
||||
define quadglcore(a, b, n)
|
||||
{
|
||||
local k c d digs order eps places sum ret err x x1 w w1 m;
|
||||
local phalf x2 px1 spx1 u b1 a1 half;
|
||||
|
||||
eps = epsilon(epsilon() * 1e-2);
|
||||
places = highbit(1 + int (1 / epsilon())) +1;
|
||||
if (!isnull(n))
|
||||
order = n;
|
||||
else {
|
||||
m = int (4 + max(0, ln(places / 30.0) / ln(2))) + 2;
|
||||
order = 3 * 2 ^ (m - 1);
|
||||
}
|
||||
|
||||
|
||||
quadglcomputenodes(order, 1);
|
||||
|
||||
if (isinfinite(a) || isinfinite(b)) {
|
||||
if (isninf(a) && ispinf(b)) {
|
||||
for (k = 0; k < order; k++) {
|
||||
x1 = __CZ__gl_x[k];
|
||||
w1 = __CZ__gl_w[k];
|
||||
|
||||
x = bround(x1 * (1 - x1 ^ 2) ^ (-1 / 2), places);
|
||||
w = bround(w1 * (((1 - x1 ^ 2) ^ (-1 / 2)) / (1 - x1 ^ 2)),
|
||||
places);
|
||||
sum += bround(w * f(x), places);
|
||||
}
|
||||
} else if (isninf(a) && !iscinf(b)) {
|
||||
for (k = 0; k < order; k++) {
|
||||
x1 = __CZ__gl_x[k];
|
||||
w1 = __CZ__gl_w[k];
|
||||
|
||||
x = bround((b + 1) - (2 / (x1 + 1)), places);
|
||||
w = bround(w1 * (1 / 2 * (2 / (x1 + 1)) ^ 2), places);
|
||||
sum += bround(w * f(x), places);
|
||||
}
|
||||
} else if (!iscinf(a) && ispinf(b)) {
|
||||
for (k = 0; k < order; k++) {
|
||||
x1 = __CZ__gl_x[k];
|
||||
w1 = __CZ__gl_w[k];
|
||||
x = bround((a - 1) + (2 / (x1 + 1)), places);
|
||||
w = bround(w1 * (((1 / 2) * (2 / (x1 + 1)) ^ 2)), places);
|
||||
sum += bround(w * f(x), places);
|
||||
}
|
||||
} else if (isninf(a) || isninf(b)) {
|
||||
/*TODO: swap(a,b) and negate(w)? Lookup! */
|
||||
return newerror("quadglcore: reverse limits?");
|
||||
} else
|
||||
return
|
||||
newerror("quadglcore: complex infinity not yet implemented");
|
||||
ret = sum;
|
||||
} else {
|
||||
/* Avoid rounding errors */
|
||||
if (a == -1 && b == 1) {
|
||||
c = 1;
|
||||
d = 0;
|
||||
} else {
|
||||
c = (b - a) / 2;
|
||||
d = (b + a) / 2;
|
||||
}
|
||||
sum = 0;
|
||||
for (k = 0; k < order; k++) {
|
||||
sum += bround(__CZ__gl_w[k] * f(c * __CZ__gl_x[k] + d), places);
|
||||
}
|
||||
ret = c * sum;
|
||||
}
|
||||
epsilon(eps);
|
||||
return ret;
|
||||
}
|
||||
|
||||
define quadgl(a, b, points)
|
||||
{
|
||||
local k sp results epsbits nsect interval length segment slope C x1 y1 x2
|
||||
y2;
|
||||
local sum D1 D2 D3 D4;
|
||||
if (param(0) < 2)
|
||||
return newerror("quadgl: not enough arguments");
|
||||
epsbits = highbit(1 + int (1 / epsilon())) +1;
|
||||
if (isnull(points)) {
|
||||
/* return as given */
|
||||
return quadglcore(a, b);
|
||||
} else {
|
||||
/* But if we could half the time needed to execute a single operation
|
||||
* we could do all of it in just twice that time. */
|
||||
if (isinfinite(a) || isinfinite(b)
|
||||
&& (!ismat(points) && !islist(points)))
|
||||
return
|
||||
newerror(strcat
|
||||
("quadgl: multiple segments of infinite length ",
|
||||
"are not yet supported"));
|
||||
if (ismat(points) || islist(points)) {
|
||||
sp = size(points);
|
||||
if (sp == 0)
|
||||
return
|
||||
newerror(strcat
|
||||
("quadgl: variable 'points` must be a list or ",
|
||||
"1d-matrix of a length > 0"));
|
||||
/* check if all points are numbers */
|
||||
for (k = 0; k < sp; k++) {
|
||||
if (!isnum(points[k]))
|
||||
return
|
||||
newerror(strcat
|
||||
("quadgl: elements of 'points` must be ",
|
||||
"numbers only"));
|
||||
}
|
||||
/* We have n-1 intervals and a and b, hence n-1 + 2 results */
|
||||
results = mat[sp + 1];
|
||||
if (a != points[0]) {
|
||||
results[0] = quadglcore(a, points[0]);
|
||||
} else {
|
||||
results[0] = 0;
|
||||
}
|
||||
if (sp == 1) {
|
||||
if (b != points[0]) {
|
||||
results[1] = quadglcore(points[0], b);
|
||||
} else {
|
||||
results[1] = 0;
|
||||
}
|
||||
} else {
|
||||
for (k = 1; k < sp; k++) {
|
||||
results[k] = quadglcore(points[k - 1], points[k]);
|
||||
}
|
||||
if (b != points[k - 1]) {
|
||||
results[k] = quadglcore(points[k - 1], b);
|
||||
} else {
|
||||
results[k] = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!isint(points) || points <= 0)
|
||||
return newerror(strcat("quadgl: variable 'points` must be a ",
|
||||
"list or a positive integer"));
|
||||
/* Taking "points" as the number of equally spaced intervals */
|
||||
results = mat[points + 1];
|
||||
/* It is easy if a,b lie on the real line */
|
||||
if (isreal(a) && isreal(b)) {
|
||||
length = abs(a - b);
|
||||
segment = length / points;
|
||||
|
||||
for (k = 1; k <= points; k++) {
|
||||
results[k - 1] =
|
||||
quadglcore(a + (k - 1) * segment, a + k * segment);
|
||||
}
|
||||
} else {
|
||||
/* Other contours by way of a list of points */
|
||||
slope = (im(b) - im(a)) / (re(b) - re(a));
|
||||
C = (im(a) + slope) * re(a);
|
||||
length = abs(re(a) - re(b));
|
||||
segment = length / points;
|
||||
|
||||
/* y = mx+C where m is the slope, x is the real part and y the
|
||||
* imaginary part */
|
||||
if(re(a)>re(b))swap(a,b);
|
||||
for (k = re(a); k <= (re(b)); k+=segment) {
|
||||
x1 = slope*(k) + C;
|
||||
results[k] = quadglcore(k + x1 * 1i);
|
||||
}
|
||||
} /* else of isreal */
|
||||
} /* else of ismat|islist */
|
||||
} /* else of isnull(points) */
|
||||
/* With a bit of undeserved luck we have a result by now. */
|
||||
sp = size(results);
|
||||
for (k = 0; k < sp; k++) {
|
||||
sum += results[k];
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
define quad(a, b, points = -1, method = "tanhsinh")
|
||||
{
|
||||
if (isnull(a) || isnull(b) || param(0) < 2)
|
||||
return newerror("quad: both limits must be given");
|
||||
if (isstr(a)) {
|
||||
if (strncmp(a, "cinf", 1) == 0)
|
||||
return
|
||||
newerror(strcat
|
||||
("quad: complex infinity not yet supported, use",
|
||||
" 'pinf' or 'ninf' respectively"));
|
||||
}
|
||||
if (isstr(b)) {
|
||||
if (strncmp(b, "cinf", 1) == 0)
|
||||
return
|
||||
newerror(strcat
|
||||
("quad: complex infinity not yet supported, use",
|
||||
" 'pinf' or 'ninf' respectively"));
|
||||
}
|
||||
|
||||
if (param(0) == 3) {
|
||||
if (isstr(points))
|
||||
method = points;
|
||||
}
|
||||
|
||||
if (strncmp(method, "tanhsinh", 1) == 0) {
|
||||
if (!isstr(points)) {
|
||||
if (points == -1) {
|
||||
return quadts(a, b);
|
||||
} else {
|
||||
return quadts(a, b, points);
|
||||
}
|
||||
} else {
|
||||
return quadts(a, b);
|
||||
}
|
||||
}
|
||||
|
||||
if (strncmp(method, "gausslegendre", 1) == 0) {
|
||||
if (!isstr(points)) {
|
||||
if (points == -1) {
|
||||
return quadgl(a, b);
|
||||
} else {
|
||||
return quadgl(a, b, points);
|
||||
}
|
||||
} else {
|
||||
return quadgl(a, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
define makerange(start, end, steps)
|
||||
{
|
||||
local ret k l step C length slope x1 x2 y1 y2;
|
||||
local segment;
|
||||
steps = int (steps);
|
||||
if (steps < 1) {
|
||||
return newerror("makerange: number of steps must be > 0");
|
||||
}
|
||||
if (!isnum(start) || !isnum(end)) {
|
||||
return newerror("makerange: only numbers are supported yet");
|
||||
}
|
||||
if (isreal(start) && isreal(end)) {
|
||||
step = (end - start) / (steps);
|
||||
print step;
|
||||
ret = mat[steps + 1];
|
||||
for (k = 0; k <= steps; k++) {
|
||||
ret[k] = k * step + start;
|
||||
}
|
||||
} else {
|
||||
ret = mat[steps + 1];
|
||||
if (re(start) > re(end)) {
|
||||
swap(start, end);
|
||||
}
|
||||
|
||||
slope = (im(end) - im(start)) / (re(end) - re(start));
|
||||
C = im(start) - slope * re(start);
|
||||
length = abs(re(start) - re(end));
|
||||
segment = length / (steps);
|
||||
|
||||
for (k = re(start), l = 0; k <= (re(end)); k += segment, l++) {
|
||||
x1 = slope * (k) + C;
|
||||
ret[l] = k + x1 * 1i;
|
||||
}
|
||||
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
define makecircle(radius, center, points)
|
||||
{
|
||||
local ret k a b twopi centerx centery;
|
||||
if (!isint(points) || points < 2) {
|
||||
return
|
||||
newerror("makecircle: number of points is not a positive integer");
|
||||
}
|
||||
if (!isnum(center)) {
|
||||
return newerror("makecircle: center does not lie on the complex plane");
|
||||
}
|
||||
if (!isreal(radius) || radius <= 0) {
|
||||
return newerror("makecircle: radius is not a real > 0");
|
||||
}
|
||||
ret = mat[points];
|
||||
twopi = 2 * pi();
|
||||
centerx = re(center);
|
||||
centery = im(center);
|
||||
for (k = 0; k < points; k++) {
|
||||
a = centerx + radius * cos(twopi * k / points);
|
||||
b = centery + radius * sin(twopi * k / points);
|
||||
ret[k] = a + b * 1i;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
define makeellipse(angle, a, b, center, points)
|
||||
{
|
||||
local ret k x y twopi centerx centery;
|
||||
if (!isint(points) || points < 2) {
|
||||
return
|
||||
newerror("makeellipse: number of points is not a positive integer");
|
||||
}
|
||||
if (!isnum(center)) {
|
||||
return
|
||||
newerror("makeellipse: center does not lie on the complex plane");
|
||||
}
|
||||
if (!isreal(a) || a <= 0) {
|
||||
return newerror("makecircle: a is not a real > 0");
|
||||
}
|
||||
if (!isreal(b) || b <= 0) {
|
||||
return newerror("makecircle: b is not a real > 0");
|
||||
}
|
||||
if (!isreal(angle)) {
|
||||
return newerror("makecircle: angle is not a real");
|
||||
}
|
||||
ret = mat[points];
|
||||
twopi = 2 * pi();
|
||||
centerx = re(center);
|
||||
centery = im(center);
|
||||
for (k = 0; k < points; k++) {
|
||||
x = centerx + a * cos(twopi * k / points) * cos(angle)
|
||||
- b * sin(twopi * k / points) * sin(angle);
|
||||
y = centerx + a * cos(twopi * k / points) * sin(angle)
|
||||
+ b * sin(twopi * k / points) * cos(angle);
|
||||
ret[k] = x + y * 1i;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
define makepoints()
|
||||
{
|
||||
local ret k;
|
||||
ret = mat[param(0)];
|
||||
for (k = 0; k < param(0); k++) {
|
||||
if (!isnum(param(k + 1))) {
|
||||
return
|
||||
newerror(strcat
|
||||
("makepoints: parameter number \"", str(k + 1),
|
||||
"\" is not a number"));
|
||||
}
|
||||
ret[k] = param(k + 1);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
config("resource_debug", resource_debug_level),;
|
||||
if (config("resource_debug") & 3) {
|
||||
print "quadtsdeletenodes()";
|
||||
print "quadtscomputenodes(order, expo, eps)";
|
||||
print "quadtscore(a,b,n)";
|
||||
print "quadts(a,b,points)";
|
||||
print "quadglcomputenodes(N)";
|
||||
print "quadgldeletenodes()";
|
||||
print "quadglcore(a,b,n)";
|
||||
print "quadgl(a,b,points)";
|
||||
print "quad(a,b,points=-1,method=\"tanhsinh\")";
|
||||
print "makerange(start, end, steps)";
|
||||
print "makecircle(radius, center, points)";
|
||||
print "makeellipse(angle, a, b, center, points)";
|
||||
print "makepoints(a1,[...])";
|
||||
}
|
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
* lambertw- Lambert's W-function
|
||||
* lambertw - Lambert's W-function
|
||||
*
|
||||
* Copyright (C) 2013 Christoph Zurnieden
|
||||
*
|
||||
* lambertw 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
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* lambertw is distributed in the hope that it will be useful, but WITHOUT
|
||||
* 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.
|
||||
@@ -17,8 +17,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.3 $
|
||||
* @(#) $Id: lambertw.cal,v 30.3 2013/08/11 08:41:38 chongo Exp $
|
||||
* @(#) $Revision: 30.4 $
|
||||
* @(#) $Id: lambertw.cal,v 30.4 2013/08/18 20:01:53 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/lambertw.cal,v $
|
||||
*
|
||||
* Under source code control: 2013/08/11 01:31:28
|
||||
|
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
* special_functions - special functions (e.g.: gamma, zeta, psi)
|
||||
* lnseries - special functions (e.g.: gamma, zeta, psi)
|
||||
*
|
||||
* Copyright (C) 2013 Christoph Zurnieden
|
||||
*
|
||||
* lnseries.cal 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
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* lnseries.cal is distributed in the hope that it will be useful, but WITHOUT
|
||||
* 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.
|
||||
@@ -17,8 +17,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.3 $
|
||||
* @(#) $Id: lnseries.cal,v 30.3 2013/08/11 08:41:38 chongo Exp $
|
||||
* @(#) $Revision: 30.4 $
|
||||
* @(#) $Id: lnseries.cal,v 30.4 2013/08/18 20:01:53 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/lnseries.cal,v $
|
||||
*
|
||||
* Under source code control: 2013/08/11 01:31:28
|
||||
|
@@ -17,8 +17,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.1 $
|
||||
* @(#) $Id: lucas.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $
|
||||
* @(#) $Revision: 30.2 $
|
||||
* @(#) $Id: lucas.cal,v 30.2 2013/09/27 08:58:46 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/lucas.cal,v $
|
||||
*
|
||||
* Under source code control: 1990/05/03 16:49:51
|
||||
@@ -442,7 +442,7 @@ lucas(h, n)
|
||||
* See the function gen_v1() for details on the value of v(1).
|
||||
*
|
||||
* input:
|
||||
* h - h as in h*2^n-1 (h mod 2 != 0)
|
||||
* h - h as in h*2^n-1
|
||||
* n - n as in h*2^n-1
|
||||
* v1 - gen_v1(h,n) (see function below)
|
||||
*
|
||||
@@ -475,13 +475,6 @@ gen_u0(h, n, v1)
|
||||
quit "bogus arg: v1 is <= 0";
|
||||
}
|
||||
|
||||
/*
|
||||
* enforce the h mod rules
|
||||
*/
|
||||
if (h%2 == 0) {
|
||||
quit "h must not be even";
|
||||
}
|
||||
|
||||
/*
|
||||
* enforce the h > 0 and n >= 2 rules
|
||||
*/
|
||||
|
146
cal/regress.cal
146
cal/regress.cal
@@ -17,8 +17,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.8 $
|
||||
* @(#) $Id: regress.cal,v 30.8 2013/08/11 08:41:38 chongo Exp $
|
||||
* @(#) $Revision: 30.12 $
|
||||
* @(#) $Id: regress.cal,v 30.12 2013/09/02 02:32:55 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/regress.cal,v $
|
||||
*
|
||||
* Under source code control: 1990/02/15 01:50:36
|
||||
@@ -768,6 +768,8 @@ print '016: parsed test_bignums()';
|
||||
|
||||
/*
|
||||
* Test many of the built-in functions.
|
||||
*
|
||||
* See test_functionss() starting at test 9000 for more built-in function tests.
|
||||
*/
|
||||
define test_functions()
|
||||
{
|
||||
@@ -1445,7 +1447,12 @@ define test_functions()
|
||||
vrfy(jacobi(-1,-1) == 0, '1236: jacobi(-1,-1) == 0');
|
||||
vrfy(jacobi(0,-1) == 0, '1237: jacobi(0,-1) == 0');
|
||||
|
||||
print '1238: Ending test_functions';
|
||||
/*
|
||||
* NOTE: Function tests are continued in test_functionss()
|
||||
* starting at test 9000.
|
||||
*/
|
||||
|
||||
print '1293: Ending test_functions';
|
||||
}
|
||||
print '017: parsed test_functions()';
|
||||
|
||||
@@ -1462,14 +1469,14 @@ define _test_underscore()
|
||||
local _a = 27;
|
||||
local __a = 23209;
|
||||
|
||||
print "1290: Beginning _test_underscore";
|
||||
print "1294: Beginning _test_underscore";
|
||||
|
||||
vrfy(_a == 27, '1291: _a == 27');
|
||||
vrfy(_ == 49, '1292: _ == 49');
|
||||
vrfy(__ == 63, '1293: __ == 63');
|
||||
vrfy(__a == 23209, '1294: __a == 23209');
|
||||
vrfy(_a == 27, '1295: _a == 27');
|
||||
vrfy(_ == 49, '1296: _ == 49');
|
||||
vrfy(__ == 63, '1297: __ == 63');
|
||||
vrfy(__a == 23209, '1298: __a == 23209');
|
||||
|
||||
print "1295: Ending _test_underscore";
|
||||
print "1299: Ending _test_underscore";
|
||||
}
|
||||
print '020: parsed _test_underscore';
|
||||
|
||||
@@ -5031,7 +5038,7 @@ vrfy(i == 9, '151: i == 9');
|
||||
|
||||
|
||||
/*
|
||||
* test_commaeq - test changes to , and =
|
||||
* test_commaeq - test changes to = and ,
|
||||
*/
|
||||
obj xx5600 {} xx5600;
|
||||
print '152: obj xx5600 {} xx5600';
|
||||
@@ -7929,9 +7936,128 @@ print '8901: read -once "test8900"';
|
||||
read -once "test8900";
|
||||
print '8902: about to run test8900(1,,8903)';
|
||||
testnum = test8900(1,,8903);
|
||||
print '8999: ecnt = 203;'
|
||||
ecnt = 203;
|
||||
/* 89xx: test calc resource functions by Christoph Zurnieden */
|
||||
|
||||
|
||||
/*
|
||||
* Test more of the built-in functions.
|
||||
*
|
||||
* See test_functions() (test 700 - 1238) for other built-in function tests.
|
||||
*/
|
||||
define test_functions2()
|
||||
{
|
||||
print '9001: Beginning test_functions2';
|
||||
|
||||
/* ctype function tests */
|
||||
vrfy(isalnum("A") == 1, '9002: isalnum("A") == 1');
|
||||
vrfy(isalnum("a") == 1, '9003: isalnum("a") == 1');
|
||||
vrfy(isalnum("2") == 1, '9004: isalnum("2") == 1');
|
||||
vrfy(isalnum("\t") == 0, '9005: isalnum("\\t") == 0');
|
||||
|
||||
vrfy(isalpha("A") == 1, '9006: isalpha("A") == 1');
|
||||
vrfy(isalpha("a") == 1, '9007: isalpha("a") == 1');
|
||||
vrfy(isalpha("2") == 0, '9008: isalpha("2") == 0');
|
||||
vrfy(isalpha("\t") == 0, '9009: isalpha("\\t") == 0');
|
||||
|
||||
vrfy(iscntrl("A") == 0, '9010: iscntrl("A") == 0');
|
||||
vrfy(iscntrl("a") == 0, '9011: iscntrl("a") == 0');
|
||||
vrfy(iscntrl("2") == 0, '9012: iscntrl("2") == 0');
|
||||
vrfy(iscntrl("\t") == 1, '9013: iscntrl("\\t") == 1');
|
||||
|
||||
vrfy(isdigit("A") == 0, '9014: isdigit("A") == 0');
|
||||
vrfy(isdigit("a") == 0, '9015: isdigit("a") == 0');
|
||||
vrfy(isdigit("2") == 1, '9016: isdigit("2") == 1');
|
||||
vrfy(isdigit("\t") == 0, '9017: isdigit("\\t") == 0');
|
||||
|
||||
vrfy(isgraph("A") == 1, '9018: isgraph("A") == 1');
|
||||
vrfy(isgraph("a") == 1, '9019: isgraph("a") == 1');
|
||||
vrfy(isgraph("2") == 1, '9020: isgraph("2") == 1');
|
||||
vrfy(isgraph("\t") == 0, '9021: isgraph("\\t") == 0');
|
||||
|
||||
vrfy(islower("A") == 0, '9022: islower("A") == 0');
|
||||
vrfy(islower("a") == 1, '9023: islower("a") == 1');
|
||||
vrfy(islower("1") == 0, '9024: islower("1") == 0');
|
||||
|
||||
vrfy(isprint("A") == 1, '9025: isprint("A") == 1');
|
||||
vrfy(isprint("a") == 1, '9026: isprint("a") == 1');
|
||||
vrfy(isprint(" ") == 1, '9027: isprint(" ") == 1');
|
||||
vrfy(isprint("\t") == 0, '9028: isprint("\\t") == 0');
|
||||
|
||||
vrfy(ispunct("A") == 0, '9029: ispunct("A") == 0');
|
||||
vrfy(ispunct("a") == 0, '9030: ispunct("a") == 0');
|
||||
vrfy(ispunct(" ") == 0, '9031: ispunct(" ") == 0');
|
||||
vrfy(ispunct("?") == 1, '9032: ispunct("?") == 1');
|
||||
|
||||
vrfy(isspace("A") == 0, '9033: isspace("A") == 0');
|
||||
vrfy(isspace("Krik") == 0, '9034: isspace("Krik") == 0');
|
||||
vrfy(isspace(" ") == 1, '9035: isspace(" ") == 1');
|
||||
vrfy(isspace("?") == 0, '9036: isspace("?") == 0');
|
||||
|
||||
vrfy(isupper("A") == 1, '9037: isupper("A") == 1');
|
||||
vrfy(isupper("a") == 0, '9038: isupper("a") == 0');
|
||||
vrfy(isupper("1") == 0, '9039: isupper("1") == 0');
|
||||
|
||||
vrfy(isxdigit("A") == 1, '9040: isxdigit("A") == 1');
|
||||
vrfy(isxdigit("f") == 1, '9041: isxdigit("f") == 1');
|
||||
vrfy(isxdigit("2") == 1, '9042: isxdigit("2") == 1');
|
||||
vrfy(isxdigit("x") == 0, '9043: isxdigit("x") == 0');
|
||||
|
||||
vrfy(strcasecmp("ab", "aBc") == -1,
|
||||
'9044: strcasecmp("ab", "aBc") == -1');
|
||||
vrfy(strcasecmp("abc", "aBb") == 1,
|
||||
'9045: strcasecmp("abc", "aBb") == 1');
|
||||
vrfy(strcasecmp("abc", "abc") == 0,
|
||||
'9046: strcasecmp("abc", "abc") == 0');
|
||||
vrfy(strcasecmp("abc", "aBc") == 0,
|
||||
'9047: strcasecmp("abc", "aBc") == 0');
|
||||
vrfy(strcasecmp("abc", "aBd") == -1,
|
||||
'9048: strcasecmp("abc", "aBd") == -1');
|
||||
vrfy(strcasecmp("abc\0", "aBc") == 1,
|
||||
'9049: strcasecmp("a8c\\0", "aBc") == 1');
|
||||
vrfy(strcasecmp("a\0b", "A\0c") == -1,
|
||||
'9050: strcasecmp("a\\0b", "A\\0c") == -1');
|
||||
|
||||
vrfy(strncasecmp("abc", "xyz", 0) == 0,
|
||||
'9051: strncasecmp("abc", "xyz", 0) == 0');
|
||||
vrfy(strncasecmp("abc", "xyz", 1) == -1,
|
||||
'9052: strncasecmp("abc", "xyz", 1) == -1');
|
||||
vrfy(strncasecmp("abc", "", 1) == 1,
|
||||
'9053: strncasecmp("abc", "", 1) == 1');
|
||||
vrfy(strncasecmp("a", "b", 2) == -1,
|
||||
'9054: strncasecmp("a", "b", 2) == -1');
|
||||
vrfy(strncasecmp("ab", "Ac", 2) == -1,
|
||||
'9055: strncasecmp("ab", "Ac", 2) == -1');
|
||||
vrfy(strncasecmp("\0ac", "\0b", 2) == -1,
|
||||
'9056: strncasecmp("\\0ac", "\\0b", 2) == -1');
|
||||
vrfy(strncasecmp("ab", "aBc", 2) == 0,
|
||||
'9057: strncasecmp("ab", "aBc", 2) == 0');
|
||||
vrfy(strncasecmp("abc", "abd", 2) == 0,
|
||||
'9058: strncasecmp("abc", "abd", 2) == 0');
|
||||
|
||||
local s1 = " gnu lesser general public license";
|
||||
print '9059: local s1 = " gnu lesser general public license";';
|
||||
|
||||
vrfy(strcmp(strtolower(" GNU Lesser General Public License"), s1) == 0,
|
||||
'9060: strcmp(strtolower(" GNU Lesser General Public License"),' +
|
||||
' s1) == 0');
|
||||
|
||||
local s2 = " GNU LESSER GENERAL PUBLIC LICENSE";
|
||||
print '9061: local s2 = " GNU LESSER GENERAL PUBLIC LICENSE";';
|
||||
|
||||
vrfy(strcmp(strtoupper(" GNU Lesser General Public License"), s2) == 0,
|
||||
'9062: strcmp(strtoupper(" GNU Lesser General Public License"),' +
|
||||
' s2) == 0');
|
||||
|
||||
print '9063: Ending test_functions2';
|
||||
}
|
||||
print;
|
||||
print '9000: parsed test_functions2()';
|
||||
print;
|
||||
return test_functions2();
|
||||
|
||||
|
||||
/*
|
||||
* read various calc resource files
|
||||
*
|
||||
|
71
cal/smallfactors.cal
Normal file
71
cal/smallfactors.cal
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* smallfactors - find the factors of a number < 2^32
|
||||
*
|
||||
* Copyright (C) 2013 Christoph Zurnieden
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
static resource_debug_level;
|
||||
resource_debug_level = config("resource_debug", 0);
|
||||
|
||||
|
||||
define smallfactors(x0)
|
||||
{
|
||||
local d q x flist tuple w;
|
||||
|
||||
if (x >= (2 ^ 32) - 1)
|
||||
return newerror("smallfactors: number must be < 2^32 -1");
|
||||
|
||||
tuple = mat[2];
|
||||
flist = list();
|
||||
x = x0;
|
||||
d = 2;
|
||||
q = 0;
|
||||
tuple[0] = d;
|
||||
if (x < 2)
|
||||
return 0;
|
||||
do {
|
||||
q = x // d;
|
||||
while (x == (q * d)) {
|
||||
tuple[0] = d;
|
||||
tuple[1]++;
|
||||
x = floor(q);
|
||||
q = x // d;
|
||||
}
|
||||
d = nextprime(d);
|
||||
if (tuple[1] > 0)
|
||||
append(flist, tuple);
|
||||
tuple = mat[2];
|
||||
} while (d <= x);
|
||||
return flist;
|
||||
}
|
||||
|
||||
define printsmallfactors(flist)
|
||||
{
|
||||
local k;
|
||||
for (k = 0; k < size(flist); k++) {
|
||||
print flist[k][0]:"^":flist[k][1];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
config("resource_debug", resource_debug_level),;
|
||||
if (config("resource_debug") & 3) {
|
||||
print "smallfactors(x0)";
|
||||
print "printsmallfactors(flist)";
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
* statistics - Some assorted statistics functions.
|
||||
* statistics - Some assorted statistics functions.
|
||||
*
|
||||
* Copyright (C) 2013 Christoph Zurnieden
|
||||
*
|
||||
* statistics 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
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* statistics is distributed in the hope that it will be useful, but WITHOUT
|
||||
* 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.
|
||||
@@ -17,8 +17,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.3 $
|
||||
* @(#) $Id: statistics.cal,v 30.3 2013/08/11 08:41:38 chongo Exp $
|
||||
* @(#) $Revision: 30.4 $
|
||||
* @(#) $Id: statistics.cal,v 30.4 2013/08/18 20:01:53 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/statistics.cal,v $
|
||||
*
|
||||
* Under source code control: 2013/08/11 01:31:28
|
||||
@@ -31,8 +31,8 @@ resource_debug_level = config("resource_debug", 0);
|
||||
|
||||
|
||||
/*
|
||||
get dependencies
|
||||
*/
|
||||
* get dependencies
|
||||
*/
|
||||
read -once factorial2 brentsolve
|
||||
|
||||
|
||||
|
41
cal/strings.cal
Normal file
41
cal/strings.cal
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* strings - implementation of some of the macros in ctype.h
|
||||
*
|
||||
* Copyright (C) 2013 Christoph Zurnieden
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
static resource_debug_level;
|
||||
resource_debug_level = config("resource_debug", 0);
|
||||
|
||||
define isascii(c){
|
||||
c = ord(c);
|
||||
return (c >= 0 && c< 128);
|
||||
}
|
||||
|
||||
define isblank(c){
|
||||
c = ord(c);
|
||||
return ( c == 32 || c == 9 );
|
||||
}
|
||||
|
||||
|
||||
config("resource_debug", resource_debug_level),;
|
||||
if (config("resource_debug") & 3) {
|
||||
print "isascii(c)";
|
||||
print "isblank(c)";
|
||||
}
|
||||
|
4287
cal/test8900.cal
4287
cal/test8900.cal
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
* Toom-Cook - implementation of Toom-Cook(3,4) multiplication algorithm
|
||||
* toomcook - implementation of Toom-Cook(3,4) multiplication algorithm
|
||||
*
|
||||
* Copyright (C) 2013 Christoph Zurnieden
|
||||
*
|
||||
* Toom-Cook 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
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* Toom-Cook is distributed in the hope that it will be useful, but WITHOUT
|
||||
* 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.
|
||||
@@ -17,8 +17,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.3 $
|
||||
* @(#) $Id: toomcook.cal,v 30.3 2013/08/11 08:41:38 chongo Exp $
|
||||
* @(#) $Revision: 30.4 $
|
||||
* @(#) $Id: toomcook.cal,v 30.4 2013/08/18 20:01:53 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/toomcook.cal,v $
|
||||
*
|
||||
* Under source code control: 2013/08/11 01:31:28
|
||||
|
@@ -1,27 +1,29 @@
|
||||
/*
|
||||
* zeta2 - Hurwitz Zeta function
|
||||
* Copyright (C) 2013 Christoph Zurnieden
|
||||
* Version: 0.0.1
|
||||
* Licence: GPL
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* 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.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
* 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.
|
||||
*
|
||||
* @(#) $Revision: 30.3 $
|
||||
* @(#) $Id: zeta2.cal,v 30.3 2013/08/11 08:41:38 chongo Exp $
|
||||
* 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.4 $
|
||||
* @(#) $Id: zeta2.cal,v 30.4 2013/08/18 20:01:53 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/bin/calc/cal/RCS/zeta2.cal,v $
|
||||
*
|
||||
* Under source code control: 2013/08/11 01:31:28
|
||||
* File existed as early as: 2013
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* hide internal function from resource debugging
|
||||
*/
|
||||
|
8
calc.h
8
calc.h
@@ -17,8 +17,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.3 $
|
||||
* @(#) $Id: calc.h,v 30.3 2013/08/11 08:41:38 chongo Exp $
|
||||
* @(#) $Revision: 30.4 $
|
||||
* @(#) $Id: calc.h,v 30.4 2013/09/01 22:16:21 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/bin/calc/RCS/calc.h,v $
|
||||
*
|
||||
* Under source code control: 1990/02/15 01:48:31
|
||||
@@ -140,7 +140,7 @@ E_FUNC int ftellid(FILEID id, ZVALUE *res);
|
||||
E_FUNC int fseekid(FILEID id, ZVALUE offset, int whence);
|
||||
E_FUNC int isattyid(FILEID id);
|
||||
E_FUNC int fsearch(FILEID id, char *str, ZVALUE start, ZVALUE end, ZVALUE *res);
|
||||
E_FUNC int frsearch(FILEID id, char *str, ZVALUE first, ZVALUE last,
|
||||
E_FUNC int frsearch(FILEID id, char *str, ZVALUE first, ZVALUE last,
|
||||
ZVALUE *res);
|
||||
E_FUNC void showconstants(void);
|
||||
E_FUNC void freeconstant(unsigned long);
|
||||
@@ -152,7 +152,7 @@ E_FUNC void trimconstants(void);
|
||||
*/
|
||||
E_FUNC int openstring(char *str, size_t num);
|
||||
E_FUNC int openterminal(void);
|
||||
E_FUNC int opensearchfile(char *name, char *pathlist, char *exten,
|
||||
E_FUNC int opensearchfile(char *name, char *pathlist, char *exten,
|
||||
int reopen_ok);
|
||||
E_FUNC char *nextline(void);
|
||||
E_FUNC int nextchar(void);
|
||||
|
11
calc.spec.in
11
calc.spec.in
@@ -18,8 +18,8 @@
|
||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# @(#) $Revision: 30.11 $
|
||||
# @(#) $Id: calc.spec.in,v 30.11 2013/08/11 08:41:38 chongo Exp $
|
||||
# @(#) $Revision: 30.12 $
|
||||
# @(#) $Id: calc.spec.in,v 30.12 2013/09/02 03:04:26 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/bin/calc/RCS/calc.spec.in,v $
|
||||
#
|
||||
# Under source code control: 2003/02/16 20:21:39
|
||||
@@ -37,7 +37,7 @@
|
||||
Summary: Arbitrary precision calculator.
|
||||
Name: calc
|
||||
Version: <<<PROJECT_VERSION>>>
|
||||
Release: 10
|
||||
Release: 11
|
||||
License: LGPL
|
||||
Group: Applications/Engineering
|
||||
Source: http://www.isthe.com/chongo/src/calc/%{name}-%{version}.tar.bz2
|
||||
@@ -146,7 +146,7 @@ rm -rf %{_buildroot}
|
||||
%attr(644, root, root) %{_datadir}/%{name}/custom/*.cal
|
||||
%attr(644, root, root) %{_datadir}/%{name}/help/*
|
||||
%attr(644, root, root) %{_datadir}/%{name}/*.cal
|
||||
%attr(644, root, root) %{_datadir}/%{name}/*.line
|
||||
%attr(644, root, root) %{_datadir}/%{name}/set8700.line
|
||||
%attr(644, root, root) %{_libdir}/libcalc.so
|
||||
%attr(644, root, root) %{_libdir}/libcalc.so.*
|
||||
%attr(644, root, root) %{_libdir}/libcustcalc.so
|
||||
@@ -161,6 +161,9 @@ rm -rf %{_buildroot}
|
||||
%attr(644, root, root) %{_libdir}/libcustcalc.a
|
||||
|
||||
%changelog
|
||||
* Sun Sep 01 2013 Landon Curt Noll http://www.isthe.com/chongo
|
||||
- Release: 11
|
||||
- only list %{_datadir}/%{name}/set8700.line not *.line
|
||||
* Sat May 05 2013 Landon Curt Noll http://www.isthe.com/chongo
|
||||
- Release: 10
|
||||
- Major bug rpm build process bug fix
|
||||
|
30
calcerr.tbl
30
calcerr.tbl
@@ -17,8 +17,8 @@
|
||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# @(#) $Revision: 30.1 $
|
||||
# @(#) $Id: calcerr.tbl,v 30.1 2007/03/16 11:09:46 chongo Exp $
|
||||
# @(#) $Revision: 30.4 $
|
||||
# @(#) $Id: calcerr.tbl,v 30.4 2013/09/02 01:38:08 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/bin/calc/RCS/calcerr.tbl,v $
|
||||
#
|
||||
# Under source code control: 1996/05/23 17:38:44
|
||||
@@ -32,6 +32,16 @@
|
||||
#
|
||||
# SYMBOL meaning
|
||||
|
||||
######################################################################
|
||||
# WARNING: The order of the lines below is critical! If you change #
|
||||
# the order, you will break code that depends on the return #
|
||||
# value of the errno() builtin function. #
|
||||
# #
|
||||
# If you need to add values to this table, ONLY add then #
|
||||
# to the bottom of the file! #
|
||||
######################################################################
|
||||
|
||||
|
||||
E_1OVER0 Division by zero
|
||||
E_0OVER0 Indeterminate (0/0)
|
||||
E_ADD Bad arguments for +
|
||||
@@ -449,3 +459,19 @@ E_FGETFILE1 Non-file argument for fgetfile
|
||||
E_FGETFILE2 File argument for fgetfile not open for reading
|
||||
E_FGETFILE3 Unable to set file position in fgetfile
|
||||
E_ESTR Non-representable type for estr
|
||||
E_STRCASECMP Non-string argument for strcasecmp
|
||||
E_STRNCASECMP Bad argument type for strncasecmp
|
||||
E_ISUPPER Bad argument for isupper
|
||||
E_ISLOWER Bad argument for islower
|
||||
E_ISALNUM Bad argument for isalnum
|
||||
E_ISALPHA Bad argument for isalpha
|
||||
E_ISASCII Bad argument for isascii
|
||||
E_ISCNTRL Bad argument for iscntrl
|
||||
E_ISDIGIT Bad argument for isdigit
|
||||
E_ISGRAPH Bad argument for isgraph
|
||||
E_ISPRINT Bad argument for isprint
|
||||
E_ISPUNCT Bad argument for ispunct
|
||||
E_ISSPACE Bad argument for isspace
|
||||
E_ISXDIGIT Bad argument for isxdigit
|
||||
E_STRTOUPPER Bad argument type for strtoupper
|
||||
E_STRTOLOWER Bad argument type for strtolower
|
||||
|
@@ -18,9 +18,9 @@
|
||||
# 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.28 $
|
||||
# @(#) $Id: Makefile.head,v 30.28 2013/08/11 05:40:18 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/Makefile.head,v $
|
||||
# @(#) $Revision: 30.31 $
|
||||
# @(#) $Id: Makefile.head,v 30.31 2013/09/27 08:55:28 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/bin/calc/custom/RCS/Makefile.head,v $
|
||||
#
|
||||
# Under source code control: 1997/03/09 02:28:54
|
||||
# File existed as early as: 1997
|
||||
@@ -366,7 +366,7 @@ EXT=
|
||||
|
||||
# The default calc versions
|
||||
#
|
||||
VERSION= 2.12.4.10
|
||||
VERSION= 2.12.4.13
|
||||
VERS= 2.12.4
|
||||
VER= 2.12
|
||||
VE= 2
|
||||
@@ -473,16 +473,16 @@ LDFLAGS= ${LD_DEBUG} ${ILDFLAGS}
|
||||
# BLD_TYPE= calc-static-only
|
||||
#
|
||||
# CC_SHARE are flags given to ${CC} to build .o files suitable for shared libs
|
||||
# DEFAULT_LIB_INSTALL_PATH is where calc progs look for calc shared libs
|
||||
# DEFAULT_LIB_INSTALL_PATH is where calc programs look for calc shared libs
|
||||
# LD_SHARE are common flags given to ${CC} to link with shared libraries
|
||||
# LIBCALC_SHLIB are flags given to ${CC} to build libcalc shared lib
|
||||
# LIBCALC_SHLIB are flags given to ${CC} to build libcalc shared libraries
|
||||
# LIBCUSTCALC_SHLIB are flags given to ${CC} to build libcustcalc shared lib
|
||||
#
|
||||
# NOTE: The above 4 values are unused if BLD_TYPE= calc-static-only
|
||||
#
|
||||
# CC_STATIC are flags given to ${CC} to build .o files suitable for static libs
|
||||
# LD_STATIC are common flags given to ${CC} to link with static libraries
|
||||
# LIBCALC_STATIC are flags given to ${CC} to build libcalc static lib
|
||||
# LIBCALC_STATIC are flags given to ${CC} to build libcalc static libraries
|
||||
# LIBCUSTCALC_STATIC are flags given to ${CC} to build libcustcalc static lib
|
||||
#
|
||||
# NOTE: The above 4 values are unused if BLD_TYPE= calc-dynamic-only
|
||||
@@ -495,7 +495,7 @@ LDFLAGS= ${LD_DEBUG} ${ILDFLAGS}
|
||||
# to abort on warnings, then leave CCWERR blank.
|
||||
# CCMISC are misc flags given to ${CC}
|
||||
#
|
||||
# LCC how the C compiler is invoked on locally executed intermediate progs
|
||||
# LCC is how the C compiler is invoked on locally executed intermediate programs
|
||||
# CC is how the C compiler is invoked (with an optional Purify)
|
||||
#
|
||||
# Specific target overrides or modifications to default values
|
||||
@@ -576,7 +576,7 @@ CCMISC= ${DARWIN_ARCH}
|
||||
LCC= MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} gcc
|
||||
CC= ${PURIFY} ${LCC} ${CCWERR}
|
||||
#
|
||||
# Darmin dynamic shared lib filenames
|
||||
# Darwin dynamic shared lib filenames
|
||||
LIB_EXT:= .dylib
|
||||
LIB_EXT_VERSION:= .${VERSION}${LIB_EXT}
|
||||
LIB_EXT_VERS:= .${VERS}${LIB_EXT}
|
||||
@@ -779,10 +779,10 @@ CC= ${PURIFY} ${LCC} ${CCWERR}
|
||||
#
|
||||
# The simple makefile forces the use of static ${CC} flags
|
||||
#
|
||||
# ICFLAGS are given to ${CC} for intermediate progs used to help compile calc
|
||||
# CFLAGS are given to ${CC} for calc progs other than intermediate progs
|
||||
# ILDFLAGS for ${CC} in linking intermediate progs used to help compile calc
|
||||
# LDFLAGS for ${CC} in linking calc progs other than intermediate progs
|
||||
# ICFLAGS are given to ${CC} for intermediate programs used to help compile calc
|
||||
# CFLAGS are given to ${CC} for calc programs other than intermediate programs
|
||||
# ILDFLAGS for ${CC} in linking intermediate programs used to help compile calc
|
||||
# LDFLAGS for ${CC} in linking calc programs other than intermediate programs
|
||||
#
|
||||
ICFLAGS= ${COMMON_CFLAGS} ${CC_STATIC}
|
||||
CFLAGS= ${ICFLAGS} ${CCOPT}
|
||||
@@ -882,8 +882,8 @@ endif
|
||||
|
||||
# Required flags to compile C files for calc
|
||||
#
|
||||
# ICFLAGS are given to ${CC} for intermediate progs used to help compile calc
|
||||
# CFLAGS are given to ${CC} for calc progs other than intermediate progs
|
||||
# ICFLAGS are given to ${CC} for intermediate programs used to help compile calc
|
||||
# CFLAGS are given to ${CC} for calc programs other than intermediate programs
|
||||
#
|
||||
# NOTE: This does not work for: make-XYZ-only and BLD_TYPE != make-XYZ-only
|
||||
#
|
||||
@@ -896,8 +896,8 @@ CFLAGS= ${ICFLAGS} ${CCOPT}
|
||||
|
||||
# Required flags to link files for calc
|
||||
#
|
||||
# ILDFLAGS for ${CC} in linking intermediate progs used to help compile calc
|
||||
# LDFLAGS for ${CC} in linking calc progs other than intermediate progs
|
||||
# ILDFLAGS for ${CC} in linking intermediate programs used to help compile calc
|
||||
# LDFLAGS for ${CC} in linking calc programs other than intermediate programs
|
||||
#
|
||||
ILDFLAGS= ${COMMON_LDFLAGS}
|
||||
LDFLAGS= ${LD_DEBUG} ${ILDFLAGS}
|
||||
|
@@ -18,9 +18,9 @@
|
||||
# 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.28 $
|
||||
# @(#) $Id: Makefile.head,v 30.28 2013/08/11 05:40:18 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/Makefile.head,v $
|
||||
# @(#) $Revision: 30.31 $
|
||||
# @(#) $Id: Makefile.head,v 30.31 2013/09/27 08:55:28 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/bin/calc/custom/RCS/Makefile.head,v $
|
||||
#
|
||||
# Under source code control: 1997/03/09 02:28:54
|
||||
# File existed as early as: 1997
|
||||
@@ -366,7 +366,7 @@ EXT=
|
||||
|
||||
# The default calc versions
|
||||
#
|
||||
VERSION= 2.12.4.10
|
||||
VERSION= 2.12.4.13
|
||||
VERS= 2.12.4
|
||||
VER= 2.12
|
||||
VE= 2
|
||||
|
@@ -18,9 +18,9 @@
|
||||
# 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.28 $
|
||||
# @(#) $Id: Makefile.head,v 30.28 2013/08/11 05:40:18 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/Makefile.head,v $
|
||||
# @(#) $Revision: 30.31 $
|
||||
# @(#) $Id: Makefile.head,v 30.31 2013/09/27 08:55:28 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/bin/calc/custom/RCS/Makefile.head,v $
|
||||
#
|
||||
# Under source code control: 1997/03/09 02:28:54
|
||||
# File existed as early as: 1997
|
||||
@@ -351,7 +351,7 @@ EXT=
|
||||
|
||||
# The default calc versions
|
||||
#
|
||||
VERSION= 2.12.4.10
|
||||
VERSION= 2.12.4.13
|
||||
VERS= 2.12.4
|
||||
VER= 2.12
|
||||
VE= 2
|
||||
@@ -433,16 +433,16 @@ COMMON_LDFLAGS= ${EXTRA_LDFLAGS}
|
||||
# BLD_TYPE= calc-static-only
|
||||
#
|
||||
# CC_SHARE are flags given to ${CC} to build .o files suitable for shared libs
|
||||
# DEFAULT_LIB_INSTALL_PATH is where calc progs look for calc shared libs
|
||||
# DEFAULT_LIB_INSTALL_PATH is where calc programs look for calc shared libs
|
||||
# LD_SHARE are common flags given to ${CC} to link with shared libraries
|
||||
# LIBCALC_SHLIB are flags given to ${CC} to build libcalc shared lib
|
||||
# LIBCALC_SHLIB are flags given to ${CC} to build libcalc shared libraries
|
||||
# LIBCUSTCALC_SHLIB are flags given to ${CC} to build libcustcalc shared lib
|
||||
#
|
||||
# NOTE: The above 4 values are unused if BLD_TYPE= calc-static-only
|
||||
#
|
||||
# CC_STATIC are flags given to ${CC} to build .o files suitable for static libs
|
||||
# LD_STATIC are common flags given to ${CC} to link with static libraries
|
||||
# LIBCALC_STATIC are flags given to ${CC} to build libcalc static lib
|
||||
# LIBCALC_STATIC are flags given to ${CC} to build libcalc static libraries
|
||||
# LIBCUSTCALC_STATIC are flags given to ${CC} to build libcustcalc static lib
|
||||
#
|
||||
# NOTE: The above 4 values are unused if BLD_TYPE= calc-dynamic-only
|
||||
@@ -455,7 +455,7 @@ COMMON_LDFLAGS= ${EXTRA_LDFLAGS}
|
||||
# to abort on warnings, then leave CCWERR blank.
|
||||
# CCMISC are misc flags given to ${CC}
|
||||
#
|
||||
# LCC how the C compiler is invoked on locally executed intermediate progs
|
||||
# LCC is how the C compiler is invoked on locally executed intermediate programs
|
||||
# CC is how the C compiler is invoked (with an optional Purify)
|
||||
#
|
||||
# Specific target overrides or modifications to default values
|
||||
@@ -495,10 +495,10 @@ CC= ${PURIFY} ${LCC} ${CCWERR}
|
||||
#
|
||||
# The simple makefile forces the use of static ${CC} flags
|
||||
#
|
||||
# ICFLAGS are given to ${CC} for intermediate progs used to help compile calc
|
||||
# CFLAGS are given to ${CC} for calc progs other than intermediate progs
|
||||
# ILDFLAGS for ${CC} in linking intermediate progs used to help compile calc
|
||||
# LDFLAGS for ${CC} in linking calc progs other than intermediate progs
|
||||
# ICFLAGS are given to ${CC} for intermediate programs used to help compile calc
|
||||
# CFLAGS are given to ${CC} for calc programs other than intermediate programs
|
||||
# ILDFLAGS for ${CC} in linking intermediate programs used to help compile calc
|
||||
# LDFLAGS for ${CC} in linking calc programs other than intermediate programs
|
||||
#
|
||||
ICFLAGS= ${COMMON_CFLAGS} ${CC_STATIC}
|
||||
CFLAGS= ${ICFLAGS} ${CCOPT}
|
||||
|
@@ -17,8 +17,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.3 $
|
||||
* @(#) $Id: c_sysinfo.c,v 30.3 2013/08/11 08:41:38 chongo Exp $
|
||||
* @(#) $Revision: 30.4 $
|
||||
* @(#) $Id: c_sysinfo.c,v 30.4 2013/09/01 22:16:21 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/bin/calc/custom/RCS/c_sysinfo.c,v $
|
||||
*
|
||||
* Under source code control: 1997/03/09 23:14:40
|
||||
@@ -71,15 +71,15 @@ struct infoname {
|
||||
FULL nmbr; /* if str==NULL ==> value fo #define as a FULL */
|
||||
};
|
||||
STATIC struct infoname sys_info[] = {
|
||||
{"S100", "slots in an subtractive 100 table", NULL,
|
||||
{"S100", "slots in an subtractive 100 table", NULL,
|
||||
(FULL)S100},
|
||||
{"BASE", "base for calculations", NULL,
|
||||
{"BASE", "base for calculations", NULL,
|
||||
(FULL)BASE},
|
||||
{"BASE1", "one less than base", NULL,
|
||||
{"BASE1", "one less than base", NULL,
|
||||
(FULL)BASE},
|
||||
{"BASEB", "bits in the calculation base", NULL,
|
||||
{"BASEB", "bits in the calculation base", NULL,
|
||||
(FULL)BASEB},
|
||||
{"BASEDIG", "number of digits in base", NULL,
|
||||
{"BASEDIG", "number of digits in base", NULL,
|
||||
(FULL)BASEDIG},
|
||||
{"BIG_ENDIAN", "Most Significant Byte first symbol", NULL,
|
||||
(FULL)BIG_ENDIAN},
|
||||
@@ -89,7 +89,7 @@ STATIC struct infoname sys_info[] = {
|
||||
(FULL)BLK_DEF_MAXPRINT},
|
||||
{"BLUM_PREGEN", "non-default predefined Blum generators", NULL,
|
||||
(FULL)BLUM_PREGEN},
|
||||
{"CALCEXT", "extension for files read in", CALCEXT,
|
||||
{"CALCEXT", "extension for files read in", CALCEXT,
|
||||
(FULL)0},
|
||||
{"CALC_BYTE_ORDER", "Byte order (LITTLE_ENDIAN or BIG_ENDIAN)", NULL,
|
||||
(FULL)CALC_BYTE_ORDER},
|
||||
@@ -97,17 +97,17 @@ STATIC struct infoname sys_info[] = {
|
||||
(FULL)0},
|
||||
{"DEFAULTCALCBINDINGS", "default key bindings file", DEFAULTCALCBINDINGS,
|
||||
(FULL)0},
|
||||
{"DEFAULTCALCHELP", "help file that -h prints", DEFAULTCALCHELP,
|
||||
{"DEFAULTCALCHELP", "help file that -h prints", DEFAULTCALCHELP,
|
||||
(FULL)0},
|
||||
{"DEFAULTCALCPAGER", "default pager", DEFAULTCALCPAGER,
|
||||
{"DEFAULTCALCPAGER", "default pager", DEFAULTCALCPAGER,
|
||||
(FULL)0},
|
||||
{"DEFAULTCALCPATH", "default :-separated search path", DEFAULTCALCPATH,
|
||||
(FULL)0},
|
||||
{"DEFAULTCALCRC", "default :-separated startup file list", DEFAULTCALCRC,
|
||||
(FULL)0},
|
||||
{"DEFAULTSHELL", "default shell to use", DEFAULTSHELL,
|
||||
{"DEFAULTSHELL", "default shell to use", DEFAULTSHELL,
|
||||
(FULL)0},
|
||||
{"DEV_BITS", "device number size in bits", NULL,
|
||||
{"DEV_BITS", "device number size in bits", NULL,
|
||||
(FULL)DEV_BITS},
|
||||
{"DISPLAY_DEFAULT", "default digits for float display", NULL,
|
||||
(FULL)DISPLAY_DEFAULT},
|
||||
@@ -115,135 +115,135 @@ STATIC struct infoname sys_info[] = {
|
||||
(FULL)EPSILONPREC_DEFAULT},
|
||||
{"EPSILON_DEFAULT", "allowed error for float calculations",
|
||||
EPSILON_DEFAULT, (FULL)0},
|
||||
{"ERRMAX", "default errmax value", NULL,
|
||||
{"ERRMAX", "default errmax value", NULL,
|
||||
(FULL)ERRMAX},
|
||||
{"E_USERDEF", "base of user defined errors", NULL,
|
||||
{"E_USERDEF", "base of user defined errors", NULL,
|
||||
(FULL)E_USERDEF},
|
||||
{"E__BASE", "calc errors start above here", NULL,
|
||||
{"E__BASE", "calc errors start above here", NULL,
|
||||
(FULL)E__BASE},
|
||||
{"E__COUNT", "number of calc errors", NULL,
|
||||
{"E__COUNT", "number of calc errors", NULL,
|
||||
(FULL)E__COUNT},
|
||||
{"E__HIGHEST", "highest calc error", NULL,
|
||||
{"E__HIGHEST", "highest calc error", NULL,
|
||||
(FULL)E__HIGHEST},
|
||||
{"FALSE", "boolean false", NULL,
|
||||
{"FALSE", "boolean false", NULL,
|
||||
(FULL)FALSE},
|
||||
{"FILEPOS_BITS", "file position size in bits", NULL,
|
||||
{"FILEPOS_BITS", "file position size in bits", NULL,
|
||||
(FULL)FILEPOS_BITS},
|
||||
{"FULL_BITS", "bits in a FULL", NULL,
|
||||
{"FULL_BITS", "bits in a FULL", NULL,
|
||||
(FULL)FULL_BITS},
|
||||
{"HELPDIR", "location of the help directory", HELPDIR,
|
||||
{"HELPDIR", "location of the help directory", HELPDIR,
|
||||
(FULL)0},
|
||||
{"HIST_BINDING_FILE", "Default binding file", HIST_BINDING_FILE,
|
||||
{"HIST_BINDING_FILE", "Default binding file", HIST_BINDING_FILE,
|
||||
(FULL)0},
|
||||
{"HIST_SIZE", "Default history size", NULL,
|
||||
{"HIST_SIZE", "Default history size", NULL,
|
||||
(FULL)HIST_SIZE},
|
||||
{"INIT_J", "initial 1st walking a55 table index", NULL,
|
||||
{"INIT_J", "initial 1st walking a55 table index", NULL,
|
||||
(FULL)INIT_J},
|
||||
{"INIT_K", "initial 2nd walking a55 table index", NULL,
|
||||
{"INIT_K", "initial 2nd walking a55 table index", NULL,
|
||||
(FULL)INIT_K},
|
||||
{"INODE_BITS", "inode number size in bits", NULL,
|
||||
{"INODE_BITS", "inode number size in bits", NULL,
|
||||
(FULL)INODE_BITS},
|
||||
{"LITTLE_ENDIAN", "Least Significant Byte first symbol",
|
||||
{"LITTLE_ENDIAN", "Least Significant Byte first symbol",
|
||||
NULL, (FULL)LITTLE_ENDIAN},
|
||||
{"LONG_BITS", "bit length of a long", NULL,
|
||||
{"LONG_BITS", "bit length of a long", NULL,
|
||||
(FULL)LONG_BITS},
|
||||
{"MAP_POPCNT", "number of odd primes in pr_map", NULL,
|
||||
{"MAP_POPCNT", "number of odd primes in pr_map", NULL,
|
||||
(FULL)MAP_POPCNT},
|
||||
{"MAX_CALCRC", "maximum allowed length of $CALCRC", NULL,
|
||||
{"MAX_CALCRC", "maximum allowed length of $CALCRC", NULL,
|
||||
(FULL)MAX_CALCRC},
|
||||
{"MAXCMD", "max length of command invocation", NULL,
|
||||
{"MAXCMD", "max length of command invocation", NULL,
|
||||
(FULL)MAXCMD},
|
||||
{"MAXDIM", "max number of dimensions in matrices", NULL,
|
||||
{"MAXDIM", "max number of dimensions in matrices", NULL,
|
||||
(FULL)MAXDIM},
|
||||
{"MAXERROR", "max length of error message string", NULL,
|
||||
{"MAXERROR", "max length of error message string", NULL,
|
||||
(FULL)MAXERROR},
|
||||
{"MAXFILES", "max number of opened files", NULL,
|
||||
{"MAXFILES", "max number of opened files", NULL,
|
||||
(FULL)MAXFILES},
|
||||
{"MAXFULL", "largest SFULL value", NULL,
|
||||
{"MAXFULL", "largest SFULL value", NULL,
|
||||
(FULL)MAXFULL},
|
||||
{"MAXHALF", "largest SHALF value", NULL,
|
||||
{"MAXHALF", "largest SHALF value", NULL,
|
||||
(FULL)MAXHALF},
|
||||
{"MAXLABELS", "max number of user labels in function", NULL,
|
||||
(FULL)MAXLABELS},
|
||||
{"MAXLEN", "longest storage size allowed", NULL,
|
||||
{"MAXLEN", "longest storage size allowed", NULL,
|
||||
(FULL)MAXLEN},
|
||||
{"MAXLONG", "largest long val", NULL,
|
||||
{"MAXLONG", "largest long val", NULL,
|
||||
(FULL)MAXLONG},
|
||||
{"MAXPRINT_DEFAULT", "default number of elements printed", NULL,
|
||||
(FULL)MAXPRINT_DEFAULT},
|
||||
{"MAXREDC", "number of entries in REDC cache", NULL,
|
||||
{"MAXREDC", "number of entries in REDC cache", NULL,
|
||||
(FULL)MAXREDC},
|
||||
{"MAXSCANCOUNT", "default max scan errors before an abort", NULL,
|
||||
(FULL)MAXSCANCOUNT},
|
||||
{"MAXSTACK", "max depth of evaluation stack", NULL,
|
||||
{"MAXSTACK", "max depth of evaluation stack", NULL,
|
||||
(FULL)MAXSTACK},
|
||||
{"MAXSTRING", "max size of string constant", NULL,
|
||||
{"MAXSTRING", "max size of string constant", NULL,
|
||||
(FULL)MAXSTRING},
|
||||
{"MAXUFULL", "largest FULL value", NULL,
|
||||
{"MAXUFULL", "largest FULL value", NULL,
|
||||
(FULL)MAXUFULL},
|
||||
{"MAXULONG", "largest unsigned long val", NULL,
|
||||
{"MAXULONG", "largest unsigned long val", NULL,
|
||||
(FULL)MAXULONG},
|
||||
{"MAX_MAP_PRIME", "larest prime in pr_map", NULL,
|
||||
{"MAX_MAP_PRIME", "larest prime in pr_map", NULL,
|
||||
(FULL)MAX_MAP_PRIME},
|
||||
{"MAX_MAP_VAL", "larest bit in pr_map", NULL,
|
||||
{"MAX_MAP_VAL", "larest bit in pr_map", NULL,
|
||||
(FULL)MAX_MAP_VAL},
|
||||
{"MAX_PFACT_VAL", "max x, for which pfact(x) is a long", NULL,
|
||||
(FULL)MAX_PFACT_VAL},
|
||||
{"MAX_SM_PRIME", "larest 32 bit prime", NULL,
|
||||
{"MAX_SM_PRIME", "larest 32 bit prime", NULL,
|
||||
(FULL)MAX_SM_PRIME},
|
||||
{"MAX_SM_VAL", "larest 32 bit value", NULL,
|
||||
{"MAX_SM_VAL", "larest 32 bit value", NULL,
|
||||
(FULL)MAX_SM_VAL},
|
||||
{"MUL_ALG2", "default size for alternative multiply", NULL,
|
||||
{"MUL_ALG2", "default size for alternative multiply", NULL,
|
||||
(FULL)MUL_ALG2},
|
||||
{"NXT_MAP_PRIME", "smallest odd prime not in pr_map", NULL,
|
||||
(FULL)NXT_MAP_PRIME},
|
||||
{"NXT_PFACT_VAL", "next prime for higher pfact values", NULL,
|
||||
(FULL)NXT_PFACT_VAL},
|
||||
{"OFF_T_BITS", "file offset size in bits", NULL,
|
||||
{"OFF_T_BITS", "file offset size in bits", NULL,
|
||||
(FULL)OFF_T_BITS},
|
||||
{"PIX_32B", "max pix() value", NULL,
|
||||
{"PIX_32B", "max pix() value", NULL,
|
||||
(FULL)PIX_32B},
|
||||
{"POW_ALG2", "default size for using REDC for powers", NULL,
|
||||
(FULL)POW_ALG2},
|
||||
{"REDC_ALG2", "default size using alternative REDC alg", NULL,
|
||||
(FULL)REDC_ALG2},
|
||||
{"SBITS", "size of additive or shuffle entry in bits", NULL,
|
||||
{"SBITS", "size of additive or shuffle entry in bits", NULL,
|
||||
(FULL)SBITS},
|
||||
{"SBYTES", "size of additive or shuffle entry in bytes", NULL,
|
||||
(FULL)SBYTES},
|
||||
{"SCNT", "length of additive 55 table in FULLs", NULL,
|
||||
{"SCNT", "length of additive 55 table in FULLs", NULL,
|
||||
(FULL)SCNT},
|
||||
{"SEEDXORBITS", "low bits of a55 seed devoted to xor", NULL,
|
||||
{"SEEDXORBITS", "low bits of a55 seed devoted to xor", NULL,
|
||||
(FULL)SEEDXORBITS},
|
||||
{"SHALFS", "size of additive or shuffle entry in HALFs", NULL,
|
||||
{"SHALFS", "size of additive or shuffle entry in HALFs", NULL,
|
||||
(FULL)SHALFS},
|
||||
{"SHUFCNT", "size of shuffle table in entries", NULL,
|
||||
{"SHUFCNT", "size of shuffle table in entries", NULL,
|
||||
(FULL)SHUFCNT},
|
||||
{"SHUFLEN", "length of shuffle table in FULLs", NULL,
|
||||
{"SHUFLEN", "length of shuffle table in FULLs", NULL,
|
||||
(FULL)SHUFLEN},
|
||||
{"SHUFMASK", "mask for shuffle table entry selection", NULL,
|
||||
{"SHUFMASK", "mask for shuffle table entry selection", NULL,
|
||||
(FULL)SHUFMASK},
|
||||
{"SHUFPOW", "power of 2 size of the shuffle table", NULL,
|
||||
{"SHUFPOW", "power of 2 size of the shuffle table", NULL,
|
||||
(FULL)SHUFPOW},
|
||||
{"SLEN", "number of FULLs in a shuffle table entry", NULL,
|
||||
{"SLEN", "number of FULLs in a shuffle table entry", NULL,
|
||||
(FULL)SLEN},
|
||||
{"SQ_ALG2", "default size for alternative squaring", NULL,
|
||||
{"SQ_ALG2", "default size for alternative squaring", NULL,
|
||||
(FULL)SQ_ALG2},
|
||||
{"SYMBOLSIZE", "max symbol name size", NULL,
|
||||
{"SYMBOLSIZE", "max symbol name size", NULL,
|
||||
(FULL)SYMBOLSIZE},
|
||||
{"TEN_MAX", "10^(2^TEN_MAX): largest base10 conversion const", NULL,
|
||||
{"TEN_MAX", "10^(2^TEN_MAX): largest base10 conversion const", NULL,
|
||||
(FULL)TEN_MAX},
|
||||
{"TOPFULL", "highest bit in FULL", NULL,
|
||||
{"TOPFULL", "highest bit in FULL", NULL,
|
||||
(FULL)TOPFULL},
|
||||
{"TOPHALF", "highest bit in a HALF", NULL,
|
||||
{"TOPHALF", "highest bit in a HALF", NULL,
|
||||
(FULL)TOPHALF},
|
||||
{"TOPLONG", "top long bit", NULL,
|
||||
{"TOPLONG", "top long bit", NULL,
|
||||
(FULL)TOPLONG},
|
||||
{"TRUE", "boolean true", NULL,
|
||||
{"TRUE", "boolean true", NULL,
|
||||
(FULL)TRUE},
|
||||
{"USUAL_ELEMENTS", "usual number of elements for objects", NULL,
|
||||
{"USUAL_ELEMENTS", "usual number of elements for objects", NULL,
|
||||
(FULL)USUAL_ELEMENTS},
|
||||
{"REGNUM_MAX", "highest custom register number", NULL,
|
||||
{"REGNUM_MAX", "highest custom register number", NULL,
|
||||
(FULL)CUSTOM_REG_MAX},
|
||||
|
||||
/* must be last */
|
||||
|
@@ -11,7 +11,7 @@ TYPES
|
||||
|
||||
DESCRIPTION
|
||||
|
||||
This custom function will return the value certain selected #defile
|
||||
This custom function will return the value certain selected #define
|
||||
values. The infoname arg must be a string that matches the given
|
||||
#define name. For conveience, the case infoname does not matter,
|
||||
so "baseb" and "BASEB" refer to the same #define value.
|
||||
@@ -69,8 +69,8 @@ SEE ALSO
|
||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: sysinfo,v 30.1 2007/03/16 11:10:04 chongo Exp $
|
||||
## @(#) $Revision: 30.2 $
|
||||
## @(#) $Id: sysinfo,v 30.2 2013/08/17 01:57:37 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/custom/RCS/sysinfo,v $
|
||||
##
|
||||
## Under source code control: 1997/03/09 23:14:40
|
||||
|
6
file.h
6
file.h
@@ -19,8 +19,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.2 $
|
||||
* @(#) $Id: file.h,v 30.2 2013/08/11 08:41:38 chongo Exp $
|
||||
* @(#) $Revision: 30.3 $
|
||||
* @(#) $Id: file.h,v 30.3 2013/09/01 22:16:21 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/bin/calc/RCS/file.h,v $
|
||||
*
|
||||
* Under source code control: 1996/05/24 05:55:58
|
||||
@@ -96,7 +96,7 @@ E_FUNC int fgetposid(FILEID id, FILEPOS *ptr);
|
||||
E_FUNC int fsetposid(FILEID id, FILEPOS *ptr);
|
||||
E_FUNC int get_open_siz(FILE *fp, ZVALUE *res);
|
||||
E_FUNC char* findfname(FILEID);
|
||||
E_FUNC FILE *f_pathopen(char *name, char *mode, char *pathlist,
|
||||
E_FUNC FILE *f_pathopen(char *name, char *mode, char *pathlist,
|
||||
char **openpath);
|
||||
|
||||
|
||||
|
416
func.c
416
func.c
@@ -19,8 +19,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* @(#) $Revision: 30.4 $
|
||||
* @(#) $Id: func.c,v 30.4 2013/08/11 08:41:38 chongo Exp $
|
||||
* @(#) $Revision: 30.9 $
|
||||
* @(#) $Id: func.c,v 30.9 2013/09/02 01:38:08 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/bin/calc/RCS/func.c,v $
|
||||
*
|
||||
* Under source code control: 1990/02/15 01:48:15
|
||||
@@ -4177,6 +4177,24 @@ f_strcmp(VALUE *v1, VALUE *v2)
|
||||
return result;
|
||||
}
|
||||
|
||||
S_FUNC VALUE
|
||||
f_strcasecmp(VALUE *v1, VALUE *v2)
|
||||
{
|
||||
VALUE result;
|
||||
FLAG flag;
|
||||
|
||||
/* initialize VALUE */
|
||||
result.v_subtype = V_NOSUBTYPE;
|
||||
|
||||
if (v1->v_type != V_STR || v2->v_type != V_STR)
|
||||
return error_value(E_STRCASECMP);
|
||||
|
||||
flag = stringcaserel(v1->v_str, v2->v_str);
|
||||
|
||||
result.v_type = V_NUM;
|
||||
result.v_num = itoq((long) flag);
|
||||
return result;
|
||||
}
|
||||
|
||||
S_FUNC VALUE
|
||||
f_strncmp(VALUE *v1, VALUE *v2, VALUE *v3)
|
||||
@@ -4209,6 +4227,69 @@ f_strncmp(VALUE *v1, VALUE *v2, VALUE *v3)
|
||||
result.v_num = itoq((long) flag);
|
||||
return result;
|
||||
}
|
||||
S_FUNC VALUE
|
||||
f_strncasecmp(VALUE *v1, VALUE *v2, VALUE *v3)
|
||||
{
|
||||
long n1, n2, n;
|
||||
FLAG flag;
|
||||
VALUE result;
|
||||
|
||||
/* initialize VALUE */
|
||||
result.v_subtype = V_NOSUBTYPE;
|
||||
|
||||
if (v1->v_type != V_STR || v2->v_type != V_STR ||
|
||||
v3->v_type != V_NUM || qisneg(v3->v_num) ||
|
||||
qisfrac(v3->v_num) || zge31b(v3->v_num->num))
|
||||
return error_value(E_STRNCASECMP);
|
||||
n1 = v1->v_str->s_len;
|
||||
n2 = v2->v_str->s_len;
|
||||
n = qtoi(v3->v_num);
|
||||
if (n < n1)
|
||||
v1->v_str->s_len = n;
|
||||
if (n < n2)
|
||||
v2->v_str->s_len = n;
|
||||
|
||||
flag = stringcaserel(v1->v_str, v2->v_str);
|
||||
|
||||
v1->v_str->s_len = n1;
|
||||
v2->v_str->s_len = n2;
|
||||
|
||||
result.v_type = V_NUM;
|
||||
result.v_num = itoq((long) flag);
|
||||
return result;
|
||||
}
|
||||
|
||||
S_FUNC VALUE
|
||||
f_strtoupper(VALUE *vp)
|
||||
{
|
||||
VALUE result;
|
||||
|
||||
/* initialize VALUE */
|
||||
result.v_subtype = V_NOSUBTYPE;
|
||||
|
||||
if (vp->v_type != V_STR)
|
||||
return error_value(E_STRTOUPPER);
|
||||
|
||||
result.v_str = stringtoupper(vp->v_str);
|
||||
result.v_type = V_STR;
|
||||
return result;
|
||||
}
|
||||
|
||||
S_FUNC VALUE
|
||||
f_strtolower(VALUE *vp)
|
||||
{
|
||||
VALUE result;
|
||||
|
||||
/* initialize VALUE */
|
||||
result.v_subtype = V_NOSUBTYPE;
|
||||
|
||||
if (vp->v_type != V_STR)
|
||||
return error_value(E_STRTOLOWER);
|
||||
|
||||
result.v_str = stringtolower(vp->v_str);
|
||||
result.v_type = V_STR;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
S_FUNC VALUE
|
||||
@@ -4396,6 +4477,307 @@ f_ord(VALUE *vp)
|
||||
return result;
|
||||
}
|
||||
|
||||
S_FUNC VALUE
|
||||
f_isupper(VALUE *vp)
|
||||
{
|
||||
char c;
|
||||
VALUE result;
|
||||
|
||||
/* initialize VALUE */
|
||||
result.v_subtype = V_NOSUBTYPE;
|
||||
|
||||
switch(vp->v_type) {
|
||||
case V_STR:
|
||||
c = *vp->v_str->s_str;
|
||||
break;
|
||||
case V_OCTET:
|
||||
c = *vp->v_octet;
|
||||
break;
|
||||
default:
|
||||
return error_value(E_ISUPPER);
|
||||
}
|
||||
|
||||
result.v_type = V_NUM;
|
||||
result.v_num = itoq( (isupper( c ))?1l:0l);
|
||||
return result;
|
||||
}
|
||||
|
||||
S_FUNC VALUE
|
||||
f_islower(VALUE *vp)
|
||||
{
|
||||
char c;
|
||||
VALUE result;
|
||||
|
||||
/* initialize VALUE */
|
||||
result.v_subtype = V_NOSUBTYPE;
|
||||
|
||||
switch(vp->v_type) {
|
||||
case V_STR:
|
||||
c = *vp->v_str->s_str;
|
||||
break;
|
||||
case V_OCTET:
|
||||
c = *vp->v_octet;
|
||||
break;
|
||||
default:
|
||||
return error_value(E_ISLOWER);
|
||||
}
|
||||
|
||||
result.v_type = V_NUM;
|
||||
result.v_num = itoq( (islower( c ))?1l:0l);
|
||||
return result;
|
||||
}
|
||||
|
||||
S_FUNC VALUE
|
||||
f_isalnum(VALUE *vp)
|
||||
{
|
||||
char c;
|
||||
VALUE result;
|
||||
|
||||
/* initialize VALUE */
|
||||
result.v_subtype = V_NOSUBTYPE;
|
||||
|
||||
switch(vp->v_type) {
|
||||
case V_STR:
|
||||
c = *vp->v_str->s_str;
|
||||
break;
|
||||
case V_OCTET:
|
||||
c = *vp->v_octet;
|
||||
break;
|
||||
default:
|
||||
return error_value(E_ISALNUM);
|
||||
}
|
||||
|
||||
result.v_type = V_NUM;
|
||||
result.v_num = itoq( (isalnum( c ))?1l:0l);
|
||||
return result;
|
||||
}
|
||||
|
||||
S_FUNC VALUE
|
||||
f_isalpha(VALUE *vp)
|
||||
{
|
||||
char c;
|
||||
VALUE result;
|
||||
|
||||
/* initialize VALUE */
|
||||
result.v_subtype = V_NOSUBTYPE;
|
||||
|
||||
switch(vp->v_type) {
|
||||
case V_STR:
|
||||
c = *vp->v_str->s_str;
|
||||
break;
|
||||
case V_OCTET:
|
||||
c = *vp->v_octet;
|
||||
break;
|
||||
default:
|
||||
return error_value(E_ISALPHA);
|
||||
}
|
||||
|
||||
result.v_type = V_NUM;
|
||||
result.v_num = itoq( (isalpha( c ))?1l:0l);
|
||||
return result;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* Not in C-standard, marked as obsolete in POSIX.1-2008 */
|
||||
S_FUNC VALUE
|
||||
f_isascii(VALUE *vp)
|
||||
{
|
||||
char c;
|
||||
VALUE result;
|
||||
|
||||
result.v_subtype = V_NOSUBTYPE;
|
||||
|
||||
switch(vp->v_type) {
|
||||
case V_STR:
|
||||
c = *vp->v_str->s_str;
|
||||
break;
|
||||
case V_OCTET:
|
||||
c = *vp->v_octet;
|
||||
break;
|
||||
default:
|
||||
return error_value(E_ISASCII);
|
||||
}
|
||||
|
||||
result.v_type = V_NUM;
|
||||
result.v_num = itoq( (isascii( c ))?1l:0l);
|
||||
return result;
|
||||
}
|
||||
#endif /* 0 */
|
||||
|
||||
S_FUNC VALUE
|
||||
f_iscntrl(VALUE *vp)
|
||||
{
|
||||
char c;
|
||||
VALUE result;
|
||||
|
||||
/* initialize VALUE */
|
||||
result.v_subtype = V_NOSUBTYPE;
|
||||
|
||||
switch(vp->v_type) {
|
||||
case V_STR:
|
||||
c = *vp->v_str->s_str;
|
||||
break;
|
||||
case V_OCTET:
|
||||
c = *vp->v_octet;
|
||||
break;
|
||||
default:
|
||||
return error_value(E_ISCNTRL);
|
||||
}
|
||||
|
||||
result.v_type = V_NUM;
|
||||
result.v_num = itoq( (iscntrl( c ))?1l:0l);
|
||||
return result;
|
||||
}
|
||||
|
||||
S_FUNC VALUE
|
||||
f_isdigit(VALUE *vp)
|
||||
{
|
||||
char c;
|
||||
VALUE result;
|
||||
|
||||
/* initialize VALUE */
|
||||
result.v_subtype = V_NOSUBTYPE;
|
||||
|
||||
switch(vp->v_type) {
|
||||
case V_STR:
|
||||
c = *vp->v_str->s_str;
|
||||
break;
|
||||
case V_OCTET:
|
||||
c = *vp->v_octet;
|
||||
break;
|
||||
default:
|
||||
return error_value(E_ISDIGIT);
|
||||
}
|
||||
|
||||
result.v_type = V_NUM;
|
||||
result.v_num = itoq( (isdigit( c ))?1l:0l);
|
||||
return result;
|
||||
}
|
||||
|
||||
S_FUNC VALUE
|
||||
f_isgraph(VALUE *vp)
|
||||
{
|
||||
char c;
|
||||
VALUE result;
|
||||
|
||||
/* initialize VALUE */
|
||||
result.v_subtype = V_NOSUBTYPE;
|
||||
|
||||
switch(vp->v_type) {
|
||||
case V_STR:
|
||||
c = *vp->v_str->s_str;
|
||||
break;
|
||||
case V_OCTET:
|
||||
c = *vp->v_octet;
|
||||
break;
|
||||
default:
|
||||
return error_value(E_ISGRAPH);
|
||||
}
|
||||
|
||||
result.v_type = V_NUM;
|
||||
result.v_num = itoq( (isgraph( c ))?1l:0l);
|
||||
return result;
|
||||
}
|
||||
|
||||
S_FUNC VALUE
|
||||
f_isprint(VALUE *vp)
|
||||
{
|
||||
char c;
|
||||
VALUE result;
|
||||
|
||||
/* initialize VALUE */
|
||||
result.v_subtype = V_NOSUBTYPE;
|
||||
|
||||
switch(vp->v_type) {
|
||||
case V_STR:
|
||||
c = *vp->v_str->s_str;
|
||||
break;
|
||||
case V_OCTET:
|
||||
c = *vp->v_octet;
|
||||
break;
|
||||
default:
|
||||
return error_value(E_ISPRINT);
|
||||
}
|
||||
|
||||
result.v_type = V_NUM;
|
||||
result.v_num = itoq( (isprint( c ))?1l:0l);
|
||||
return result;
|
||||
}
|
||||
|
||||
S_FUNC VALUE
|
||||
f_ispunct(VALUE *vp)
|
||||
{
|
||||
char c;
|
||||
VALUE result;
|
||||
|
||||
/* initialize VALUE */
|
||||
result.v_subtype = V_NOSUBTYPE;
|
||||
|
||||
switch(vp->v_type) {
|
||||
case V_STR:
|
||||
c = *vp->v_str->s_str;
|
||||
break;
|
||||
case V_OCTET:
|
||||
c = *vp->v_octet;
|
||||
break;
|
||||
default:
|
||||
return error_value(E_ISPUNCT);
|
||||
}
|
||||
|
||||
result.v_type = V_NUM;
|
||||
result.v_num = itoq( (ispunct( c ))?1l:0l);
|
||||
return result;
|
||||
}
|
||||
|
||||
S_FUNC VALUE
|
||||
f_isspace(VALUE *vp)
|
||||
{
|
||||
char c;
|
||||
VALUE result;
|
||||
|
||||
/* initialize VALUE */
|
||||
result.v_subtype = V_NOSUBTYPE;
|
||||
|
||||
switch(vp->v_type) {
|
||||
case V_STR:
|
||||
c = *vp->v_str->s_str;
|
||||
break;
|
||||
case V_OCTET:
|
||||
c = *vp->v_octet;
|
||||
break;
|
||||
default:
|
||||
return error_value(E_ISSPACE);
|
||||
}
|
||||
|
||||
result.v_type = V_NUM;
|
||||
result.v_num = itoq( (isspace( c ))?1l:0l);
|
||||
return result;
|
||||
}
|
||||
|
||||
S_FUNC VALUE
|
||||
f_isxdigit(VALUE *vp)
|
||||
{
|
||||
char c;
|
||||
VALUE result;
|
||||
|
||||
/* initialize VALUE */
|
||||
result.v_subtype = V_NOSUBTYPE;
|
||||
|
||||
switch(vp->v_type) {
|
||||
case V_STR:
|
||||
c = *vp->v_str->s_str;
|
||||
break;
|
||||
case V_OCTET:
|
||||
c = *vp->v_octet;
|
||||
break;
|
||||
default:
|
||||
return error_value(E_ISXDIGIT);
|
||||
}
|
||||
|
||||
result.v_type = V_NUM;
|
||||
result.v_num = itoq( (isxdigit( c ))?1l:0l);
|
||||
return result;
|
||||
}
|
||||
|
||||
S_FUNC VALUE
|
||||
f_protect(int count, VALUE **vals)
|
||||
@@ -8459,6 +8841,28 @@ STATIC CONST struct builtin builtins[] = {
|
||||
"numerator of fraction"},
|
||||
{"ord", 1, 1, 0, OP_NOP, 0, f_ord,
|
||||
"integer corresponding to character value"},
|
||||
{"isupper", 1, 1, 0, OP_NOP, 0, f_isupper,
|
||||
"whether character is upper case"},
|
||||
{"islower", 1, 1, 0, OP_NOP, 0, f_islower,
|
||||
"whether character is lower case"},
|
||||
{"isalnum", 1, 1, 0, OP_NOP, 0, f_isalnum,
|
||||
"whether character is alpha-numeric"},
|
||||
{"isalpha", 1, 1, 0, OP_NOP, 0, f_isalpha,
|
||||
"whether character is alphabetic"},
|
||||
{"iscntrl", 1, 1, 0, OP_NOP, 0, f_iscntrl,
|
||||
"whether character is a control character"},
|
||||
{"isdigit", 1, 1, 0, OP_NOP, 0, f_isdigit,
|
||||
"whether character is a digit"},
|
||||
{"isgraph", 1, 1, 0, OP_NOP, 0, f_isgraph,
|
||||
"whether character is a graphical character"},
|
||||
{"isprint", 1, 1, 0, OP_NOP, 0, f_isprint,
|
||||
"whether character is printable"},
|
||||
{"ispunct", 1, 1, 0, OP_NOP, 0, f_ispunct,
|
||||
"whether character is a punctuation"},
|
||||
{"isspace", 1, 1, 0, OP_NOP, 0, f_isspace,
|
||||
"whether character is a space character"},
|
||||
{"isxdigit", 1, 1, 0, OP_NOP, 0, f_isxdigit,
|
||||
"whether character is a hexadecimal digit"},
|
||||
{"param", 1, 1, 0, OP_ARGVALUE, 0, 0,
|
||||
"value of parameter n (or parameter count if n\n"
|
||||
"\t\t\tis zero)"},
|
||||
@@ -8598,10 +9002,16 @@ STATIC CONST struct builtin builtins[] = {
|
||||
"assign value to stoponerror flag"},
|
||||
{"str", 1, 1, 0, OP_NOP, 0, f_str,
|
||||
"simple value converted to string"},
|
||||
{"strtoupper", 1, 1, 0, OP_NOP, 0, f_strtoupper,
|
||||
"Make string upper case"},
|
||||
{"strtolower", 1, 1, 0, OP_NOP, 0, f_strtolower,
|
||||
"Make string lower case"},
|
||||
{"strcat", 1,IN, 0, OP_NOP, 0, f_strcat,
|
||||
"concatenate strings together"},
|
||||
{"strcmp", 2, 2, 0, OP_NOP, 0, f_strcmp,
|
||||
"compare two strings"},
|
||||
{"strcasecmp", 2, 2, 0, OP_NOP, 0, f_strcasecmp,
|
||||
"compare two strings case independent"},
|
||||
{"strcpy", 2, 2, 0, OP_NOP, 0, f_strcpy,
|
||||
"copy string to string"},
|
||||
{"strerror", 0, 1, 0, OP_NOP, 0, f_strerror,
|
||||
@@ -8610,6 +9020,8 @@ STATIC CONST struct builtin builtins[] = {
|
||||
"length of string"},
|
||||
{"strncmp", 3, 3, 0, OP_NOP, 0, f_strncmp,
|
||||
"compare strings a, b to c characters"},
|
||||
{"strncasecmp", 3, 3, 0, OP_NOP, 0, f_strncasecmp,
|
||||
"compare strings a, b to c characters case independent"},
|
||||
{"strncpy", 3, 3, 0, OP_NOP, 0, f_strncpy,
|
||||
"copy up to c characters from string to string"},
|
||||
{"strpos", 2, 2, 0, OP_NOP, 0, f_strpos,
|
||||
|
@@ -18,9 +18,9 @@
|
||||
# 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.5 $
|
||||
# @(#) $Id: Makefile,v 30.5 2007/09/21 01:27:27 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/cmd/calc/help/RCS/Makefile,v $
|
||||
# @(#) $Revision: 30.9 $
|
||||
# @(#) $Id: Makefile,v 30.9 2013/09/02 02:55:19 chongo Exp $
|
||||
# @(#) $Source: /usr/local/src/bin/calc/help/RCS/Makefile,v $
|
||||
#
|
||||
# Under source code control: 1991/07/23 06:47:57
|
||||
# File existed as early as: 1991
|
||||
@@ -272,43 +272,47 @@ BLT_HELP_FILES= ${BLT_HELP_FILES_3} ${BLT_HELP_FILES_5} \
|
||||
${BLT_HELP_FILES_11} ${BLT_HELP_FILES_13} \
|
||||
${BLT_HELP_FILES_14}
|
||||
|
||||
# The detailed list of help files to install
|
||||
#
|
||||
# This list is prodiced by the detaillist rule when no WARNINGS are detected.
|
||||
#
|
||||
# Please use:
|
||||
#
|
||||
# make detaillist
|
||||
# make detail_help_list
|
||||
#
|
||||
# to keep this list in nice sorted order and to check that these
|
||||
# non-special help files are under RCS control.
|
||||
#
|
||||
DETAIL_HELP= abs access acos acosh acot acoth acsc acsch address agd append \
|
||||
appr arg argv arrow asec asech asin asinh assign atan atan2 atanh \
|
||||
avg base base2 bernoulli bit blk blkcpy blkfree blocks bround btrunc \
|
||||
calc_tty calclevel calcpath catalan ceil cfappr cfsim char cmdbuf \
|
||||
cmp comb conj cos cosh cot coth count cp csc csch ctime delete den \
|
||||
dereference det digit digits display dp epsilon errcount errmax \
|
||||
errno error estr euler eval exp fact factor fclose fcnt feof ferror \
|
||||
fflush fgetc fgetfield fgetfile fgetline fgets fgetstr fib files \
|
||||
floor fopen forall fpathopen fprintf fputc fputs fputstr frac free \
|
||||
freebernoulli freeeuler freeglobals freeredc freestatics frem freopen \
|
||||
fscan fscanf fseek fsize ftell gcd gcdrem gd getenv hash head highbit \
|
||||
hmean hnrmod hypot ilog ilog10 ilog2 im indices inputlevel insert int \
|
||||
inverse iroot isassoc isatty isblk isconfig isdefined iserror iseven \
|
||||
isfile ishash isident isint islist ismat ismult isnull isnum isobj \
|
||||
isobjtype isodd isprime isptr isqrt isrand israndom isreal isrel \
|
||||
issimple issq isstr istype jacobi join lcm lcmfact lfactor ln log \
|
||||
lowbit ltol makelist matdim matfill matmax matmin matsum mattrace \
|
||||
mattrans max memsize meq min minv mmin mne mod modify name near \
|
||||
newerror nextcand nextprime norm null num oldvalue ord param perm \
|
||||
pfact pi pix places pmod polar poly pop popcnt pound power prevcand \
|
||||
prevprime printf prompt protect ptest push putenv quo quomod rand \
|
||||
randbit random randombit randperm rcin rcmul rcout rcpow rcsq re \
|
||||
remove reverse rewind rm root round rsearch runtime saveval scale \
|
||||
scan scanf search sec sech seed segment select sgn sha1 sin \
|
||||
sinh size sizeof sleep sort sqrt srand srandom ssq stoponerror \
|
||||
str strcat strcmp strcpy strerror strlen strncmp strncpy strpos \
|
||||
strprintf strscan strscanf substr sum swap system systime tail tan \
|
||||
tanh test time trunc usertime version xor
|
||||
DETAIL_HELP= abs access acos acosh acot acoth acsc acsch address \
|
||||
agd append appr arg argv arrow asec asech asin asinh assign atan \
|
||||
atan2 atanh avg base base2 bernoulli bit blk blkcpy blkfree blocks \
|
||||
bround btrunc calc_tty calclevel calcpath catalan ceil cfappr cfsim \
|
||||
char cmdbuf cmp comb conj cos cosh cot coth count cp csc csch ctime \
|
||||
delete den dereference det digit digits display dp epsilon errcount \
|
||||
errmax errno error estr euler eval exp fact factor fclose fcnt \
|
||||
feof ferror fflush fgetc fgetfield fgetfile fgetline fgets fgetstr \
|
||||
fib files floor fopen forall fpathopen fprintf fputc fputs fputstr \
|
||||
frac free freebernoulli freeeuler freeglobals freeredc freestatics \
|
||||
frem freopen fscan fscanf fseek fsize ftell gcd gcdrem gd getenv \
|
||||
hash head highbit hmean hnrmod hypot ilog ilog10 ilog2 im indices \
|
||||
inputlevel insert int inverse iroot isalnum isalpha isassoc isatty \
|
||||
isblk iscntrl isconfig isdefined isdigit iserror iseven isfile \
|
||||
isgraph ishash isident isint islist islower ismat ismult isnull \
|
||||
isnum isobj isobjtype isodd isprime isprint isptr ispunct isqrt \
|
||||
isrand israndom isreal isrel issimple isspace issq isstr istype \
|
||||
isupper isxdigit jacobi join lcm lcmfact lfactor ln log lowbit ltol \
|
||||
makelist matdim matfill matmax matmin matsum mattrace mattrans max \
|
||||
memsize meq min minv mmin mne mod modify name near newerror nextcand \
|
||||
nextprime norm null num oldvalue ord param perm pfact pi pix places \
|
||||
pmod polar poly pop popcnt pound power prevcand prevprime printf \
|
||||
prompt protect ptest push putenv quo quomod rand randbit random \
|
||||
randombit randperm rcin rcmul rcout rcpow rcsq re remove reverse \
|
||||
rewind rm root round rsearch runtime saveval scale scan scanf \
|
||||
search sec sech seed segment select sgn sha1 sin sinh size sizeof \
|
||||
sleep sort sqrt srand srandom ssq stoponerror str strcasecmp strcat \
|
||||
strcmp strcpy strerror strlen strncasecmp strncmp strncpy strpos \
|
||||
strprintf strscan strscanf strtolower strtoupper substr sum swap \
|
||||
system systime tail tan tanh test time trunc usertime version xor
|
||||
|
||||
# This list is of files that are clones of DETAIL_HELP files. They are
|
||||
# built from DETAIL_HELP files.
|
||||
@@ -633,11 +637,26 @@ bsdi: all
|
||||
${RM} -f obj
|
||||
${CP} obj.file obj
|
||||
|
||||
# These next rule help me form the ${DETAIL_HELP} makefile variables above.
|
||||
# These next rule help form the ${DETAIL_HELP} makefile variables above.
|
||||
#
|
||||
detaillist:
|
||||
${Q} -(echo "xxxxx"; \
|
||||
for i in ${DETAIL_HELP} /dev/null; do \
|
||||
# NOTE: The ${DETAIL_HELP} list does not include special help files.
|
||||
#
|
||||
detail_help_list:
|
||||
${Q} -(find . -mindepth 1 -maxdepth 1 -type f \
|
||||
! -name Makefile ! -name '.Makefile.swp' \
|
||||
! -name archive ! -name assoc ! -name builtin.end \
|
||||
! -name builtin.top ! -name command ! -name config \
|
||||
! -name contrib ! -name credit ! -name custom ! -name define \
|
||||
! -name environment ! -name errorcodes.hdr \
|
||||
! -name errorcodes.sed ! -name expression ! -name file \
|
||||
! -name funclist.c ! -name funclist.sed ! -name help \
|
||||
! -name history ! -name interrupt ! -name intro ! -name list \
|
||||
! -name mat ! -name obj.file ! -name operator \
|
||||
! -name overview ! -name script ! -name statement \
|
||||
! -name todo ! -name types ! -name unexpected \
|
||||
! -name variable ! -name wishlist \
|
||||
-print | \
|
||||
while read i; do \
|
||||
if [ X"$$i" != X"/dev/null" ]; then \
|
||||
if [ ! -f RCS/$$i,v ]; then \
|
||||
echo "WARNING: $$i not under RCS control" 1>&2; \
|
||||
@@ -645,8 +664,10 @@ detaillist:
|
||||
echo $$i; \
|
||||
fi; \
|
||||
fi; \
|
||||
done | LANG=C ${SORT}) | ${FMT} -70 | \
|
||||
${SED} -e '1s/xxxxx/DETAIL_HELP=/' -e '2,$$s/^/ /' \
|
||||
done; \
|
||||
echo '--first_line--') | \
|
||||
${SED} -e 's:^\./::' | LANG=C ${SORT} | ${FMT} -70 | \
|
||||
${SED} -e '1s/--first_line--/DETAIL_HELP=/' -e '2,$$s/^/ /' \
|
||||
-e 's/$$/ \\/' -e '$$s/ \\$$//'
|
||||
|
||||
##
|
||||
|
2
help/abs
2
help/abs
@@ -62,7 +62,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: abs,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/abs,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/abs,v $
|
||||
##
|
||||
## Under source code control: 1994/03/19 01:40:22
|
||||
## File existed as early as: 1994
|
||||
|
@@ -66,7 +66,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: access,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/access,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/access,v $
|
||||
##
|
||||
## Under source code control: 1996/04/30 03:36:20
|
||||
## File existed as early as: 1996
|
||||
|
@@ -47,7 +47,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: acos,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/acos,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/acos,v $
|
||||
##
|
||||
## Under source code control: 1994/03/19 01:40:23
|
||||
## File existed as early as: 1994
|
||||
|
@@ -50,7 +50,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: acosh,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/acosh,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/acosh,v $
|
||||
##
|
||||
## Under source code control: 1994/03/19 01:40:24
|
||||
## File existed as early as: 1994
|
||||
|
@@ -47,7 +47,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: acot,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/acot,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/acot,v $
|
||||
##
|
||||
## Under source code control: 1995/11/13 03:49:00
|
||||
## File existed as early as: 1995
|
||||
|
@@ -49,7 +49,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: acoth,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/acoth,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/acoth,v $
|
||||
##
|
||||
## Under source code control: 1995/11/13 03:49:01
|
||||
## File existed as early as: 1995
|
||||
|
@@ -47,7 +47,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: acsc,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/acsc,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/acsc,v $
|
||||
##
|
||||
## Under source code control: 1995/11/13 03:49:00
|
||||
## File existed as early as: 1995
|
||||
|
@@ -50,7 +50,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: acsch,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/acsch,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/acsch,v $
|
||||
##
|
||||
## Under source code control: 1995/11/13 03:49:01
|
||||
## File existed as early as: 1995
|
||||
|
@@ -178,7 +178,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: address,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/address,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/address,v $
|
||||
##
|
||||
## Under source code control: 1997/09/06 20:03:34
|
||||
## File existed as early as: 1997
|
||||
|
2
help/agd
2
help/agd
@@ -74,7 +74,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: agd,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/agd,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/agd,v $
|
||||
##
|
||||
## Under source code control: 1997/09/06 20:03:34
|
||||
## File existed as early as: 1997
|
||||
|
@@ -78,7 +78,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: append,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/append,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/append,v $
|
||||
##
|
||||
## Under source code control: 1994/03/19 03:13:17
|
||||
## File existed as early as: 1994
|
||||
|
@@ -169,7 +169,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: appr,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/appr,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/appr,v $
|
||||
##
|
||||
## Under source code control: 1994/09/25 17:18:21
|
||||
## File existed as early as: 1994
|
||||
|
@@ -33,7 +33,7 @@ chongo <was here> /\../\
|
||||
##
|
||||
## @(#) $Revision: 30.2 $
|
||||
## @(#) $Id: archive,v 30.2 2013/08/11 01:08:32 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/archive,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/archive,v $
|
||||
##
|
||||
## Under source code control: 1996/06/13 02:51:48
|
||||
## File existed as early as: 1996
|
||||
|
2
help/arg
2
help/arg
@@ -50,7 +50,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: arg,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/arg,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/arg,v $
|
||||
##
|
||||
## Under source code control: 1994/09/25 20:22:31
|
||||
## File existed as early as: 1994
|
||||
|
@@ -71,7 +71,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: argv,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/argv,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/argv,v $
|
||||
##
|
||||
## Under source code control: 1999/11/23 19:45:05
|
||||
## File existed as early as: 1999
|
||||
|
@@ -68,7 +68,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: arrow,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/arrow,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/arrow,v $
|
||||
##
|
||||
## Under source code control: 1997/09/06 20:03:34
|
||||
## File existed as early as: 1997
|
||||
|
@@ -47,7 +47,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: asec,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/asec,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/asec,v $
|
||||
##
|
||||
## Under source code control: 1995/11/13 03:49:00
|
||||
## File existed as early as: 1995
|
||||
|
@@ -49,7 +49,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: asech,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/asech,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/asech,v $
|
||||
##
|
||||
## Under source code control: 1995/11/13 03:49:00
|
||||
## File existed as early as: 1995
|
||||
|
@@ -47,7 +47,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: asin,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/asin,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/asin,v $
|
||||
##
|
||||
## Under source code control: 1994/03/19 01:40:24
|
||||
## File existed as early as: 1994
|
||||
|
@@ -49,7 +49,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: asinh,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/asinh,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/asinh,v $
|
||||
##
|
||||
## Under source code control: 1994/03/19 01:40:25
|
||||
## File existed as early as: 1994
|
||||
|
@@ -135,7 +135,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: assign,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/assign,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/assign,v $
|
||||
##
|
||||
## Under source code control: 1995/05/11 21:03:23
|
||||
## File existed as early as: 1995
|
||||
|
@@ -100,7 +100,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: assoc,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/assoc,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/assoc,v $
|
||||
##
|
||||
## Under source code control: 1994/09/25 20:22:31
|
||||
## File existed as early as: 1994
|
||||
|
@@ -47,7 +47,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: atan,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/atan,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/atan,v $
|
||||
##
|
||||
## Under source code control: 1994/03/19 01:40:25
|
||||
## File existed as early as: 1994
|
||||
|
@@ -54,7 +54,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: atan2,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/atan2,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/atan2,v $
|
||||
##
|
||||
## Under source code control: 1994/03/19 01:40:26
|
||||
## File existed as early as: 1994
|
||||
|
@@ -49,7 +49,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: atanh,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/atanh,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/atanh,v $
|
||||
##
|
||||
## Under source code control: 1994/03/19 01:40:27
|
||||
## File existed as early as: 1994
|
||||
|
2
help/avg
2
help/avg
@@ -67,7 +67,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: avg,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/avg,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/avg,v $
|
||||
##
|
||||
## Under source code control: 1994/09/25 20:22:31
|
||||
## File existed as early as: 1994
|
||||
|
@@ -99,7 +99,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: base,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/base,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/base,v $
|
||||
##
|
||||
## Under source code control: 1994/09/30 00:09:39
|
||||
## File existed as early as: 1994
|
||||
|
@@ -111,7 +111,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: base2,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/base2,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/base2,v $
|
||||
##
|
||||
## Under source code control: 2002/12/29 00:21:07
|
||||
## File existed as early as: 2002
|
||||
|
@@ -59,7 +59,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: bernoulli,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/bernoulli,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/bernoulli,v $
|
||||
##
|
||||
## Under source code control: 2000/07/13 01:33:00
|
||||
## File existed as early as: 2000
|
||||
|
2
help/bit
2
help/bit
@@ -60,7 +60,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: bit,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/bit,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/bit,v $
|
||||
##
|
||||
## Under source code control: 1994/10/21 02:21:30
|
||||
## File existed as early as: 1994
|
||||
|
2
help/blk
2
help/blk
@@ -251,7 +251,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: blk,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/blk,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/blk,v $
|
||||
##
|
||||
## Under source code control: 1997/04/05 13:07:13
|
||||
## File existed as early as: 1997
|
||||
|
@@ -208,7 +208,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.2 $
|
||||
## @(#) $Id: blkcpy,v 30.2 2013/08/11 01:08:32 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/blkcpy,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/blkcpy,v $
|
||||
##
|
||||
## Under source code control: 1997/04/05 14:08:50
|
||||
## File existed as early as: 1997
|
||||
|
@@ -75,7 +75,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: blkfree,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/blkfree,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/blkfree,v $
|
||||
##
|
||||
## Under source code control: 1997/04/05 13:07:13
|
||||
## File existed as early as: 1997
|
||||
|
@@ -60,7 +60,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: blocks,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/blocks,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/blocks,v $
|
||||
##
|
||||
## Under source code control: 1997/04/05 13:07:13
|
||||
## File existed as early as: 1997
|
||||
|
@@ -140,7 +140,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: bround,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/bround,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/bround,v $
|
||||
##
|
||||
## Under source code control: 1994/09/30 00:22:35
|
||||
## File existed as early as: 1994
|
||||
|
@@ -61,7 +61,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: btrunc,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/btrunc,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/btrunc,v $
|
||||
##
|
||||
## Under source code control: 1994/09/30 00:44:27
|
||||
## File existed as early as: 1994
|
||||
|
@@ -217,7 +217,7 @@
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: builtin.end,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/builtin.end,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/builtin.end,v $
|
||||
##
|
||||
## Under source code control: 1995/07/10 01:17:53
|
||||
## File existed as early as: 1995
|
||||
|
@@ -25,7 +25,7 @@ Builtin functions
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: builtin.top,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/builtin.top,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/builtin.top,v $
|
||||
##
|
||||
## Under source code control: 1995/07/10 01:17:53
|
||||
## File existed as early as: 1995
|
||||
|
@@ -44,7 +44,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: calc_tty,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/calc_tty,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/calc_tty,v $
|
||||
##
|
||||
## Under source code control: 2000/12/14 01:33:00
|
||||
## File existed as early as: 2000
|
||||
|
@@ -52,7 +52,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: calclevel,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/calclevel,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/calclevel,v $
|
||||
##
|
||||
## Under source code control: 1999/10/31 06:01:21
|
||||
## File existed as early as: 1999
|
||||
|
@@ -47,7 +47,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: calcpath,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/calcpath,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/calcpath,v $
|
||||
##
|
||||
## Under source code control: 2006/05/07 23:56:04
|
||||
## File existed as early as: 2006
|
||||
|
@@ -55,7 +55,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: catalan,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/catalan,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/catalan,v $
|
||||
##
|
||||
## Under source code control: 2000/12/14 01:33:00
|
||||
## File existed as early as: 2000
|
||||
|
@@ -50,7 +50,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: ceil,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ceil,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/ceil,v $
|
||||
##
|
||||
## Under source code control: 1994/09/30 01:12:01
|
||||
## File existed as early as: 1994
|
||||
|
@@ -106,7 +106,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: cfappr,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/cfappr,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/cfappr,v $
|
||||
##
|
||||
## Under source code control: 1994/09/30 01:23:59
|
||||
## File existed as early as: 1994
|
||||
|
@@ -131,7 +131,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: cfsim,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/cfsim,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/cfsim,v $
|
||||
##
|
||||
## Under source code control: 1994/09/30 01:29:45
|
||||
## File existed as early as: 1994
|
||||
|
@@ -44,7 +44,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: char,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/char,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/char,v $
|
||||
##
|
||||
## Under source code control: 1994/09/30 01:45:45
|
||||
## File existed as early as: 1994
|
||||
|
@@ -46,7 +46,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: cmdbuf,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/cmdbuf,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/cmdbuf,v $
|
||||
##
|
||||
## Under source code control: 1995/07/09 04:05:58
|
||||
## File existed as early as: 1995
|
||||
|
2
help/cmp
2
help/cmp
@@ -132,7 +132,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: cmp,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/cmp,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/cmp,v $
|
||||
##
|
||||
## Under source code control: 1994/10/20 02:52:30
|
||||
## File existed as early as: 1994
|
||||
|
@@ -56,7 +56,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: comb,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/comb,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/comb,v $
|
||||
##
|
||||
## Under source code control: 1994/10/20 04:03:02
|
||||
## File existed as early as: 1994
|
||||
|
@@ -368,7 +368,7 @@ Command sequence
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: command,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/command,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/command,v $
|
||||
##
|
||||
## Under source code control: 1991/07/21 04:37:17
|
||||
## File existed as early as: 1991
|
||||
|
@@ -976,7 +976,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.3 $
|
||||
## @(#) $Id: config,v 30.3 2007/09/21 01:27:27 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/config,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/config,v $
|
||||
##
|
||||
## Under source code control: 1991/07/21 04:37:17
|
||||
## File existed as early as: 1991
|
||||
|
@@ -58,7 +58,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: conj,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/conj,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/conj,v $
|
||||
##
|
||||
## Under source code control: 1995/10/03 10:40:01
|
||||
## File existed as early as: 1995
|
||||
|
@@ -101,7 +101,7 @@ chongo (share and enjoy) /\../\
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: contrib,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/contrib,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/contrib,v $
|
||||
##
|
||||
## Under source code control: 1997/03/09 16:33:22
|
||||
## File existed as early as: 1997
|
||||
|
2
help/cos
2
help/cos
@@ -53,7 +53,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: cos,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/cos,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/cos,v $
|
||||
##
|
||||
## Under source code control: 1994/03/19 01:40:27
|
||||
## File existed as early as: 1994
|
||||
|
@@ -47,7 +47,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: cosh,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/cosh,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/cosh,v $
|
||||
##
|
||||
## Under source code control: 1994/03/19 01:40:28
|
||||
## File existed as early as: 1994
|
||||
|
2
help/cot
2
help/cot
@@ -45,7 +45,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: cot,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/cot,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/cot,v $
|
||||
##
|
||||
## Under source code control: 1995/11/13 03:49:00
|
||||
## File existed as early as: 1995
|
||||
|
@@ -47,7 +47,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: coth,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/coth,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/coth,v $
|
||||
##
|
||||
## Under source code control: 1995/11/13 03:49:00
|
||||
## File existed as early as: 1995
|
||||
|
@@ -48,7 +48,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: count,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/count,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/count,v $
|
||||
##
|
||||
## Under source code control: 1995/07/10 02:09:31
|
||||
## File existed as early as: 1995
|
||||
|
2
help/cp
2
help/cp
@@ -54,7 +54,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: cp,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/cp,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/cp,v $
|
||||
##
|
||||
## Under source code control: 1995/10/05 04:52:26
|
||||
## File existed as early as: 1995
|
||||
|
@@ -83,7 +83,7 @@ See also:
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: credit,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/credit,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/credit,v $
|
||||
##
|
||||
## Under source code control: 1991/07/23 05:47:24
|
||||
## File existed as early as: 1991
|
||||
|
2
help/csc
2
help/csc
@@ -45,7 +45,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: csc,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/csc,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/csc,v $
|
||||
##
|
||||
## Under source code control: 1995/11/13 03:49:00
|
||||
## File existed as early as: 1995
|
||||
|
@@ -47,7 +47,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: csch,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/csch,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/csch,v $
|
||||
##
|
||||
## Under source code control: 1995/11/13 03:49:00
|
||||
## File existed as early as: 1995
|
||||
|
@@ -46,7 +46,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: ctime,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ctime,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/ctime,v $
|
||||
##
|
||||
## Under source code control: 1996/04/30 03:05:18
|
||||
## File existed as early as: 1996
|
||||
|
@@ -112,7 +112,7 @@ SEE ALSO
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: custom,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/custom,v $
|
||||
## @(#) $Source: /usr/local/src/bin/calc/help/RCS/custom,v $
|
||||
##
|
||||
## Under source code control: 1997/03/09 16:33:22
|
||||
## File existed as early as: 1997
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user