mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Compare commits
5 Commits
2.11.5t4.2
...
2.11.5.6
Author | SHA1 | Date | |
---|---|---|---|
|
a57ee19ca5 | ||
|
a6e226fa80 | ||
|
86e0f98c8f | ||
|
e4dcbf7ecf | ||
|
10c0bd2d95 |
51
BUGS
51
BUGS
@@ -74,6 +74,53 @@ Known bugs:
|
|||||||
|
|
||||||
Problems with known work-a-rounds:
|
Problems with known work-a-rounds:
|
||||||
|
|
||||||
|
* The gcc as shipped with Redhat 7 perhaps other Linux distributions
|
||||||
|
has a bug causes calc to dump core on startup when calc is:
|
||||||
|
|
||||||
|
compiled optimized (-O, -O1, -O2 or -O3)
|
||||||
|
|
||||||
|
AND
|
||||||
|
|
||||||
|
compiled with debugging (-g or -g3)
|
||||||
|
|
||||||
|
AND
|
||||||
|
|
||||||
|
when calc is compiled with readline (see USE_READLINE,
|
||||||
|
READLINE_LIB and READLINE_INCLUDE in the Makefile)
|
||||||
|
|
||||||
|
On Redhat, the gcc -v which has this problem is:
|
||||||
|
|
||||||
|
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85)
|
||||||
|
|
||||||
|
there may be other gcc versions that also suffer this fate.
|
||||||
|
|
||||||
|
The readlines associated with problem are:
|
||||||
|
|
||||||
|
readline-4.1-5
|
||||||
|
readline2.2.1-2.2.1-2
|
||||||
|
readline-devel-4.1-5
|
||||||
|
|
||||||
|
One work-a-round is to compile calc WITHOUT readline. In the
|
||||||
|
Makefile be sure that:
|
||||||
|
|
||||||
|
USE_READLINE=
|
||||||
|
READLINE_LIB=
|
||||||
|
READLINE_INCLUDE=
|
||||||
|
|
||||||
|
i.e., these Makefile vars are empty.
|
||||||
|
|
||||||
|
If you must use readline, then an alternate work-a-round is to
|
||||||
|
change the DEBUG Makefile variable to either:
|
||||||
|
|
||||||
|
compile for speed: -O3 (or -O2 if you do not have -O3)
|
||||||
|
compile to debug: -g3 (or -g if you do not have -g3)
|
||||||
|
|
||||||
|
but not both.
|
||||||
|
|
||||||
|
See RH bug #57889 for details:
|
||||||
|
|
||||||
|
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=57889
|
||||||
|
|
||||||
* There is a bug in gcc-2.95 that causes calc, when compiled with -O2,
|
* There is a bug in gcc-2.95 that causes calc, when compiled with -O2,
|
||||||
to fail the regression test. The work-a-round is to compile with -O
|
to fail the regression test. The work-a-round is to compile with -O
|
||||||
or to use gcc-2.96 or later.
|
or to use gcc-2.96 or later.
|
||||||
@@ -241,8 +288,8 @@ Problems with known work-a-rounds:
|
|||||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
##
|
##
|
||||||
## @(#) $Revision: 29.12 $
|
## @(#) $Revision: 29.17 $
|
||||||
## @(#) $Id: BUGS,v 29.12 2001/06/01 11:32:01 chongo Exp $
|
## @(#) $Id: BUGS,v 29.17 2001/12/31 22:12:35 chongo Exp $
|
||||||
## @(#) $Source: /usr/local/src/cmd/calc/RCS/BUGS,v $
|
## @(#) $Source: /usr/local/src/cmd/calc/RCS/BUGS,v $
|
||||||
##
|
##
|
||||||
## Under source code control: 1994/03/18 14:06:13
|
## Under source code control: 1994/03/18 14:06:13
|
||||||
|
88
CHANGES
88
CHANGES
@@ -1,14 +1,38 @@
|
|||||||
The following are the changes from calc version 2.11.5t4.1 to date:
|
The following are the changes from calc version 2.11.5.5 to date:
|
||||||
|
|
||||||
|
Now using version numbers of one of these forms:
|
||||||
|
|
||||||
|
x.y.z.w
|
||||||
|
x.y.z
|
||||||
|
x.y
|
||||||
|
|
||||||
|
Changed the READLINE_LIB Makefile variable to not link with -lreadline
|
||||||
|
by default. If you do have readline, we recommend that you use it.
|
||||||
|
If you can install the GNU readline:
|
||||||
|
|
||||||
|
http://freshmeat.net/projects/gnureadline/
|
||||||
|
http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
|
||||||
|
|
||||||
|
we recommend it. But if not, you should set the USE_READLINE,
|
||||||
|
READLINE_LIB, and READLINE_INCLUDE Makefile variables to empty.
|
||||||
|
NOTE: See the BUGS file for a Linux issue when compiling calc
|
||||||
|
with -O (or -O2 or -O3) AND with -g (or -g3) AND with readline.
|
||||||
|
|
||||||
|
|
||||||
|
The following are the changes from calc version 2.11.5t4.1 to 2.11.5t4.4:
|
||||||
|
|
||||||
Updated dependency rules in Makefiles.
|
Updated dependency rules in Makefiles.
|
||||||
|
|
||||||
|
NOTE: -DSRC, as used in 2.11.5t4.1 was renamed -DCALC_SRC
|
||||||
|
in a later version.
|
||||||
|
|
||||||
Calc include files use #include "foo.h" to include other calc
|
Calc include files use #include "foo.h" to include other calc
|
||||||
header files if -DSRC. Otherwise they use <calc/foo.h>.
|
header files if -DCALC_SRC. Otherwise they use <calc/foo.h>.
|
||||||
The -DSRC symbol is defined by default in calc's Makefile
|
The -DCALC_SRC symbol is defined by default in calc's Makefile
|
||||||
and so it uses the header files from within the calc src tree.
|
and so it uses the header files from within the calc src tree.
|
||||||
If an external non-calc program includes an installed calc
|
If an external non-calc program includes an installed calc
|
||||||
header file (from under /usr/include), and it does NOT define
|
header file (from under /usr/include), and it does NOT define
|
||||||
SRC, then it will obtain the calc header files from the
|
CALC_SRC, then it will obtain the calc header files from the
|
||||||
correct system location (such as /usr/include/calc/foo.h).
|
correct system location (such as /usr/include/calc/foo.h).
|
||||||
|
|
||||||
Added calc builtin function: version() which returns the calc
|
Added calc builtin function: version() which returns the calc
|
||||||
@@ -21,6 +45,56 @@ The following are the changes from calc version 2.11.5t4.1 to date:
|
|||||||
|
|
||||||
for details.
|
for details.
|
||||||
|
|
||||||
|
Corrected a bug that incorrectly set the default calc path
|
||||||
|
back in version 2.11.5t4. The default CALCPATH is now:
|
||||||
|
|
||||||
|
.:./cal:~/.cal:/usr/share/calc:/usr/share/calc/custom
|
||||||
|
|
||||||
|
and the default CALCRC is now:
|
||||||
|
|
||||||
|
/usr/share/calc/startup:~/.calcrc:./.calcinit
|
||||||
|
|
||||||
|
This fixes the missing bindings error and it places the calc
|
||||||
|
resource files into the default path.
|
||||||
|
|
||||||
|
If you are using the GNU readline then the Makefile recommends that
|
||||||
|
you link with the ncurses library.
|
||||||
|
|
||||||
|
Applied Makefile, cscript/Makefile and custom/Makefile patches to
|
||||||
|
fix install mode problems, to deal with sorting and dates in I18n
|
||||||
|
environments (such as Japanese), to fix some problems with calc.spec
|
||||||
|
and to fix the cscript #! header lines. Thanks goes to KAWAMURA Masao
|
||||||
|
(kawamura at mlb.co.jp) for the bug report and patch!
|
||||||
|
|
||||||
|
Fixed headers on fproduct.calc powerterm.calc 4dsphere.calc so
|
||||||
|
that they are correcly changed on installation.
|
||||||
|
|
||||||
|
Added ${GREP} Makefile variable.
|
||||||
|
|
||||||
|
The top level Makefile now sets LANG=C and passes it down to
|
||||||
|
lower level Makefiles.
|
||||||
|
|
||||||
|
Updated URLs in cal/lucas.cal comments.
|
||||||
|
|
||||||
|
Now shipping calc.spec, inst_files, spec-template and Makefile.linux
|
||||||
|
with the standard calc source distribution. Note that the standard
|
||||||
|
Makefile has not changed. The Makefile.linux only in minor ways
|
||||||
|
needed to build calc rpms.
|
||||||
|
|
||||||
|
Added $T Makefile variable. $T is the 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 to install calc somewhere other than into the system area.
|
||||||
|
For examplewhen forming the calc rpm, the Makefile is called with
|
||||||
|
T=$RPM_BUILD_ROOT. If $T is empty, calc is installed under /.
|
||||||
|
|
||||||
|
Removed all echo_XXX rules except for echo_inst_files from lower
|
||||||
|
level makefile. The calc.spec will use a make install rule
|
||||||
|
with T=$RPM_BUILD_ROOT.
|
||||||
|
|
||||||
|
Updated LIBRARY file with instructions related to -DCALC_SRC,
|
||||||
|
the new default include file locatin and -lcustcalc.
|
||||||
|
|
||||||
|
|
||||||
The following are the changes from calc version 2.11.5t3 to 2.11.5t4:
|
The following are the changes from calc version 2.11.5t3 to 2.11.5t4:
|
||||||
|
|
||||||
@@ -151,7 +225,7 @@ The following are the changes from calc version 2.11.5t0 to 2.11.5t1.1:
|
|||||||
|
|
||||||
An effort was made to make calc easier to build under Windoz
|
An effort was made to make calc easier to build under Windoz
|
||||||
using the Cygwin project (http://sources.redhat.com/cygwin/).
|
using the Cygwin project (http://sources.redhat.com/cygwin/).
|
||||||
Thanks to the work of Thomas Jones-Low (tjoneslo and softstart
|
Thanks to the work of Thomas Jones-Low (tjoneslo at softstart
|
||||||
dot com), a number of #if defined(_WIN32)'s have been added
|
dot com), a number of #if defined(_WIN32)'s have been added
|
||||||
to calc source. These changes should not effect Windoz
|
to calc source. These changes should not effect Windoz
|
||||||
free system such as GNU/Linux, Solaris, POSIX-like, etc ...
|
free system such as GNU/Linux, Solaris, POSIX-like, etc ...
|
||||||
@@ -5305,8 +5379,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.
|
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
##
|
##
|
||||||
## @(#) $Revision: 29.34 $
|
## @(#) $Revision: 29.45 $
|
||||||
## @(#) $Id: CHANGES,v 29.34 2001/06/01 11:26:53 chongo Exp chongo $
|
## @(#) $Id: CHANGES,v 29.45 2001/12/31 22:12:35 chongo Exp $
|
||||||
## @(#) $Source: /usr/local/src/cmd/calc/RCS/CHANGES,v $
|
## @(#) $Source: /usr/local/src/cmd/calc/RCS/CHANGES,v $
|
||||||
##
|
##
|
||||||
## Under source code control: 1993/06/02 18:12:57
|
## Under source code control: 1993/06/02 18:12:57
|
||||||
|
@@ -26,6 +26,13 @@ Installing calc in 4 easy steps:
|
|||||||
Set BINDIR to the place where calc is installed. As shipped
|
Set BINDIR to the place where calc is installed. As shipped
|
||||||
the Makefile assumes a BINDIR /usr/local/bin.
|
the Makefile assumes a BINDIR /usr/local/bin.
|
||||||
|
|
||||||
|
Some compilers (to put it mildly) have bugs. Sometimes the
|
||||||
|
DEBUG Makefile variable causes the compiler / optimizer to
|
||||||
|
produce bad code. Other compilers do just fine. If possible
|
||||||
|
try to use DEBUG=-O3 -g3 (maximum optimization and debug symbols).
|
||||||
|
If the calc test fails (see step 3), try lowering either the
|
||||||
|
-O value and/or the -g3. Also try using -Osomething without -g.
|
||||||
|
|
||||||
Adjust other Makefile variables as needed.
|
Adjust other Makefile variables as needed.
|
||||||
|
|
||||||
2) build calc:
|
2) build calc:
|
||||||
@@ -65,8 +72,8 @@ the calc help subsystem. See the README file for details.
|
|||||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
##
|
##
|
||||||
## @(#) $Revision: 29.2 $
|
## @(#) $Revision: 29.3 $
|
||||||
## @(#) $Id: HOWTO.INSTALL,v 29.2 2000/06/07 14:02:13 chongo Exp $
|
## @(#) $Id: HOWTO.INSTALL,v 29.3 2001/12/11 02:51:00 chongo Exp $
|
||||||
## @(#) $Source: /usr/local/src/cmd/calc/RCS/HOWTO.INSTALL,v $
|
## @(#) $Source: /usr/local/src/cmd/calc/RCS/HOWTO.INSTALL,v $
|
||||||
##
|
##
|
||||||
## Under source code control: 1999/09/27 20:48:44
|
## Under source code control: 1999/09/27 20:48:44
|
||||||
|
28
LIBRARY
28
LIBRARY
@@ -48,12 +48,30 @@ convenient for outside use. So you should read the source for a routine
|
|||||||
to see if it really does what you think it does. I won't guarantee that
|
to see if it really does what you think it does. I won't guarantee that
|
||||||
obscure internal routines won't change or disappear in future releases!
|
obscure internal routines won't change or disappear in future releases!
|
||||||
|
|
||||||
When calc is installed, all of the include files needed to build
|
When calc is installed, all of libraries are installed into ${LIBDIR}.
|
||||||
libcalc.a along with the link library itself are installed into ${LIBDIR}.
|
All of the calc header files are installed under ${INCDIRCALC}.
|
||||||
|
|
||||||
|
If CALC_SRC is defined, then the calc header files will assume that
|
||||||
|
they are in or under the current directory. However, most external
|
||||||
|
programs most likely will not be located under calc'c source tree.
|
||||||
|
External programs most likely want to use the installed calc header
|
||||||
|
files under ${INCDIRCALC}. External programs most likely NOT want
|
||||||
|
to define CALC_SRC.
|
||||||
|
|
||||||
External programs may want to compile with:
|
External programs may want to compile with:
|
||||||
|
|
||||||
-I${LIBDIR} -L${LIBDIR} -lcalc
|
-L${LIBDIR} -lcalc
|
||||||
|
|
||||||
|
If custom functions are also used, they may want to compile with:
|
||||||
|
|
||||||
|
-L${LIBDIR} -lcalc -lcustcalc
|
||||||
|
|
||||||
|
The CALC_SRC symbol should NOT be defined by default. However if you are
|
||||||
|
feeling pedantic you may want to force CALC_SRC to be undefined:
|
||||||
|
|
||||||
|
-UCALC_SRC
|
||||||
|
|
||||||
|
as well.
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
ERROR HANDLING
|
ERROR HANDLING
|
||||||
@@ -471,8 +489,8 @@ need call libcalc_call_me_last() only once.
|
|||||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
##
|
##
|
||||||
## @(#) $Revision: 29.2 $
|
## @(#) $Revision: 29.5 $
|
||||||
## @(#) $Id: LIBRARY,v 29.2 2000/06/07 14:02:13 chongo Exp $
|
## @(#) $Id: LIBRARY,v 29.5 2001/06/08 22:57:35 chongo Exp $
|
||||||
## @(#) $Source: /usr/local/src/cmd/calc/RCS/LIBRARY,v $
|
## @(#) $Source: /usr/local/src/cmd/calc/RCS/LIBRARY,v $
|
||||||
##
|
##
|
||||||
## Under source code control: 1993/07/30 19:44:49
|
## Under source code control: 1993/07/30 19:44:49
|
||||||
|
553
Makefile
553
Makefile
@@ -20,8 +20,8 @@
|
|||||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#
|
#
|
||||||
MAKEFILE_REV= $$Revision: 29.30 $$
|
MAKEFILE_REV= $$Revision: 29.41 $$
|
||||||
# @(#) $Id: Makefile.ship,v 29.30 2001/05/29 00:16:53 chongo Exp $
|
# @(#) $Id: Makefile.ship,v 29.41 2001/12/31 22:12:35 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/RCS/Makefile.ship,v $
|
# @(#) $Source: /usr/local/src/cmd/calc/RCS/Makefile.ship,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 1990/02/15 01:48:41
|
# Under source code control: 1990/02/15 01:48:41
|
||||||
@@ -33,7 +33,6 @@ MAKEFILE_REV= $$Revision: 29.30 $$
|
|||||||
# calculator by David I. Bell with help/mods from others
|
# calculator by David I. Bell with help/mods from others
|
||||||
# Makefile by Landon Curt Noll
|
# Makefile by Landon Curt Noll
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#-=-=-=-=-=-=-=-=- You may want to change some values below -=-=-=-=-=-=-=-=-#
|
#-=-=-=-=-=-=-=-=- You may want to change some values below -=-=-=-=-=-=-=-=-#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@@ -503,6 +502,13 @@ HAVE_UNISTD_H=
|
|||||||
# ${INCDIR} where most .h files are kept
|
# ${INCDIR} where most .h files are kept
|
||||||
# ${LIBDIR} where *.a files are installed
|
# ${LIBDIR} where *.a files are installed
|
||||||
#
|
#
|
||||||
|
# If in doubt, set:
|
||||||
|
#
|
||||||
|
# BINDIR= /usr/bin
|
||||||
|
# SHAREDIR= /usr/share
|
||||||
|
# INCDIR= /usr/include
|
||||||
|
# LIBDIR= /usr/lib
|
||||||
|
#
|
||||||
#BINDIR= /usr/local/bin
|
#BINDIR= /usr/local/bin
|
||||||
BINDIR= /usr/bin
|
BINDIR= /usr/bin
|
||||||
|
|
||||||
@@ -525,6 +531,16 @@ LIBDIR= /usr/lib
|
|||||||
# ${CUSTOMINCPDIR} where custom .h files are installed
|
# ${CUSTOMINCPDIR} where custom .h files are installed
|
||||||
# ${SCRIPTDIR} where calc shell scripts are installed
|
# ${SCRIPTDIR} where calc shell scripts are installed
|
||||||
#
|
#
|
||||||
|
# If in doubt, set:
|
||||||
|
#
|
||||||
|
# CSHAREDIR= ${SHAREDIR}/calc
|
||||||
|
# HELPDIR= ${CSHAREDIR}/help
|
||||||
|
# INCDIRCALC= ${INCDIR}/calc
|
||||||
|
# CUSTOMLIBDIR= ${CSHAREDIR}/custom
|
||||||
|
# CUSTOMHELPDIR= ${CSHAREDIR}/custhelp
|
||||||
|
# CUSTOMINCDIR= ${INCDIRCALC}/custom
|
||||||
|
# SCRIPTDIR= ${BINDIR}/cscript
|
||||||
|
#
|
||||||
CSHAREDIR= ${SHAREDIR}/calc
|
CSHAREDIR= ${SHAREDIR}/calc
|
||||||
HELPDIR= ${CSHAREDIR}/help
|
HELPDIR= ${CSHAREDIR}/help
|
||||||
INCDIRCALC= ${INCDIR}/calc
|
INCDIRCALC= ${INCDIR}/calc
|
||||||
@@ -533,6 +549,26 @@ CUSTOMHELPDIR= ${CSHAREDIR}/custhelp
|
|||||||
CUSTOMINCDIR= ${INCDIRCALC}/custom
|
CUSTOMINCDIR= ${INCDIRCALC}/custom
|
||||||
SCRIPTDIR= ${BINDIR}/cscript
|
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 /. For example, calc is built with its help
|
||||||
|
# directory being ${HELPDIR}. Howeever calc help files are
|
||||||
|
# installed under $T${HELPDIR}.
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
# calc is installed under $T, as if one had to chroot under
|
||||||
|
# $T for calc to operate.
|
||||||
|
#
|
||||||
|
# The purpose for $T is to allow someone to install calc
|
||||||
|
# somewhere other than into the system area. For example when
|
||||||
|
# forming the calc rpm, the Makefile is called with T=$RPM_BUILD_ROOT.
|
||||||
|
#
|
||||||
|
# If in doubt, use T=
|
||||||
|
#
|
||||||
|
T=
|
||||||
|
|
||||||
# where man pages are installed
|
# where man pages are installed
|
||||||
#
|
#
|
||||||
# Use MANDIR= to disable installation of the calc man (source) page.
|
# Use MANDIR= to disable installation of the calc man (source) page.
|
||||||
@@ -607,12 +643,12 @@ CATMODE= 0444
|
|||||||
# If the $CALCPATH environment variable is not defined, then the following
|
# If the $CALCPATH environment variable is not defined, then the following
|
||||||
# path will be search for calc resource file routines.
|
# path will be search for calc resource file routines.
|
||||||
#
|
#
|
||||||
CALCPATH= .:./cal:~/cal:${LIBDIR}:${CUSTOMLIBDIR}
|
CALCPATH= .:./cal:~/.cal:${CSHAREDIR}:${CUSTOMLIBDIR}
|
||||||
|
|
||||||
# If the $CALCRC environment variable is not defined, then the following
|
# If the $CALCRC environment variable is not defined, then the following
|
||||||
# path will be search for calc resource files.
|
# path will be search for calc resource files.
|
||||||
#
|
#
|
||||||
CALCRC= ${LIBDIR}/startup:~/.calcrc:./.calcinit
|
CALCRC= ${CSHAREDIR}/startup:~/.calcrc:./.calcinit
|
||||||
|
|
||||||
# Determine of the GNU-readline facility will be used instead of the
|
# Determine of the GNU-readline facility will be used instead of the
|
||||||
# built-in calc binding method.
|
# built-in calc binding method.
|
||||||
@@ -625,6 +661,7 @@ CALCRC= ${LIBDIR}/startup:~/.calcrc:./.calcinit
|
|||||||
# READLINE_LIB The flags needed to link in the readline
|
# READLINE_LIB The flags needed to link in the readline
|
||||||
# and history link libraries
|
# and history link libraries
|
||||||
# READLINE_INCLUDE Where the readline include files reside
|
# 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
|
# the appropriate headers and link libs installed on your system in
|
||||||
@@ -636,9 +673,9 @@ USE_READLINE=
|
|||||||
#USE_READLINE= -DUSE_READLINE
|
#USE_READLINE= -DUSE_READLINE
|
||||||
#
|
#
|
||||||
READLINE_LIB=
|
READLINE_LIB=
|
||||||
#READLINE_LIB= -L/usr/gnu/lib -lreadline -lhistory
|
#READLINE_LIB= -lreadline -lhistory -lncurses
|
||||||
#READLINE_LIB= -lreadline -lhistory
|
#READLINE_LIB= -L/usr/gnu/lib -lreadline -lhistory -lncurses
|
||||||
#READLINE_LIB= -L/usr/local/lib -lreadline -lhistory
|
#READLINE_LIB= -L/usr/local/lib -lreadline -lhistory -lncurses
|
||||||
#
|
#
|
||||||
READLINE_INCLUDE=
|
READLINE_INCLUDE=
|
||||||
#READLINE_INCLUDE= -I/usr/gnu/include
|
#READLINE_INCLUDE= -I/usr/gnu/include
|
||||||
@@ -664,8 +701,8 @@ CALCPAGER= more
|
|||||||
#DEBUG= -O1 -g3
|
#DEBUG= -O1 -g3
|
||||||
#
|
#
|
||||||
#DEBUG= -O2
|
#DEBUG= -O2
|
||||||
#DEBUG= -O2 -g
|
DEBUG= -O2 -g
|
||||||
DEBUG= -O2 -g3
|
#DEBUG= -O2 -g3
|
||||||
#DEBUG= -O2 -ipa
|
#DEBUG= -O2 -ipa
|
||||||
#DEBUG= -O2 -g3 -ipa
|
#DEBUG= -O2 -g3 -ipa
|
||||||
#
|
#
|
||||||
@@ -812,8 +849,8 @@ CCWARN= -Wall -Wno-implicit -Wno-comment
|
|||||||
CCOPT= ${DEBUG} ${NO_SHARED}
|
CCOPT= ${DEBUG} ${NO_SHARED}
|
||||||
CCMISC=
|
CCMISC=
|
||||||
#
|
#
|
||||||
CFLAGS= -DSRC ${CCWARN} ${CCOPT} ${CCMISC}
|
CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC}
|
||||||
ICFLAGS= -DSRC ${CCWARN} ${CCMISC}
|
ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC}
|
||||||
#
|
#
|
||||||
LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}
|
LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}
|
||||||
ILDFLAGS=
|
ILDFLAGS=
|
||||||
@@ -832,8 +869,8 @@ CC= ${PURIFY} ${LCC}
|
|||||||
#CCOPT= ${DEBUG} ${NO_SHARED}
|
#CCOPT= ${DEBUG} ${NO_SHARED}
|
||||||
#CCMISC=
|
#CCMISC=
|
||||||
#
|
#
|
||||||
#CFLAGS= -DSRC ${CCWARN} ${CCOPT} ${CCMISC}
|
#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC}
|
||||||
#ICFLAGS= -DSRC ${CCWARN} ${CCMISC}
|
#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC}
|
||||||
#
|
#
|
||||||
#LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}
|
#LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}
|
||||||
#ILDFLAGS=
|
#ILDFLAGS=
|
||||||
@@ -853,8 +890,8 @@ CC= ${PURIFY} ${LCC}
|
|||||||
#CCOPT= ${DEBUG} ${NO_SHARED}
|
#CCOPT= ${DEBUG} ${NO_SHARED}
|
||||||
#CCMISC=
|
#CCMISC=
|
||||||
#
|
#
|
||||||
#CFLAGS= -DSRC ${CCWARN} ${CCOPT} ${CCMISC}
|
#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC}
|
||||||
#ICFLAGS= -DSRC ${CCWARN} ${CCMISC}
|
#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC}
|
||||||
#
|
#
|
||||||
#LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}
|
#LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}
|
||||||
#ILDFLAGS=
|
#ILDFLAGS=
|
||||||
@@ -880,8 +917,8 @@ CC= ${PURIFY} ${LCC}
|
|||||||
#CCOPT= ${DEBUG} ${NO_SHARED}
|
#CCOPT= ${DEBUG} ${NO_SHARED}
|
||||||
#CCMISC= -rdata_shared
|
#CCMISC= -rdata_shared
|
||||||
#
|
#
|
||||||
#CFLAGS= -DSRC ${CCWARN} ${CCOPT} ${CCMISC}
|
#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC}
|
||||||
#ICFLAGS= -DSRC ${CCWARN} ${CCMISC}
|
#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC}
|
||||||
#
|
#
|
||||||
#LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}
|
#LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}
|
||||||
#ILDFLAGS=
|
#ILDFLAGS=
|
||||||
@@ -902,8 +939,8 @@ CC= ${PURIFY} ${LCC}
|
|||||||
#CCOPT= ${DEBUG} ${NO_SHARED}
|
#CCOPT= ${DEBUG} ${NO_SHARED}
|
||||||
#CCMISC= +e
|
#CCMISC= +e
|
||||||
#
|
#
|
||||||
#CFLAGS= -DSRC ${CCWARN} ${CCOPT} ${CCMISC}
|
#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC}
|
||||||
#ICFLAGS= -DSRC ${CCWARN} ${CCMISC}
|
#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC}
|
||||||
#
|
#
|
||||||
#LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}
|
#LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}
|
||||||
#ILDFLAGS=
|
#ILDFLAGS=
|
||||||
@@ -919,8 +956,8 @@ CC= ${PURIFY} ${LCC}
|
|||||||
#CCOPT= ${DEBUG} ${NO_SHARED}
|
#CCOPT= ${DEBUG} ${NO_SHARED}
|
||||||
#CCMISC= -qlanglvl=ansi
|
#CCMISC= -qlanglvl=ansi
|
||||||
#
|
#
|
||||||
#CFLAGS= -DSRC ${CCWARN} ${CCOPT} ${CCMISC}
|
#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC}
|
||||||
#ICFLAGS= -DSRC ${CCWARN} ${CCMISC}
|
#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC}
|
||||||
#
|
#
|
||||||
#LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}
|
#LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}
|
||||||
#ILDFLAGS=
|
#ILDFLAGS=
|
||||||
@@ -941,8 +978,8 @@ CC= ${PURIFY} ${LCC}
|
|||||||
#CCOPT= ${DEBUG} ${NO_SHARED}
|
#CCOPT= ${DEBUG} ${NO_SHARED}
|
||||||
#CCMISC= -DFORCE_STDC
|
#CCMISC= -DFORCE_STDC
|
||||||
#
|
#
|
||||||
#CFLAGS= -DSRC ${CCWARN} ${CCOPT} ${CCMISC}
|
#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC}
|
||||||
#ICFLAGS= -DSRC ${CCWARN} ${CCMISC}
|
#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC}
|
||||||
#
|
#
|
||||||
#LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}
|
#LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}
|
||||||
#ILDFLAGS=
|
#ILDFLAGS=
|
||||||
@@ -961,8 +998,8 @@ CC= ${PURIFY} ${LCC}
|
|||||||
#CCOPT= ${DEBUG} ${NO_SHARED}
|
#CCOPT= ${DEBUG} ${NO_SHARED}
|
||||||
#CCMISC=
|
#CCMISC=
|
||||||
#
|
#
|
||||||
#CFLAGS= -DSRC ${CCWARN} ${CCOPT} ${CCMISC}
|
#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC}
|
||||||
#ICFLAGS= -DSRC ${CCWARN} ${CCMISC} -Wno-unused
|
#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC} -Wno-unused
|
||||||
#
|
#
|
||||||
#LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}
|
#LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}
|
||||||
#ILDFLAGS=
|
#ILDFLAGS=
|
||||||
@@ -980,8 +1017,8 @@ CC= ${PURIFY} ${LCC}
|
|||||||
#CCOPT= ${DEBUG} ${NO_SHARED}
|
#CCOPT= ${DEBUG} ${NO_SHARED}
|
||||||
#CCMISC=
|
#CCMISC=
|
||||||
#
|
#
|
||||||
#CFLAGS= -DSRC ${CCWARN} ${CCOPT} ${CCMISC}
|
#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC}
|
||||||
#ICFLAGS= -DSRC ${CCWARN} ${CCMISC} -Wno-unused
|
#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC} -Wno-unused
|
||||||
#
|
#
|
||||||
#LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}
|
#LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}
|
||||||
#ILDFLAGS=
|
#ILDFLAGS=
|
||||||
@@ -996,9 +1033,12 @@ CC= ${PURIFY} ${LCC}
|
|||||||
# standard utilities used during make
|
# standard utilities used during make
|
||||||
#
|
#
|
||||||
SHELL= /bin/sh
|
SHELL= /bin/sh
|
||||||
|
LANG= C
|
||||||
MAKE= make
|
MAKE= make
|
||||||
AWK= awk
|
AWK= awk
|
||||||
SED= sed
|
SED= sed
|
||||||
|
DIFF= diff
|
||||||
|
GREP= egrep
|
||||||
SORT= sort
|
SORT= sort
|
||||||
TEE= tee
|
TEE= tee
|
||||||
CTAGS= ctags
|
CTAGS= ctags
|
||||||
@@ -1155,7 +1195,9 @@ CUSTOM_PASSDOWN= Q="${Q}" \
|
|||||||
CHMOD=${CHMOD} \
|
CHMOD=${CHMOD} \
|
||||||
CMP=${CMP} \
|
CMP=${CMP} \
|
||||||
MAKEDEPEND=${MAKEDEPEND} \
|
MAKEDEPEND=${MAKEDEPEND} \
|
||||||
SORT=${SORT}
|
SORT=${SORT} \
|
||||||
|
LANG=${LANG} \
|
||||||
|
T=$T
|
||||||
|
|
||||||
# The complete list of Makefile vars passed down to sample/Makefile.
|
# The complete list of Makefile vars passed down to sample/Makefile.
|
||||||
#
|
#
|
||||||
@@ -1186,14 +1228,19 @@ SAMPLE_PASSDOWN= Q="${Q}" \
|
|||||||
CHMOD=${CHMOD} \
|
CHMOD=${CHMOD} \
|
||||||
CMP=${CMP} \
|
CMP=${CMP} \
|
||||||
MAKEDEPEND=${MAKEDEPEND} \
|
MAKEDEPEND=${MAKEDEPEND} \
|
||||||
SORT=${SORT}
|
SORT=${SORT} \
|
||||||
|
LANG=${LANG} \
|
||||||
|
T=$T
|
||||||
|
|
||||||
# The compelte list of Makefile vars passed down to help/Makefile.
|
# The compelte list of Makefile vars passed down to help/Makefile.
|
||||||
#
|
#
|
||||||
HELP_PASSDOWN= Q="${Q}" \
|
HELP_PASSDOWN= Q="${Q}" \
|
||||||
SHAREDIR="${SHAREDIR}" \
|
SHAREDIR="${SHAREDIR}" \
|
||||||
|
INCDIR="${INCDIR}" \
|
||||||
|
LIBDIR="${LIBDIR}" \
|
||||||
CSHAREDIR="${CSHAREDIR}" \
|
CSHAREDIR="${CSHAREDIR}" \
|
||||||
HELPDIR="${HELPDIR}" \
|
HELPDIR="${HELPDIR}" \
|
||||||
|
INCDIRCALC="${INCDIRCALC}" \
|
||||||
ICFLAGS="${ICFLAGS}" \
|
ICFLAGS="${ICFLAGS}" \
|
||||||
ILDFLAGS="${ILDFLAGS}" \
|
ILDFLAGS="${ILDFLAGS}" \
|
||||||
LCC="${LCC}" \
|
LCC="${LCC}" \
|
||||||
@@ -1201,7 +1248,9 @@ HELP_PASSDOWN= Q="${Q}" \
|
|||||||
SED=${SED} \
|
SED=${SED} \
|
||||||
CHMOD=${CHMOD} \
|
CHMOD=${CHMOD} \
|
||||||
CMP=${CMP} \
|
CMP=${CMP} \
|
||||||
FMT=${FMT}
|
FMT=${FMT} \
|
||||||
|
LANG=${LANG} \
|
||||||
|
T=$T
|
||||||
|
|
||||||
# The compelte list of Makefile vars passed down to cal/Makefile.
|
# The compelte list of Makefile vars passed down to cal/Makefile.
|
||||||
#
|
#
|
||||||
@@ -1210,7 +1259,9 @@ CAL_PASSDOWN= Q="${Q}" \
|
|||||||
CSHAREDIR="${CSHAREDIR}" \
|
CSHAREDIR="${CSHAREDIR}" \
|
||||||
MAKE_FILE=${MAKE_FILE} \
|
MAKE_FILE=${MAKE_FILE} \
|
||||||
CHMOD=${CHMOD} \
|
CHMOD=${CHMOD} \
|
||||||
CMP=${CMP}
|
CMP=${CMP} \
|
||||||
|
LANG=${LANG} \
|
||||||
|
T=$T
|
||||||
|
|
||||||
# The compelte list of Makefile vars passed down to cscript/Makefile.
|
# The compelte list of Makefile vars passed down to cscript/Makefile.
|
||||||
#
|
#
|
||||||
@@ -1222,7 +1273,9 @@ CSCRIPT_PASSDOWN= Q="${Q}" \
|
|||||||
SED=${SED} \
|
SED=${SED} \
|
||||||
FMT=${FMT} \
|
FMT=${FMT} \
|
||||||
SORT=${SORT} \
|
SORT=${SORT} \
|
||||||
CMP=${CMP}
|
CMP=${CMP} \
|
||||||
|
LANG=${LANG} \
|
||||||
|
T=$T
|
||||||
|
|
||||||
# complete list of .h files found (but not built) in the distribution
|
# complete list of .h files found (but not built) in the distribution
|
||||||
#
|
#
|
||||||
@@ -1269,6 +1322,11 @@ SAMPLE_TARGETS= sample/test_random sample/many_random
|
|||||||
CSCRIPT_TARGETS= cscript/mersenne cscript/piforever cscript/plus \
|
CSCRIPT_TARGETS= cscript/mersenne cscript/piforever cscript/plus \
|
||||||
cscript/square cscript/fproduct cscript/powerterm
|
cscript/square cscript/fproduct cscript/powerterm
|
||||||
|
|
||||||
|
# List of miscellaneous files NOT shipped with calc
|
||||||
|
#
|
||||||
|
NO_SHIP= Makefile.linux calc.spec inst_files spec-template \
|
||||||
|
rpm.mk.patch rpm.release
|
||||||
|
|
||||||
# complete list of progs built
|
# complete list of progs built
|
||||||
#
|
#
|
||||||
PROGS= calc ${UTIL_PROGS}
|
PROGS= calc ${UTIL_PROGS}
|
||||||
@@ -2862,7 +2920,6 @@ distlist: ${DISTLIST}
|
|||||||
for i in ${BUILD_H_SRC} ${BUILD_C_SRC}; do \
|
for i in ${BUILD_H_SRC} ${BUILD_C_SRC}; do \
|
||||||
echo win32/$$i; \
|
echo win32/$$i; \
|
||||||
done; \
|
done; \
|
||||||
echo spec-template; \
|
|
||||||
(cd help; ${MAKE} ${HELP_PASSDOWN} $@); \
|
(cd help; ${MAKE} ${HELP_PASSDOWN} $@); \
|
||||||
(cd cal; ${MAKE} ${CAL_PASSDOWN} $@); \
|
(cd cal; ${MAKE} ${CAL_PASSDOWN} $@); \
|
||||||
(cd custom; ${MAKE} ${CUSTOM_PASSDOWN} $@); \
|
(cd custom; ${MAKE} ${CUSTOM_PASSDOWN} $@); \
|
||||||
@@ -2992,6 +3049,9 @@ env:
|
|||||||
@echo 'MAKE=${MAKE}'; echo ''
|
@echo 'MAKE=${MAKE}'; echo ''
|
||||||
@echo 'AWK=${AWK}'; echo ''
|
@echo 'AWK=${AWK}'; echo ''
|
||||||
@echo 'SED=${SED}'; echo ''
|
@echo 'SED=${SED}'; echo ''
|
||||||
|
@echo 'GREP=${GREP}'; echo ''
|
||||||
|
@echo 'LANG=${LANG}'; echo ''
|
||||||
|
@echo 'T=$T'; echo ''
|
||||||
@echo 'SORT=${SORT}'; echo ''
|
@echo 'SORT=${SORT}'; echo ''
|
||||||
@echo 'TEE=${TEE}'; echo ''
|
@echo 'TEE=${TEE}'; echo ''
|
||||||
@echo 'CTAGS=${CTAGS}'; echo ''
|
@echo 'CTAGS=${CTAGS}'; echo ''
|
||||||
@@ -3024,11 +3084,12 @@ env:
|
|||||||
@echo 'TARGETS=${TARGETS}'; echo ''
|
@echo 'TARGETS=${TARGETS}'; echo ''
|
||||||
@echo '=-=-=-=-= end of major make variable dump =-=-=-=-='
|
@echo '=-=-=-=-= end of major make variable dump =-=-=-=-='
|
||||||
|
|
||||||
mkdebug: env version.c
|
mkdebug: env version.c rpm.release
|
||||||
@echo '=-=-=-=-= start of $@ rule =-=-=-=-='
|
@echo '=-=-=-=-= start of $@ rule =-=-=-=-='
|
||||||
@echo '=-=-=-=-= Determining the source version =-=-=-=-='
|
@echo '=-=-=-=-= Determining the source version =-=-=-=-='
|
||||||
@${MAKE} -f Makefile Q= V=@ ver_calc
|
@${MAKE} -f Makefile Q= V=@ ver_calc
|
||||||
-@./ver_calc
|
-@./ver_calc
|
||||||
|
-@./ver_calc -r rpm.release
|
||||||
@echo '=-=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ all =-=-=-=-='
|
@echo '=-=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ all =-=-=-=-='
|
||||||
@${MAKE} -f Makefile Q= V=@ all
|
@${MAKE} -f Makefile Q= V=@ all
|
||||||
@echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
|
@echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
|
||||||
@@ -3037,7 +3098,7 @@ mkdebug: env version.c
|
|||||||
@echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
|
@echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
|
||||||
@echo '=-=-=-=-= end of $@ rule =-=-=-=-='
|
@echo '=-=-=-=-= end of $@ rule =-=-=-=-='
|
||||||
|
|
||||||
debug: env
|
debug: env rpm.release
|
||||||
@echo '=-=-=-=-= start of $@ rule =-=-=-=-='
|
@echo '=-=-=-=-= 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
|
@${MAKE} -f Makefile Q= V=@ clobber
|
||||||
@@ -3045,6 +3106,7 @@ debug: env
|
|||||||
@echo '=-=-=-=-= Determining the source version =-=-=-=-='
|
@echo '=-=-=-=-= Determining the source version =-=-=-=-='
|
||||||
@${MAKE} -f Makefile Q= V=@ ver_calc
|
@${MAKE} -f Makefile Q= V=@ ver_calc
|
||||||
-@./ver_calc
|
-@./ver_calc
|
||||||
|
-@./ver_calc -r rpm.release
|
||||||
@echo '=-=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ all =-=-=-=-='
|
@echo '=-=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ all =-=-=-=-='
|
||||||
@${MAKE} -f Makefile Q= V=@ all
|
@${MAKE} -f Makefile Q= V=@ all
|
||||||
@echo '=-=-=-=-= Determining the binary version =-=-=-=-='
|
@echo '=-=-=-=-= Determining the binary version =-=-=-=-='
|
||||||
@@ -3095,14 +3157,14 @@ gdb:
|
|||||||
# This file is linked to calc-version-rel.spec before the rpm is built.
|
# This file is linked to calc-version-rel.spec before the rpm is built.
|
||||||
#
|
#
|
||||||
calc.spec: spec-template ${MAKE_FILE} help/Makefile cal/Makefile \
|
calc.spec: spec-template ${MAKE_FILE} help/Makefile cal/Makefile \
|
||||||
custom/Makefile cscript/Makefile ver_calc
|
custom/Makefile cscript/Makefile ver_calc rpm.release
|
||||||
${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-='
|
${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-='
|
||||||
${Q}rm -f calc.spec calc.spec.sed
|
${Q}rm -f calc.spec calc.spec.sed
|
||||||
${Q}echo 's,$${BINDIR},${BINDIR},g' >> calc.spec.sed
|
${Q}echo 's,$${BINDIR},${BINDIR},g' >> calc.spec.sed
|
||||||
${Q}echo 's:$${SHAREDIR}:${SHAREDIR}:g' > calc.spec.sed
|
${Q}echo 's:$${SHAREDIR}:${SHAREDIR}:g' >> calc.spec.sed
|
||||||
${Q}echo 's,$${INCDIR},${INCDIR},g' >> calc.spec.sed
|
${Q}echo 's,$${INCDIR},${INCDIR},g' >> calc.spec.sed
|
||||||
${Q}echo 's:$${LIBDIR}:${LIBDIR}:g' >> calc.spec.sed
|
${Q}echo 's:$${LIBDIR}:${LIBDIR}:g' >> calc.spec.sed
|
||||||
${Q}echo 's:$${CSHAREDIR}:${CSHAREDIR}:g' > calc.spec.sed
|
${Q}echo 's:$${CSHAREDIR}:${CSHAREDIR}:g' >> calc.spec.sed
|
||||||
${Q}echo 's,$${HELPDIR},${HELPDIR},g' >> calc.spec.sed
|
${Q}echo 's,$${HELPDIR},${HELPDIR},g' >> calc.spec.sed
|
||||||
${Q}echo 's,$${INCDIRCALC},${INCDIRCALC},g' >> calc.spec.sed
|
${Q}echo 's,$${INCDIRCALC},${INCDIRCALC},g' >> calc.spec.sed
|
||||||
${Q}echo 's,$${CUSTOMLIBDIR},${CUSTOMLIBDIR},g' >> calc.spec.sed
|
${Q}echo 's,$${CUSTOMLIBDIR},${CUSTOMLIBDIR},g' >> calc.spec.sed
|
||||||
@@ -3122,85 +3184,61 @@ calc.spec: spec-template ${MAKE_FILE} help/Makefile cal/Makefile \
|
|||||||
${Q}echo 's,$${MANMODE},${MANMODE},g' >> calc.spec.sed
|
${Q}echo 's,$${MANMODE},${MANMODE},g' >> calc.spec.sed
|
||||||
${Q}echo 's,$${MANEXT},${MANEXT},g' >> calc.spec.sed
|
${Q}echo 's,$${MANEXT},${MANEXT},g' >> calc.spec.sed
|
||||||
${Q}echo 's,$${CHMOD},${CHMOD},g' >> calc.spec.sed
|
${Q}echo 's,$${CHMOD},${CHMOD},g' >> calc.spec.sed
|
||||||
${Q}cd help; \
|
${Q}echo 's,$${DATE},'`LANG=C date +"%a %b %d %Y"`',g' >> calc.spec.sed
|
||||||
${MAKE} -f Makefile ${HELP_PASSDOWN} echo_STD_HELP_FILES | \
|
${Q}echo 's,$${VERSION},'`./ver_calc`',g' >> calc.spec.sed
|
||||||
grep -v '^make\[[0-9][0-9]*\]: .*ing directory ' | \
|
${Q}echo 's,$${REL},'`./ver_calc -R rpm.release`',g' >> calc.spec.sed
|
||||||
${SED} -e 's/^/s,$${STD_HELP_FILES},/' \
|
|
||||||
-e 's/$$/,g/' >> ../calc.spec.sed
|
|
||||||
${Q}cd help; \
|
|
||||||
${MAKE} -f Makefile ${HELP_PASSDOWN} echo_BLT_HELP_FILES | \
|
|
||||||
grep -v '^make\[[0-9][0-9]*\]: .*ing directory ' | \
|
|
||||||
${SED} -e 's/^/s,$${BLT_HELP_FILES},/' \
|
|
||||||
-e 's/$$/,g/' >> ../calc.spec.sed
|
|
||||||
${Q}cd help; \
|
|
||||||
${MAKE} -f Makefile ${HELP_PASSDOWN} echo_DETAIL_HELP | \
|
|
||||||
grep -v '^make\[[0-9][0-9]*\]: .*ing directory ' | \
|
|
||||||
${SED} -e 's/^/s,$${DETAIL_HELP},/' \
|
|
||||||
-e 's/$$/,g/' >> ../calc.spec.sed
|
|
||||||
${Q}cd help; \
|
|
||||||
${MAKE} -f Makefile ${HELP_PASSDOWN} echo_SINGULAR_FILES | \
|
|
||||||
grep -v '^make\[[0-9][0-9]*\]: .*ing directory ' | \
|
|
||||||
${SED} -e 's/^/s,$${SINGULAR_FILES},/' \
|
|
||||||
-e 's/$$/,g/' >> ../calc.spec.sed
|
|
||||||
${Q}cd cal; \
|
|
||||||
${MAKE} -f Makefile ${CAL_PASSDOWN} echo_CALC_FILES | \
|
|
||||||
grep -v '^make\[[0-9][0-9]*\]: .*ing directory ' | \
|
|
||||||
${SED} -e 's/^/s,$${CALC_FILES},/' \
|
|
||||||
-e 's/$$/,g/' >> ../calc.spec.sed
|
|
||||||
${Q}cd custom; \
|
|
||||||
${MAKE} -f Makefile ${CUSTOM_PASSDOWN} echo_INSTALL_H_SRC | \
|
|
||||||
grep -v '^make\[[0-9][0-9]*\]: .*ing directory ' | \
|
|
||||||
${SED} -e 's/^/s,$${INSTALL_H_SRC},/' \
|
|
||||||
-e 's/$$/,g/' >> ../calc.spec.sed
|
|
||||||
${Q}cd custom; \
|
|
||||||
${MAKE} -f Makefile ${CUSTOM_PASSDOWN} echo_CUSTOM_CALC_FILES | \
|
|
||||||
grep -v '^make\[[0-9][0-9]*\]: .*ing directory ' | \
|
|
||||||
${SED} -e 's/^/s,$${CUSTOM_CALC_FILES},/' \
|
|
||||||
-e 's/$$/,g/' >> ../calc.spec.sed
|
|
||||||
${Q}cd custom; \
|
|
||||||
${MAKE} -f Makefile ${CUSTOM_PASSDOWN} echo_CUSTOM_HELP | \
|
|
||||||
grep -v '^make\[[0-9][0-9]*\]: .*ing directory ' | \
|
|
||||||
${SED} -e 's/^/s,$${CUSTOM_HELP},/' \
|
|
||||||
-e 's/$$/,g/' >> ../calc.spec.sed
|
|
||||||
${Q}cd cscript; \
|
|
||||||
${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} echo_SCRIPT | \
|
|
||||||
grep -v '^make\[[0-9][0-9]*\]: .*ing directory ' | \
|
|
||||||
${SED} -e 's/^/s,$${SCRIPT},/' -e 's/$$/,g/' >> ../calc.spec.sed
|
|
||||||
${Q}echo 's,$${DATE},'`date +"%a %b %d %Y"`',g' >> calc.spec.sed
|
|
||||||
${Q}echo 's,$${VER_CALC},'`./ver_calc`',g' >> calc.spec.sed
|
|
||||||
${Q}echo 's,$${VERSION},'`./ver_calc -v`',g' >> calc.spec.sed
|
|
||||||
${Q}echo 's,$${RELEASE},'`./ver_calc -r`',g' >> calc.spec.sed
|
|
||||||
${Q}${SED} -f calc.spec.sed < spec-template > calc.spec
|
${Q}${SED} -f calc.spec.sed < spec-template > calc.spec
|
||||||
${Q}rm -f calc.spec.sed
|
${Q}rm -f calc.spec.sed
|
||||||
${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-='
|
${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-='
|
||||||
|
|
||||||
# Form the installed file list
|
# Form the installed file list
|
||||||
#
|
#
|
||||||
install.list: ${MAKE_FILE} help/Makefile cal/Makefile custom/Makefile \
|
inst_files: ${MAKE_FILE} help/Makefile cal/Makefile custom/Makefile \
|
||||||
cscript/Makefile ver_calc
|
cscript/Makefile ver_calc
|
||||||
${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-='
|
${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-='
|
||||||
${Q}rm -f install.list
|
${Q}rm -f inst_files
|
||||||
${Q}echo ${BINDIR}/calc > install.list
|
${Q}echo ${BINDIR}/calc > inst_files
|
||||||
${Q}cd help; \
|
${Q}cd help; LANG=C \
|
||||||
${MAKE} -f Makefile ${HELP_PASSDOWN} echo_install.list | \
|
${MAKE} -f Makefile ${HELP_PASSDOWN} echo_inst_files | \
|
||||||
grep -v '^make\[[0-9][0-9]*\]: .*ing directory ' >> ../install.list
|
${GREP} '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files
|
||||||
${Q}cd cal; \
|
${Q}cd cal; LANG=C \
|
||||||
${MAKE} -f Makefile ${CAL_PASSDOWN} echo_install.list | \
|
${MAKE} -f Makefile ${CAL_PASSDOWN} echo_inst_files | \
|
||||||
grep -v '^make\[[0-9][0-9]*\]: .*ing directory ' >> ../install.list
|
${GREP} '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files
|
||||||
${Q}cd custom; \
|
${Q}cd custom; LANG=C \
|
||||||
${MAKE} -f Makefile ${CUSTOM_PASSDOWN} echo_install.list | \
|
${MAKE} -f Makefile ${CUSTOM_PASSDOWN} echo_inst_files | \
|
||||||
grep -v '^make\[[0-9][0-9]*\]: .*ing directory ' >> ../install.list
|
${GREP} '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files
|
||||||
${Q}cd cscript; \
|
${Q}cd cscript; LANG=C \
|
||||||
${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} echo_install.list | \
|
${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} echo_inst_files | \
|
||||||
grep -v '^make\[[0-9][0-9]*\]: .*ing directory ' >> ../install.list
|
${GREP} '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files
|
||||||
${Q}echo ${LIBDIR}/libcalc.a >> install.list
|
${Q}echo ${LIBDIR}/libcalc.a >> inst_files
|
||||||
${Q}for i in ${LIB_H_SRC} ${BUILD_H_SRC}; do \
|
${Q}for i in ${LIB_H_SRC} ${BUILD_H_SRC}; do \
|
||||||
echo ${INCDIRCALC}/$$i; \
|
echo ${INCDIRCALC}/$$i; \
|
||||||
done >> install.list
|
done >> inst_files
|
||||||
${Q}if [ ! -z "${MANDIR}" ]; then \
|
${Q}if [ ! -z "${MANDIR}" ]; then \
|
||||||
echo ${MANDIR}/calc.${MANEXT}; \
|
echo ${MANDIR}/calc.${MANEXT}; \
|
||||||
fi >> install.list
|
fi >> inst_files
|
||||||
${Q}LANG=C ${SORT} -u install.list -o install.list
|
${Q}LANG=C ${SORT} -u inst_files -o inst_files
|
||||||
|
${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-='
|
||||||
|
|
||||||
|
# We make a small patch to effectively move Makefile.linux into Makefile.
|
||||||
|
#
|
||||||
|
rpm.mk.patch: Makefile.linux ${MAKE_FILE}
|
||||||
|
${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-='
|
||||||
|
${Q}rm -f $@
|
||||||
|
${Q}rm -rf tmp.patch
|
||||||
|
${Q}mkdir -p tmp.patch
|
||||||
|
${Q}if [ -e Makefile.ship ]; then \
|
||||||
|
cp Makefile.ship tmp.patch/Makefile; \
|
||||||
|
else \
|
||||||
|
cp Makefile tmp.patch/Makefile; \
|
||||||
|
fi
|
||||||
|
${Q}cp Makefile.linux tmp.patch
|
||||||
|
${Q}-cd tmp.patch; \
|
||||||
|
${DIFF} -c Makefile Makefile.linux > $@; \
|
||||||
|
true
|
||||||
|
${Q}cp tmp.patch/$@ $@
|
||||||
|
${Q}${CHMOD} 0444 $@
|
||||||
|
${Q}rm -rf tmp.patch
|
||||||
${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-='
|
${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-='
|
||||||
|
|
||||||
##
|
##
|
||||||
@@ -3216,7 +3254,7 @@ install.list: ${MAKE_FILE} help/Makefile cal/Makefile custom/Makefile \
|
|||||||
# the /usr/local directory.
|
# the /usr/local directory.
|
||||||
#
|
#
|
||||||
olduninstall:
|
olduninstall:
|
||||||
-rm -f install.list
|
-rm -f inst_files
|
||||||
${MAKE} -f Makefile \
|
${MAKE} -f Makefile \
|
||||||
BINDIR=/usr/local/bin \
|
BINDIR=/usr/local/bin \
|
||||||
SHAREDIR=/usr/local/lib \
|
SHAREDIR=/usr/local/lib \
|
||||||
@@ -3230,19 +3268,19 @@ olduninstall:
|
|||||||
CUSTOMINCDIR=/usr/local/lib/calc/custom \
|
CUSTOMINCDIR=/usr/local/lib/calc/custom \
|
||||||
SCRIPTDIR=/usr/local/bin/cscript \
|
SCRIPTDIR=/usr/local/bin/cscript \
|
||||||
MANDIR=/usr/local/man/man1 \
|
MANDIR=/usr/local/man/man1 \
|
||||||
install.list
|
inst_files
|
||||||
-${XARGS} rm -f < install.list
|
-${XARGS} rm -f < inst_files
|
||||||
-rmdir /usr/local/lib/calc/help/custhelp
|
-rmdir /usr/local/lib/calc/help/custhelp
|
||||||
-rmdir /usr/local/lib/calc/help
|
-rmdir /usr/local/lib/calc/help
|
||||||
-rmdir /usr/local/lib/calc/custom
|
-rmdir /usr/local/lib/calc/custom
|
||||||
-rmdir /usr/local/lib/calc
|
-rmdir /usr/local/lib/calc
|
||||||
-rmdir /usr/local/include/calc
|
-rmdir /usr/local/include/calc
|
||||||
-rmdir /usr/local/bin/cscript
|
-rmdir /usr/local/bin/cscript
|
||||||
-rm -f install.list
|
-rm -f inst_files
|
||||||
|
|
||||||
tags: ${CALCSRC} ${LIBSRC} ${H_SRC} ${BUILD_H_SRC} ${MAKE_FILE}
|
tags: ${CALCSRC} ${LIBSRC} ${H_SRC} ${BUILD_H_SRC} ${MAKE_FILE}
|
||||||
-${CTAGS} ${CALCSRC} ${LIBSRC} ${H_SRC} ${BUILD_H_SRC} 2>&1 | \
|
-${CTAGS} ${CALCSRC} ${LIBSRC} ${H_SRC} ${BUILD_H_SRC} 2>&1 | \
|
||||||
egrep -v 'Duplicate entry|Second entry ignored'
|
${GREP} -v 'Duplicate entry|Second entry ignored'
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-='
|
${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-='
|
||||||
@@ -3289,8 +3327,8 @@ clobber:
|
|||||||
-rm -f calc.1 *.pure_linkinfo
|
-rm -f calc.1 *.pure_linkinfo
|
||||||
-rm -f have_args *.u
|
-rm -f have_args *.u
|
||||||
-rm -f calc.pixie calc.rf calc.Counts calc.cord
|
-rm -f calc.pixie calc.rf calc.Counts calc.cord
|
||||||
-rm -rf gen_h skel Makefile.bak
|
-rm -rf gen_h skel Makefile.bak tmp.patch
|
||||||
-rm -f calc.spec install.list tmp
|
-rm -f calc.spec inst_files rpm.mk.patch tmp
|
||||||
${V} echo '=-=-=-=-= Invoking $@ rule for help =-=-=-=-='
|
${V} echo '=-=-=-=-= Invoking $@ rule for help =-=-=-=-='
|
||||||
-cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} clobber
|
-cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} clobber
|
||||||
${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
|
${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
|
||||||
@@ -3315,100 +3353,161 @@ clobber:
|
|||||||
|
|
||||||
install: calc libcalc.a ${LIB_H_SRC} ${BUILD_H_SRC} calc.1
|
install: calc libcalc.a ${LIB_H_SRC} ${BUILD_H_SRC} calc.1
|
||||||
${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-='
|
${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-='
|
||||||
-${Q}if [ ! -d ${BINDIR} ]; then \
|
-${Q}if [ ! -z "$T" ]; then \
|
||||||
echo mkdir ${BINDIR}; \
|
if [ ! -d $T ]; then \
|
||||||
mkdir ${BINDIR}; \
|
echo mkdir $T; \
|
||||||
echo ${CHMOD} 0755 ${BINDIR}; \
|
mkdir $T; \
|
||||||
${CHMOD} 0755 ${BINDIR}; \
|
if [ ! -d "$T" ]; then \
|
||||||
else \
|
echo mkdir -p "$T"; \
|
||||||
true; \
|
mkdir -p "$T"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T; \
|
||||||
|
${CHMOD} 0755 $T; \
|
||||||
|
fi; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${SHAREDIR} ]; then \
|
-${Q}if [ ! -d $T${BINDIR} ]; then \
|
||||||
echo mkdir ${SHAREDIR}; \
|
echo mkdir $T${BINDIR}; \
|
||||||
mkdir ${SHAREDIR}; \
|
mkdir $T${BINDIR}; \
|
||||||
echo ${CHMOD} 0755 ${SHAREDIR}; \
|
if [ ! -d "$T${BINDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${SHAREDIR}; \
|
echo mkdir -p "$T${BINDIR}"; \
|
||||||
|
mkdir -p "$T${BINDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${BINDIR}; \
|
||||||
|
${CHMOD} 0755 $T${BINDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${INCDIR} ]; then \
|
-${Q}if [ ! -d $T${SHAREDIR} ]; then \
|
||||||
echo mkdir ${INCDIR}; \
|
echo mkdir $T${SHAREDIR}; \
|
||||||
mkdir ${INCDIR}; \
|
mkdir $T${SHAREDIR}; \
|
||||||
echo ${CHMOD} 0755 ${INCDIR}; \
|
if [ ! -d "$T${SHAREDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${INCDIR}; \
|
echo mkdir -p "$T${SHAREDIR}"; \
|
||||||
|
mkdir -p "$T${SHAREDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${SHAREDIR}; \
|
||||||
|
${CHMOD} 0755 $T${SHAREDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${LIBDIR} ]; then \
|
-${Q}if [ ! -d $T${INCDIR} ]; then \
|
||||||
echo mkdir ${LIBDIR}; \
|
echo mkdir $T${INCDIR}; \
|
||||||
mkdir ${LIBDIR}; \
|
mkdir $T${INCDIR}; \
|
||||||
echo ${CHMOD} 0755 ${LIBDIR}; \
|
if [ ! -d "$T${INCDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${LIBDIR}; \
|
echo mkdir -p "$T${INCDIR}"; \
|
||||||
|
mkdir -p "$T${INCDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${INCDIR}; \
|
||||||
|
${CHMOD} 0755 $T${INCDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${CSHAREDIR} ]; then \
|
-${Q}if [ ! -d $T${LIBDIR} ]; then \
|
||||||
echo mkdir ${CSHAREDIR}; \
|
echo mkdir $T${LIBDIR}; \
|
||||||
mkdir ${CSHAREDIR}; \
|
mkdir $T${LIBDIR}; \
|
||||||
echo ${CHMOD} 0755 ${CSHAREDIR}; \
|
if [ ! -d "$T${LIBDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${CSHAREDIR}; \
|
echo mkdir -p "$T${LIBDIR}"; \
|
||||||
|
mkdir -p "$T${LIBDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${LIBDIR}; \
|
||||||
|
${CHMOD} 0755 $T${LIBDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${HELPDIR} ]; then \
|
-${Q}if [ ! -d $T${CSHAREDIR} ]; then \
|
||||||
echo mkdir ${HELPDIR}; \
|
mkdir $T${CSHAREDIR}; \
|
||||||
mkdir ${HELPDIR}; \
|
echo mkdir $T${CSHAREDIR}; \
|
||||||
echo ${CHMOD} 0755 ${HELPDIR}; \
|
if [ ! -d "$T${CSHAREDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${HELPDIR}; \
|
echo mkdir -p "$T${CSHAREDIR}"; \
|
||||||
|
mkdir -p "$T${CSHAREDIR}"; \
|
||||||
|
fi; \
|
||||||
|
mkdir $T${CSHAREDIR}; \
|
||||||
|
echo ${CHMOD} 0755 $T${CSHAREDIR}; \
|
||||||
|
${CHMOD} 0755 $T${CSHAREDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${INCDIRCALC} ]; then \
|
-${Q}if [ ! -d $T${HELPDIR} ]; then \
|
||||||
echo mkdir ${INCDIRCALC}; \
|
echo mkdir $T${HELPDIR}; \
|
||||||
mkdir ${INCDIRCALC}; \
|
mkdir $T${HELPDIR}; \
|
||||||
echo ${CHMOD} 0755 ${INCDIRCALC}; \
|
if [ ! -d "$T${HELPDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${INCDIRCALC}; \
|
echo mkdir -p "$T${HELPDIR}"; \
|
||||||
|
mkdir -p "$T${HELPDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${HELPDIR}; \
|
||||||
|
${CHMOD} 0755 $T${HELPDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${CUSTOMLIBDIR} ]; then \
|
-${Q}if [ ! -d $T${INCDIRCALC} ]; then \
|
||||||
echo mkdir ${CUSTOMLIBDIR}; \
|
echo mkdir $T${INCDIRCALC}; \
|
||||||
mkdir ${CUSTOMLIBDIR}; \
|
mkdir $T${INCDIRCALC}; \
|
||||||
echo ${CHMOD} 0755 ${CUSTOMLIBDIR}; \
|
if [ ! -d "$T${INCDIRCALC}" ]; then \
|
||||||
${CHMOD} 0755 ${CUSTOMLIBDIR}; \
|
echo mkdir -p "$T${INCDIRCALC}"; \
|
||||||
|
mkdir -p "$T${INCDIRCALC}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${INCDIRCALC}; \
|
||||||
|
${CHMOD} 0755 $T${INCDIRCALC}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${CUSTOMHELPDIR} ]; then \
|
-${Q}if [ ! -d $T${CUSTOMLIBDIR} ]; then \
|
||||||
echo mkdir ${CUSTOMHELPDIR}; \
|
echo mkdir $T${CUSTOMLIBDIR}; \
|
||||||
mkdir ${CUSTOMHELPDIR}; \
|
mkdir $T${CUSTOMLIBDIR}; \
|
||||||
echo ${CHMOD} 0755 ${CUSTOMHELPDIR}; \
|
if [ ! -d "$T${CUSTOMLIBDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${CUSTOMHELPDIR}; \
|
echo mkdir -p "$T${CUSTOMLIBDIR}"; \
|
||||||
|
mkdir -p "$T${CUSTOMLIBDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${CUSTOMLIBDIR}; \
|
||||||
|
${CHMOD} 0755 $T${CUSTOMLIBDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${CUSTOMINCDIR} ]; then \
|
-${Q}if [ ! -d $T${CUSTOMHELPDIR} ]; then \
|
||||||
echo mkdir ${CUSTOMINCDIR}; \
|
echo mkdir $T${CUSTOMHELPDIR}; \
|
||||||
mkdir ${CUSTOMINCDIR}; \
|
mkdir $T${CUSTOMHELPDIR}; \
|
||||||
echo ${CHMOD} 0755 ${CUSTOMINCDIR}; \
|
if [ ! -d "$T${CUSTOMHELPDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${CUSTOMINCDIR}; \
|
echo mkdir -p "$T${CUSTOMHELPDIR}"; \
|
||||||
|
mkdir -p "$T${CUSTOMHELPDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${CUSTOMHELPDIR}; \
|
||||||
|
${CHMOD} 0755 $T${CUSTOMHELPDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${SCRIPTDIR} ]; then \
|
-${Q}if [ ! -d $T${CUSTOMINCDIR} ]; then \
|
||||||
echo mkdir ${SCRIPTDIR}; \
|
echo mkdir $T${CUSTOMINCDIR}; \
|
||||||
mkdir ${SCRIPTDIR}; \
|
mkdir $T${CUSTOMINCDIR}; \
|
||||||
echo ${CHMOD} 0755 ${SCRIPTDIR}; \
|
if [ ! -d "$T${CUSTOMINCDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${SCRIPTDIR}; \
|
echo mkdir -p "$T${CUSTOMINCDIR}"; \
|
||||||
|
mkdir -p "$T${CUSTOMINCDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${CUSTOMINCDIR}; \
|
||||||
|
${CHMOD} 0755 $T${CUSTOMINCDIR}; \
|
||||||
|
else \
|
||||||
|
true; \
|
||||||
|
fi
|
||||||
|
-${Q}if [ ! -d $T${SCRIPTDIR} ]; then \
|
||||||
|
echo mkdir $T${SCRIPTDIR}; \
|
||||||
|
mkdir $T${SCRIPTDIR}; \
|
||||||
|
if [ ! -d "$T${SCRIPTDIR}" ]; then \
|
||||||
|
echo mkdir -p "$T${SCRIPTDIR}"; \
|
||||||
|
mkdir -p "$T${SCRIPTDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${SCRIPTDIR}; \
|
||||||
|
${CHMOD} 0755 $T${SCRIPTDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -z "${MANDIR}" ]; then \
|
-${Q}if [ ! -z "${MANDIR}" ]; then \
|
||||||
if [ ! -d ${MANDIR} ]; then \
|
if [ ! -d $T${MANDIR} ]; then \
|
||||||
echo mkdir ${MANDIR}; \
|
echo mkdir $T${MANDIR}; \
|
||||||
mkdir ${MANDIR}; \
|
mkdir $T${MANDIR}; \
|
||||||
echo ${CHMOD} 0755 ${MANDIR}; \
|
if [ ! -d "$T${MANDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${MANDIR}; \
|
echo mkdir -p "$T${MANDIR}"; \
|
||||||
|
mkdir -p "$T${MANDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${MANDIR}; \
|
||||||
|
${CHMOD} 0755 $T${MANDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi; \
|
fi; \
|
||||||
@@ -3416,25 +3515,29 @@ install: calc libcalc.a ${LIB_H_SRC} ${BUILD_H_SRC} calc.1
|
|||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -z "${CATDIR}" ]; then \
|
-${Q}if [ ! -z "${CATDIR}" ]; then \
|
||||||
if [ ! -d ${CATDIR} ]; then \
|
if [ ! -d $T${CATDIR} ]; then \
|
||||||
echo mkdir ${CATDIR}; \
|
echo mkdir $T${CATDIR}; \
|
||||||
mkdir ${CATDIR}; \
|
mkdir $T${CATDIR}; \
|
||||||
echo ${CHMOD} 0755 ${CATDIR}; \
|
if [ ! -d "$T${CATDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${CATDIR}; \
|
echo mkdir -p "$T${CATDIR}"; \
|
||||||
|
mkdir -p "$T${CATDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${CATDIR}; \
|
||||||
|
${CHMOD} 0755 $T${CATDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi; \
|
fi; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if ${CMP} -s calc ${BINDIR}/calc; then \
|
-${Q}if ${CMP} -s calc $T${BINDIR}/calc; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
rm -f ${BINDIR}/calc.new; \
|
rm -f $T${BINDIR}/calc.new; \
|
||||||
cp -f calc ${BINDIR}/calc.new; \
|
cp -f calc $T${BINDIR}/calc.new; \
|
||||||
${CHMOD} 0555 ${BINDIR}/calc.new; \
|
${CHMOD} 0555 $T${BINDIR}/calc.new; \
|
||||||
mv -f ${BINDIR}/calc.new ${BINDIR}/calc; \
|
mv -f $T${BINDIR}/calc.new $T${BINDIR}/calc; \
|
||||||
echo "installed ${BINDIR}/calc"; \
|
echo "installed $T${BINDIR}/calc"; \
|
||||||
fi
|
fi
|
||||||
${V} echo '=-=-=-=-= Invoking $@ rule for help =-=-=-=-='
|
${V} echo '=-=-=-=-= Invoking $@ rule for help =-=-=-=-='
|
||||||
${Q}cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} install
|
${Q}cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} install
|
||||||
@@ -3451,61 +3554,61 @@ install: calc libcalc.a ${LIB_H_SRC} ${BUILD_H_SRC} calc.1
|
|||||||
${V} echo '=-=-=-=-= Invoking $@ rule for cscript =-=-=-=-='
|
${V} echo '=-=-=-=-= Invoking $@ rule for cscript =-=-=-=-='
|
||||||
${Q}cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} install
|
${Q}cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} install
|
||||||
${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
|
${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
|
||||||
-${Q}if ${CMP} -s libcalc.a ${LIBDIR}/libcalc.a; then \
|
-${Q}if ${CMP} -s libcalc.a $T${LIBDIR}/libcalc.a; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
rm -f ${LIBDIR}/libcalc.a.new; \
|
rm -f $T${LIBDIR}/libcalc.a.new; \
|
||||||
cp -f libcalc.a ${LIBDIR}/libcalc.a.new; \
|
cp -f libcalc.a $T${LIBDIR}/libcalc.a.new; \
|
||||||
mv -f ${LIBDIR}/libcalc.a.new ${LIBDIR}/libcalc.a; \
|
mv -f $T${LIBDIR}/libcalc.a.new $T${LIBDIR}/libcalc.a; \
|
||||||
${RANLIB} ${LIBDIR}/libcalc.a; \
|
${RANLIB} $T${LIBDIR}/libcalc.a; \
|
||||||
${CHMOD} 0444 ${LIBDIR}/libcalc.a; \
|
${CHMOD} 0444 $T${LIBDIR}/libcalc.a; \
|
||||||
echo "installed ${LIBDIR}/libcalc.a"; \
|
echo "installed $T${LIBDIR}/libcalc.a"; \
|
||||||
fi
|
fi
|
||||||
-${Q}for i in ${LIB_H_SRC} ${BUILD_H_SRC}; do \
|
-${Q}for i in ${LIB_H_SRC} ${BUILD_H_SRC}; do \
|
||||||
rm -f tmp; \
|
rm -f tmp; \
|
||||||
${SED} -e 's/^\(#[ ]*include[ ][ ]*\)"/\1"calc\//' $$i > tmp; \
|
${SED} -e 's/^\(#[ ]*include[ ][ ]*\)"/\1"calc\//' $$i > tmp; \
|
||||||
if ${CMP} -s tmp ${INCDIRCALC}/$$i; then \
|
if ${CMP} -s tmp $T${INCDIRCALC}/$$i; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
rm -f ${INCDIRCALC}/$$i.new; \
|
rm -f $T${INCDIRCALC}/$$i.new; \
|
||||||
cp -f tmp ${INCDIRCALC}/$$i.new; \
|
cp -f tmp $T${INCDIRCALC}/$$i.new; \
|
||||||
${CHMOD} 0444 ${INCDIRCALC}/$$i.new; \
|
${CHMOD} 0444 $T${INCDIRCALC}/$$i.new; \
|
||||||
mv -f ${INCDIRCALC}/$$i.new ${INCDIRCALC}/$$i; \
|
mv -f $T${INCDIRCALC}/$$i.new $T${INCDIRCALC}/$$i; \
|
||||||
echo "installed ${INCDIRCALC}/$$i"; \
|
echo "installed $T${INCDIRCALC}/$$i"; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
${Q}rm -f tmp
|
${Q}rm -f tmp
|
||||||
-${Q}if [ -z "${MANDIR}" ]; then \
|
-${Q}if [ -z "${MANDIR}" ]; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
if ${CMP} -s calc.1 ${MANDIR}/calc.${MANEXT}; then \
|
if ${CMP} -s calc.1 $T${MANDIR}/calc.${MANEXT}; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
rm -f ${MANDIR}/calc.${MANEXT}.new; \
|
rm -f $T${MANDIR}/calc.${MANEXT}.new; \
|
||||||
cp -f calc.1 ${MANDIR}/calc.${MANEXT}.new; \
|
cp -f calc.1 $T${MANDIR}/calc.${MANEXT}.new; \
|
||||||
${CHMOD} 0444 ${MANDIR}/calc.${MANEXT}.new; \
|
${CHMOD} 0444 $T${MANDIR}/calc.${MANEXT}.new; \
|
||||||
mv -f ${MANDIR}/calc.${MANEXT}.new \
|
mv -f $T${MANDIR}/calc.${MANEXT}.new \
|
||||||
${MANDIR}/calc.${MANEXT}; \
|
$T${MANDIR}/calc.${MANEXT}; \
|
||||||
echo "installed ${MANDIR}/calc.${MANEXT}"; \
|
echo "installed $T${MANDIR}/calc.${MANEXT}"; \
|
||||||
fi; \
|
fi; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ -z "${CATDIR}" ]; then \
|
-${Q}if [ -z "${CATDIR}" ]; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
if ${CMP} -s calc.1 ${MANDIR}/calc.${MANEXT}; then \
|
if ${CMP} -s calc.1 $T${MANDIR}/calc.${MANEXT}; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
if [ -z "${NROFF}" ]; then \
|
if [ -z "${NROFF}" ]; then \
|
||||||
echo "${MANMAKE} calc.1 ${CATDIR}"; \
|
echo "${MANMAKE} calc.1 $T${CATDIR}"; \
|
||||||
${MANMAKE} calc.1 ${CATDIR}; \
|
${MANMAKE} calc.1 $T${CATDIR}; \
|
||||||
else \
|
else \
|
||||||
rm -f ${CATDIR}/calc.${CATEXT}.new; \
|
rm -f $T${CATDIR}/calc.${CATEXT}.new; \
|
||||||
${NROFF} ${NROFF_ARG} calc.1 > \
|
${NROFF} ${NROFF_ARG} calc.1 > \
|
||||||
${CATDIR}/calc.${CATEXT}.new; \
|
$T${CATDIR}/calc.${CATEXT}.new; \
|
||||||
${CHMOD} ${MANMODE} ${MANDIR}/calc.${CATEXT}.new; \
|
${CHMOD} ${MANMODE} $T${MANDIR}/calc.${CATEXT}.new; \
|
||||||
mv -f ${CATDIR}/calc.${CATEXT}.new \
|
mv -f $T${CATDIR}/calc.${CATEXT}.new \
|
||||||
${CATDIR}/calc.${CATEXT}; \
|
$T${CATDIR}/calc.${CATEXT}; \
|
||||||
echo "installed ${CATDIR}/calc.${CATEXT}"; \
|
echo "installed $T${CATDIR}/calc.${CATEXT}"; \
|
||||||
fi; \
|
fi; \
|
||||||
fi; \
|
fi; \
|
||||||
fi
|
fi
|
||||||
|
6
alloc.h
6
alloc.h
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.3 $
|
* @(#) $Revision: 29.4 $
|
||||||
* @(#) $Id: alloc.h,v 29.3 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: alloc.h,v 29.4 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/alloc.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/alloc.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:48:29
|
* Under source code control: 1990/02/15 01:48:29
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
#define __ALLOC_H__
|
#define __ALLOC_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "have_malloc.h"
|
# include "have_malloc.h"
|
||||||
# include "have_newstr.h"
|
# include "have_newstr.h"
|
||||||
# include "have_string.h"
|
# include "have_string.h"
|
||||||
|
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.3 $
|
* @(#) $Revision: 29.4 $
|
||||||
* @(#) $Id: byteswap.h,v 29.3 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: byteswap.h,v 29.4 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/byteswap.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/byteswap.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1995/10/11 04:44:01
|
* Under source code control: 1995/10/11 04:44:01
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
#define __BYTESWAP_H__
|
#define __BYTESWAP_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "longbits.h"
|
# include "longbits.h"
|
||||||
#else
|
#else
|
||||||
# include <calc/longbits.h>
|
# include <calc/longbits.h>
|
||||||
|
69
cal/Makefile
69
cal/Makefile
@@ -18,8 +18,8 @@
|
|||||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#
|
#
|
||||||
# @(#) $Revision: 29.9 $
|
# @(#) $Revision: 29.12 $
|
||||||
# @(#) $Id: Makefile,v 29.9 2001/05/28 21:56:08 chongo Exp $
|
# @(#) $Id: Makefile,v 29.12 2001/06/08 22:38:53 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/Makefile,v $
|
# @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/Makefile,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 1991/07/21 05:00:54
|
# Under source code control: 1991/07/21 05:00:54
|
||||||
@@ -47,6 +47,22 @@ SHAREDIR= /usr/share
|
|||||||
|
|
||||||
CSHAREDIR= ${SHAREDIR}/calc
|
CSHAREDIR= ${SHAREDIR}/calc
|
||||||
|
|
||||||
|
# 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 to
|
||||||
|
# install calc somewhere other than into the system area. For example
|
||||||
|
# when forming the calc rpm, the Makefile is called with T=$RPM_BUILD_ROOT.
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
# calc is installed under $T, as if one had to chroot under
|
||||||
|
# $T for calc to operate.
|
||||||
|
#
|
||||||
|
# If in doubt, use T=
|
||||||
|
#
|
||||||
|
T=
|
||||||
|
|
||||||
# Makefile debug
|
# Makefile debug
|
||||||
#
|
#
|
||||||
# Q=@ do not echo internal makefile actions (quiet mode)
|
# Q=@ do not echo internal makefile actions (quiet mode)
|
||||||
@@ -124,12 +140,9 @@ calcliblist:
|
|||||||
#
|
#
|
||||||
##
|
##
|
||||||
|
|
||||||
echo_CALC_FILES: ${MAKE_FILE}
|
echo_inst_files:
|
||||||
@echo ${CALC_FILES}
|
${Q}for i in ${CALC_FILES}; do \
|
||||||
|
echo __file__ ${CSHAREDIR}/$$i; \
|
||||||
echo_install.list: ${MAKE_FILE}
|
|
||||||
@for i in ${CALC_FILES}; do \
|
|
||||||
echo ${CSHAREDIR}/$$i; \
|
|
||||||
done
|
done
|
||||||
|
|
||||||
##
|
##
|
||||||
@@ -144,30 +157,38 @@ clobber:
|
|||||||
rm -f .all
|
rm -f .all
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
-${Q}if [ ! -d ${SHAREDIR} ]; then \
|
-${Q}if [ ! -d $T${SHAREDIR} ]; then \
|
||||||
echo mkdir ${SHAREDIR}; \
|
echo mkdir $T${SHAREDIR}; \
|
||||||
mkdir ${SHAREDIR}; \
|
mkdir $T${SHAREDIR}; \
|
||||||
echo ${CHMOD} 0755 ${SHAREDIR}; \
|
if [ ! -d "$T${SHAREDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${SHAREDIR}; \
|
echo mkdir -p "$T${SHAREDIR}"; \
|
||||||
|
mkdir -p "$T${SHAREDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${SHAREDIR}; \
|
||||||
|
${CHMOD} 0755 $T${SHAREDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${CSHAREDIR} ]; then \
|
-${Q}if [ ! -d $T${CSHAREDIR} ]; then \
|
||||||
echo mkdir ${CSHAREDIR}; \
|
echo mkdir $T${CSHAREDIR}; \
|
||||||
mkdir ${CSHAREDIR}; \
|
mkdir $T${CSHAREDIR}; \
|
||||||
echo ${CHMOD} 0755 ${CSHAREDIR}; \
|
if [ ! -d "$T${CSHAREDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${CSHAREDIR}; \
|
echo mkdir -p "$T${CSHAREDIR}"; \
|
||||||
|
mkdir -p "$T${CSHAREDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${CSHAREDIR}; \
|
||||||
|
${CHMOD} 0755 $T${CSHAREDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
${Q}for i in ${CALC_FILES}; do \
|
${Q}for i in ${CALC_FILES}; do \
|
||||||
if ${CMP} -s $$i ${CSHAREDIR}/$$i; then \
|
if ${CMP} -s $$i $T${CSHAREDIR}/$$i; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
rm -f ${CSHAREDIR}/$$i.new; \
|
rm -f $T${CSHAREDIR}/$$i.new; \
|
||||||
cp -f $$i ${CSHAREDIR}/$$i.new; \
|
cp -f $$i $T${CSHAREDIR}/$$i.new; \
|
||||||
${CHMOD} 0444 ${CSHAREDIR}/$$i.new; \
|
${CHMOD} 0444 $T${CSHAREDIR}/$$i.new; \
|
||||||
mv -f ${CSHAREDIR}/$$i.new ${CSHAREDIR}/$$i; \
|
mv -f $T${CSHAREDIR}/$$i.new $T${CSHAREDIR}/$$i; \
|
||||||
echo "installed ${CSHAREDIR}/$$i"; \
|
echo "installed $T${CSHAREDIR}/$$i"; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
|
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.3 $
|
* @(#) $Revision: 29.5 $
|
||||||
* @(#) $Id: lucas.cal,v 29.3 2001/03/31 13:31:34 chongo Exp $
|
* @(#) $Id: lucas.cal,v 29.5 2001/06/08 20:07:29 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/lucas.cal,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/lucas.cal,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/05/03 16:49:51
|
* Under source code control: 1990/05/03 16:49:51
|
||||||
@@ -28,6 +28,16 @@
|
|||||||
* Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
|
* Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* NOTE: This is a standard calc resource file. For information on calc see:
|
||||||
|
*
|
||||||
|
* http://www.isthe.com/chongo/tech/comp/calc/index.html
|
||||||
|
*
|
||||||
|
* To obtain your own copy of calc, see:
|
||||||
|
*
|
||||||
|
* http://www.isthe.com/chongo/tech/comp/calc/calc-download.html
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* HISTORICAL NOTE:
|
* HISTORICAL NOTE:
|
||||||
*
|
*
|
||||||
@@ -52,12 +62,19 @@
|
|||||||
*
|
*
|
||||||
* At the time of discovery, this was the largest known twin prime pair.
|
* At the time of discovery, this was the largest known twin prime pair.
|
||||||
*
|
*
|
||||||
|
* See:
|
||||||
|
*
|
||||||
|
* http://www.isthe.com/chongo/tech/math/prime/amdahl6.html
|
||||||
|
*
|
||||||
|
* for more information on the Amdahl 6 group.
|
||||||
|
*
|
||||||
* NOTE: Both largest known and largest known twin prime records have been
|
* NOTE: Both largest known and largest known twin prime records have been
|
||||||
* broken. Rather than update this file each time, I'll just
|
* broken. Rather than update this file each time, I'll just
|
||||||
* congratulate the finders and encourage others to try for
|
* congratulate the finders and encourage others to try for
|
||||||
* larger finds. Records were made to be broken afterall!
|
* larger finds. Records were made to be broken afterall!
|
||||||
*
|
*/
|
||||||
* ON GAINING A WORLD RECORD:
|
|
||||||
|
/* ON GAINING A WORLD RECORD:
|
||||||
*
|
*
|
||||||
* The routines in calc were designed to be portable, and to work on
|
* The routines in calc were designed to be portable, and to work on
|
||||||
* numbers of 'sane' size. The Amdahl 6 team used a 'ultra-high speed
|
* numbers of 'sane' size. The Amdahl 6 team used a 'ultra-high speed
|
||||||
|
8
calc.h
8
calc.h
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.7 $
|
* @(#) $Revision: 29.9 $
|
||||||
* @(#) $Id: calc.h,v 29.7 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: calc.h,v 29.9 2001/12/11 02:28:47 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/calc.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/calc.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:48:31
|
* Under source code control: 1990/02/15 01:48:31
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
#define __CALC_H__
|
#define __CALC_H__
|
||||||
|
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "win32dll.h"
|
# include "win32dll.h"
|
||||||
# include "value.h"
|
# include "value.h"
|
||||||
# include "have_const.h"
|
# include "have_const.h"
|
||||||
@@ -258,7 +258,7 @@ extern DLL char *run_state_name(run state);
|
|||||||
extern int calc_major_ver;
|
extern int calc_major_ver;
|
||||||
extern int calc_minor_ver;
|
extern int calc_minor_ver;
|
||||||
extern int calc_major_patch;
|
extern int calc_major_patch;
|
||||||
extern char *calc_minor_patch;
|
extern int calc_minor_patch;
|
||||||
extern char *Copyright;
|
extern char *Copyright;
|
||||||
extern DLL char *version(void);
|
extern DLL char *version(void);
|
||||||
|
|
||||||
|
6
cmath.h
6
cmath.h
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.4 $
|
* @(#) $Revision: 29.5 $
|
||||||
* @(#) $Id: cmath.h,v 29.4 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: cmath.h,v 29.5 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/cmath.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/cmath.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1993/07/30 19:42:45
|
* Under source code control: 1993/07/30 19:42:45
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
#define __CMATH_H__
|
#define __CMATH_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "qmath.h"
|
# include "qmath.h"
|
||||||
#else
|
#else
|
||||||
# include <calc/qmath.h>
|
# include <calc/qmath.h>
|
||||||
|
6
config.h
6
config.h
@@ -19,8 +19,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.10 $
|
* @(#) $Revision: 29.11 $
|
||||||
* @(#) $Id: config.h,v 29.10 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: config.h,v 29.11 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/config.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/config.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1995/11/01 22:20:17
|
* Under source code control: 1995/11/01 22:20:17
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
#define __CONFIG_H__
|
#define __CONFIG_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "win32dll.h"
|
# include "win32dll.h"
|
||||||
# include "nametype.h"
|
# include "nametype.h"
|
||||||
# include "qmath.h"
|
# include "qmath.h"
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/local/bin/calc -q -s -f
|
#!/usr/local/src/cmd/calc/calc -q -s -f
|
||||||
/*
|
/*
|
||||||
* 4dsphere - determine if 6 points lie on the surface of a sphere in R^4
|
* 4dsphere - determine if 6 points lie on the surface of a sphere in R^4
|
||||||
*
|
*
|
||||||
@@ -26,8 +26,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 1.2 $
|
* @(#) $Revision: 1.3 $
|
||||||
* @(#) $Id: 4dsphere.calc,v 1.2 2001/05/29 00:48:46 chongo Exp $
|
* @(#) $Id: 4dsphere.calc,v 1.3 2001/06/06 09:06:29 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/4dsphere.calc,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/4dsphere.calc,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 2001/05/03 19:02:03
|
* Under source code control: 2001/05/03 19:02:03
|
||||||
|
@@ -17,8 +17,8 @@
|
|||||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#
|
#
|
||||||
# @(#) $Revision: 29.14 $
|
# @(#) $Revision: 29.20 $
|
||||||
# @(#) $Id: Makefile,v 29.14 2001/05/28 23:08:22 chongo Exp $
|
# @(#) $Id: Makefile,v 29.20 2001/06/10 19:35:02 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/Makefile,v $
|
# @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/Makefile,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 1999/11/29 11:10:26
|
# Under source code control: 1999/11/29 11:10:26
|
||||||
@@ -45,6 +45,22 @@ BINDIR= /usr/bin
|
|||||||
#
|
#
|
||||||
SCRIPTDIR= ${BINDIR}/cscript
|
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 to
|
||||||
|
# install calc somewhere other than into the system area. For example
|
||||||
|
# when forming the calc rpm, the Makefile is called with T=$RPM_BUILD_ROOT.
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
# calc is installed under $T, as if one had to chroot under
|
||||||
|
# $T for calc to operate.
|
||||||
|
#
|
||||||
|
# If in doubt, use T=
|
||||||
|
#
|
||||||
|
T=
|
||||||
|
|
||||||
# Makefile debug
|
# Makefile debug
|
||||||
#
|
#
|
||||||
# Q=@ do not echo internal makefile actions (quiet mode)
|
# Q=@ do not echo internal makefile actions (quiet mode)
|
||||||
@@ -77,11 +93,11 @@ CMP= cmp
|
|||||||
#
|
#
|
||||||
# make detaillist
|
# make detaillist
|
||||||
#
|
#
|
||||||
SCRIPT= 4dsphere fproduct mersenne piforever plus powerterm simple \
|
SCRIPT= 4dsphere fproduct mersenne piforever plus powerterm \
|
||||||
square
|
simple square
|
||||||
|
|
||||||
SCRIPT_SRC= 4dsphere.calc fproduct.calc mersenne.calc piforever.calc \
|
SCRIPT_SRC= 4dsphere.calc fproduct.calc mersenne.calc \
|
||||||
plus.calc powerterm.calc simple.calc square.calc
|
piforever.calc plus.calc powerterm.calc simple.calc square.calc
|
||||||
|
|
||||||
# These files are found (but not built) in the distribution
|
# These files are found (but not built) in the distribution
|
||||||
#
|
#
|
||||||
@@ -216,14 +232,11 @@ depend:
|
|||||||
#
|
#
|
||||||
##
|
##
|
||||||
|
|
||||||
echo_SCRIPT: ${MAKE_FILE}
|
echo_inst_files:
|
||||||
@echo ${SCRIPT}
|
${Q}for i in ${SCRIPT}; do \
|
||||||
|
echo __file__ ${SCRIPTDIR}/$$i; \
|
||||||
|
|
||||||
echo_install.list: ${MAKE_FILE}
|
|
||||||
@for i in ${SCRIPT}; do \
|
|
||||||
echo ${SCRIPTDIR}/$$i; \
|
|
||||||
done
|
done
|
||||||
|
|
||||||
##
|
##
|
||||||
#
|
#
|
||||||
# Utility rules
|
# Utility rules
|
||||||
@@ -237,31 +250,39 @@ clobber:
|
|||||||
-rm -f ${TARGETS}
|
-rm -f ${TARGETS}
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
-${Q}if [ ! -d ${BINDIR} ]; then \
|
-${Q}if [ ! -d $T${BINDIR} ]; then \
|
||||||
echo mkdir ${BINDIR}; \
|
echo mkdir $T${BINDIR}; \
|
||||||
mkdir ${BINDIR}; \
|
mkdir $T${BINDIR}; \
|
||||||
echo ${CHMOD} 0755 ${BINDIR}; \
|
if [ ! -d "$T${BINDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${BINDIR}; \
|
echo mkdir -p "$T${BINDIR}"; \
|
||||||
|
mkdir -p "$T${BINDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${BINDIR}; \
|
||||||
|
${CHMOD} 0755 $T${BINDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${SCRIPTDIR} ]; then \
|
-${Q}if [ ! -d $T${SCRIPTDIR} ]; then \
|
||||||
echo mkdir ${SCRIPTDIR}; \
|
echo mkdir $T${SCRIPTDIR}; \
|
||||||
mkdir ${SCRIPTDIR}; \
|
mkdir $T${SCRIPTDIR}; \
|
||||||
echo ${CHMOD} 0755 ${SCRIPTDIR}; \
|
if [ ! -d "$T${SCRIPTDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${SCRIPTDIR}; \
|
echo mkdir -p "$T${SCRIPTDIR}"; \
|
||||||
|
mkdir -p "$T${SCRIPTDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${SCRIPTDIR}; \
|
||||||
|
${CHMOD} 0755 $T${SCRIPTDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
${Q}for i in ${SCRIPT}; do \
|
${Q}for i in ${SCRIPT}; do \
|
||||||
if ${CMP} -s $$i ${SCRIPTDIR}/$$i; then \
|
if ${CMP} -s $$i $T${SCRIPTDIR}/$$i; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
rm -f ${SCRIPTDIR}/$$i.new; \
|
rm -f $T${SCRIPTDIR}/$$i.new; \
|
||||||
cp -f $$i ${SCRIPTDIR}/$$i.new; \
|
cp -f $$i $T${SCRIPTDIR}/$$i.new; \
|
||||||
${CHMOD} 0555 ${SCRIPTDIR}/$$i; \
|
${CHMOD} 0555 $T${SCRIPTDIR}/$$i.new; \
|
||||||
mv -f ${SCRIPTDIR}/$$i.new ${SCRIPTDIR}/$$i; \
|
mv -f $T${SCRIPTDIR}/$$i.new $T${SCRIPTDIR}/$$i; \
|
||||||
echo "installed ${SCRIPTDIR}/$$i"; \
|
echo "installed $T${SCRIPTDIR}/$$i"; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@@ -21,14 +21,14 @@ For more info, see:
|
|||||||
|
|
||||||
4dsphere
|
4dsphere
|
||||||
|
|
||||||
determine if 6 points lie on the surface of a sphere in R^4
|
Determine if 6 points lie on the surface of a 4-dimensional sphere in R^4.
|
||||||
|
|
||||||
usage: 4dsphere x0 y0 z0 w0 x1 y1 z1 w1 ... x5 y5 z5 w5
|
4dsphere x0 y0 z0 w0 x1 y1 z1 w1 ... x5 y5 z5 w5
|
||||||
|
|
||||||
x0 y0 z0 w0 point 0 in R^4
|
x0 y0 z0 w0 point 0 in R^4
|
||||||
x1 y1 z1 w1 point 1 in R^4
|
x1 y1 z1 w1 point 1 in R^4
|
||||||
... ...
|
... ...
|
||||||
x5 y5 z5 w5 point 5 in R^4
|
x5 y5 z5 w5 point 5 in R^4
|
||||||
|
|
||||||
|
|
||||||
fproduct filename term ...
|
fproduct filename term ...
|
||||||
@@ -77,8 +77,8 @@ simple
|
|||||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
##
|
##
|
||||||
## @(#) $Revision: 29.7 $
|
## @(#) $Revision: 29.10 $
|
||||||
## @(#) $Id: README,v 29.7 2001/05/28 23:08:22 chongo Exp $
|
## @(#) $Id: README,v 29.10 2001/06/10 19:34:40 chongo Exp $
|
||||||
## @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/README,v $
|
## @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/README,v $
|
||||||
##
|
##
|
||||||
## Under source code control: 1999/12/17 10:23:40
|
## Under source code control: 1999/12/17 10:23:40
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/local/bin/calc -q -s -f
|
#!/usr/local/src/cmd/calc/calc -q -s -f
|
||||||
/*
|
/*
|
||||||
* fproduct - write the big Endian product of terms to a file
|
* fproduct - write the big Endian product of terms to a file
|
||||||
*
|
*
|
||||||
@@ -24,8 +24,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.1 $
|
* @(#) $Revision: 29.2 $
|
||||||
* @(#) $Id: fproduct.calc,v 29.1 2001/04/08 08:25:15 chongo Exp $
|
* @(#) $Id: fproduct.calc,v 29.2 2001/06/06 09:06:29 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/fproduct.calc,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/fproduct.calc,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 2001/04/07 20:13:11
|
* Under source code control: 2001/04/07 20:13:11
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/local/bin/calc -q -s -f
|
#!/usr/local/src/cmd/calc/calc -q -s -f
|
||||||
/*
|
/*
|
||||||
* powerterm - print the argument as a sum of powers of integers
|
* powerterm - print the argument as a sum of powers of integers
|
||||||
*
|
*
|
||||||
@@ -24,8 +24,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.5 $
|
* @(#) $Revision: 29.6 $
|
||||||
* @(#) $Id: powerterm.calc,v 29.5 2001/04/25 08:41:36 chongo Exp $
|
* @(#) $Id: powerterm.calc,v 29.6 2001/06/06 09:06:29 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/powerterm.calc,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/powerterm.calc,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 2001/04/24 23:49:11
|
* Under source code control: 2001/04/24 23:49:11
|
||||||
|
214
custom/Makefile
214
custom/Makefile
@@ -18,8 +18,8 @@
|
|||||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#
|
#
|
||||||
# @(#) $Revision: 29.13 $
|
# @(#) $Revision: 29.17 $
|
||||||
# @(#) $Id: Makefile,v 29.13 2001/05/28 23:54:53 chongo Exp $
|
# @(#) $Id: Makefile,v 29.17 2001/06/08 22:38:53 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/Makefile,v $
|
# @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/Makefile,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 1997/03/09 02:28:54
|
# Under source code control: 1997/03/09 02:28:54
|
||||||
@@ -116,6 +116,22 @@ CUSTOMLIBDIR= ${CSHAREDIR}/custom
|
|||||||
CUSTOMHELPDIR= ${CSHAREDIR}/custhelp
|
CUSTOMHELPDIR= ${CSHAREDIR}/custhelp
|
||||||
CUSTOMINCDIR= ${INCDIRCALC}/custom
|
CUSTOMINCDIR= ${INCDIRCALC}/custom
|
||||||
|
|
||||||
|
# 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 to
|
||||||
|
# install calc somewhere other than into the system area. For example
|
||||||
|
# when forming the calc rpm, the Makefile is called with T=$RPM_BUILD_ROOT.
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
# calc is installed under $T, as if one had to chroot under
|
||||||
|
# $T for calc to operate.
|
||||||
|
#
|
||||||
|
# If in doubt, use T=
|
||||||
|
#
|
||||||
|
T=
|
||||||
|
|
||||||
# Normally, the upper level makefile will set these values. We provide
|
# Normally, the upper level makefile will set these values. We provide
|
||||||
# a default here just in case you want to build from this directory.
|
# a default here just in case you want to build from this directory.
|
||||||
#
|
#
|
||||||
@@ -468,27 +484,18 @@ depend:
|
|||||||
#
|
#
|
||||||
##
|
##
|
||||||
|
|
||||||
echo_INSTALL_H_SRC: ${MAKE_FILE}
|
echo_inst_files:
|
||||||
@echo ${INSTALL_H_SRC}
|
${Q}for i in ${INSTALL_H_SRC}; do \
|
||||||
|
echo __file__ ${CUSTOMINCDIR}/$$i; \
|
||||||
echo_CUSTOM_CALC_FILES: ${MAKE_FILE}
|
|
||||||
@echo ${CUSTOM_CALC_FILES}
|
|
||||||
|
|
||||||
echo_CUSTOM_HELP: ${MAKE_FILE}
|
|
||||||
@echo ${CUSTOM_HELP}
|
|
||||||
|
|
||||||
echo_install.list: ${MAKE_FILE}
|
|
||||||
@for i in ${INSTALL_H_SRC}; do \
|
|
||||||
echo ${CUSTOMINCDIR}/$$i; \
|
|
||||||
done
|
done
|
||||||
@for i in ${CUSTOM_HELP}; do \
|
${Q}for i in ${CUSTOM_HELP}; do \
|
||||||
echo ${CUSTOMHELPDIR}/$$i; \
|
echo __file__ ${CUSTOMHELPDIR}/$$i; \
|
||||||
done
|
done
|
||||||
@for i in ${CUSTOM_CALC_FILES}; do \
|
${Q}for i in ${CUSTOM_CALC_FILES}; do \
|
||||||
echo ${CUSTOMLIBDIR}/$$i; \
|
echo __file__ ${CUSTOMLIBDIR}/$$i; \
|
||||||
done
|
done
|
||||||
@for i in ${CALC_LIBCUSTOM}; do \
|
${Q}for i in ${CALC_LIBCUSTOM}; do \
|
||||||
echo ${CUSTOMLIBDIR}/$$i; \
|
echo __file__ ${CUSTOMLIBDIR}/$$i; \
|
||||||
done
|
done
|
||||||
|
|
||||||
##
|
##
|
||||||
@@ -505,118 +512,147 @@ clobber:
|
|||||||
rm -f .all Makefile.tmp Makefile.bak
|
rm -f .all Makefile.tmp Makefile.bak
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
-${Q}if [ ! -d ${SHAREDIR} ]; then \
|
-${Q}if [ ! -d $T${SHAREDIR} ]; then \
|
||||||
echo mkdir ${SHAREDIR}; \
|
echo mkdir $T${SHAREDIR}; \
|
||||||
mkdir ${SHAREDIR}; \
|
mkdir $T${SHAREDIR}; \
|
||||||
echo ${CHMOD} 0755 ${SHAREDIR}; \
|
if [ ! -d "$T${SHAREDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${SHAREDIR}; \
|
echo mkdir -p "$T${SHAREDIR}"; \
|
||||||
|
mkdir -p "$T${SHAREDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${SHAREDIR}; \
|
||||||
|
${CHMOD} 0755 $T${SHAREDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${INCDIR} ]; then \
|
-${Q}if [ ! -d $T${INCDIR} ]; then \
|
||||||
echo mkdir ${INCDIR}; \
|
echo mkdir $T${INCDIR}; \
|
||||||
mkdir ${INCDIR}; \
|
mkdir $T${INCDIR}; \
|
||||||
echo ${CHMOD} 0755 ${INCDIR}; \
|
if [ ! -d "$T${INCDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${INCDIR}; \
|
echo mkdir -p "$T${INCDIR}"; \
|
||||||
|
mkdir -p "$T${INCDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${INCDIR}; \
|
||||||
|
${CHMOD} 0755 $T${INCDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${CSHAREDIR} ]; then \
|
-${Q}if [ ! -d $T${CSHAREDIR} ]; then \
|
||||||
echo mkdir ${CSHAREDIR}; \
|
echo mkdir $T${CSHAREDIR}; \
|
||||||
mkdir ${CSHAREDIR}; \
|
mkdir $T${CSHAREDIR}; \
|
||||||
echo ${CHMOD} 0755 ${CSHAREDIR}; \
|
if [ ! -d "$T${CSHAREDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${CSHAREDIR}; \
|
echo mkdir -p "$T${CSHAREDIR}"; \
|
||||||
|
mkdir -p "$T${CSHAREDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${CSHAREDIR}; \
|
||||||
|
${CHMOD} 0755 $T${CSHAREDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${INCDIRCALC} ]; then \
|
-${Q}if [ ! -d $T${INCDIRCALC} ]; then \
|
||||||
echo mkdir ${INCDIRCALC}; \
|
echo mkdir $T${INCDIRCALC}; \
|
||||||
mkdir ${INCDIRCALC}; \
|
mkdir $T${INCDIRCALC}; \
|
||||||
echo ${CHMOD} 0755 ${INCDIRCALC}; \
|
if [ ! -d "$T${INCDIRCALC}" ]; then \
|
||||||
${CHMOD} 0755 ${INCDIRCALC}; \
|
echo mkdir -p "$T${INCDIRCALC}"; \
|
||||||
|
mkdir -p "$T${INCDIRCALC}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${INCDIRCALC}; \
|
||||||
|
${CHMOD} 0755 $T${INCDIRCALC}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${HELPDIR} ]; then \
|
-${Q}if [ ! -d $T${HELPDIR} ]; then \
|
||||||
echo mkdir ${HELPDIR}; \
|
echo mkdir $T${HELPDIR}; \
|
||||||
mkdir ${HELPDIR}; \
|
mkdir $T${HELPDIR}; \
|
||||||
echo ${CHMOD} 0755 ${HELPDIR}; \
|
if [ ! -d "$T${HELPDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${HELPDIR}; \
|
echo mkdir -p "$T${HELPDIR}"; \
|
||||||
|
mkdir -p "$T${HELPDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${HELPDIR}; \
|
||||||
|
${CHMOD} 0755 $T${HELPDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${CUSTOMLIBDIR} ]; then \
|
-${Q}if [ ! -d $T${CUSTOMLIBDIR} ]; then \
|
||||||
echo mkdir ${CUSTOMLIBDIR}; \
|
echo mkdir $T${CUSTOMLIBDIR}; \
|
||||||
mkdir ${CUSTOMLIBDIR}; \
|
mkdir $T${CUSTOMLIBDIR}; \
|
||||||
echo ${CHMOD} 0755 ${CUSTOMLIBDIR}; \
|
if [ ! -d "$T${CUSTOMLIBDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${CUSTOMLIBDIR}; \
|
echo mkdir -p "$T${CUSTOMLIBDIR}"; \
|
||||||
|
mkdir -p "$T${CUSTOMLIBDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${CUSTOMLIBDIR}; \
|
||||||
|
${CHMOD} 0755 $T${CUSTOMLIBDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${CUSTOMHELPDIR} ]; then \
|
-${Q}if [ ! -d $T${CUSTOMHELPDIR} ]; then \
|
||||||
echo mkdir ${CUSTOMHELPDIR}; \
|
echo mkdir $T${CUSTOMHELPDIR}; \
|
||||||
mkdir ${CUSTOMHELPDIR}; \
|
mkdir $T${CUSTOMHELPDIR}; \
|
||||||
echo ${CHMOD} 0755 ${CUSTOMHELPDIR}; \
|
if [ ! -d "$T${CUSTOMHELPDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${CUSTOMHELPDIR}; \
|
echo mkdir -p "$T${CUSTOMHELPDIR}"; \
|
||||||
|
mkdir -p "$T${CUSTOMHELPDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${CUSTOMHELPDIR}; \
|
||||||
|
${CHMOD} 0755 $T${CUSTOMHELPDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${CUSTOMINCDIR} ]; then \
|
-${Q}if [ ! -d $T${CUSTOMINCDIR} ]; then \
|
||||||
echo mkdir ${CUSTOMINCDIR}; \
|
echo mkdir $T${CUSTOMINCDIR}; \
|
||||||
mkdir ${CUSTOMINCDIR}; \
|
mkdir $T${CUSTOMINCDIR}; \
|
||||||
echo ${CHMOD} 0755 ${CUSTOMINCDIR}; \
|
if [ ! -d "$T${CUSTOMINCDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${CUSTOMINCDIR}; \
|
echo mkdir -p "$T${CUSTOMINCDIR}"; \
|
||||||
|
mkdir -p "$T${CUSTOMINCDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${CUSTOMINCDIR}; \
|
||||||
|
${CHMOD} 0755 $T${CUSTOMINCDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}for i in ${INSTALL_H_SRC}; do \
|
-${Q}for i in ${INSTALL_H_SRC}; do \
|
||||||
rm -f tmp; \
|
if ${CMP} -s tmp $T${CUSTOMINCDIR}/$$i; then \
|
||||||
${SED} -e 's/^\(#[ ]*include[ ][ ]*\)"/\1"calc\//' $$i > tmp; \
|
|
||||||
if ${CMP} -s tmp ${CUSTOMINCDIR}/$$i; then \
|
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
rm -f ${CUSTOMINCDIR}/$$i; \
|
rm -f $T${CUSTOMINCDIR}/$$i.new; \
|
||||||
cp -f tmp ${INCDIRCALC}/$$i.new; \
|
cp -f $$i $T${CUSTOMINCDIR}/$$i.new; \
|
||||||
cp -f $$i ${CUSTOMINCDIR}/$$i.new; \
|
${CHMOD} 0444 $T${CUSTOMINCDIR}/$$i.new; \
|
||||||
${CHMOD} 0444 ${CUSTOMINCDIR}/$$i.new; \
|
mv -f $T${CUSTOMINCDIR}/$$i.new $T${CUSTOMINCDIR}/$$i; \
|
||||||
mv -f ${CUSTOMINCDIR}/$$i.new ${CUSTOMINCDIR}/$$i; \
|
echo "installed $T${CUSTOMINCDIR}/$$i"; \
|
||||||
echo "installed ${CUSTOMINCDIR}/$$i"; \
|
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
-${Q}rm -f tmp
|
-${Q}rm -f tmp
|
||||||
-${Q}for i in ${CUSTOM_CALC_FILES}; do \
|
-${Q}for i in ${CUSTOM_CALC_FILES}; do \
|
||||||
if ${CMP} -s $$i ${CUSTOMLIBDIR}/$$i; then \
|
if ${CMP} -s $$i $T${CUSTOMLIBDIR}/$$i; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
rm -f ${CUSTOMLIBDIR}/$$i; \
|
rm -f $T${CUSTOMLIBDIR}/$$i.new; \
|
||||||
cp -f $$i ${CUSTOMLIBDIR}/$$i; \
|
cp -f $$i $T${CUSTOMLIBDIR}/$$i.new; \
|
||||||
${CHMOD} 0444 ${CUSTOMLIBDIR}/$$i.new; \
|
${CHMOD} 0444 $T${CUSTOMLIBDIR}/$$i.new; \
|
||||||
mv -f ${CUSTOMLIBDIR}/$$i.new ${CUSTOMLIBDIR}/$$i; \
|
mv -f $T${CUSTOMLIBDIR}/$$i.new $T${CUSTOMLIBDIR}/$$i; \
|
||||||
echo "installed ${CUSTOMLIBDIR}/$$i"; \
|
echo "installed $T${CUSTOMLIBDIR}/$$i"; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
-${Q}for i in ${CUSTOM_HELP}; do \
|
-${Q}for i in ${CUSTOM_HELP}; do \
|
||||||
if ${CMP} -s $$i ${CUSTOMHELPDIR}/$$i; then \
|
if ${CMP} -s $$i $T${CUSTOMHELPDIR}/$$i; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
rm -f ${CUSTOMHELPDIR}/$$i; \
|
rm -f $T${CUSTOMHELPDIR}/$$i.new; \
|
||||||
cp -f $$i ${CUSTOMHELPDIR}/$$i.new; \
|
cp -f $$i $T${CUSTOMHELPDIR}/$$i.new; \
|
||||||
${CHMOD} 0444 ${CUSTOMHELPDIR}/$$i.new; \
|
${CHMOD} 0444 $T${CUSTOMHELPDIR}/$$i.new; \
|
||||||
mv -f ${CUSTOMHELPDIR}/$$i.new ${CUSTOMHELPDIR}/$$i; \
|
mv -f $T${CUSTOMHELPDIR}/$$i.new $T${CUSTOMHELPDIR}/$$i; \
|
||||||
echo "installed ${CUSTOMHELPDIR}/$$i"; \
|
echo "installed $T${CUSTOMHELPDIR}/$$i"; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
-${Q}if [ ! -z ${ALLOW_CUSTOM} ]; then \
|
-${Q}if [ ! -z ${ALLOW_CUSTOM} ]; then \
|
||||||
if ${CMP} -s libcustcalc.a ${CUSTOMLIBDIR}/libcustcalc.a; then \
|
if ${CMP} -s libcustcalc.a $T${CUSTOMLIBDIR}/libcustcalc.a; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
rm -f ${CUSTOMLIBDIR}/libcustcalc.a.new; \
|
rm -f $T${CUSTOMLIBDIR}/libcustcalc.a.new; \
|
||||||
cp -f libcustcalc.a ${CUSTOMLIBDIR}/libcustcalc.a.new; \
|
cp -f libcustcalc.a $T${CUSTOMLIBDIR}/libcustcalc.a.new; \
|
||||||
${CHMOD} 0644 ${CUSTOMLIBDIR}/libcustcalc.a; \
|
${CHMOD} 0644 $T${CUSTOMLIBDIR}/libcustcalc.a.new; \
|
||||||
mv -f ${CUSTOMLIBDIR}/libcustcalc.a.new \
|
mv -f $T${CUSTOMLIBDIR}/libcustcalc.a.new \
|
||||||
${CUSTOMLIBDIR}/libcustcalc.a; \
|
$T${CUSTOMLIBDIR}/libcustcalc.a; \
|
||||||
${RANLIB} ${CUSTOMLIBDIR}/libcustcalc.a; \
|
${RANLIB} $T${CUSTOMLIBDIR}/libcustcalc.a; \
|
||||||
echo "installed ${CUSTOMLIBDIR}/libcustcalc.a"; \
|
echo "installed $T${CUSTOMLIBDIR}/libcustcalc.a"; \
|
||||||
fi; \
|
fi; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
6
file.h
6
file.h
@@ -19,8 +19,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.4 $
|
* @(#) $Revision: 29.5 $
|
||||||
* @(#) $Id: file.h,v 29.4 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: file.h,v 29.5 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/file.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/file.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1996/05/24 05:55:58
|
* Under source code control: 1996/05/24 05:55:58
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
#define __FILE_H__
|
#define __FILE_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "have_fpos.h"
|
# include "have_fpos.h"
|
||||||
#else
|
#else
|
||||||
# include <calc/have_fpos.h>
|
# include <calc/have_fpos.h>
|
||||||
|
6
func.h
6
func.h
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.3 $
|
* @(#) $Revision: 29.4 $
|
||||||
* @(#) $Id: func.h,v 29.3 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: func.h,v 29.4 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/func.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/func.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:48:33
|
* Under source code control: 1990/02/15 01:48:33
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
#define __FUNC_H__
|
#define __FUNC_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "calc.h"
|
# include "calc.h"
|
||||||
# include "label.h"
|
# include "label.h"
|
||||||
#else
|
#else
|
||||||
|
6
hash.h
6
hash.h
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.3 $
|
* @(#) $Revision: 29.4 $
|
||||||
* @(#) $Id: hash.h,v 29.3 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: hash.h,v 29.4 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/hash.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/hash.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1995/11/14 23:57:45
|
* Under source code control: 1995/11/14 23:57:45
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
#define __HASH_H__
|
#define __HASH_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "shs.h"
|
# include "shs.h"
|
||||||
# include "shs1.h"
|
# include "shs1.h"
|
||||||
# include "md5.h"
|
# include "md5.h"
|
||||||
|
117
help/Makefile
117
help/Makefile
@@ -18,8 +18,8 @@
|
|||||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#
|
#
|
||||||
# @(#) $Revision: 29.13 $
|
# @(#) $Revision: 29.18 $
|
||||||
# @(#) $Id: Makefile,v 29.13 2001/05/29 00:41:11 chongo Exp $
|
# @(#) $Id: Makefile,v 29.18 2001/06/08 22:57:54 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/help/RCS/Makefile,v $
|
# @(#) $Source: /usr/local/src/cmd/calc/help/RCS/Makefile,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 1991/07/23 06:47:57
|
# Under source code control: 1991/07/23 06:47:57
|
||||||
@@ -37,15 +37,41 @@ SHELL= /bin/sh
|
|||||||
MAKE_FILE = Makefile
|
MAKE_FILE = Makefile
|
||||||
|
|
||||||
# ${SHAREDIR} where most common shared files are kept
|
# ${SHAREDIR} where most common shared files are kept
|
||||||
|
# ${INCDIR} where most .h files are kept
|
||||||
|
# ${LIBDIR} where *.a files are installed
|
||||||
#
|
#
|
||||||
# ${CSHAREDIR} where most common shared calc files are kept
|
# ${CSHAREDIR} where most common shared calc files are kept
|
||||||
# ${HELPDIR} where the help directory is installed.
|
# ${HELPDIR} where the help directory is installed.
|
||||||
|
# ${INCDIRCALC} where the calc include files are installed
|
||||||
#
|
#
|
||||||
#SHAREDIR= /usr/local/lib
|
#SHAREDIR= /usr/local/lib
|
||||||
SHAREDIR= /usr/share
|
SHAREDIR= /usr/share
|
||||||
|
|
||||||
|
#INCDIR= /usr/local/include
|
||||||
|
INCDIR= /usr/include
|
||||||
|
|
||||||
|
#LIBDIR= /usr/local/lib
|
||||||
|
LIBDIR= /usr/lib
|
||||||
|
|
||||||
CSHAREDIR= ${SHAREDIR}/calc
|
CSHAREDIR= ${SHAREDIR}/calc
|
||||||
HELPDIR= ${CSHAREDIR}/help
|
HELPDIR= ${CSHAREDIR}/help
|
||||||
|
INCDIRCALC= ${INCDIR}/calc
|
||||||
|
|
||||||
|
# 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 to
|
||||||
|
# install calc somewhere other than into the system area. For example
|
||||||
|
# when forming the calc rpm, the Makefile is called with T=$RPM_BUILD_ROOT.
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
# calc is installed under $T, as if one had to chroot under
|
||||||
|
# $T for calc to operate.
|
||||||
|
#
|
||||||
|
# If in doubt, use T=
|
||||||
|
#
|
||||||
|
T=
|
||||||
|
|
||||||
# Makefile debug
|
# Makefile debug
|
||||||
#
|
#
|
||||||
@@ -240,7 +266,8 @@ changes: ../CHANGES
|
|||||||
|
|
||||||
libcalc: ../LIBRARY
|
libcalc: ../LIBRARY
|
||||||
rm -f $@
|
rm -f $@
|
||||||
${SED} -e 's:$${LIBDIR}:${LIBDIR}:g' < ../LIBRARY > $@
|
${SED} -e 's:$${LIBDIR}:${LIBDIR}:g' \
|
||||||
|
-e 's:$${INCDIRCALC}:${INCDIRCALC}:g' < ../LIBRARY > $@
|
||||||
${CHMOD} 0444 $@
|
${CHMOD} 0444 $@
|
||||||
-@if [ -z "${Q}" ]; then \
|
-@if [ -z "${Q}" ]; then \
|
||||||
echo ''; \
|
echo ''; \
|
||||||
@@ -497,24 +524,12 @@ detaillist:
|
|||||||
#
|
#
|
||||||
##
|
##
|
||||||
|
|
||||||
echo_STD_HELP_FILES: ${MAKE_FILE}
|
echo_inst_files:
|
||||||
@echo ${STD_HELP_FILES}
|
${Q}for i in ${STD_HELP_FILES} full ${BLT_HELP_FILES} \
|
||||||
|
|
||||||
echo_BLT_HELP_FILES: ${MAKE_FILE}
|
|
||||||
@echo ${BLT_HELP_FILES}
|
|
||||||
|
|
||||||
echo_DETAIL_HELP: ${MAKE_FILE}
|
|
||||||
@echo ${DETAIL_HELP}
|
|
||||||
|
|
||||||
echo_SINGULAR_FILES: ${MAKE_FILE}
|
|
||||||
@echo ${SINGULAR_FILES}
|
|
||||||
|
|
||||||
echo_install.list: ${MAKE_FILE}
|
|
||||||
@for i in ${STD_HELP_FILES} full ${BLT_HELP_FILES} \
|
|
||||||
builtin ${DETAIL_HELP} ${SINGULAR_FILES}; do \
|
builtin ${DETAIL_HELP} ${SINGULAR_FILES}; do \
|
||||||
echo ${HELPDIR}/$$i; \
|
echo __file__ ${HELPDIR}/$$i; \
|
||||||
done
|
done
|
||||||
@echo ${HELPDIR}/obj
|
${Q}echo __file__ ${HELPDIR}/obj
|
||||||
|
|
||||||
##
|
##
|
||||||
#
|
#
|
||||||
@@ -534,47 +549,59 @@ clobber:
|
|||||||
|
|
||||||
install: all
|
install: all
|
||||||
-${Q}if [ ! -d ${SHAREDIR} ]; then \
|
-${Q}if [ ! -d ${SHAREDIR} ]; then \
|
||||||
echo mkdir ${SHAREDIR}; \
|
echo mkdir $T${SHAREDIR}; \
|
||||||
mkdir ${SHAREDIR}; \
|
mkdir $T${SHAREDIR}; \
|
||||||
echo ${CHMOD} 0755 ${SHAREDIR}; \
|
if [ ! -d "$T${SHAREDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${SHAREDIR}; \
|
echo mkdir -p "$T${SHAREDIR}"; \
|
||||||
|
mkdir -p "$T${SHAREDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${SHAREDIR}; \
|
||||||
|
${CHMOD} 0755 $T${SHAREDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${CSHAREDIR} ]; then \
|
-${Q}if [ ! -d $T${CSHAREDIR} ]; then \
|
||||||
echo mkdir ${CSHAREDIR}; \
|
echo mkdir $T${CSHAREDIR}; \
|
||||||
mkdir ${CSHAREDIR}; \
|
mkdir $T${CSHAREDIR}; \
|
||||||
echo ${CHMOD} 0755 ${CSHAREDIR}; \
|
if [ ! -d "$T${CSHAREDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${CSHAREDIR}; \
|
echo mkdir -p "$T${CSHAREDIR}"; \
|
||||||
|
mkdir -p "$T${CSHAREDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${CSHAREDIR}; \
|
||||||
|
${CHMOD} 0755 $T${CSHAREDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}if [ ! -d ${HELPDIR} ]; then \
|
-${Q}if [ ! -d $T${HELPDIR} ]; then \
|
||||||
echo mkdir ${HELPDIR}; \
|
echo mkdir $T${HELPDIR}; \
|
||||||
mkdir ${HELPDIR}; \
|
mkdir $T${HELPDIR}; \
|
||||||
echo ${CHMOD} 0755 ${HELPDIR}; \
|
if [ ! -d "$T${HELPDIR}" ]; then \
|
||||||
${CHMOD} 0755 ${HELPDIR}; \
|
echo mkdir -p "$T${HELPDIR}"; \
|
||||||
|
mkdir -p "$T${HELPDIR}"; \
|
||||||
|
fi; \
|
||||||
|
echo ${CHMOD} 0755 $T${HELPDIR}; \
|
||||||
|
${CHMOD} 0755 $T${HELPDIR}; \
|
||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}for i in ${STD_HELP_FILES} ${BLT_HELP_FILES} builtin \
|
-${Q}for i in ${STD_HELP_FILES} ${BLT_HELP_FILES} builtin \
|
||||||
full ${DETAIL_HELP} ${SINGULAR_FILES}; do \
|
full ${DETAIL_HELP} ${SINGULAR_FILES}; do \
|
||||||
if ${CMP} -s $$i ${HELPDIR}/$$i; then \
|
if ${CMP} -s $$i $T${HELPDIR}/$$i; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
rm -f ${HELPDIR}/$$i.new; \
|
rm -f $T${HELPDIR}/$$i.new; \
|
||||||
cp -f $$i ${HELPDIR}/$$i.new; \
|
cp -f $$i $T${HELPDIR}/$$i.new; \
|
||||||
${CHMOD} 0444 ${HELPDIR}/$$i.new; \
|
${CHMOD} 0444 $T${HELPDIR}/$$i.new; \
|
||||||
mv -f ${HELPDIR}/$$i.new ${HELPDIR}/$$i; \
|
mv -f $T${HELPDIR}/$$i.new $T${HELPDIR}/$$i; \
|
||||||
echo "installed ${HELPDIR}/$$i"; \
|
echo "installed $T${HELPDIR}/$$i"; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
-${Q}if ${CMP} -s obj.file ${HELPDIR}/obj; then \
|
-${Q}if ${CMP} -s obj.file $T${HELPDIR}/obj; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
rm -f ${HELPDIR}/obj.new; \
|
rm -f $T${HELPDIR}/obj.new; \
|
||||||
cp -f obj.file ${HELPDIR}/obj.new; \
|
cp -f obj.file $T${HELPDIR}/obj.new; \
|
||||||
${CHMOD} 0444 ${HELPDIR}/obj.new; \
|
${CHMOD} 0444 $T${HELPDIR}/obj.new; \
|
||||||
mv -f ${HELPDIR}/obj.new ${HELPDIR}/obj; \
|
mv -f $T${HELPDIR}/obj.new $T${HELPDIR}/obj; \
|
||||||
echo "installed ${HELPDIR}/obj"; \
|
echo "installed $T${HELPDIR}/obj"; \
|
||||||
fi
|
fi
|
||||||
|
@@ -12,8 +12,7 @@ DESCRIPTION
|
|||||||
|
|
||||||
Calc version strings can be of the form:
|
Calc version strings can be of the form:
|
||||||
|
|
||||||
x.y.ztw.v
|
x.y.z.w
|
||||||
x.y.ztw
|
|
||||||
x.y.z
|
x.y.z
|
||||||
x.y
|
x.y
|
||||||
|
|
||||||
@@ -22,7 +21,7 @@ DESCRIPTION
|
|||||||
|
|
||||||
EXAMPLE
|
EXAMPLE
|
||||||
> version()
|
> version()
|
||||||
"2.11.5t4.1"
|
"2.11.5.4"
|
||||||
|
|
||||||
LIMITS
|
LIMITS
|
||||||
none
|
none
|
||||||
@@ -49,8 +48,8 @@ SEE ALSO
|
|||||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
##
|
##
|
||||||
## @(#) $Revision: 29.2 $
|
## @(#) $Revision: 29.3 $
|
||||||
## @(#) $Id: version,v 29.2 2001/05/29 00:43:54 chongo Exp $
|
## @(#) $Id: version,v 29.3 2001/06/09 23:32:45 chongo Exp $
|
||||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/version,v $
|
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/version,v $
|
||||||
##
|
##
|
||||||
## Under source code control: 2001/05/28 17:38:01
|
## Under source code control: 2001/05/28 17:38:01
|
||||||
|
6
jump.h
6
jump.h
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.3 $
|
* @(#) $Revision: 29.4 $
|
||||||
* @(#) $Id: jump.h,v 29.3 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: jump.h,v 29.4 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/jump.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/jump.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1994/06/29 04:03:55
|
* Under source code control: 1994/06/29 04:03:55
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
#define __JUMP_H__
|
#define __JUMP_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "have_const.h"
|
# include "have_const.h"
|
||||||
#else
|
#else
|
||||||
# include <calc/have_const.h>
|
# include <calc/have_const.h>
|
||||||
|
6
label.h
6
label.h
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.3 $
|
* @(#) $Revision: 29.4 $
|
||||||
* @(#) $Id: label.h,v 29.3 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: label.h,v 29.4 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/label.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/label.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:48:33
|
* Under source code control: 1990/02/15 01:48:33
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
#define __LABEL_H__
|
#define __LABEL_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "zmath.h"
|
# include "zmath.h"
|
||||||
#else
|
#else
|
||||||
# include <calc/zmath.h>
|
# include <calc/zmath.h>
|
||||||
|
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.4 $
|
* @(#) $Revision: 29.5 $
|
||||||
* @(#) $Id: math_error.h,v 29.4 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: math_error.h,v 29.5 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/math_error.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/math_error.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1997/03/23 18:37:10
|
* Under source code control: 1997/03/23 18:37:10
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
#define __MATH_ERROR_H__
|
#define __MATH_ERROR_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "win32dll.h"
|
# include "win32dll.h"
|
||||||
#else
|
#else
|
||||||
# include <calc/win32dll.h>
|
# include <calc/win32dll.h>
|
||||||
|
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.5 $
|
* @(#) $Revision: 29.6 $
|
||||||
* @(#) $Id: opcodes.h,v 29.5 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: opcodes.h,v 29.6 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/opcodes.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/opcodes.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:48:35
|
* Under source code control: 1990/02/15 01:48:35
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
#define __OPCODES_H__
|
#define __OPCODES_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "win32dll.h"
|
# include "win32dll.h"
|
||||||
#else
|
#else
|
||||||
# include <calc/win32dll.h>
|
# include <calc/win32dll.h>
|
||||||
|
6
prime.h
6
prime.h
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.3 $
|
* @(#) $Revision: 29.4 $
|
||||||
* @(#) $Id: prime.h,v 29.3 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: prime.h,v 29.4 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/prime.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/prime.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1994/06/04 03:26:15
|
* Under source code control: 1994/06/04 03:26:15
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
#define __PRIME_H__
|
#define __PRIME_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "qmath.h"
|
# include "qmath.h"
|
||||||
# include "have_const.h"
|
# include "have_const.h"
|
||||||
#else
|
#else
|
||||||
|
6
qmath.h
6
qmath.h
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.4 $
|
* @(#) $Revision: 29.5 $
|
||||||
* @(#) $Id: qmath.h,v 29.4 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: qmath.h,v 29.5 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/qmath.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/qmath.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1993/07/30 19:42:47
|
* Under source code control: 1993/07/30 19:42:47
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
#define __QMATH_H__
|
#define __QMATH_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "zmath.h"
|
# include "zmath.h"
|
||||||
#else
|
#else
|
||||||
# include <calc/zmath.h>
|
# include <calc/zmath.h>
|
||||||
|
@@ -17,8 +17,8 @@
|
|||||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#
|
#
|
||||||
# @(#) $Revision: 29.11 $
|
# @(#) $Revision: 29.14 $
|
||||||
# @(#) $Id: Makefile,v 29.11 2001/05/28 23:54:53 chongo Exp $
|
# @(#) $Id: Makefile,v 29.14 2001/06/08 22:38:53 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/sample/RCS/Makefile,v $
|
# @(#) $Source: /usr/local/src/cmd/calc/sample/RCS/Makefile,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 1997/04/19 22:46:49
|
# Under source code control: 1997/04/19 22:46:49
|
||||||
@@ -104,6 +104,22 @@ LIBDIR= /usr/lib
|
|||||||
CSHAREDIR= ${SHAREDIR}/calc
|
CSHAREDIR= ${SHAREDIR}/calc
|
||||||
HELPDIR= ${LIBDIR}/help
|
HELPDIR= ${LIBDIR}/help
|
||||||
|
|
||||||
|
# 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 to
|
||||||
|
# install calc somewhere other than into the system area. For example
|
||||||
|
# when forming the calc rpm, the Makefile is called with T=$RPM_BUILD_ROOT.
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
# calc is installed under $T, as if one had to chroot under
|
||||||
|
# $T for calc to operate.
|
||||||
|
#
|
||||||
|
# If in doubt, use T=
|
||||||
|
#
|
||||||
|
T=
|
||||||
|
|
||||||
# Normally, the upper level makefile will set these values. We provide
|
# Normally, the upper level makefile will set these values. We provide
|
||||||
# a default here just in case you want to build from this directory.
|
# a default here just in case you want to build from this directory.
|
||||||
#
|
#
|
||||||
@@ -445,7 +461,7 @@ depend:
|
|||||||
#
|
#
|
||||||
##
|
##
|
||||||
|
|
||||||
echo_install.list: Makefile
|
echo_inst_files: Makefile
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@@ -1,98 +0,0 @@
|
|||||||
Summary: C-style arbitrary precision calculator
|
|
||||||
Name: calc
|
|
||||||
Version: ${VERSION}
|
|
||||||
Release: ${RELEASE}
|
|
||||||
Copyright: LGPL
|
|
||||||
Group: Applications/Engineering
|
|
||||||
Source: http://www.isthe.com/chongo/src/calc/calc-${VER_CALC}.tar.gz
|
|
||||||
BuildRoot: /var/tmp/%{name}-buildroot
|
|
||||||
|
|
||||||
%description
|
|
||||||
Calc is an interactive calculator which provides for easy large numeric
|
|
||||||
calculations, but which also can be easily programmed for difficult or
|
|
||||||
long calculations.
|
|
||||||
|
|
||||||
All numbers are represented as fractions with arbitrarily large numerators
|
|
||||||
and denominators which are always reduced to lowest terms. Real or
|
|
||||||
exponential format numbers are converted to the equivalent fraction.
|
|
||||||
One use enter decinal, hex, octal, binary and complex values.
|
|
||||||
|
|
||||||
Commands are statements in a C-like language, where each input line is
|
|
||||||
treated as the body of a procedure. You can define your own functions
|
|
||||||
by using the 'define' keyword, followed by a function declaration very
|
|
||||||
similar to C. Calc also comes with a rich set of builtin functions
|
|
||||||
and calc shell commands.
|
|
||||||
|
|
||||||
In addition to numeric global, local and static variables, Calc as
|
|
||||||
lists, associated arrays, matrices, byte blocks, dymanic strings and
|
|
||||||
user defined objects.
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%setup -q
|
|
||||||
|
|
||||||
%build
|
|
||||||
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
|
|
||||||
|
|
||||||
%install
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
mkdir -p $RPM_BUILD_ROOT${BINDIR}
|
|
||||||
mkdir -p $RPM_BUILD_ROOT${SHAREDIR}
|
|
||||||
mkdir -p $RPM_BUILD_ROOT${INCDIR}
|
|
||||||
mkdir -p $RPM_BUILD_ROOT${LIBDIR}
|
|
||||||
mkdir -p $RPM_BUILD_ROOT${CSHAREDIR}
|
|
||||||
mkdir -p $RPM_BUILD_ROOT${HELPDIR}
|
|
||||||
mkdir -p $RPM_BUILD_ROOT${INCDIRCALC}
|
|
||||||
mkdir -p $RPM_BUILD_ROOT${CUSTOMLIBDIR}
|
|
||||||
mkdir -p $RPM_BUILD_ROOT${CUSTOMHELPDIR}
|
|
||||||
mkdir -p $RPM_BUILD_ROOT${CUSTOMINCDIR}
|
|
||||||
mkdir -p $RPM_BUILD_ROOT${SCRIPTDIR}
|
|
||||||
mkdir -p $RPM_BUILD_ROOT${MANDIR}
|
|
||||||
|
|
||||||
install -m 0555 calc $RPM_BUILD_ROOT${BINDIR}
|
|
||||||
|
|
||||||
(cd help
|
|
||||||
install -m 0444 ${STD_HELP_FILES} $RPM_BUILD_ROOT${HELPDIR}
|
|
||||||
install -m 0444 ${BLT_HELP_FILES} $RPM_BUILD_ROOT${HELPDIR}
|
|
||||||
install -m 0444 builtin full $RPM_BUILD_ROOT${HELPDIR}
|
|
||||||
install -m 0444 ${DETAIL_HELP} $RPM_BUILD_ROOT${HELPDIR}
|
|
||||||
install -m 0444 ${SINGULAR_FILES} $RPM_BUILD_ROOT${HELPDIR}
|
|
||||||
install -m 0444 obj.file $RPM_BUILD_ROOT${HELPDIR}/obj
|
|
||||||
)
|
|
||||||
|
|
||||||
(cd cal; install -m 0444 ${CALC_FILES} $RPM_BUILD_ROOT${LIBDIR})
|
|
||||||
|
|
||||||
(cd custom
|
|
||||||
if [ ! -z "${INSTALL_H_SRC}" ]; then
|
|
||||||
install -m 0444 ${INSTALL_H_SRC} $RPM_BUILD_ROOT${CUSTOMINCDIR}
|
|
||||||
fi
|
|
||||||
install -m 0444 ${CUSTOM_CALC_FILES} $RPM_BUILD_ROOT${CUSTOMLIBDIR}
|
|
||||||
install -m 0444 ${CUSTOM_HELP} $RPM_BUILD_ROOT${CUSTOMHELPDIR}
|
|
||||||
if [ ! -z "${ALLOW_CUSTOM}" ]; then
|
|
||||||
install -m 0644 libcustcalc.a $RPM_BUILD_ROOT${CUSTOMLIBDIR}
|
|
||||||
${RANLIB} $RPM_BUILD_ROOT${CUSTOMLIBDIR}
|
|
||||||
fi
|
|
||||||
)
|
|
||||||
|
|
||||||
(cd cscript
|
|
||||||
install -m 0555 ${SCRIPT} $RPM_BUILD_ROOT${SCRIPTDIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
install -m 0444 libcalc.a $RPM_BUILD_ROOT${LIBDIR}
|
|
||||||
${RANLIB} $RPM_BUILD_ROOT${LIBDIR}
|
|
||||||
install -m 0444 ${LIB_H_SRC} $RPM_BUILD_ROOT${INCDIRCALC}
|
|
||||||
install -m 0444 ${BUILD_H_SRC} $RPM_BUILD_ROOT${INCDIRCALC}
|
|
||||||
install -m 0444 calc.1 $RPM_BUILD_ROOT${MANDIR}.${MANEXT}
|
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
%files -f install.list
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc BUGS README COPYING COPYING-LGPL HOWTO.INSTALL
|
|
||||||
%doc README LIBRARY README.WINDOWS calc.1
|
|
||||||
%doc help/resource help/errorcodes help/custom_cal help/new_custom
|
|
||||||
%doc help/cscript help/full
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* ${DATE} Landon Curt Noll <http://www.isthe.com/chongo/index.html>
|
|
||||||
- calc version ${VER_CALC}
|
|
6
string.h
6
string.h
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.3 $
|
* @(#) $Revision: 29.4 $
|
||||||
* @(#) $Id: string.h,v 29.3 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: string.h,v 29.4 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/string.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/string.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:48:36
|
* Under source code control: 1990/02/15 01:48:36
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
#define __CALCSTRING_H__
|
#define __CALCSTRING_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "zmath.h"
|
# include "zmath.h"
|
||||||
#else
|
#else
|
||||||
# include <calc/zmath.h>
|
# include <calc/zmath.h>
|
||||||
|
6
symbol.h
6
symbol.h
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.3 $
|
* @(#) $Revision: 29.4 $
|
||||||
* @(#) $Id: symbol.h,v 29.3 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: symbol.h,v 29.4 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/symbol.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/symbol.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:48:37
|
* Under source code control: 1990/02/15 01:48:37
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
#define __SYMBOL_H__
|
#define __SYMBOL_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "zmath.h"
|
# include "zmath.h"
|
||||||
#else
|
#else
|
||||||
# include <calc/zmath.h>
|
# include <calc/zmath.h>
|
||||||
|
6
token.h
6
token.h
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.3 $
|
* @(#) $Revision: 29.4 $
|
||||||
* @(#) $Id: token.h,v 29.3 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: token.h,v 29.4 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/token.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/token.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:48:37
|
* Under source code control: 1990/02/15 01:48:37
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
#define __TOKEN_H__
|
#define __TOKEN_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "zmath.h"
|
# include "zmath.h"
|
||||||
#else
|
#else
|
||||||
# include <calc/zmath.h>
|
# include <calc/zmath.h>
|
||||||
|
6
value.h
6
value.h
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.6 $
|
* @(#) $Revision: 29.7 $
|
||||||
* @(#) $Id: value.h,v 29.6 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: value.h,v 29.7 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/value.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/value.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1993/07/30 19:42:47
|
* Under source code control: 1993/07/30 19:42:47
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
#define __VALUE_H__
|
#define __VALUE_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "win32dll.h"
|
# include "win32dll.h"
|
||||||
# include "cmath.h"
|
# include "cmath.h"
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
166
version.c
166
version.c
@@ -19,8 +19,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.28 $
|
* @(#) $Revision: 29.37 $
|
||||||
* @(#) $Id: version.c,v 29.28 2001/06/01 11:27:38 chongo Exp $
|
* @(#) $Id: version.c,v 29.37 2001/12/31 22:12:35 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/version.c,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/version.c,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/05/22 11:00:58
|
* Under source code control: 1990/05/22 11:00:58
|
||||||
@@ -32,6 +32,9 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#if defined(CALC_VER)
|
#if defined(CALC_VER)
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@@ -43,7 +46,8 @@ static char *program;
|
|||||||
#define MAJOR_VER 2 /* major version */
|
#define MAJOR_VER 2 /* major version */
|
||||||
#define MINOR_VER 11 /* minor version */
|
#define MINOR_VER 11 /* minor version */
|
||||||
#define MAJOR_PATCH 5 /* patch level or 0 if no patch */
|
#define MAJOR_PATCH 5 /* patch level or 0 if no patch */
|
||||||
#define MINOR_PATCH "4.2" /* test number or empty string if no patch */
|
#define MINOR_PATCH 6 /* test number or 0 if no minor patch */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* calc version constants
|
* calc version constants
|
||||||
@@ -51,7 +55,7 @@ static char *program;
|
|||||||
int calc_major_ver = MAJOR_VER;
|
int calc_major_ver = MAJOR_VER;
|
||||||
int calc_minor_ver = MINOR_VER;
|
int calc_minor_ver = MINOR_VER;
|
||||||
int calc_major_patch = MAJOR_PATCH;
|
int calc_major_patch = MAJOR_PATCH;
|
||||||
char *calc_minor_patch = MINOR_PATCH;
|
int calc_minor_patch = MINOR_PATCH;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -95,7 +99,7 @@ char *Copyright = "\n"
|
|||||||
* This function returns a malloced version string. This version
|
* This function returns a malloced version string. This version
|
||||||
* string does not contain the title, just:
|
* string does not contain the title, just:
|
||||||
*
|
*
|
||||||
* x.y.ztw
|
* x.y.z.w
|
||||||
* x.y.z
|
* x.y.z
|
||||||
* x.y
|
* x.y
|
||||||
*/
|
*/
|
||||||
@@ -114,15 +118,17 @@ version(void)
|
|||||||
/*
|
/*
|
||||||
* form the version buffer
|
* form the version buffer
|
||||||
*/
|
*/
|
||||||
if (sizeof(MINOR_PATCH) > 1) {
|
if (MINOR_PATCH > 0) {
|
||||||
sprintf(verbuf,
|
snprintf(verbuf, BUFSIZ,
|
||||||
"%d.%d.%dt%s", calc_major_ver, calc_minor_ver,
|
"%d.%d.%d.%d", calc_major_ver, calc_minor_ver,
|
||||||
calc_major_patch, calc_minor_patch);
|
calc_major_patch, calc_minor_patch);
|
||||||
} else if (MAJOR_PATCH > 0) {
|
} else if (MAJOR_PATCH > 0) {
|
||||||
sprintf(verbuf,
|
snprintf(verbuf, BUFSIZ,
|
||||||
"%d.%d.%d", calc_major_ver, calc_minor_ver, calc_major_patch);
|
"%d.%d.%d", calc_major_ver,
|
||||||
|
calc_minor_ver, calc_major_patch);
|
||||||
} else {
|
} else {
|
||||||
sprintf(verbuf, "%d.%d", calc_major_ver, calc_minor_ver);
|
snprintf(verbuf, BUFSIZ,
|
||||||
|
"%d.%d", calc_major_ver, calc_minor_ver);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -131,7 +137,7 @@ version(void)
|
|||||||
stored_version = (char *)malloc(strlen(verbuf)+1);
|
stored_version = (char *)malloc(strlen(verbuf)+1);
|
||||||
if (stored_version == NULL) {
|
if (stored_version == NULL) {
|
||||||
fprintf(stderr, "%s: version formation value\n", program);
|
fprintf(stderr, "%s: version formation value\n", program);
|
||||||
exit(2);
|
exit(1);
|
||||||
}
|
}
|
||||||
strcpy(stored_version, verbuf);
|
strcpy(stored_version, verbuf);
|
||||||
|
|
||||||
@@ -146,76 +152,123 @@ version(void)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* print_rpm_version_release - print the rpm style version-release
|
* print_rpm_version - print just the version string, rpm style
|
||||||
*
|
*
|
||||||
* This function prints a version-release string, rpm style:
|
* This function prints a version string, rpm style:
|
||||||
*
|
*
|
||||||
* x.y.z-w
|
* x.y.z.w-r
|
||||||
* x.y.z-0
|
* x.y.z-r
|
||||||
* x.y-0
|
* x.y-r
|
||||||
|
*
|
||||||
|
* where 'r' comes from the content of the release file.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
print_rpm_version_release(void)
|
print_rpm_version(char *release)
|
||||||
{
|
{
|
||||||
|
FILE *file; /* open file */
|
||||||
|
char buf[BUFSIZ+1]; /* release file buffer */
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* obtain the release
|
||||||
|
*/
|
||||||
|
file = fopen(release, "r");
|
||||||
|
if (file == NULL) {
|
||||||
|
fprintf(stderr, "%s: cannot open %s: %s\n",
|
||||||
|
program, release, strerror(errno));
|
||||||
|
exit(2);
|
||||||
|
}
|
||||||
|
buf[BUFSIZ] = '\0';
|
||||||
|
if (fgets(buf, BUFSIZ, file) == NULL) {
|
||||||
|
fprintf(stderr, "%s: cannot read %s: %s\n",
|
||||||
|
program, release, strerror(errno));
|
||||||
|
exit(3);
|
||||||
|
}
|
||||||
|
p = strchr(buf, '\n');
|
||||||
|
if (p != NULL) {
|
||||||
|
*p = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* form the version buffer
|
* form the version buffer
|
||||||
*/
|
*/
|
||||||
if (sizeof(MINOR_PATCH) > 1) {
|
if (MINOR_PATCH > 0) {
|
||||||
printf("%d.%d.%d-%s\n", calc_major_ver, calc_minor_ver,
|
printf("%d.%d.%d.%d-%s\n", calc_major_ver, calc_minor_ver,
|
||||||
calc_major_patch, calc_minor_patch);
|
calc_major_patch, calc_minor_patch, buf);
|
||||||
} else if (MAJOR_PATCH > 0) {
|
} else if (MAJOR_PATCH > 0) {
|
||||||
printf("%d.%d.%d-0\n", calc_major_ver, calc_minor_ver,
|
printf("%d.%d.%d-%s\n", calc_major_ver, calc_minor_ver,
|
||||||
calc_major_patch);
|
calc_major_patch, buf);
|
||||||
} else {
|
} else {
|
||||||
printf("%d.%d-0\n", calc_major_ver, calc_minor_ver);
|
printf("%d.%d-%s\n", calc_major_ver, calc_minor_ver, buf);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* print_rpm_version - print just the version string, rpm style
|
* print_rpm_major - print just the major part version string
|
||||||
*
|
*
|
||||||
* This function prints a version string, rpm style:
|
* This function prints the major part version string:
|
||||||
*
|
*
|
||||||
* x.y.z
|
* x.y.z
|
||||||
* x.y
|
* x.y
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
print_rpm_version(void)
|
print_rpm_major(void)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* form the version buffer
|
* form the version buffer
|
||||||
*/
|
*/
|
||||||
if (MAJOR_PATCH > 0) {
|
if (MAJOR_PATCH > 0) {
|
||||||
printf("%d.%d.%d\n", calc_major_ver, calc_minor_ver,
|
printf("%d.%d.%d\n", calc_major_ver, calc_minor_ver,
|
||||||
calc_major_patch);
|
calc_major_patch);
|
||||||
} else {
|
} else {
|
||||||
printf("%d.%d\n", calc_major_ver, calc_minor_ver);
|
printf("%d.%d\n", calc_major_ver, calc_minor_ver);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* print_rpm_release - print just the release string, rpm style
|
* print_rpm_release - print just the rpm release
|
||||||
*
|
*
|
||||||
* This function prints a release string, rpm style:
|
* This function prints the rpm release:
|
||||||
*
|
*
|
||||||
* w
|
* r
|
||||||
* 0
|
*
|
||||||
|
* where 'r' comes from the content of the release file.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
print_rpm_release(void)
|
print_rpm_release(char *release)
|
||||||
{
|
{
|
||||||
|
FILE *file; /* open file */
|
||||||
|
char buf[BUFSIZ+1]; /* release file buffer */
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* obtain the release
|
||||||
|
*/
|
||||||
|
file = fopen(release, "r");
|
||||||
|
if (file == NULL) {
|
||||||
|
fprintf(stderr, "%s: cannot open %s: %s\n",
|
||||||
|
program, release, strerror(errno));
|
||||||
|
exit(2);
|
||||||
|
}
|
||||||
|
buf[BUFSIZ] = '\0';
|
||||||
|
if (fgets(buf, BUFSIZ, file) == NULL) {
|
||||||
|
fprintf(stderr, "%s: cannot read %s: %s\n",
|
||||||
|
program, release, strerror(errno));
|
||||||
|
exit(3);
|
||||||
|
}
|
||||||
|
p = strchr(buf, '\n');
|
||||||
|
if (p != NULL) {
|
||||||
|
*p = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* form the version buffer
|
* form the version buffer
|
||||||
*/
|
*/
|
||||||
if (sizeof(MINOR_PATCH) > 1) {
|
printf("%s\n", buf);
|
||||||
printf("%s\n", calc_minor_patch);
|
|
||||||
} else {
|
|
||||||
printf("0\n");
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -227,17 +280,26 @@ print_rpm_release(void)
|
|||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
program = argv[0];
|
program = argv[0];
|
||||||
if (argc == 2 && strcmp(argv[1], "-R") == 0) {
|
if (argc == 3 && strcmp(argv[1], "-r") == 0) {
|
||||||
print_rpm_version_release();
|
print_rpm_version(argv[2]);
|
||||||
} else if (argc == 2 && strcmp(argv[1], "-v") == 0) {
|
|
||||||
print_rpm_version();
|
} else if (argc == 3 && strcmp(argv[1], "-R") == 0) {
|
||||||
} else if (argc == 2 && strcmp(argv[1], "-r") == 0) {
|
print_rpm_release(argv[2]);
|
||||||
print_rpm_release();
|
|
||||||
} else {
|
} else if (argc == 2 && strcmp(argv[1], "-V") == 0) {
|
||||||
printf("%s\n", version());
|
print_rpm_major();
|
||||||
}
|
|
||||||
return 0;
|
} else if (argc == 1) {
|
||||||
|
printf("%s\n", version());
|
||||||
|
|
||||||
|
} else {
|
||||||
|
fprintf(stderr,
|
||||||
|
"usage: %s [-V] [-R release_file] [-r release_file]\n",
|
||||||
|
program);
|
||||||
|
exit(4);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CALC_VER */
|
#endif /* CALC_VER */
|
||||||
|
6
zmath.h
6
zmath.h
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.6 $
|
* @(#) $Revision: 29.7 $
|
||||||
* @(#) $Id: zmath.h,v 29.6 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: zmath.h,v 29.7 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/zmath.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/zmath.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1993/07/30 19:42:48
|
* Under source code control: 1993/07/30 19:42:48
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
#define __ZMATH_H__
|
#define __ZMATH_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "win32dll.h"
|
# include "win32dll.h"
|
||||||
# include "alloc.h"
|
# include "alloc.h"
|
||||||
# include "endian_calc.h"
|
# include "endian_calc.h"
|
||||||
|
6
zrand.h
6
zrand.h
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.4 $
|
* @(#) $Revision: 29.5 $
|
||||||
* @(#) $Id: zrand.h,v 29.4 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: zrand.h,v 29.5 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/zrand.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/zrand.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1995/01/07 09:45:26
|
* Under source code control: 1995/01/07 09:45:26
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
#define __ZRAND_H__
|
#define __ZRAND_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "value.h"
|
# include "value.h"
|
||||||
# include "have_const.h"
|
# include "have_const.h"
|
||||||
#else
|
#else
|
||||||
|
@@ -17,8 +17,8 @@
|
|||||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* @(#) $Revision: 29.3 $
|
* @(#) $Revision: 29.4 $
|
||||||
* @(#) $Id: zrandom.h,v 29.3 2001/05/29 00:16:53 chongo Exp $
|
* @(#) $Id: zrandom.h,v 29.4 2001/06/08 21:00:58 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/zrandom.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/zrandom.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1997/02/15 04:01:56
|
* Under source code control: 1997/02/15 04:01:56
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
#define __ZRANDOM_H__
|
#define __ZRANDOM_H__
|
||||||
|
|
||||||
|
|
||||||
#if defined(SRC) /* if we are building from the calc source tree */
|
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||||
# include "value.h"
|
# include "value.h"
|
||||||
# include "have_const.h"
|
# include "have_const.h"
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user