mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Compare commits
3 Commits
2.11.5t4.5
...
2.11.5.7
Author | SHA1 | Date | |
---|---|---|---|
|
7e40db44e3 | ||
|
a57ee19ca5 | ||
|
a6e226fa80 |
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
|
||||||
|
67
CHANGES
67
CHANGES
@@ -1,4 +1,57 @@
|
|||||||
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.
|
||||||
|
|
||||||
|
Removed an obsolete reference to TOPDIR. This was fixed thanks to
|
||||||
|
a bug report by Clifford Kite <kite_public1 at ev1 dot net>.
|
||||||
|
|
||||||
|
Fixed calc man page so that is refers to -f instead of the old -S flag.
|
||||||
|
Fixed thanks to Clifford Kite <kite_public1 at ev1 dot net> for
|
||||||
|
point this out.
|
||||||
|
|
||||||
|
All for loops end with /dev/null to avoid any problems related
|
||||||
|
to systems that cannot grok empty for loops.
|
||||||
|
|
||||||
|
Changed the libcalc functions creal and cimag to c_real and c_imag
|
||||||
|
to about conflicts with new libc such as those used by gcc v3.
|
||||||
|
Thanks Eli Zaretskii <eliz at is dot elta dot co dot il> and
|
||||||
|
Martin Buck <m at rtin-buck dot de> for alerting us to this conflict.
|
||||||
|
|
||||||
|
The Makefile no longer hard code's /usr/include. Instead it uses
|
||||||
|
the ${INCDIR} Makefile variable. Thanks goes to Eli Zaretskii
|
||||||
|
<eliz at is dot elta dot co dot il> for pointing out this inconsistency.
|
||||||
|
|
||||||
|
Added mods to support compilation under DJGPP. DJGPP runs on 386
|
||||||
|
and newer PCs running DOS or dos-compatible operating systems.
|
||||||
|
See http://www.delorie.com/djgpp/. Thanks goes to Eli Zaretskii
|
||||||
|
<eliz at is dot elta dot co dot il> for sending in these mods.
|
||||||
|
|
||||||
|
Updated README.WINDOWS to include information on building with DJGPP.
|
||||||
|
|
||||||
|
The pld folks are building RPMs based on our calc distrbutions.
|
||||||
|
See: ftp://ftp.pld.org.pl/dists/ra/PLD/i686/PLD/RPMS or
|
||||||
|
http://ftp.pld.org.pl/dists/ra/PLD/i686/PLD/RPMS more information.
|
||||||
|
We appreciate their work in this regard. In the next release, we
|
||||||
|
plan to also build and release our own RPMs based on their efforts.
|
||||||
|
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
@@ -60,9 +113,9 @@ The following are the changes from calc version 2.11.5t4.1 to date:
|
|||||||
Makefile has not changed. The Makefile.linux only in minor ways
|
Makefile has not changed. The Makefile.linux only in minor ways
|
||||||
needed to build calc rpms.
|
needed to build calc rpms.
|
||||||
|
|
||||||
Added $T Makefile variable, top level directory under which calc
|
Added $T Makefile variable. $T is the top level directory under
|
||||||
will be installed. The calc install is performed under $T, the
|
which calc will be installed. The calc install is performed under $T,
|
||||||
calc build is performed under /. The purpose for $T is to allow
|
the calc build is performed under /. The purpose for $T is to allow
|
||||||
someone to install calc somewhere other than into the system area.
|
someone to install calc somewhere other than into the system area.
|
||||||
For examplewhen forming the calc rpm, the Makefile is called with
|
For examplewhen forming the calc rpm, the Makefile is called with
|
||||||
T=$RPM_BUILD_ROOT. If $T is empty, calc is installed under /.
|
T=$RPM_BUILD_ROOT. If $T is empty, calc is installed under /.
|
||||||
@@ -204,7 +257,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 ...
|
||||||
@@ -5358,8 +5411,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.39 $
|
## @(#) $Revision: 29.46 $
|
||||||
## @(#) $Id: CHANGES,v 29.39 2001/06/08 22:32:42 chongo Exp $
|
## @(#) $Id: CHANGES,v 29.46 2002/03/12 10:58:31 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
|
||||||
|
@@ -19,12 +19,28 @@ Installing calc in 4 easy steps:
|
|||||||
As shipped the Makefile assumes 'more'. On your system
|
As shipped the Makefile assumes 'more'. On your system
|
||||||
you may find 'less' to be a better pager.
|
you may find 'less' to be a better pager.
|
||||||
|
|
||||||
Set TOPDIR to be the place under which help files, calc,
|
Set BINDIR to the directory where calc is installed.
|
||||||
include files and calc libs are to be installed. As shipped
|
As shipped the Makefile assumes BINDIR is /usr/local/bin.
|
||||||
the Makefile assumes a TOPDIR of /usr/local/lib.
|
|
||||||
|
|
||||||
Set BINDIR to the place where calc is installed. As shipped
|
Set SHAREDIR to the place where shared files are kept.
|
||||||
the Makefile assumes a BINDIR /usr/local/bin.
|
As shipped the Makefile assumes that SHAREDIR is /usr/share.
|
||||||
|
Calc places its shared files under ${SHAREDIR}/calc.
|
||||||
|
|
||||||
|
Set INCDIR to the place where .h header files are kept.
|
||||||
|
As shipped the Makefile assumes that INCDIR is /usr/include.
|
||||||
|
Calc places its .h header files under ${INCDIR}/calc.
|
||||||
|
|
||||||
|
Set LIBDIR to be the place under which help files, calc,
|
||||||
|
include files and calc libs are to be installed.
|
||||||
|
As shipped the Makefile assumes a LIBDIR of /usr/lib.
|
||||||
|
The calc library is installed as ${LIBDIR}/libcalc.a.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
@@ -65,8 +81,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.4 $
|
||||||
## @(#) $Id: HOWTO.INSTALL,v 29.2 2000/06/07 14:02:13 chongo Exp $
|
## @(#) $Id: HOWTO.INSTALL,v 29.4 2002/03/12 09:03:17 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
|
||||||
|
209
Makefile
209
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.36 $$
|
MAKEFILE_REV= $$Revision: 29.46 $$
|
||||||
# @(#) $Id: Makefile.ship,v 29.36 2001/06/08 23:00:19 chongo Exp $
|
# @(#) $Id: Makefile.ship,v 29.46 2002/03/12 10:43:05 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
|
||||||
@@ -47,6 +47,8 @@ MAKEFILE_REV= $$Revision: 29.36 $$
|
|||||||
# -DUSE_SGTTY use struct sgttyb from <sys/ioctl.h>
|
# -DUSE_SGTTY use struct sgttyb from <sys/ioctl.h>
|
||||||
# -DUSE_NOTHING windoz system, don't use any of them
|
# -DUSE_NOTHING windoz system, don't use any of them
|
||||||
#
|
#
|
||||||
|
# Select TERMCONTROL= -DUSE_TERMIOS for DJGPP.
|
||||||
|
#
|
||||||
# If in doubt, leave TERMCONTROL empty.
|
# If in doubt, leave TERMCONTROL empty.
|
||||||
#
|
#
|
||||||
TERMCONTROL=
|
TERMCONTROL=
|
||||||
@@ -87,6 +89,8 @@ HAVE_VSPRINTF=
|
|||||||
# a make clobber and try -DLITTLE_ENDIAN. If that fails, ask a wizard
|
# a make clobber and try -DLITTLE_ENDIAN. If that fails, ask a wizard
|
||||||
# for help.
|
# for help.
|
||||||
#
|
#
|
||||||
|
# Select BYTE_ORDER= -DLITTLE_ENDIAN for DJGPP.
|
||||||
|
#
|
||||||
BYTE_ORDER=
|
BYTE_ORDER=
|
||||||
#BYTE_ORDER= -DBIG_ENDIAN
|
#BYTE_ORDER= -DBIG_ENDIAN
|
||||||
#BYTE_ORDER= -DLITTLE_ENDIAN
|
#BYTE_ORDER= -DLITTLE_ENDIAN
|
||||||
@@ -99,9 +103,11 @@ BYTE_ORDER=
|
|||||||
# In order to avoid make brain damage in some systems, we avoid placing
|
# In order to avoid make brain damage in some systems, we avoid placing
|
||||||
# a space after the ='s below.
|
# a space after the ='s below.
|
||||||
#
|
#
|
||||||
|
# Select LONG_BITS= 32 for DJGPP.
|
||||||
|
#
|
||||||
LONG_BITS=
|
LONG_BITS=
|
||||||
#LONG_BITS=32
|
#LONG_BITS= 32
|
||||||
#LONG_BITS=64
|
#LONG_BITS= 64
|
||||||
|
|
||||||
# Determine if your compiler supports the long long type and if so, its length
|
# Determine if your compiler supports the long long type and if so, its length
|
||||||
#
|
#
|
||||||
@@ -119,6 +125,8 @@ LONG_BITS=
|
|||||||
# If in doubt, try to leave LONGLONG_BITS empty. Do a 'make check'
|
# If in doubt, try to leave LONGLONG_BITS empty. Do a 'make check'
|
||||||
# and change to 'LONGLONG_BITS= 0' if you encounter problems.
|
# and change to 'LONGLONG_BITS= 0' if you encounter problems.
|
||||||
#
|
#
|
||||||
|
# Select LONGLONG_BITS= 64 for DJGPP.
|
||||||
|
#
|
||||||
#LONGLONG_BITS= 0
|
#LONGLONG_BITS= 0
|
||||||
LONGLONG_BITS=
|
LONGLONG_BITS=
|
||||||
#LONGLONG_BITS= 64
|
#LONGLONG_BITS= 64
|
||||||
@@ -141,6 +149,8 @@ HAVE_FPOS=
|
|||||||
# to determine if fpos_t has a __pos structure element. If HAVE_FPOS_POS
|
# to determine if fpos_t has a __pos structure element. If HAVE_FPOS_POS
|
||||||
# is set to -DHAVE_NO_FPOS_POS, then calc assume there is no __pos element.
|
# is set to -DHAVE_NO_FPOS_POS, then calc assume there is no __pos element.
|
||||||
#
|
#
|
||||||
|
# Select HAVE_FPOS_POS= -DHAVE_NO_FPOS_POS for DJGPP.
|
||||||
|
#
|
||||||
# If in doubt, leave HAVE_FPOS_POS empty and this Makefile will figure it out.
|
# If in doubt, leave HAVE_FPOS_POS empty and this Makefile will figure it out.
|
||||||
#
|
#
|
||||||
HAVE_FPOS_POS=
|
HAVE_FPOS_POS=
|
||||||
@@ -151,11 +161,11 @@ HAVE_FPOS_POS=
|
|||||||
# If FPOS_POS_BITS is empty, then the Makefile will determine the size of
|
# If FPOS_POS_BITS is empty, then the Makefile will determine the size of
|
||||||
# the file position value of the __pos element.
|
# the file position value of the __pos element.
|
||||||
#
|
#
|
||||||
# If in doubt, leave FPOS_POS_BITS empty and this Makefile will figure it out.
|
|
||||||
#
|
|
||||||
# If there is no __pos element in fpos_t (say because fpos_t is a scalar),
|
# If there is no __pos element in fpos_t (say because fpos_t is a scalar),
|
||||||
# leave FPOS_POS_BITS blank.
|
# leave FPOS_POS_BITS blank.
|
||||||
#
|
#
|
||||||
|
# If in doubt, leave FPOS_POS_BITS empty and this Makefile will figure it out.
|
||||||
|
#
|
||||||
FPOS_POS_BITS=
|
FPOS_POS_BITS=
|
||||||
#FPOS_POS_BITS= 32
|
#FPOS_POS_BITS= 32
|
||||||
#FPOS_POS_BITS= 64
|
#FPOS_POS_BITS= 64
|
||||||
@@ -165,6 +175,8 @@ FPOS_POS_BITS=
|
|||||||
# If FPOS_BITS is empty, then the Makefile will determine the size of
|
# If FPOS_BITS is empty, then the Makefile will determine the size of
|
||||||
# the file position value.
|
# the file position value.
|
||||||
#
|
#
|
||||||
|
# Select FPOS_BITS= 32 for DJGPP.
|
||||||
|
#
|
||||||
# If in doubt, leave FPOS_BITS empty and this Makefile will figure it out.
|
# If in doubt, leave FPOS_BITS empty and this Makefile will figure it out.
|
||||||
#
|
#
|
||||||
FPOS_BITS=
|
FPOS_BITS=
|
||||||
@@ -176,6 +188,8 @@ FPOS_BITS=
|
|||||||
# If OFF_T_BITS is empty, then the Makefile will determine the size of
|
# If OFF_T_BITS is empty, then the Makefile will determine the size of
|
||||||
# the file offset value.
|
# the file offset value.
|
||||||
#
|
#
|
||||||
|
# Select OFF_T_BITS= 32 for DJGPP.
|
||||||
|
#
|
||||||
# If in doubt, leave OFF_T_BITS empty and this Makefile will figure it out.
|
# If in doubt, leave OFF_T_BITS empty and this Makefile will figure it out.
|
||||||
#
|
#
|
||||||
OFF_T_BITS=
|
OFF_T_BITS=
|
||||||
@@ -187,6 +201,8 @@ OFF_T_BITS=
|
|||||||
# If DEV_BITS is empty, then the Makefile will determine the size of
|
# If DEV_BITS is empty, then the Makefile will determine the size of
|
||||||
# the dev_t device value
|
# the dev_t device value
|
||||||
#
|
#
|
||||||
|
# Select DEV_BITS= 32 for DJGPP.
|
||||||
|
#
|
||||||
# If in doubt, leave DEV_BITS empty and this Makefile will figure it out.
|
# If in doubt, leave DEV_BITS empty and this Makefile will figure it out.
|
||||||
#
|
#
|
||||||
DEV_BITS=
|
DEV_BITS=
|
||||||
@@ -199,6 +215,8 @@ DEV_BITS=
|
|||||||
# If INODE_BITS is empty, then the Makefile will determine the size of
|
# If INODE_BITS is empty, then the Makefile will determine the size of
|
||||||
# the ino_t inode value
|
# the ino_t inode value
|
||||||
#
|
#
|
||||||
|
# Select INODE_BITS= 32 for DJGPP.
|
||||||
|
#
|
||||||
# If in doubt, leave INODE_BITS empty and this Makefile will figure it out.
|
# If in doubt, leave INODE_BITS empty and this Makefile will figure it out.
|
||||||
#
|
#
|
||||||
INODE_BITS=
|
INODE_BITS=
|
||||||
@@ -291,6 +309,8 @@ HAVE_MEMMOVE=
|
|||||||
# -DHAVE_NO_USTAT, then calc will use internal functions to simulate
|
# -DHAVE_NO_USTAT, then calc will use internal functions to simulate
|
||||||
# the memory move function that does correct overlapping memory modes.
|
# the memory move function that does correct overlapping memory modes.
|
||||||
#
|
#
|
||||||
|
# Select HAVE_USTAT= -DHAVE_NO_USTAT for DJGPP.
|
||||||
|
#
|
||||||
# If in doubt, leave HAVE_USTAT empty and this Makefile will figure it out.
|
# If in doubt, leave HAVE_USTAT empty and this Makefile will figure it out.
|
||||||
#
|
#
|
||||||
HAVE_USTAT=
|
HAVE_USTAT=
|
||||||
@@ -303,6 +323,8 @@ HAVE_USTAT=
|
|||||||
# -DHAVE_NO_GETSID, then calc will use internal functions to simulate
|
# -DHAVE_NO_GETSID, then calc will use internal functions to simulate
|
||||||
# the memory move function that does correct overlapping memory modes.
|
# the memory move function that does correct overlapping memory modes.
|
||||||
#
|
#
|
||||||
|
# Select HAVE_GETSID= -DHAVE_NO_GETSID for DJGPP.
|
||||||
|
#
|
||||||
# If in doubt, leave HAVE_GETSID empty and this Makefile will figure it out.
|
# If in doubt, leave HAVE_GETSID empty and this Makefile will figure it out.
|
||||||
#
|
#
|
||||||
HAVE_GETSID=
|
HAVE_GETSID=
|
||||||
@@ -315,6 +337,8 @@ HAVE_GETSID=
|
|||||||
# -DHAVE_NO_GETPGID, then calc will use internal functions to simulate
|
# -DHAVE_NO_GETPGID, then calc will use internal functions to simulate
|
||||||
# the memory move function that does correct overlapping memory modes.
|
# the memory move function that does correct overlapping memory modes.
|
||||||
#
|
#
|
||||||
|
# Select HAVE_GETPGID= -DHAVE_NO_GETPGID for DJGPP.
|
||||||
|
#
|
||||||
# If in doubt, leave HAVE_GETPGID empty and this Makefile will figure it out.
|
# If in doubt, leave HAVE_GETPGID empty and this Makefile will figure it out.
|
||||||
#
|
#
|
||||||
HAVE_GETPGID=
|
HAVE_GETPGID=
|
||||||
@@ -327,6 +351,8 @@ HAVE_GETPGID=
|
|||||||
# -DHAVE_NO_GETTIME, then calc will use internal functions to simulate
|
# -DHAVE_NO_GETTIME, then calc will use internal functions to simulate
|
||||||
# the memory move function that does correct overlapping memory modes.
|
# the memory move function that does correct overlapping memory modes.
|
||||||
#
|
#
|
||||||
|
# Select HAVE_GETTIME= -DHAVE_NO_GETTIME for DJGPP.
|
||||||
|
#
|
||||||
# If in doubt, leave HAVE_GETTIME empty and this Makefile will figure it out.
|
# If in doubt, leave HAVE_GETTIME empty and this Makefile will figure it out.
|
||||||
#
|
#
|
||||||
HAVE_GETTIME=
|
HAVE_GETTIME=
|
||||||
@@ -339,6 +365,8 @@ HAVE_GETTIME=
|
|||||||
# -DHAVE_NO_GETPRID, then calc will use internal functions to simulate
|
# -DHAVE_NO_GETPRID, then calc will use internal functions to simulate
|
||||||
# the memory move function that does correct overlapping memory modes.
|
# the memory move function that does correct overlapping memory modes.
|
||||||
#
|
#
|
||||||
|
# Select HAVE_GETPRID= -DHAVE_NO_GETPRID for DJGPP.
|
||||||
|
#
|
||||||
# If in doubt, leave HAVE_GETPRID empty and this Makefile will figure it out.
|
# If in doubt, leave HAVE_GETPRID empty and this Makefile will figure it out.
|
||||||
#
|
#
|
||||||
HAVE_GETPRID=
|
HAVE_GETPRID=
|
||||||
@@ -350,6 +378,8 @@ HAVE_GETPRID=
|
|||||||
# HAVE_URANDOM_H= YES assume that /dev/urandom exists
|
# HAVE_URANDOM_H= YES assume that /dev/urandom exists
|
||||||
# HAVE_URANDOM_H= NO assume that /dev/urandom does not exist
|
# HAVE_URANDOM_H= NO assume that /dev/urandom does not exist
|
||||||
#
|
#
|
||||||
|
# Select HAVE_URANDOM_H= NO for DJGPP.
|
||||||
|
#
|
||||||
# When in doubt, leave HAVE_URANDOM_H empty.
|
# When in doubt, leave HAVE_URANDOM_H empty.
|
||||||
#
|
#
|
||||||
HAVE_URANDOM_H=
|
HAVE_URANDOM_H=
|
||||||
@@ -391,10 +421,12 @@ HAVE_STRDUP=
|
|||||||
# ALIGN32= -DMUST_ALIGN32 force 32 bit alignment
|
# ALIGN32= -DMUST_ALIGN32 force 32 bit alignment
|
||||||
# ALIGN32= -UMUST_ALIGN32 allow non-alignment of 32 bit accesses
|
# ALIGN32= -UMUST_ALIGN32 allow non-alignment of 32 bit accesses
|
||||||
#
|
#
|
||||||
|
# Select ALIGN32= -UMUST_ALIGN32 for DJGPP.
|
||||||
|
#
|
||||||
# When in doubt, be safe and pick ALIGN32=-DMUST_ALIGN32.
|
# When in doubt, be safe and pick ALIGN32=-DMUST_ALIGN32.
|
||||||
#
|
#
|
||||||
#ALIGN32=
|
ALIGN32=
|
||||||
ALIGN32= -DMUST_ALIGN32
|
#ALIGN32= -DMUST_ALIGN32
|
||||||
#ALIGN32= -UMUST_ALIGN32
|
#ALIGN32= -UMUST_ALIGN32
|
||||||
|
|
||||||
# Determine if we have the <malloc.h> include file.
|
# Determine if we have the <malloc.h> include file.
|
||||||
@@ -403,6 +435,8 @@ ALIGN32= -DMUST_ALIGN32
|
|||||||
# HAVE_MALLOC_H= YES assume that the include file exists
|
# HAVE_MALLOC_H= YES assume that the include file exists
|
||||||
# HAVE_MALLOC_H= NO assume that the include file does not exist
|
# HAVE_MALLOC_H= NO assume that the include file does not exist
|
||||||
#
|
#
|
||||||
|
# Select HAVE_MALLOC_H= YES for DJGPP.
|
||||||
|
#
|
||||||
# When in doubt, leave HAVE_MALLOC_H empty.
|
# When in doubt, leave HAVE_MALLOC_H empty.
|
||||||
#
|
#
|
||||||
HAVE_MALLOC_H=
|
HAVE_MALLOC_H=
|
||||||
@@ -415,6 +449,8 @@ HAVE_MALLOC_H=
|
|||||||
# HAVE_STDLIB_H= YES assume that the include file exists
|
# HAVE_STDLIB_H= YES assume that the include file exists
|
||||||
# HAVE_STDLIB_H= NO assume that the include file does not exist
|
# HAVE_STDLIB_H= NO assume that the include file does not exist
|
||||||
#
|
#
|
||||||
|
# Select HAVE_STDLIB_H= YES for DJGPP.
|
||||||
|
#
|
||||||
# When in doubt, leave HAVE_STDLIB_H empty.
|
# When in doubt, leave HAVE_STDLIB_H empty.
|
||||||
#
|
#
|
||||||
HAVE_STDLIB_H=
|
HAVE_STDLIB_H=
|
||||||
@@ -427,6 +463,8 @@ HAVE_STDLIB_H=
|
|||||||
# HAVE_STRING_H= YES assume that the include file exists
|
# HAVE_STRING_H= YES assume that the include file exists
|
||||||
# HAVE_STRING_H= NO assume that the include file does not exist
|
# HAVE_STRING_H= NO assume that the include file does not exist
|
||||||
#
|
#
|
||||||
|
# Select HAVE_STRING_H= YES for DJGPP.
|
||||||
|
#
|
||||||
# When in doubt, leave HAVE_STRING_H empty.
|
# When in doubt, leave HAVE_STRING_H empty.
|
||||||
#
|
#
|
||||||
HAVE_STRING_H=
|
HAVE_STRING_H=
|
||||||
@@ -439,6 +477,8 @@ HAVE_STRING_H=
|
|||||||
# HAVE_TIMES_H= YES assume that the include file exists
|
# HAVE_TIMES_H= YES assume that the include file exists
|
||||||
# HAVE_TIMES_H= NO assume that the include file does not exist
|
# HAVE_TIMES_H= NO assume that the include file does not exist
|
||||||
#
|
#
|
||||||
|
# Select HAVE_TIMES_H= NO for DJGPP.
|
||||||
|
#
|
||||||
# When in doubt, leave HAVE_TIMES_H empty.
|
# When in doubt, leave HAVE_TIMES_H empty.
|
||||||
#
|
#
|
||||||
HAVE_TIMES_H=
|
HAVE_TIMES_H=
|
||||||
@@ -451,6 +491,8 @@ HAVE_TIMES_H=
|
|||||||
# HAVE_SYS_TIMES_H= YES assume that the include file exists
|
# HAVE_SYS_TIMES_H= YES assume that the include file exists
|
||||||
# HAVE_SYS_TIMES_H= NO assume that the include file does not exist
|
# HAVE_SYS_TIMES_H= NO assume that the include file does not exist
|
||||||
#
|
#
|
||||||
|
# Select HAVE_SYS_TIMES_H= YES for DJGPP.
|
||||||
|
#
|
||||||
# When in doubt, leave HAVE_SYS_TIMES_H empty.
|
# When in doubt, leave HAVE_SYS_TIMES_H empty.
|
||||||
#
|
#
|
||||||
HAVE_SYS_TIMES_H=
|
HAVE_SYS_TIMES_H=
|
||||||
@@ -463,6 +505,8 @@ HAVE_SYS_TIMES_H=
|
|||||||
# HAVE_TIME_H= YES assume that the include file exists
|
# HAVE_TIME_H= YES assume that the include file exists
|
||||||
# HAVE_TIME_H= NO assume that the include file does not exist
|
# HAVE_TIME_H= NO assume that the include file does not exist
|
||||||
#
|
#
|
||||||
|
# Select HAVE_TIME_H= YES for DJGPP.
|
||||||
|
#
|
||||||
# When in doubt, leave HAVE_TIME_H empty.
|
# When in doubt, leave HAVE_TIME_H empty.
|
||||||
#
|
#
|
||||||
HAVE_TIME_H=
|
HAVE_TIME_H=
|
||||||
@@ -475,6 +519,8 @@ HAVE_TIME_H=
|
|||||||
# HAVE_SYS_TIME_H= YES assume that the include file exists
|
# HAVE_SYS_TIME_H= YES assume that the include file exists
|
||||||
# HAVE_SYS_TIME_H= NO assume that the include file does not exist
|
# HAVE_SYS_TIME_H= NO assume that the include file does not exist
|
||||||
#
|
#
|
||||||
|
# Select HAVE_SYS_TIME_H= YES for DJGPP.
|
||||||
|
#
|
||||||
# When in doubt, leave HAVE_SYS_TIME_H empty.
|
# When in doubt, leave HAVE_SYS_TIME_H empty.
|
||||||
#
|
#
|
||||||
HAVE_SYS_TIME_H=
|
HAVE_SYS_TIME_H=
|
||||||
@@ -487,6 +533,8 @@ HAVE_SYS_TIME_H=
|
|||||||
# HAVE_UNISTD_H= YES assume that the include file exists
|
# HAVE_UNISTD_H= YES assume that the include file exists
|
||||||
# HAVE_UNISTD_H= NO assume that the include file does not exist
|
# HAVE_UNISTD_H= NO assume that the include file does not exist
|
||||||
#
|
#
|
||||||
|
# Select HAVE_UNISTD_H= YES for DJGPP.
|
||||||
|
#
|
||||||
# When in doubt, leave HAVE_UNISTD_H empty.
|
# When in doubt, leave HAVE_UNISTD_H empty.
|
||||||
#
|
#
|
||||||
HAVE_UNISTD_H=
|
HAVE_UNISTD_H=
|
||||||
@@ -502,6 +550,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
|
||||||
#
|
#
|
||||||
|
# For DJGPP, select:
|
||||||
|
#
|
||||||
|
# BINDIR= /dev/env/DJDIR/bin
|
||||||
|
# SHAREDIR= /dev/env/DJDIR/share
|
||||||
|
# INCDIR= /dev/env/DJDIR/include
|
||||||
|
# LIBDIR= /dev/env/DJDIR/lib
|
||||||
|
#
|
||||||
# If in doubt, set:
|
# If in doubt, set:
|
||||||
#
|
#
|
||||||
# BINDIR= /usr/bin
|
# BINDIR= /usr/bin
|
||||||
@@ -510,15 +565,19 @@ HAVE_UNISTD_H=
|
|||||||
# LIBDIR= /usr/lib
|
# LIBDIR= /usr/lib
|
||||||
#
|
#
|
||||||
#BINDIR= /usr/local/bin
|
#BINDIR= /usr/local/bin
|
||||||
|
#BINDIR= /dev/env/DJDIR/bin
|
||||||
BINDIR= /usr/bin
|
BINDIR= /usr/bin
|
||||||
|
|
||||||
#SHAREDIR= /usr/local/lib
|
#SHAREDIR= /usr/local/lib
|
||||||
|
#SHAREDIR= /dev/env/DJDIR/share
|
||||||
SHAREDIR= /usr/share
|
SHAREDIR= /usr/share
|
||||||
|
|
||||||
#INCDIR= /usr/local/include
|
#INCDIR= /usr/local/include
|
||||||
|
#INCDIR= /dev/env/DJDIR/include
|
||||||
INCDIR= /usr/include
|
INCDIR= /usr/include
|
||||||
|
|
||||||
#LIBDIR= /usr/local/lib
|
#LIBDIR= /usr/local/lib
|
||||||
|
#LIBDIR= /dev/env/DJDIR/lib
|
||||||
LIBDIR= /usr/lib
|
LIBDIR= /usr/lib
|
||||||
|
|
||||||
# By default, these values are based on the above 4 values
|
# By default, these values are based on the above 4 values
|
||||||
@@ -571,17 +630,22 @@ T=
|
|||||||
|
|
||||||
# where man pages are installed
|
# where man pages are installed
|
||||||
#
|
#
|
||||||
|
# Select MANDIR= /dev/env/DJDIR/man/man1 for DJGPP.
|
||||||
|
#
|
||||||
# Use MANDIR= to disable installation of the calc man (source) page.
|
# Use MANDIR= to disable installation of the calc man (source) page.
|
||||||
#
|
#
|
||||||
#MANDIR=
|
#MANDIR=
|
||||||
#MANDIR= /usr/local/man/man1
|
#MANDIR= /usr/local/man/man1
|
||||||
#MANDIR= /usr/man/man1
|
#MANDIR= /usr/man/man1
|
||||||
MANDIR= /usr/share/man/man1
|
MANDIR= /usr/share/man/man1
|
||||||
|
#MANDIR= /dev/env/DJDIR/man/man1
|
||||||
#MANDIR= /usr/man/u_man/man1
|
#MANDIR= /usr/man/u_man/man1
|
||||||
#MANDIR= /usr/contrib/man/man1
|
#MANDIR= /usr/contrib/man/man1
|
||||||
|
|
||||||
# where cat (formatted man) pages are installed
|
# where cat (formatted man) pages are installed
|
||||||
#
|
#
|
||||||
|
# Select CATDIR= /dev/env/DJDIR/man/cat1 for DJGPP.
|
||||||
|
#
|
||||||
# Use CATDIR= to disable installation of the calc cat (formatted) page.
|
# Use CATDIR= to disable installation of the calc cat (formatted) page.
|
||||||
#
|
#
|
||||||
CATDIR=
|
CATDIR=
|
||||||
@@ -589,6 +653,7 @@ CATDIR=
|
|||||||
#CATDIR= /usr/local/catman/cat1
|
#CATDIR= /usr/local/catman/cat1
|
||||||
#CATDIR= /usr/man/cat1
|
#CATDIR= /usr/man/cat1
|
||||||
#CATDIR= /usr/share/man/cat1
|
#CATDIR= /usr/share/man/cat1
|
||||||
|
#CATDIR= /dev/env/DJDIR/man/cat1
|
||||||
#CATDIR= /var/cache/man/cat1
|
#CATDIR= /var/cache/man/cat1
|
||||||
#CATDIR= /usr/man/u_man/cat1
|
#CATDIR= /usr/man/u_man/cat1
|
||||||
#CATDIR= /usr/contrib/man/cat1
|
#CATDIR= /usr/contrib/man/cat1
|
||||||
@@ -626,6 +691,8 @@ CATEXT= 1
|
|||||||
#
|
#
|
||||||
# The cat page is not built or installed
|
# The cat page is not built or installed
|
||||||
#
|
#
|
||||||
|
# Select NROFF= groff for DJGPP.
|
||||||
|
#
|
||||||
# If in doubt and you don't want to fool with man pages, set MANDIR
|
# If in doubt and you don't want to fool with man pages, set MANDIR
|
||||||
# and CATDIR to empty and ignore the NROFF, NROFF_ARG and MANMAKE
|
# and CATDIR to empty and ignore the NROFF, NROFF_ARG and MANMAKE
|
||||||
# lines below.
|
# lines below.
|
||||||
@@ -643,12 +710,18 @@ 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.
|
||||||
#
|
#
|
||||||
|
# Select CALCPATH= .;./cal;~/.cal;${CSHAREDIR};${CUSTOMLIBDIR} for DJGPP.
|
||||||
|
#
|
||||||
CALCPATH= .:./cal:~/.cal:${CSHAREDIR}:${CUSTOMLIBDIR}
|
CALCPATH= .:./cal:~/.cal:${CSHAREDIR}:${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.
|
||||||
#
|
#
|
||||||
|
# Select CALCRC= ${CSHAREDIR}/startup;~/.calcrc;./.calcinit for DJGPP.
|
||||||
|
#
|
||||||
CALCRC= ${CSHAREDIR}/startup:~/.calcrc:./.calcinit
|
CALCRC= ${CSHAREDIR}/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.
|
||||||
@@ -672,8 +745,8 @@ CALCRC= ${CSHAREDIR}/startup:~/.calcrc:./.calcinit
|
|||||||
USE_READLINE=
|
USE_READLINE=
|
||||||
#USE_READLINE= -DUSE_READLINE
|
#USE_READLINE= -DUSE_READLINE
|
||||||
#
|
#
|
||||||
#READLINE_LIB=
|
READLINE_LIB=
|
||||||
READLINE_LIB= -lreadline -lhistory -lncurses
|
#READLINE_LIB= -lreadline -lhistory -lncurses
|
||||||
#READLINE_LIB= -L/usr/gnu/lib -lreadline -lhistory -lncurses
|
#READLINE_LIB= -L/usr/gnu/lib -lreadline -lhistory -lncurses
|
||||||
#READLINE_LIB= -L/usr/local/lib -lreadline -lhistory -lncurses
|
#READLINE_LIB= -L/usr/local/lib -lreadline -lhistory -lncurses
|
||||||
#
|
#
|
||||||
@@ -683,13 +756,18 @@ READLINE_INCLUDE=
|
|||||||
|
|
||||||
# If $PAGER is not set, use this program to display a help file
|
# If $PAGER is not set, use this program to display a help file
|
||||||
#
|
#
|
||||||
|
# Select CALCPAGER= less.exe -ci for DJGPP.
|
||||||
|
#
|
||||||
CALCPAGER= more
|
CALCPAGER= more
|
||||||
#CALCPAGER= pg
|
#CALCPAGER= pg
|
||||||
#CALCPAGER= cat
|
#CALCPAGER= cat
|
||||||
#CALCPAGER= less
|
#CALCPAGER= less
|
||||||
|
#CALCPAGER= less.exe -ci
|
||||||
|
|
||||||
# Debug/Optimize options for ${CC} and ${LCC}
|
# Debug/Optimize options for ${CC} and ${LCC}
|
||||||
#
|
#
|
||||||
|
# Select DEBUG= -O2 -gstabs+ for DJGPP.
|
||||||
|
#
|
||||||
#DEBUG=
|
#DEBUG=
|
||||||
#
|
#
|
||||||
#DEBUG= -O
|
#DEBUG= -O
|
||||||
@@ -701,8 +779,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
|
||||||
#
|
#
|
||||||
@@ -718,6 +796,8 @@ DEBUG= -O2 -g3
|
|||||||
#DEBUG= -g3
|
#DEBUG= -g3
|
||||||
#DEBUG= -gx
|
#DEBUG= -gx
|
||||||
#DEBUG= -WM,-g
|
#DEBUG= -WM,-g
|
||||||
|
#
|
||||||
|
#DEBUG= -O2 -gstabs+
|
||||||
|
|
||||||
# On systems that have dynamic shared link libs, you may want want to disable
|
# On systems that have dynamic shared link libs, you may want want to disable
|
||||||
# them for faster calc startup.
|
# them for faster calc startup.
|
||||||
@@ -759,7 +839,7 @@ RANLIB=ranlib
|
|||||||
# Normally certain files depend on the Makefile. If the Makefile is
|
# Normally certain files depend on the Makefile. If the Makefile is
|
||||||
# changed, then certain steps should be redone. If MAKE_FILE is
|
# changed, then certain steps should be redone. If MAKE_FILE is
|
||||||
# set to Makefile, then these files will depend on Makefile. If
|
# set to Makefile, then these files will depend on Makefile. If
|
||||||
# MAKE_FILE is empty, they they wont.
|
# MAKE_FILE is empty, then they wont.
|
||||||
#
|
#
|
||||||
# If in doubt, set MAKE_FILE to Makefile
|
# If in doubt, set MAKE_FILE to Makefile
|
||||||
#
|
#
|
||||||
@@ -1048,8 +1128,13 @@ XARGS= xargs
|
|||||||
CMP= cmp
|
CMP= cmp
|
||||||
# assume the X11 makedepend tool for the depend rule
|
# assume the X11 makedepend tool for the depend rule
|
||||||
MAKEDEPEND= makedepend
|
MAKEDEPEND= makedepend
|
||||||
|
|
||||||
# echo command location
|
# echo command location
|
||||||
|
#
|
||||||
|
# Select ECHO= echo for DJGPP.
|
||||||
|
#
|
||||||
ECHO= /bin/echo
|
ECHO= /bin/echo
|
||||||
|
#ECHO= echo
|
||||||
|
|
||||||
# Makefile debug
|
# Makefile debug
|
||||||
#
|
#
|
||||||
@@ -1322,9 +1407,10 @@ 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 shipped with calc
|
# List of miscellaneous files NOT shipped with calc
|
||||||
#
|
#
|
||||||
MISC= Makefile.linux calc.spec inst_files spec-template rpm.mk.patch
|
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
|
||||||
#
|
#
|
||||||
@@ -1333,7 +1419,7 @@ PROGS= calc ${UTIL_PROGS}
|
|||||||
# complete list of targets
|
# complete list of targets
|
||||||
#
|
#
|
||||||
TARGETS= ${LICENSE} ${CALC_LIBS} custom/.all calc sample/.all \
|
TARGETS= ${LICENSE} ${CALC_LIBS} custom/.all calc sample/.all \
|
||||||
cal/.all help/.all help/builtin cscript/.all calc.1 ${MISC}
|
cal/.all help/.all help/builtin cscript/.all calc.1
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -1474,13 +1560,13 @@ endian_calc.h: endian ${MAKE_FILE}
|
|||||||
${Q}echo '' >> endian_calc.h
|
${Q}echo '' >> endian_calc.h
|
||||||
${Q}echo '/* what byte order are we? */' >> endian_calc.h
|
${Q}echo '/* what byte order are we? */' >> endian_calc.h
|
||||||
-${Q}if [ X"${BYTE_ORDER}" = X ]; then \
|
-${Q}if [ X"${BYTE_ORDER}" = X ]; then \
|
||||||
if [ -f /usr/include/endian.h ]; then \
|
if [ -f ${INCDIR}/endian.h ]; then \
|
||||||
echo '#include <endian.h>' >> endian_calc.h; \
|
echo '#include <endian.h>' >> endian_calc.h; \
|
||||||
echo '#define CALC_BYTE_ORDER BYTE_ORDER' >> endian_calc.h; \
|
echo '#define CALC_BYTE_ORDER BYTE_ORDER' >> endian_calc.h; \
|
||||||
elif [ -f /usr/include/machine/endian.h ]; then \
|
elif [ -f ${INCDIR}/machine/endian.h ]; then \
|
||||||
echo '#include <machine/endian.h>' >> endian_calc.h; \
|
echo '#include <machine/endian.h>' >> endian_calc.h; \
|
||||||
echo '#define CALC_BYTE_ORDER BYTE_ORDER' >> endian_calc.h; \
|
echo '#define CALC_BYTE_ORDER BYTE_ORDER' >> endian_calc.h; \
|
||||||
elif [ -f /usr/include/sys/endian.h ]; then \
|
elif [ -f ${INCDIR}/sys/endian.h ]; then \
|
||||||
echo '#include <sys/endian.h>' >> endian_calc.h; \
|
echo '#include <sys/endian.h>' >> endian_calc.h; \
|
||||||
echo '#define CALC_BYTE_ORDER BYTE_ORDER' >> endian_calc.h; \
|
echo '#define CALC_BYTE_ORDER BYTE_ORDER' >> endian_calc.h; \
|
||||||
else \
|
else \
|
||||||
@@ -1542,12 +1628,12 @@ have_malloc.h: ${MAKE_FILE}
|
|||||||
${Q}echo '#define __HAVE_MALLOC_H__' >> have_malloc.h
|
${Q}echo '#define __HAVE_MALLOC_H__' >> have_malloc.h
|
||||||
${Q}echo '' >> have_malloc.h
|
${Q}echo '' >> have_malloc.h
|
||||||
${Q}echo '' >> have_malloc.h
|
${Q}echo '' >> have_malloc.h
|
||||||
${Q}echo '/* do we have /usr/include/malloc.h? */' >> have_malloc.h
|
${Q}echo '/* do we have ${INCDIR}/malloc.h? */' >> have_malloc.h
|
||||||
-${Q}if [ X"${HAVE_MALLOC_H}" = X"YES" ]; then \
|
-${Q}if [ X"${HAVE_MALLOC_H}" = X"YES" ]; then \
|
||||||
echo '#define HAVE_MALLOC_H /* yes */' >> have_malloc.h; \
|
echo '#define HAVE_MALLOC_H /* yes */' >> have_malloc.h; \
|
||||||
elif [ X"${HAVE_MALLOC_H}" = X"NO" ]; then \
|
elif [ X"${HAVE_MALLOC_H}" = X"NO" ]; then \
|
||||||
echo '#undef HAVE_MALLOC_H /* no */' >> have_malloc.h; \
|
echo '#undef HAVE_MALLOC_H /* no */' >> have_malloc.h; \
|
||||||
elif [ -f /usr/include/malloc.h ]; then \
|
elif [ -f ${INCDIR}/malloc.h ]; then \
|
||||||
echo '#define HAVE_MALLOC_H /* yes */' >> have_malloc.h; \
|
echo '#define HAVE_MALLOC_H /* yes */' >> have_malloc.h; \
|
||||||
else \
|
else \
|
||||||
echo '#undef HAVE_MALLOC_H /* no */' >> have_malloc.h; \
|
echo '#undef HAVE_MALLOC_H /* no */' >> have_malloc.h; \
|
||||||
@@ -1578,12 +1664,12 @@ have_times.h: ${MAKE_FILE}
|
|||||||
${Q}echo '#define __HAVE_TIMES_H__' >> have_times.h
|
${Q}echo '#define __HAVE_TIMES_H__' >> have_times.h
|
||||||
${Q}echo '' >> have_times.h
|
${Q}echo '' >> have_times.h
|
||||||
${Q}echo '' >> have_times.h
|
${Q}echo '' >> have_times.h
|
||||||
${Q}echo '/* do we have /usr/include/times.h? */' >> have_times.h
|
${Q}echo '/* do we have ${INCDIR}/times.h? */' >> have_times.h
|
||||||
-${Q}if [ X"${HAVE_TIMES_H}" = X"YES" ]; then \
|
-${Q}if [ X"${HAVE_TIMES_H}" = X"YES" ]; then \
|
||||||
echo '#define HAVE_TIMES_H /* yes */' >> have_times.h; \
|
echo '#define HAVE_TIMES_H /* yes */' >> have_times.h; \
|
||||||
elif [ X"${HAVE_TIMES_H}" = X"NO" ]; then \
|
elif [ X"${HAVE_TIMES_H}" = X"NO" ]; then \
|
||||||
echo '#undef HAVE_TIMES_H /* no */' >> have_times.h; \
|
echo '#undef HAVE_TIMES_H /* no */' >> have_times.h; \
|
||||||
elif [ -f /usr/include/times.h ]; then \
|
elif [ -f ${INCDIR}/times.h ]; then \
|
||||||
echo '#define HAVE_TIMES_H /* yes */' >> have_times.h; \
|
echo '#define HAVE_TIMES_H /* yes */' >> have_times.h; \
|
||||||
else \
|
else \
|
||||||
echo '#undef HAVE_TIMES_H /* no */' >> have_times.h; \
|
echo '#undef HAVE_TIMES_H /* no */' >> have_times.h; \
|
||||||
@@ -1592,7 +1678,7 @@ have_times.h: ${MAKE_FILE}
|
|||||||
echo '#define HAVE_SYS_TIMES_H /* yes */' >> have_times.h; \
|
echo '#define HAVE_SYS_TIMES_H /* yes */' >> have_times.h; \
|
||||||
elif [ X"${HAVE_SYS_TIMES_H}" = X"NO" ]; then \
|
elif [ X"${HAVE_SYS_TIMES_H}" = X"NO" ]; then \
|
||||||
echo '#undef HAVE_SYS_TIMES_H /* no */' >> have_times.h; \
|
echo '#undef HAVE_SYS_TIMES_H /* no */' >> have_times.h; \
|
||||||
elif [ -f /usr/include/sys/times.h ]; then \
|
elif [ -f ${INCDIR}/sys/times.h ]; then \
|
||||||
echo '#define HAVE_SYS_TIMES_H /* yes */' >> have_times.h; \
|
echo '#define HAVE_SYS_TIMES_H /* yes */' >> have_times.h; \
|
||||||
else \
|
else \
|
||||||
echo '#undef HAVE_SYS_TIMES_H /* no */' >> have_times.h; \
|
echo '#undef HAVE_SYS_TIMES_H /* no */' >> have_times.h; \
|
||||||
@@ -1601,7 +1687,7 @@ have_times.h: ${MAKE_FILE}
|
|||||||
echo '#define HAVE_TIME_H /* yes */' >> have_times.h; \
|
echo '#define HAVE_TIME_H /* yes */' >> have_times.h; \
|
||||||
elif [ X"${HAVE_TIME_H}" = X"NO" ]; then \
|
elif [ X"${HAVE_TIME_H}" = X"NO" ]; then \
|
||||||
echo '#undef HAVE_TIME_H /* no */' >> have_times.h; \
|
echo '#undef HAVE_TIME_H /* no */' >> have_times.h; \
|
||||||
elif [ -f /usr/include/time.h ]; then \
|
elif [ -f ${INCDIR}/time.h ]; then \
|
||||||
echo '#define HAVE_TIME_H /* yes */' >> have_times.h; \
|
echo '#define HAVE_TIME_H /* yes */' >> have_times.h; \
|
||||||
else \
|
else \
|
||||||
echo '#undef HAVE_TIME_H /* no */' >> have_times.h; \
|
echo '#undef HAVE_TIME_H /* no */' >> have_times.h; \
|
||||||
@@ -1610,7 +1696,7 @@ have_times.h: ${MAKE_FILE}
|
|||||||
echo '#define HAVE_SYS_TIME_H /* yes */' >> have_times.h; \
|
echo '#define HAVE_SYS_TIME_H /* yes */' >> have_times.h; \
|
||||||
elif [ X"${HAVE_SYS_TIME_H}" = X"NO" ]; then \
|
elif [ X"${HAVE_SYS_TIME_H}" = X"NO" ]; then \
|
||||||
echo '#undef HAVE_SYS_TIME_H /* no */' >> have_times.h; \
|
echo '#undef HAVE_SYS_TIME_H /* no */' >> have_times.h; \
|
||||||
elif [ -f /usr/include/sys/time.h ]; then \
|
elif [ -f ${INCDIR}/sys/time.h ]; then \
|
||||||
echo '#define HAVE_SYS_TIME_H /* yes */' >> have_times.h; \
|
echo '#define HAVE_SYS_TIME_H /* yes */' >> have_times.h; \
|
||||||
else \
|
else \
|
||||||
echo '#undef HAVE_SYS_TIME_H /* no */' >> have_times.h; \
|
echo '#undef HAVE_SYS_TIME_H /* no */' >> have_times.h; \
|
||||||
@@ -1641,12 +1727,12 @@ have_stdlib.h: ${MAKE_FILE}
|
|||||||
${Q}echo '#define __HAVE_STDLIB_H__' >> have_stdlib.h
|
${Q}echo '#define __HAVE_STDLIB_H__' >> have_stdlib.h
|
||||||
${Q}echo '' >> have_stdlib.h
|
${Q}echo '' >> have_stdlib.h
|
||||||
${Q}echo '' >> have_stdlib.h
|
${Q}echo '' >> have_stdlib.h
|
||||||
${Q}echo '/* do we have /usr/include/stdlib.h? */' >> have_stdlib.h
|
${Q}echo '/* do we have ${INCDIR}/stdlib.h? */' >> have_stdlib.h
|
||||||
-${Q}if [ X"${HAVE_STDLIB_H}" = X"YES" ]; then \
|
-${Q}if [ X"${HAVE_STDLIB_H}" = X"YES" ]; then \
|
||||||
echo '#define HAVE_STDLIB_H /* yes */' >> have_stdlib.h; \
|
echo '#define HAVE_STDLIB_H /* yes */' >> have_stdlib.h; \
|
||||||
elif [ X"${HAVE_STDLIB_H}" = X"NO" ]; then \
|
elif [ X"${HAVE_STDLIB_H}" = X"NO" ]; then \
|
||||||
echo '#undef HAVE_STDLIB_H /* no */' >> have_stdlib.h; \
|
echo '#undef HAVE_STDLIB_H /* no */' >> have_stdlib.h; \
|
||||||
elif [ -f /usr/include/stdlib.h ]; then \
|
elif [ -f ${INCDIR}/stdlib.h ]; then \
|
||||||
echo '#define HAVE_STDLIB_H /* yes */' >> have_stdlib.h; \
|
echo '#define HAVE_STDLIB_H /* yes */' >> have_stdlib.h; \
|
||||||
else \
|
else \
|
||||||
echo '#undef HAVE_STDLIB_H /* no */' >> have_stdlib.h; \
|
echo '#undef HAVE_STDLIB_H /* no */' >> have_stdlib.h; \
|
||||||
@@ -1677,12 +1763,12 @@ have_unistd.h: ${MAKE_FILE}
|
|||||||
${Q}echo '#define __HAVE_UNISTD_H__' >> have_unistd.h
|
${Q}echo '#define __HAVE_UNISTD_H__' >> have_unistd.h
|
||||||
${Q}echo '' >> have_unistd.h
|
${Q}echo '' >> have_unistd.h
|
||||||
${Q}echo '' >> have_unistd.h
|
${Q}echo '' >> have_unistd.h
|
||||||
${Q}echo '/* do we have /usr/include/unistd.h? */' >> have_unistd.h
|
${Q}echo '/* do we have ${INCDIR}/unistd.h? */' >> have_unistd.h
|
||||||
-${Q}if [ X"${HAVE_UNISTD_H}" = X"YES" ]; then \
|
-${Q}if [ X"${HAVE_UNISTD_H}" = X"YES" ]; then \
|
||||||
echo '#define HAVE_UNISTD_H /* yes */' >> have_unistd.h; \
|
echo '#define HAVE_UNISTD_H /* yes */' >> have_unistd.h; \
|
||||||
elif [ X"${HAVE_UNISTD_H}" = X"NO" ]; then \
|
elif [ X"${HAVE_UNISTD_H}" = X"NO" ]; then \
|
||||||
echo '#undef HAVE_UNISTD_H /* no */' >> have_unistd.h; \
|
echo '#undef HAVE_UNISTD_H /* no */' >> have_unistd.h; \
|
||||||
elif [ -f /usr/include/unistd.h ]; then \
|
elif [ -f ${INCDIR}/unistd.h ]; then \
|
||||||
echo '#define HAVE_UNISTD_H /* yes */' >> have_unistd.h; \
|
echo '#define HAVE_UNISTD_H /* yes */' >> have_unistd.h; \
|
||||||
else \
|
else \
|
||||||
echo '#undef HAVE_UNISTD_H /* no */' >> have_unistd.h; \
|
echo '#undef HAVE_UNISTD_H /* no */' >> have_unistd.h; \
|
||||||
@@ -1713,12 +1799,12 @@ have_string.h: ${MAKE_FILE}
|
|||||||
${Q}echo '#define __HAVE_STRING_H__' >> have_string.h
|
${Q}echo '#define __HAVE_STRING_H__' >> have_string.h
|
||||||
${Q}echo '' >> have_string.h
|
${Q}echo '' >> have_string.h
|
||||||
${Q}echo '' >> have_string.h
|
${Q}echo '' >> have_string.h
|
||||||
${Q}echo '/* do we have /usr/include/string.h? */' >> have_string.h
|
${Q}echo '/* do we have ${INCDIR}/string.h? */' >> have_string.h
|
||||||
-${Q}if [ X"${HAVE_STRING_H}" = X"YES" ]; then \
|
-${Q}if [ X"${HAVE_STRING_H}" = X"YES" ]; then \
|
||||||
echo '#define HAVE_STRING_H /* yes */' >> have_string.h; \
|
echo '#define HAVE_STRING_H /* yes */' >> have_string.h; \
|
||||||
elif [ X"${HAVE_STRING_H}" = X"NO" ]; then \
|
elif [ X"${HAVE_STRING_H}" = X"NO" ]; then \
|
||||||
echo '#undef HAVE_STRING_H /* no */' >> have_string.h; \
|
echo '#undef HAVE_STRING_H /* no */' >> have_string.h; \
|
||||||
elif [ -f /usr/include/string.h ]; then \
|
elif [ -f ${INCDIR}/string.h ]; then \
|
||||||
echo '#define HAVE_STRING_H /* yes */' >> have_string.h; \
|
echo '#define HAVE_STRING_H /* yes */' >> have_string.h; \
|
||||||
else \
|
else \
|
||||||
echo '#undef HAVE_STRING_H /* no */' >> have_string.h; \
|
echo '#undef HAVE_STRING_H /* no */' >> have_string.h; \
|
||||||
@@ -1758,12 +1844,12 @@ terminal.h: ${MAKE_FILE}
|
|||||||
echo '#undef USE_TERMIOS /* <termios.h> */' >> terminal.h; \
|
echo '#undef USE_TERMIOS /* <termios.h> */' >> terminal.h; \
|
||||||
echo '#undef USE_TERMIO /* <termio.h> */' >> terminal.h; \
|
echo '#undef USE_TERMIO /* <termio.h> */' >> terminal.h; \
|
||||||
echo '#undef USE_SGTTY /* <sys/ioctl.h> */' >> terminal.h; \
|
echo '#undef USE_SGTTY /* <sys/ioctl.h> */' >> terminal.h; \
|
||||||
elif [ -f /usr/include/termios.h ]; then \
|
elif [ -f ${INCDIR}/termios.h ]; then \
|
||||||
echo '/* use termios */' >> terminal.h; \
|
echo '/* use termios */' >> terminal.h; \
|
||||||
echo '#define USE_TERMIOS /* <termios.h> */' >> terminal.h; \
|
echo '#define USE_TERMIOS /* <termios.h> */' >> terminal.h; \
|
||||||
echo '#undef USE_TERMIO /* <termio.h> */' >> terminal.h; \
|
echo '#undef USE_TERMIO /* <termio.h> */' >> terminal.h; \
|
||||||
echo '#undef USE_SGTTY /* <sys/ioctl.h> */' >> terminal.h; \
|
echo '#undef USE_SGTTY /* <sys/ioctl.h> */' >> terminal.h; \
|
||||||
elif [ -f /usr/include/termio.h ]; then \
|
elif [ -f ${INCDIR}/termio.h ]; then \
|
||||||
echo '/* use termio */' >> terminal.h; \
|
echo '/* use termio */' >> terminal.h; \
|
||||||
echo '#undef USE_TERMIOS /* <termios.h> */' >> terminal.h; \
|
echo '#undef USE_TERMIOS /* <termios.h> */' >> terminal.h; \
|
||||||
echo '#define USE_TERMIO /* <termio.h> */' >> terminal.h; \
|
echo '#define USE_TERMIO /* <termio.h> */' >> terminal.h; \
|
||||||
@@ -2814,13 +2900,15 @@ bsdi: ${LIB_H_SRC} ${BUILD_H_SRC} calc.1
|
|||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}for i in ${LIB_H_SRC} ${BUILD_H_SRC}; do \
|
-${Q}for i in ${LIB_H_SRC} ${BUILD_H_SRC} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
echo rm -f gen_h/$$i; \
|
echo rm -f gen_h/$$i; \
|
||||||
rm -f gen_h/$$i; \
|
rm -f gen_h/$$i; \
|
||||||
echo cp $$i gen_h; \
|
echo cp $$i gen_h; \
|
||||||
cp $$i gen_h; \
|
cp $$i gen_h; \
|
||||||
echo ${CHMOD} 0444 gen_h/$$i; \
|
echo ${CHMOD} 0444 gen_h/$$i; \
|
||||||
${CHMOD} 0444 gen_h/$$i; \
|
${CHMOD} 0444 gen_h/$$i; \
|
||||||
|
fi; \
|
||||||
done
|
done
|
||||||
cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} bsdi
|
cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} bsdi
|
||||||
${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-='
|
${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-='
|
||||||
@@ -2857,13 +2945,15 @@ depend: hsrc
|
|||||||
${SED} -n '/^#[ ]*include[ ]*"/p' "$$i" > "skel/$$i"; \
|
${SED} -n '/^#[ ]*include[ ]*"/p' "$$i" > "skel/$$i"; \
|
||||||
done
|
done
|
||||||
${Q}mkdir skel/custom
|
${Q}mkdir skel/custom
|
||||||
-${Q}for i in ${H_SRC} ${BUILD_H_SRC} custom.h; do \
|
-${Q}for i in ${H_SRC} ${BUILD_H_SRC} custom.h /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \
|
tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \
|
||||||
echo "#if !defined($$tag)" > "skel/$$i"; \
|
echo "#if !defined($$tag)" > "skel/$$i"; \
|
||||||
echo "#define $$tag" >> "skel/$$i"; \
|
echo "#define $$tag" >> "skel/$$i"; \
|
||||||
${SED} -n '/^#[ ]*include[ ]*"/p' "$$i" | \
|
${SED} -n '/^#[ ]*include[ ]*"/p' "$$i" | \
|
||||||
LANG=C ${SORT} -u >> "skel/$$i"; \
|
LANG=C ${SORT} -u >> "skel/$$i"; \
|
||||||
echo '#endif /* '"$$tag"' */' >> "skel/$$i"; \
|
echo '#endif /* '"$$tag"' */' >> "skel/$$i"; \
|
||||||
|
fi; \
|
||||||
done
|
done
|
||||||
-${Q}rm -f skel/makedep.out
|
-${Q}rm -f skel/makedep.out
|
||||||
${Q}echo skel formed
|
${Q}echo skel formed
|
||||||
@@ -2872,8 +2962,10 @@ depend: hsrc
|
|||||||
skel/makedep.out
|
skel/makedep.out
|
||||||
${Q}cd skel; \
|
${Q}cd skel; \
|
||||||
${MAKEDEPEND} -w 1 -f makedep.out ${C_SRC} ${BUILD_C_SRC}
|
${MAKEDEPEND} -w 1 -f makedep.out ${C_SRC} ${BUILD_C_SRC}
|
||||||
-${Q}for i in ${C_SRC} ${BUILD_C_SRC}; do \
|
-${Q}for i in ${C_SRC} ${BUILD_C_SRC} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
echo "$$i" | ${SED} 's/^\(.*\)\.c/\1.o: \1.c/'; \
|
echo "$$i" | ${SED} 's/^\(.*\)\.c/\1.o: \1.c/'; \
|
||||||
|
fi; \
|
||||||
done >> skel/makedep.out
|
done >> skel/makedep.out
|
||||||
${Q}echo dependency list formed
|
${Q}echo dependency list formed
|
||||||
${Q}echo forming new Makefile
|
${Q}echo forming new Makefile
|
||||||
@@ -2893,8 +2985,10 @@ depend: hsrc
|
|||||||
# generate the list of h files for lower level depend use
|
# generate the list of h files for lower level depend use
|
||||||
#
|
#
|
||||||
h_list:
|
h_list:
|
||||||
-${Q}for i in ${H_SRC} ${BUILD_H_SRC}; do \
|
-${Q}for i in ${H_SRC} ${BUILD_H_SRC} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
echo $$i; \
|
echo $$i; \
|
||||||
|
fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
# print the calc version
|
# print the calc version
|
||||||
@@ -2913,14 +3007,15 @@ ver_calc: version.c
|
|||||||
##
|
##
|
||||||
|
|
||||||
distlist: ${DISTLIST}
|
distlist: ${DISTLIST}
|
||||||
${Q}(for i in ${DISTLIST}; do \
|
${Q}(for i in ${DISTLIST} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
echo $$i; \
|
echo $$i; \
|
||||||
|
fi; \
|
||||||
done; \
|
done; \
|
||||||
for i in ${BUILD_H_SRC} ${BUILD_C_SRC}; do \
|
for i in ${BUILD_H_SRC} ${BUILD_C_SRC} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
echo win32/$$i; \
|
echo win32/$$i; \
|
||||||
done; \
|
fi; \
|
||||||
for i in ${MISC}; do \
|
|
||||||
echo $$i; \
|
|
||||||
done; \
|
done; \
|
||||||
(cd help; ${MAKE} ${HELP_PASSDOWN} $@); \
|
(cd help; ${MAKE} ${HELP_PASSDOWN} $@); \
|
||||||
(cd cal; ${MAKE} ${CAL_PASSDOWN} $@); \
|
(cd cal; ${MAKE} ${CAL_PASSDOWN} $@); \
|
||||||
@@ -2938,8 +3033,10 @@ distdir:
|
|||||||
(cd sample; ${MAKE} ${SAMPLE_PASSDOWN} $@)) | LANG=C ${SORT}
|
(cd sample; ${MAKE} ${SAMPLE_PASSDOWN} $@)) | LANG=C ${SORT}
|
||||||
|
|
||||||
calcliblist:
|
calcliblist:
|
||||||
${Q}(for i in ${CALCLIBLIST}; do \
|
${Q}(for i in ${CALCLIBLIST} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
echo $$i; \
|
echo $$i; \
|
||||||
|
fi; \
|
||||||
done; \
|
done; \
|
||||||
(cd help; ${MAKE} ${HELP_PASSDOWN} $@); \
|
(cd help; ${MAKE} ${HELP_PASSDOWN} $@); \
|
||||||
(cd cal; ${MAKE} ${CAL_PASSDOWN} $@); \
|
(cd cal; ${MAKE} ${CAL_PASSDOWN} $@); \
|
||||||
@@ -3086,11 +3183,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 =-=-=-=-='
|
||||||
@@ -3099,7 +3197,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
|
||||||
@@ -3107,6 +3205,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 =-=-=-=-='
|
||||||
@@ -3157,7 +3256,7 @@ 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
|
||||||
@@ -3185,9 +3284,8 @@ calc.spec: spec-template ${MAKE_FILE} help/Makefile cal/Makefile \
|
|||||||
${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}echo 's,$${DATE},'`LANG=C date +"%a %b %d %Y"`',g' >> calc.spec.sed
|
${Q}echo 's,$${DATE},'`LANG=C 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`',g' >> calc.spec.sed
|
||||||
${Q}echo 's,$${VERSION},'`./ver_calc -v`',g' >> calc.spec.sed
|
${Q}echo 's,$${REL},'`./ver_calc -R rpm.release`',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 =-=-=-=-='
|
||||||
@@ -3212,8 +3310,10 @@ inst_files: ${MAKE_FILE} help/Makefile cal/Makefile custom/Makefile \
|
|||||||
${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} echo_inst_files | \
|
${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} echo_inst_files | \
|
||||||
${GREP} '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files
|
${GREP} '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files
|
||||||
${Q}echo ${LIBDIR}/libcalc.a >> inst_files
|
${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} /dev/null; do \
|
||||||
echo ${INCDIRCALC}/$$i; \
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
|
echo ${INCDIRCALC}/$$i; \
|
||||||
|
fi; \
|
||||||
done >> inst_files
|
done >> inst_files
|
||||||
${Q}if [ ! -z "${MANDIR}" ]; then \
|
${Q}if [ ! -z "${MANDIR}" ]; then \
|
||||||
echo ${MANDIR}/calc.${MANEXT}; \
|
echo ${MANDIR}/calc.${MANEXT}; \
|
||||||
@@ -3565,7 +3665,10 @@ install: calc libcalc.a ${LIB_H_SRC} ${BUILD_H_SRC} calc.1
|
|||||||
${CHMOD} 0444 $T${LIBDIR}/libcalc.a; \
|
${CHMOD} 0444 $T${LIBDIR}/libcalc.a; \
|
||||||
echo "installed $T${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} /dev/null; do \
|
||||||
|
if [ "$$i" = "/dev/null" ]; then \
|
||||||
|
continue; \
|
||||||
|
fi; \
|
||||||
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 $T${INCDIRCALC}/$$i; then \
|
if ${CMP} -s tmp $T${INCDIRCALC}/$$i; then \
|
||||||
|
4974
Makefile.linux
4974
Makefile.linux
File diff suppressed because it is too large
Load Diff
@@ -3,15 +3,6 @@ Dear calc user on a Windoz based system,
|
|||||||
See the HOWTO.INSTALL file for information on how to build and install calc.
|
See the HOWTO.INSTALL file for information on how to build and install calc.
|
||||||
See also the README file.
|
See also the README file.
|
||||||
|
|
||||||
NOTE: The Windoz port is extremely experimental, untested and perhaps
|
|
||||||
incomplete. We are in the process of making it easier. The
|
|
||||||
following should help anyone who is trying to make a go of this
|
|
||||||
under the current code conditions.
|
|
||||||
|
|
||||||
NOTE: We are currently ONLY making an effort to support building under
|
|
||||||
Windoz using the Cygwin project (http://sources.redhat.com/cygwin/)
|
|
||||||
with the GCC compiler and Un*x tools for Windows.
|
|
||||||
|
|
||||||
NOTE: The main developers do not have access to a Windoz based platform.
|
NOTE: The main developers do not have access to a Windoz based platform.
|
||||||
While we will make an effort to not break calc Windoz based system,
|
While we will make an effort to not break calc Windoz based system,
|
||||||
our lack of a Windoz test environment will mean we will make mistakes
|
our lack of a Windoz test environment will mean we will make mistakes
|
||||||
@@ -19,7 +10,9 @@ NOTE: The main developers do not have access to a Windoz based platform.
|
|||||||
Of course you are welcome to send us any patches that fix your
|
Of course you are welcome to send us any patches that fix your
|
||||||
Windoz build environment.
|
Windoz build environment.
|
||||||
|
|
||||||
=-=
|
=-=-=-=-=
|
||||||
|
=-=-=-=-=
|
||||||
|
=-=-=-=-=
|
||||||
|
|
||||||
An effort is being made to allow windows users to compile calc using the
|
An effort is being made to allow windows users to compile calc using the
|
||||||
Cygwin project (http://sources.redhat.com/cygwin/) with the GCC compiler
|
Cygwin project (http://sources.redhat.com/cygwin/) with the GCC compiler
|
||||||
@@ -61,8 +54,6 @@ needs. Just copy the win32/*.[ch] files up into the top level calc
|
|||||||
source directory, edited (if needed) and build using the Cygwin GCC
|
source directory, edited (if needed) and build using the Cygwin GCC
|
||||||
compiler.
|
compiler.
|
||||||
|
|
||||||
=-=
|
|
||||||
|
|
||||||
People who maintain calc need to keep in mind the following:
|
People who maintain calc need to keep in mind the following:
|
||||||
|
|
||||||
The following was added to opcodes.h, config.h, zmath.h and value.h:
|
The following was added to opcodes.h, config.h, zmath.h and value.h:
|
||||||
@@ -88,8 +79,71 @@ was changed to:
|
|||||||
|
|
||||||
DLL extern int configtype(char*);
|
DLL extern int configtype(char*);
|
||||||
|
|
||||||
|
=-=-=-=-=
|
||||||
|
=-=-=-=-=
|
||||||
|
=-=-=-=-=
|
||||||
|
|
||||||
## Copyright (C) 2001 Landon Curt Noll and Thomas Jones-Low
|
There is a different approach to the Cygwin approach above
|
||||||
|
----------------------------------------------------------
|
||||||
|
|
||||||
|
You might want to try using the DJGPP system to compile calc. See:
|
||||||
|
|
||||||
|
http://www.delorie.com/djgpp/
|
||||||
|
|
||||||
|
for DJGPP details and availability.
|
||||||
|
|
||||||
|
To compile with DJGPP, one needs to select a number of Makefile
|
||||||
|
variable changes. Eli Zaretskii <eliz at is dot elta dot co dot il>
|
||||||
|
recommends the following settings:
|
||||||
|
|
||||||
|
TERMCONTROL= -DUSE_TERMIOS
|
||||||
|
BYTE_ORDER= -DLITTLE_ENDIAN
|
||||||
|
LONG_BITS= 32
|
||||||
|
LONGLONG_BITS= 64
|
||||||
|
HAVE_FPOS_POS= -DHAVE_NO_FPOS_POS
|
||||||
|
FPOS_BITS= 32
|
||||||
|
OFF_T_BITS= 32
|
||||||
|
DEV_BITS= 32
|
||||||
|
INODE_BITS= 32
|
||||||
|
HAVE_USTAT= -DHAVE_NO_USTAT
|
||||||
|
HAVE_GETSID= -DHAVE_NO_GETSID
|
||||||
|
HAVE_GETPGID= -DHAVE_NO_GETPGID
|
||||||
|
HAVE_GETTIME= -DHAVE_NO_GETTIME
|
||||||
|
HAVE_GETPRID= -DHAVE_NO_GETPRID
|
||||||
|
HAVE_URANDOM_H= NO
|
||||||
|
ALIGN32= -UMUST_ALIGN32
|
||||||
|
HAVE_MALLOC_H= YES
|
||||||
|
HAVE_STDLIB_H= YES
|
||||||
|
HAVE_STRING_H= YES
|
||||||
|
HAVE_TIMES_H= NO
|
||||||
|
HAVE_SYS_TIMES_H= YES
|
||||||
|
HAVE_TIME_H= YES
|
||||||
|
HAVE_SYS_TIME_H= YES
|
||||||
|
HAVE_UNISTD_H= YES
|
||||||
|
BINDIR= /dev/env/DJDIR/bin
|
||||||
|
SHAREDIR= /dev/env/DJDIR/share
|
||||||
|
INCDIR= /dev/env/DJDIR/include
|
||||||
|
LIBDIR= /dev/env/DJDIR/lib
|
||||||
|
MANDIR= /dev/env/DJDIR/man/man1
|
||||||
|
CATDIR= /dev/env/DJDIR/man/cat1
|
||||||
|
NROFF= groff
|
||||||
|
CALCPATH= .;./cal;~/.cal;${CSHAREDIR};${CUSTOMLIBDIR}
|
||||||
|
CALCRC= ${CSHAREDIR}/startup;~/.calcrc;./.calcinit
|
||||||
|
CALCPAGER= less.exe -ci
|
||||||
|
DEBUG= -O2 -gstabs+
|
||||||
|
|
||||||
|
The 'Linux set' or 'gcc set' (see the Select your compiler type section)
|
||||||
|
should work for DJGPP systems if you set the above Makefile variables.
|
||||||
|
|
||||||
|
Look for Makefile comments of the form:
|
||||||
|
|
||||||
|
# Select ...something... for DJGPP.
|
||||||
|
|
||||||
|
Follow those recommendations. In cases where they conflict with
|
||||||
|
the above Makefile list, follow the recommendation in the Makefile.
|
||||||
|
|
||||||
|
|
||||||
|
## Copyright (C) 2002 Landon Curt Noll and Thomas Jones-Low
|
||||||
##
|
##
|
||||||
## Calc is open software; you can redistribute it and/or modify it under
|
## Calc is open software; you can redistribute it and/or modify it under
|
||||||
## the terms of the version 2.1 of the GNU Lesser General Public License
|
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
@@ -105,8 +159,8 @@ was changed to:
|
|||||||
## 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: README.WINDOWS,v 29.6 2001/04/08 22:13:38 chongo Exp $
|
## @(#) $Id: README.WINDOWS,v 29.7 2002/03/12 10:50:25 chongo Exp $
|
||||||
## @(#) $Source: /usr/local/src/cmd/calc/RCS/README.WINDOWS,v $
|
## @(#) $Source: /usr/local/src/cmd/calc/RCS/README.WINDOWS,v $
|
||||||
##
|
##
|
||||||
## Under source code control: 2001/02/25 14:00:05
|
## Under source code control: 2001/02/25 14:00:05
|
||||||
|
19
cal/Makefile
19
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.12 $
|
# @(#) $Revision: 29.13 $
|
||||||
# @(#) $Id: Makefile,v 29.12 2001/06/08 22:38:53 chongo Exp $
|
# @(#) $Id: Makefile,v 29.13 2002/03/12 08:32:35 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
|
||||||
@@ -120,8 +120,10 @@ all: ${CALC_FILES} ${MAKE_FILE} .all
|
|||||||
##
|
##
|
||||||
|
|
||||||
distlist: ${DISTLIST}
|
distlist: ${DISTLIST}
|
||||||
${Q}for i in ${DISTLIST}; do \
|
${Q}for i in ${DISTLIST} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
echo cal/$$i; \
|
echo cal/$$i; \
|
||||||
|
fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
distdir:
|
distdir:
|
||||||
@@ -141,8 +143,10 @@ calcliblist:
|
|||||||
##
|
##
|
||||||
|
|
||||||
echo_inst_files:
|
echo_inst_files:
|
||||||
${Q}for i in ${CALC_FILES}; do \
|
${Q}for i in ${CALC_FILES} /dev/null; do \
|
||||||
echo __file__ ${CSHAREDIR}/$$i; \
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
|
echo __file__ ${CSHAREDIR}/$$i; \
|
||||||
|
fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
##
|
##
|
||||||
@@ -181,7 +185,10 @@ install: all
|
|||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
${Q}for i in ${CALC_FILES}; do \
|
${Q}for i in ${CALC_FILES} /dev/null; do \
|
||||||
|
if [ "$$i" = "/dev/null" ]; then \
|
||||||
|
continue; \
|
||||||
|
fi; \
|
||||||
if ${CMP} -s $$i $T${CSHAREDIR}/$$i; then \
|
if ${CMP} -s $$i $T${CSHAREDIR}/$$i; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
|
10
calc.h
10
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.8 $
|
* @(#) $Revision: 29.10 $
|
||||||
* @(#) $Id: calc.h,v 29.8 2001/06/08 21:00:58 chongo Exp $
|
* @(#) $Id: calc.h,v 29.10 2002/03/12 09:40:57 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
|
||||||
@@ -60,7 +60,11 @@
|
|||||||
#define HOMECHAR '~' /* char which indicates home directory */
|
#define HOMECHAR '~' /* char which indicates home directory */
|
||||||
#define DOTCHAR '.' /* char which indicates current directory */
|
#define DOTCHAR '.' /* char which indicates current directory */
|
||||||
#define PATHCHAR '/' /* char which separates path components */
|
#define PATHCHAR '/' /* char which separates path components */
|
||||||
|
#if defined(__MSDOS__) || defined(__WIN32)
|
||||||
|
#define LISTCHAR ';' /* char which separates paths in a list */
|
||||||
|
#else
|
||||||
#define LISTCHAR ':' /* char which separates paths in a list */
|
#define LISTCHAR ':' /* char which separates paths in a list */
|
||||||
|
#endif
|
||||||
#define MAXCMD 16384 /* maximum length of command invocation */
|
#define MAXCMD 16384 /* maximum length of command invocation */
|
||||||
#define MAXERROR 512 /* maximum length of error message string */
|
#define MAXERROR 512 /* maximum length of error message string */
|
||||||
|
|
||||||
@@ -258,7 +262,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);
|
||||||
|
|
||||||
|
18
calc.man
18
calc.man
@@ -15,8 +15,8 @@
|
|||||||
.\" received a copy with calc; if not, write to Free Software Foundation, Inc.
|
.\" received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
.\" 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.8 $
|
||||||
.\" @(#) $Id: calc.man,v 29.7 2001/06/01 11:26:53 chongo Exp $
|
.\" @(#) $Id: calc.man,v 29.8 2002/03/12 09:02:58 chongo Exp $
|
||||||
.\" @(#) $Source: /usr/local/src/cmd/calc/RCS/calc.man,v $
|
.\" @(#) $Source: /usr/local/src/cmd/calc/RCS/calc.man,v $
|
||||||
.\"
|
.\"
|
||||||
.\" Under source code control: 1991/07/23 05:48:26
|
.\" Under source code control: 1991/07/23 05:48:26
|
||||||
@@ -54,7 +54,7 @@ calc \- arbitrary precision calculator
|
|||||||
.RB [ calc_cmd\ \&.\|.\|. ]
|
.RB [ calc_cmd\ \&.\|.\|. ]
|
||||||
.in -5n
|
.in -5n
|
||||||
.sp
|
.sp
|
||||||
\fI#!${BINDIR}/calc\fP\ \fB\-S\fP\ [other_flags\ \&...]
|
\fI#!${BINDIR}/calc\fP\ \fB\-f\fP\ [other_flags\ \&...]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
\&
|
\&
|
||||||
.br
|
.br
|
||||||
@@ -572,27 +572,25 @@ If first line of an executable file begins
|
|||||||
followed by the absolute pathname of the
|
followed by the absolute pathname of the
|
||||||
.B calc
|
.B calc
|
||||||
program and the flag
|
program and the flag
|
||||||
.B \-S
|
.B \-f
|
||||||
as in:
|
as in:
|
||||||
.sp 1
|
.sp 1
|
||||||
.in +5n
|
.in +5n
|
||||||
.nf
|
.nf
|
||||||
\fI#!${BINDIR}/calc\fP\ \fB\-S\fP\ [other_flags\ \&...]
|
\fI#!${BINDIR}/calc\fP\ \fB\-f\fP\ [other_flags\ \&...]
|
||||||
.fi
|
.fi
|
||||||
.in -5n
|
.in -5n
|
||||||
.sp 1
|
.sp 1
|
||||||
the rest of the file will be processed in
|
the rest of the file will be processed in
|
||||||
.BR "shell script mode" .
|
.BR "shell script mode" .
|
||||||
Note that
|
Note that
|
||||||
.B \-S
|
.B \-f
|
||||||
(UPPER CASE
|
|
||||||
.BR \-S )
|
|
||||||
must be the first \-flag on the ``#!'' line.
|
must be the first \-flag on the ``#!'' line.
|
||||||
Any other optional
|
Any other optional
|
||||||
.B "other_flags"
|
.B "other_flags"
|
||||||
must come after
|
must come after
|
||||||
the
|
the
|
||||||
.BR \-S .
|
.BR \-f .
|
||||||
.sp 1
|
.sp 1
|
||||||
In
|
In
|
||||||
.B "shell script mode"
|
.B "shell script mode"
|
||||||
@@ -625,7 +623,7 @@ the file
|
|||||||
.sp 1
|
.sp 1
|
||||||
.in +5n
|
.in +5n
|
||||||
.nf
|
.nf
|
||||||
\fI#!${BINDIR}/calc\fP\ \fB\-S\fP\ \&\fB\-q\fP
|
\fI#!${BINDIR}/calc\fP\ \fB\-f\fP\ \&\fB\-q\fP
|
||||||
#
|
#
|
||||||
# mersenne - an example of a calc \fBshell script file\fP
|
# mersenne - an example of a calc \fBshell script file\fP
|
||||||
|
|
||||||
|
60
calc.spec
60
calc.spec
@@ -1,60 +0,0 @@
|
|||||||
Summary: C-style arbitrary precision calculator
|
|
||||||
Name: calc
|
|
||||||
Version: 2.11.5
|
|
||||||
Release: 4.5
|
|
||||||
Copyright: LGPL
|
|
||||||
Group: Applications/Engineering
|
|
||||||
Source: http://www.isthe.com/chongo/src/calc/calc-2.11.5t4.5.tar.gz
|
|
||||||
Patch0: rpm.mk.patch
|
|
||||||
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 -f Makefile.linux all RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
|
|
||||||
|
|
||||||
%install
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
make -f Makefile.linux install RPM_OPT_FLAGS="$RPM_OPT_FLAGS" T="$RPM_BUILD_ROOT"
|
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
%files -f install.list
|
|
||||||
%dir /usr/share/calc
|
|
||||||
%dir /usr/share/calc/help
|
|
||||||
%dir /usr/include/calc
|
|
||||||
%dir /usr/share/calc/custom
|
|
||||||
%dir /usr/share/calc/custhelp
|
|
||||||
%dir /usr/include/calc/custom
|
|
||||||
%dir /usr/bin/cscript
|
|
||||||
%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
|
|
||||||
* Fri Jun 08 2001 Landon Curt Noll <http://www.isthe.com/chongo/index.html>
|
|
||||||
- calc version 2.11.5t4.5
|
|
9
cmath.h
9
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.5 $
|
* @(#) $Revision: 29.6 $
|
||||||
* @(#) $Id: cmath.h,v 29.5 2001/06/08 21:00:58 chongo Exp $
|
* @(#) $Id: cmath.h,v 29.6 2002/03/12 09:38:26 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
|
||||||
@@ -62,6 +62,7 @@ extern void cprintfr(COMPLEX *c);
|
|||||||
/*
|
/*
|
||||||
* Basic numeric routines.
|
* Basic numeric routines.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern COMPLEX *cadd(COMPLEX *c1, COMPLEX *c2);
|
extern COMPLEX *cadd(COMPLEX *c1, COMPLEX *c2);
|
||||||
extern COMPLEX *csub(COMPLEX *c1, COMPLEX *c2);
|
extern COMPLEX *csub(COMPLEX *c1, COMPLEX *c2);
|
||||||
extern COMPLEX *cmul(COMPLEX *c1, COMPLEX *c2);
|
extern COMPLEX *cmul(COMPLEX *c1, COMPLEX *c2);
|
||||||
@@ -74,8 +75,8 @@ extern COMPLEX *cscale(COMPLEX *c, long i);
|
|||||||
extern COMPLEX *cshift(COMPLEX *c, long i);
|
extern COMPLEX *cshift(COMPLEX *c, long i);
|
||||||
extern COMPLEX *csquare(COMPLEX *c);
|
extern COMPLEX *csquare(COMPLEX *c);
|
||||||
extern COMPLEX *cconj(COMPLEX *c);
|
extern COMPLEX *cconj(COMPLEX *c);
|
||||||
extern COMPLEX *creal(COMPLEX *c);
|
extern COMPLEX *c_real(COMPLEX *c);
|
||||||
extern COMPLEX *cimag(COMPLEX *c);
|
extern COMPLEX *c_imag(COMPLEX *c);
|
||||||
extern COMPLEX *cneg(COMPLEX *c);
|
extern COMPLEX *cneg(COMPLEX *c);
|
||||||
extern COMPLEX *cinv(COMPLEX *c);
|
extern COMPLEX *cinv(COMPLEX *c);
|
||||||
extern COMPLEX *cint(COMPLEX *c);
|
extern COMPLEX *cint(COMPLEX *c);
|
||||||
|
@@ -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.2 $
|
* @(#) $Revision: 29.3 $
|
||||||
* @(#) $Id: commath.c,v 29.2 2000/06/07 14:02:13 chongo Exp $
|
* @(#) $Id: commath.c,v 29.3 2002/03/12 09:38:26 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/commath.c,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/commath.c,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:48:10
|
* Under source code control: 1990/02/15 01:48:10
|
||||||
@@ -381,7 +381,7 @@ cconj(COMPLEX *c)
|
|||||||
* Return the real part of a complex number.
|
* Return the real part of a complex number.
|
||||||
*/
|
*/
|
||||||
COMPLEX *
|
COMPLEX *
|
||||||
creal(COMPLEX *c)
|
c_real(COMPLEX *c)
|
||||||
{
|
{
|
||||||
COMPLEX *r;
|
COMPLEX *r;
|
||||||
|
|
||||||
@@ -400,7 +400,7 @@ creal(COMPLEX *c)
|
|||||||
* Return the imaginary part of a complex number as a real.
|
* Return the imaginary part of a complex number as a real.
|
||||||
*/
|
*/
|
||||||
COMPLEX *
|
COMPLEX *
|
||||||
cimag(COMPLEX *c)
|
c_imag(COMPLEX *c)
|
||||||
{
|
{
|
||||||
COMPLEX *r;
|
COMPLEX *r;
|
||||||
|
|
||||||
|
@@ -17,9 +17,9 @@
|
|||||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#
|
#
|
||||||
# @(#) $Revision: 29.18 $
|
# @(#) $Revision: 29.21 $
|
||||||
# @(#) $Id: Makefile,v 29.18 2001/06/08 22:38:53 chongo Exp $
|
# @(#) $Id: Makefile,v 29.21 2002/03/12 08:36:11 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/Makefile,v $
|
# @(#) $Source: /usr/local/src/cmd/calc/cal/../cscript/RCS/Makefile,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 1999/11/29 11:10:26
|
# Under source code control: 1999/11/29 11:10:26
|
||||||
# File existed as early as: 1999
|
# File existed as early as: 1999
|
||||||
@@ -93,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
|
||||||
#
|
#
|
||||||
@@ -139,8 +139,10 @@ all: ${TARGETS} .all
|
|||||||
##
|
##
|
||||||
|
|
||||||
distlist: ${DISTLIST}
|
distlist: ${DISTLIST}
|
||||||
${Q}for i in ${DISTLIST}; do \
|
${Q}for i in ${DISTLIST} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
echo cscript/$$i; \
|
echo cscript/$$i; \
|
||||||
|
fi; \
|
||||||
done | LANG=C ${SORT}
|
done | LANG=C ${SORT}
|
||||||
|
|
||||||
distdir:
|
distdir:
|
||||||
@@ -152,23 +154,27 @@ calcliblist:
|
|||||||
#
|
#
|
||||||
detaillist:
|
detaillist:
|
||||||
${Q}-(echo "xxxxxxx"; \
|
${Q}-(echo "xxxxxxx"; \
|
||||||
for i in ${SCRIPT}; do \
|
for i in ${SCRIPT} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
if [ ! -f RCS/$$i.calc,v ]; then \
|
if [ ! -f RCS/$$i.calc,v ]; then \
|
||||||
echo "WARNING: $$i.calc not under RCS control" 1>&2; \
|
echo "WARNING: $$i.calc not under RCS control" 1>&2; \
|
||||||
else \
|
else \
|
||||||
echo $$i; \
|
echo $$i; \
|
||||||
fi; \
|
fi; \
|
||||||
|
fi; \
|
||||||
done | LANG=C ${SORT}) | ${FMT} -70 | \
|
done | LANG=C ${SORT}) | ${FMT} -70 | \
|
||||||
${SED} -e '1s/xxxxxxx/SCRIPT=/' -e '2,$$s/^/ /' \
|
${SED} -e '1s/xxxxxxx/SCRIPT=/' -e '2,$$s/^/ /' \
|
||||||
-e 's/$$/ \\/' -e '$$s/ \\$$//'
|
-e 's/$$/ \\/' -e '$$s/ \\$$//'
|
||||||
${Q}echo
|
${Q}echo
|
||||||
${Q}-(echo "xxxxxxxxxxx"; \
|
${Q}-(echo "xxxxxxxxxxx"; \
|
||||||
for i in ${SCRIPT}; do \
|
for i in ${SCRIPT} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
if [ ! -f RCS/$$i.calc,v ]; then \
|
if [ ! -f RCS/$$i.calc,v ]; then \
|
||||||
echo "WARNING: $$i.calc not under RCS control" 1>&2; \
|
echo "WARNING: $$i.calc not under RCS control" 1>&2; \
|
||||||
else \
|
else \
|
||||||
echo $$i.calc; \
|
echo $$i.calc; \
|
||||||
fi; \
|
fi; \
|
||||||
|
fi; \
|
||||||
done | LANG=C ${SORT}) | ${FMT} -70 | \
|
done | LANG=C ${SORT}) | ${FMT} -70 | \
|
||||||
${SED} -e '1s/xxxxxxxxxxx/SCRIPT_SRC=/' -e '2,$$s/^/ /' \
|
${SED} -e '1s/xxxxxxxxxxx/SCRIPT_SRC=/' -e '2,$$s/^/ /' \
|
||||||
-e 's/$$/ \\/' -e '$$s/ \\$$//'
|
-e 's/$$/ \\/' -e '$$s/ \\$$//'
|
||||||
@@ -197,11 +203,13 @@ depend:
|
|||||||
${Q}echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > \
|
${Q}echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > \
|
||||||
makedep.out
|
makedep.out
|
||||||
${Q}echo "" >> makedep.out
|
${Q}echo "" >> makedep.out
|
||||||
${Q}for i in ${SCRIPT}; do \
|
${Q}for i in ${SCRIPT} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
echo "$$i: $$i.calc"; \
|
echo "$$i: $$i.calc"; \
|
||||||
echo ' rm -f $$@'; \
|
echo ' rm -f $$@'; \
|
||||||
echo ' $${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!$${BINDIR}/calc:" $$?>$$@'; \
|
echo ' $${SED} -e "1s:^#!/usr/local/src/cmd/calc/calc:#!$${BINDIR}/calc:" $$?>$$@'; \
|
||||||
echo ' $${CHMOD} +x $$@'; \
|
echo ' $${CHMOD} +x $$@'; \
|
||||||
|
fi; \
|
||||||
done >> makedep.out
|
done >> makedep.out
|
||||||
${Q}echo sample dependency list formed
|
${Q}echo sample dependency list formed
|
||||||
${Q}echo forming new cscript/Makefile
|
${Q}echo forming new cscript/Makefile
|
||||||
@@ -233,8 +241,10 @@ depend:
|
|||||||
##
|
##
|
||||||
|
|
||||||
echo_inst_files:
|
echo_inst_files:
|
||||||
${Q}for i in ${SCRIPT}; do \
|
${Q}for i in ${SCRIPT} /dev/null; do \
|
||||||
echo __file__ ${SCRIPTDIR}/$$i; \
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
|
echo __file__ ${SCRIPTDIR}/$$i; \
|
||||||
|
fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
##
|
##
|
||||||
@@ -274,7 +284,10 @@ install: all
|
|||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
${Q}for i in ${SCRIPT}; do \
|
${Q}for i in ${SCRIPT} /dev/null; do \
|
||||||
|
if [ "$$i" = "/dev/null" ]; then \
|
||||||
|
continue; \
|
||||||
|
fi; \
|
||||||
if ${CMP} -s $$i $T${SCRIPTDIR}/$$i; then \
|
if ${CMP} -s $$i $T${SCRIPTDIR}/$$i; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
|
@@ -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
|
||||||
|
@@ -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.17 $
|
# @(#) $Revision: 29.18 $
|
||||||
# @(#) $Id: Makefile,v 29.17 2001/06/08 22:38:53 chongo Exp $
|
# @(#) $Id: Makefile,v 29.18 2002/03/12 08:30:43 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
|
||||||
@@ -381,8 +381,10 @@ c_sysinfo.o: c_sysinfo.c ${MAKE_FILE}
|
|||||||
##
|
##
|
||||||
|
|
||||||
distlist: ${DISTLIST}
|
distlist: ${DISTLIST}
|
||||||
${Q}for i in ${DISTLIST}; do \
|
${Q}for i in ${DISTLIST} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
echo custom/$$i; \
|
echo custom/$$i; \
|
||||||
|
fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
distdir:
|
distdir:
|
||||||
@@ -418,11 +420,13 @@ depend:
|
|||||||
-${Q}rm -rf skel
|
-${Q}rm -rf skel
|
||||||
${Q}mkdir skel
|
${Q}mkdir skel
|
||||||
${Q}mkdir skel/custom
|
${Q}mkdir skel/custom
|
||||||
-${Q}for i in ${C_SRC}; do \
|
-${Q}for i in ${C_SRC} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
${SED} -n '/^#[ ]*include[ ]*"/p' \
|
${SED} -n '/^#[ ]*include[ ]*"/p' \
|
||||||
"$$i" > "skel/custom/$$i"; \
|
"$$i" > "skel/custom/$$i"; \
|
||||||
|
fi; \
|
||||||
done
|
done
|
||||||
-${Q}for i in /dev/null ${H_SRC}; do \
|
-${Q}for i in ${H_SRC} /dev/null; do \
|
||||||
if [ "$$i" = "/dev/null" ]; then \
|
if [ "$$i" = "/dev/null" ]; then \
|
||||||
continue; \
|
continue; \
|
||||||
fi; \
|
fi; \
|
||||||
@@ -437,7 +441,10 @@ depend:
|
|||||||
${Q}for i in `cd ..; ${MAKE} h_list 2>&1 | \
|
${Q}for i in `cd ..; ${MAKE} h_list 2>&1 | \
|
||||||
${SED} -e '/Entering directory/d' \
|
${SED} -e '/Entering directory/d' \
|
||||||
-e '/Nothing to be done/d' \
|
-e '/Nothing to be done/d' \
|
||||||
-e '/Leaving directory/d'`; do \
|
-e '/Leaving directory/d'` /dev/null; do \
|
||||||
|
if [ "$$i" = "/dev/null" ]; then \
|
||||||
|
continue; \
|
||||||
|
fi; \
|
||||||
tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \
|
tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \
|
||||||
echo "#if !defined($$tag)" > "skel/$$i"; \
|
echo "#if !defined($$tag)" > "skel/$$i"; \
|
||||||
echo "#define $$tag" >> "skel/$$i"; \
|
echo "#define $$tag" >> "skel/$$i"; \
|
||||||
@@ -451,8 +458,10 @@ depend:
|
|||||||
${Q}echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > \
|
${Q}echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > \
|
||||||
skel/custom/makedep.out
|
skel/custom/makedep.out
|
||||||
${Q}cd skel/custom; ${MAKEDEPEND} -w 1 -f makedep.out ${C_SRC}
|
${Q}cd skel/custom; ${MAKEDEPEND} -w 1 -f makedep.out ${C_SRC}
|
||||||
-${Q}for i in ${C_SRC}; do \
|
-${Q}for i in ${C_SRC} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
echo "$$i" | ${SED} 's/^\(.*\)\.c/\1.o: \1.c/'; \
|
echo "$$i" | ${SED} 's/^\(.*\)\.c/\1.o: \1.c/'; \
|
||||||
|
fi; \
|
||||||
done >> skel/custom/makedep.out
|
done >> skel/custom/makedep.out
|
||||||
${Q}echo custom dependency list formed
|
${Q}echo custom dependency list formed
|
||||||
${Q}echo forming new custom/Makefile
|
${Q}echo forming new custom/Makefile
|
||||||
@@ -485,17 +494,25 @@ depend:
|
|||||||
##
|
##
|
||||||
|
|
||||||
echo_inst_files:
|
echo_inst_files:
|
||||||
${Q}for i in ${INSTALL_H_SRC}; do \
|
${Q}for i in ${INSTALL_H_SRC} /dev/null; do \
|
||||||
echo __file__ ${CUSTOMINCDIR}/$$i; \
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
|
echo __file__ ${CUSTOMINCDIR}/$$i; \
|
||||||
|
fi; \
|
||||||
done
|
done
|
||||||
${Q}for i in ${CUSTOM_HELP}; do \
|
${Q}for i in ${CUSTOM_HELP} /dev/null; do \
|
||||||
echo __file__ ${CUSTOMHELPDIR}/$$i; \
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
|
echo __file__ ${CUSTOMHELPDIR}/$$i; \
|
||||||
|
fi; \
|
||||||
done
|
done
|
||||||
${Q}for i in ${CUSTOM_CALC_FILES}; do \
|
${Q}for i in ${CUSTOM_CALC_FILES} /dev/null; do \
|
||||||
echo __file__ ${CUSTOMLIBDIR}/$$i; \
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
|
echo __file__ ${CUSTOMLIBDIR}/$$i; \
|
||||||
|
fi; \
|
||||||
done
|
done
|
||||||
${Q}for i in ${CALC_LIBCUSTOM}; do \
|
${Q}for i in ${CALC_LIBCUSTOM} /dev/null; do \
|
||||||
echo __file__ ${CUSTOMLIBDIR}/$$i; \
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
|
echo __file__ ${CUSTOMLIBDIR}/$$i; \
|
||||||
|
fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
##
|
##
|
||||||
@@ -608,7 +625,10 @@ install: all
|
|||||||
else \
|
else \
|
||||||
true; \
|
true; \
|
||||||
fi
|
fi
|
||||||
-${Q}for i in ${INSTALL_H_SRC}; do \
|
-${Q}for i in ${INSTALL_H_SRC} /dev/null; do \
|
||||||
|
if [ "$$i" = "/dev/null" ]; then \
|
||||||
|
continue; \
|
||||||
|
fi; \
|
||||||
if ${CMP} -s tmp $T${CUSTOMINCDIR}/$$i; then \
|
if ${CMP} -s tmp $T${CUSTOMINCDIR}/$$i; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
@@ -620,7 +640,10 @@ install: all
|
|||||||
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} /dev/null; do \
|
||||||
|
if [ "$$i" = "/dev/null" ]; then \
|
||||||
|
continue; \
|
||||||
|
fi; \
|
||||||
if ${CMP} -s $$i $T${CUSTOMLIBDIR}/$$i; then \
|
if ${CMP} -s $$i $T${CUSTOMLIBDIR}/$$i; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
@@ -631,7 +654,10 @@ install: all
|
|||||||
echo "installed $T${CUSTOMLIBDIR}/$$i"; \
|
echo "installed $T${CUSTOMLIBDIR}/$$i"; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
-${Q}for i in ${CUSTOM_HELP}; do \
|
-${Q}for i in ${CUSTOM_HELP} /dev/null; do \
|
||||||
|
if [ "$$i" = "/dev/null" ]; then \
|
||||||
|
continue; \
|
||||||
|
fi; \
|
||||||
if ${CMP} -s $$i $T${CUSTOMHELPDIR}/$$i; then \
|
if ${CMP} -s $$i $T${CUSTOMHELPDIR}/$$i; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
|
@@ -18,9 +18,9 @@
|
|||||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#
|
#
|
||||||
# @(#) $Revision: 29.18 $
|
# @(#) $Revision: 29.19 $
|
||||||
# @(#) $Id: Makefile,v 29.18 2001/06/08 22:57:54 chongo Exp $
|
# @(#) $Id: Makefile,v 29.19 2002/03/12 08:39:14 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/help/RCS/Makefile,v $
|
# @(#) $Source: /usr/local/src/cmd/calc/cal/../help/RCS/Makefile,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 1991/07/23 06:47:57
|
# Under source code control: 1991/07/23 06:47:57
|
||||||
# File existed as early as: 1991
|
# File existed as early as: 1991
|
||||||
@@ -418,11 +418,13 @@ full: ${FULL_HELP_FILES} ${MAKE_FILE}
|
|||||||
# Singular files are the same files as their plural form.
|
# Singular files are the same files as their plural form.
|
||||||
#
|
#
|
||||||
${SINGULAR_FILES}: ${PLURAL_FILES}
|
${SINGULAR_FILES}: ${PLURAL_FILES}
|
||||||
${Q}for i in ${SINGULAR_FILES}; do \
|
${Q}for i in ${SINGULAR_FILES} /dev/null; do \
|
||||||
echo "rm -f $${i}"; \
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
rm -f $${i}; \
|
echo "rm -f $${i}"; \
|
||||||
echo "cp $${i}s $${i}"; \
|
rm -f $${i}; \
|
||||||
cp $${i}s $${i}; \
|
echo "cp $${i}s $${i}"; \
|
||||||
|
cp $${i}s $${i}; \
|
||||||
|
fi; \
|
||||||
done
|
done
|
||||||
-@if [ -z "${Q}" ]; then \
|
-@if [ -z "${Q}" ]; then \
|
||||||
echo ''; \
|
echo ''; \
|
||||||
@@ -482,8 +484,10 @@ builtin: builtin.top builtin.end ../func.c funclist.sed
|
|||||||
##
|
##
|
||||||
|
|
||||||
distlist: ${DISTLIST}
|
distlist: ${DISTLIST}
|
||||||
${Q}for i in ${DISTLIST}; do \
|
${Q}for i in ${DISTLIST} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
echo help/$$i; \
|
echo help/$$i; \
|
||||||
|
fi; \
|
||||||
done | LANG=C ${SORT}
|
done | LANG=C ${SORT}
|
||||||
|
|
||||||
distdir:
|
distdir:
|
||||||
@@ -508,12 +512,14 @@ bsdi: all
|
|||||||
#
|
#
|
||||||
detaillist:
|
detaillist:
|
||||||
${Q}-(echo "xxxxx"; \
|
${Q}-(echo "xxxxx"; \
|
||||||
for i in ${DETAIL_HELP}; do \
|
for i in ${DETAIL_HELP} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
if [ ! -f RCS/$$i,v ]; then \
|
if [ ! -f RCS/$$i,v ]; then \
|
||||||
echo "WARNING: $$i not under RCS control" 1>&2; \
|
echo "WARNING: $$i not under RCS control" 1>&2; \
|
||||||
else \
|
else \
|
||||||
echo $$i; \
|
echo $$i; \
|
||||||
fi; \
|
fi; \
|
||||||
|
fi; \
|
||||||
done | LANG=C ${SORT}) | ${FMT} -70 | \
|
done | LANG=C ${SORT}) | ${FMT} -70 | \
|
||||||
${SED} -e '1s/xxxxx/DETAIL_HELP=/' -e '2,$$s/^/ /' \
|
${SED} -e '1s/xxxxx/DETAIL_HELP=/' -e '2,$$s/^/ /' \
|
||||||
-e 's/$$/ \\/' -e '$$s/ \\$$//'
|
-e 's/$$/ \\/' -e '$$s/ \\$$//'
|
||||||
@@ -526,8 +532,10 @@ detaillist:
|
|||||||
|
|
||||||
echo_inst_files:
|
echo_inst_files:
|
||||||
${Q}for i in ${STD_HELP_FILES} full ${BLT_HELP_FILES} \
|
${Q}for i in ${STD_HELP_FILES} full ${BLT_HELP_FILES} \
|
||||||
builtin ${DETAIL_HELP} ${SINGULAR_FILES}; do \
|
builtin ${DETAIL_HELP} ${SINGULAR_FILES} /dev/null; do \
|
||||||
echo __file__ ${HELPDIR}/$$i; \
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
|
echo __file__ ${HELPDIR}/$$i; \
|
||||||
|
fi; \
|
||||||
done
|
done
|
||||||
${Q}echo __file__ ${HELPDIR}/obj
|
${Q}echo __file__ ${HELPDIR}/obj
|
||||||
|
|
||||||
@@ -585,7 +593,10 @@ install: all
|
|||||||
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} /dev/null; do \
|
||||||
|
if [ "$$i" = "/dev/null" ]; then \
|
||||||
|
continue; \
|
||||||
|
fi; \
|
||||||
if ${CMP} -s $$i $T${HELPDIR}/$$i; then \
|
if ${CMP} -s $$i $T${HELPDIR}/$$i; then \
|
||||||
true; \
|
true; \
|
||||||
else \
|
else \
|
||||||
|
6
help/im
6
help/im
@@ -20,7 +20,7 @@ LIMITS
|
|||||||
none
|
none
|
||||||
|
|
||||||
LINK LIBRARY
|
LINK LIBRARY
|
||||||
COMPLEX *cimag(COMPLEX *x)
|
COMPLEX *c_imag(COMPLEX *x)
|
||||||
|
|
||||||
SEE ALSO
|
SEE ALSO
|
||||||
re
|
re
|
||||||
@@ -41,8 +41,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: im,v 29.2 2000/06/07 14:02:33 chongo Exp $
|
## @(#) $Id: im,v 29.3 2002/03/12 09:38:26 chongo Exp $
|
||||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/im,v $
|
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/im,v $
|
||||||
##
|
##
|
||||||
## Under source code control: 1995/10/05 04:52:26
|
## Under source code control: 1995/10/05 04:52:26
|
||||||
|
6
help/re
6
help/re
@@ -20,7 +20,7 @@ LIMITS
|
|||||||
none
|
none
|
||||||
|
|
||||||
LINK LIBRARY
|
LINK LIBRARY
|
||||||
COMPLEX *cimag(COMPLEX *x)
|
COMPLEX *c_imag(COMPLEX *x)
|
||||||
|
|
||||||
SEE ALSO
|
SEE ALSO
|
||||||
im
|
im
|
||||||
@@ -41,8 +41,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: re,v 29.2 2000/06/07 14:02:33 chongo Exp $
|
## @(#) $Id: re,v 29.3 2002/03/12 09:38:26 chongo Exp $
|
||||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/re,v $
|
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/re,v $
|
||||||
##
|
##
|
||||||
## Under source code control: 1995/10/05 04:52:27
|
## Under source code control: 1995/10/05 04:52:27
|
||||||
|
@@ -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
|
||||||
|
8
hist.h
8
hist.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: hist.h,v 29.3 2001/03/17 21:31:47 chongo Exp $
|
* @(#) $Id: hist.h,v 29.4 2002/03/12 09:40:57 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/hist.h,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/hist.h,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1993/05/02 20:09:20
|
* Under source code control: 1993/05/02 20:09:20
|
||||||
@@ -50,7 +50,11 @@
|
|||||||
#define HOMECHAR '~' /* char which indicates home directory */
|
#define HOMECHAR '~' /* char which indicates home directory */
|
||||||
#define DOTCHAR '.' /* char which indicates current directory */
|
#define DOTCHAR '.' /* char which indicates current directory */
|
||||||
#define PATHCHAR '/' /* char which separates path components */
|
#define PATHCHAR '/' /* char which separates path components */
|
||||||
|
#if defined(__MSDOS__) || defined(__WIN32)
|
||||||
|
#define LISTCHAR ';' /* char which separates paths in a list */
|
||||||
|
#else
|
||||||
#define LISTCHAR ':' /* char which separates paths in a list */
|
#define LISTCHAR ':' /* char which separates paths in a list */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
29
input.c
29
input.c
@@ -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: input.c,v 29.5 2001/03/17 21:31:47 chongo Exp $
|
* @(#) $Id: input.c,v 29.6 2002/03/12 09:40:57 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/input.c,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/input.c,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1990/02/15 01:48:16
|
* Under source code control: 1990/02/15 01:48:16
|
||||||
@@ -46,6 +46,12 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__MSDOS__)
|
||||||
|
#include <limits.h>
|
||||||
|
#define _fullpath(f,n,s) (_fixpath(n,f),f)
|
||||||
|
#define _MAX_PATH PATH_MAX
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "calc.h"
|
#include "calc.h"
|
||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
#include "hist.h"
|
#include "hist.h"
|
||||||
@@ -816,11 +822,12 @@ runrcfiles(void)
|
|||||||
* given:
|
* given:
|
||||||
* sbuf stat of the inode in question
|
* sbuf stat of the inode in question
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
isinoderead(struct stat *sbuf)
|
isinoderead(struct stat *sbuf)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32) || defined(__MSDOS__)
|
||||||
char fullpathname[_MAX_PATH];
|
char fullpathname[_MAX_PATH];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -832,11 +839,11 @@ isinoderead(struct stat *sbuf)
|
|||||||
|
|
||||||
/* scan the entire readset */
|
/* scan the entire readset */
|
||||||
for (i=0; i < maxreadset; ++i) {
|
for (i=0; i < maxreadset; ++i) {
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32) || defined(__MSDOS__)
|
||||||
if (readset[i].active &&
|
if (readset[i].active &&
|
||||||
strcmp(readset[i].path,
|
strcasecmp(readset[i].path,
|
||||||
_fullpath(fullpathname,cip->i_name,
|
_fullpath(fullpathname,cip->i_name,
|
||||||
_MAX_PATH)) == 0) {
|
_MAX_PATH)) == 0) {
|
||||||
/* found a match */
|
/* found a match */
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
@@ -954,14 +961,18 @@ addreadset(char *name, char *path, struct stat *sbuf)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
strcpy(readset[ret].name, name);
|
strcpy(readset[ret].name, name);
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32) || defined(__MSDOS__)
|
||||||
/*
|
/*
|
||||||
* For WIN32, _fullpath expands the path to a fully qualified
|
* For WIN32, _fullpath expands the path to a fully qualified
|
||||||
* path name, which under WIN32 FAT and NTFS is unique, just
|
* path name, which under WIN32 FAT and NTFS is unique, just
|
||||||
* like UNIX inodes. _fullpath also allocated the memory for
|
* like UNIX inodes. _fullpath also allocated the memory for
|
||||||
* this new longer path name.
|
* this new longer path name.
|
||||||
*/
|
*/
|
||||||
readset[ret].path = _fullpath(NULL, path, 0);
|
{
|
||||||
|
char fullpathname[_MAX_PATH];
|
||||||
|
|
||||||
|
readset[ret].path = _fullpath(fullpathname, path, _MAX_PATH);
|
||||||
|
}
|
||||||
#else /* Windoz free systems */
|
#else /* Windoz free systems */
|
||||||
readset[ret].path = (char *)malloc(strlen(path)+1);
|
readset[ret].path = (char *)malloc(strlen(path)+1);
|
||||||
if (readset[ret].path == NULL) {
|
if (readset[ret].path == NULL) {
|
||||||
|
456
inst_files
456
inst_files
@@ -1,456 +0,0 @@
|
|||||||
/usr/bin/calc
|
|
||||||
/usr/bin/cscript/4dsphere
|
|
||||||
/usr/bin/cscript/fproduct
|
|
||||||
/usr/bin/cscript/mersenne
|
|
||||||
/usr/bin/cscript/piforever
|
|
||||||
/usr/bin/cscript/plus
|
|
||||||
/usr/bin/cscript/powerterm
|
|
||||||
/usr/bin/cscript/simple
|
|
||||||
/usr/bin/cscript/square
|
|
||||||
/usr/include/calc/align32.h
|
|
||||||
/usr/include/calc/alloc.h
|
|
||||||
/usr/include/calc/args.h
|
|
||||||
/usr/include/calc/blkcpy.h
|
|
||||||
/usr/include/calc/block.h
|
|
||||||
/usr/include/calc/byteswap.h
|
|
||||||
/usr/include/calc/calc.h
|
|
||||||
/usr/include/calc/calcerr.h
|
|
||||||
/usr/include/calc/cmath.h
|
|
||||||
/usr/include/calc/conf.h
|
|
||||||
/usr/include/calc/config.h
|
|
||||||
/usr/include/calc/custom.h
|
|
||||||
/usr/include/calc/endian_calc.h
|
|
||||||
/usr/include/calc/file.h
|
|
||||||
/usr/include/calc/fposval.h
|
|
||||||
/usr/include/calc/func.h
|
|
||||||
/usr/include/calc/hash.h
|
|
||||||
/usr/include/calc/have_const.h
|
|
||||||
/usr/include/calc/have_fpos.h
|
|
||||||
/usr/include/calc/have_fpos_pos.h
|
|
||||||
/usr/include/calc/have_getpgid.h
|
|
||||||
/usr/include/calc/have_getprid.h
|
|
||||||
/usr/include/calc/have_getsid.h
|
|
||||||
/usr/include/calc/have_gettime.h
|
|
||||||
/usr/include/calc/have_malloc.h
|
|
||||||
/usr/include/calc/have_memmv.h
|
|
||||||
/usr/include/calc/have_newstr.h
|
|
||||||
/usr/include/calc/have_offscl.h
|
|
||||||
/usr/include/calc/have_posscl.h
|
|
||||||
/usr/include/calc/have_rusage.h
|
|
||||||
/usr/include/calc/have_stdlib.h
|
|
||||||
/usr/include/calc/have_strdup.h
|
|
||||||
/usr/include/calc/have_string.h
|
|
||||||
/usr/include/calc/have_times.h
|
|
||||||
/usr/include/calc/have_uid_t.h
|
|
||||||
/usr/include/calc/have_unistd.h
|
|
||||||
/usr/include/calc/have_urandom.h
|
|
||||||
/usr/include/calc/have_ustat.h
|
|
||||||
/usr/include/calc/hist.h
|
|
||||||
/usr/include/calc/jump.h
|
|
||||||
/usr/include/calc/label.h
|
|
||||||
/usr/include/calc/lib_util.h
|
|
||||||
/usr/include/calc/longbits.h
|
|
||||||
/usr/include/calc/longlong.h
|
|
||||||
/usr/include/calc/math_error.h
|
|
||||||
/usr/include/calc/md5.h
|
|
||||||
/usr/include/calc/nametype.h
|
|
||||||
/usr/include/calc/opcodes.h
|
|
||||||
/usr/include/calc/prime.h
|
|
||||||
/usr/include/calc/qmath.h
|
|
||||||
/usr/include/calc/shs.h
|
|
||||||
/usr/include/calc/shs1.h
|
|
||||||
/usr/include/calc/string.h
|
|
||||||
/usr/include/calc/symbol.h
|
|
||||||
/usr/include/calc/terminal.h
|
|
||||||
/usr/include/calc/token.h
|
|
||||||
/usr/include/calc/value.h
|
|
||||||
/usr/include/calc/win32dll.h
|
|
||||||
/usr/include/calc/zmath.h
|
|
||||||
/usr/include/calc/zrand.h
|
|
||||||
/usr/include/calc/zrandom.h
|
|
||||||
/usr/lib/libcalc.a
|
|
||||||
/usr/share/calc/README
|
|
||||||
/usr/share/calc/beer.cal
|
|
||||||
/usr/share/calc/bernoulli.cal
|
|
||||||
/usr/share/calc/bigprime.cal
|
|
||||||
/usr/share/calc/bindings
|
|
||||||
/usr/share/calc/chi.cal
|
|
||||||
/usr/share/calc/chrem.cal
|
|
||||||
/usr/share/calc/custhelp/argv
|
|
||||||
/usr/share/calc/custhelp/devnull
|
|
||||||
/usr/share/calc/custhelp/help
|
|
||||||
/usr/share/calc/custhelp/pzasusb8
|
|
||||||
/usr/share/calc/custhelp/sysinfo
|
|
||||||
/usr/share/calc/custom/argv.cal
|
|
||||||
/usr/share/calc/custom/halflen.cal
|
|
||||||
/usr/share/calc/custom/libcustcalc.a
|
|
||||||
/usr/share/calc/custom/pzasusb8.cal
|
|
||||||
/usr/share/calc/deg.cal
|
|
||||||
/usr/share/calc/ellip.cal
|
|
||||||
/usr/share/calc/hello.cal
|
|
||||||
/usr/share/calc/help/COPYING
|
|
||||||
/usr/share/calc/help/COPYING-LGPL
|
|
||||||
/usr/share/calc/help/abs
|
|
||||||
/usr/share/calc/help/access
|
|
||||||
/usr/share/calc/help/acos
|
|
||||||
/usr/share/calc/help/acosh
|
|
||||||
/usr/share/calc/help/acot
|
|
||||||
/usr/share/calc/help/acoth
|
|
||||||
/usr/share/calc/help/acsc
|
|
||||||
/usr/share/calc/help/acsch
|
|
||||||
/usr/share/calc/help/address
|
|
||||||
/usr/share/calc/help/agd
|
|
||||||
/usr/share/calc/help/append
|
|
||||||
/usr/share/calc/help/appr
|
|
||||||
/usr/share/calc/help/archive
|
|
||||||
/usr/share/calc/help/arg
|
|
||||||
/usr/share/calc/help/argv
|
|
||||||
/usr/share/calc/help/arrow
|
|
||||||
/usr/share/calc/help/asec
|
|
||||||
/usr/share/calc/help/asech
|
|
||||||
/usr/share/calc/help/asin
|
|
||||||
/usr/share/calc/help/asinh
|
|
||||||
/usr/share/calc/help/assign
|
|
||||||
/usr/share/calc/help/assoc
|
|
||||||
/usr/share/calc/help/atan
|
|
||||||
/usr/share/calc/help/atan2
|
|
||||||
/usr/share/calc/help/atanh
|
|
||||||
/usr/share/calc/help/avg
|
|
||||||
/usr/share/calc/help/base
|
|
||||||
/usr/share/calc/help/bernoulli
|
|
||||||
/usr/share/calc/help/binding
|
|
||||||
/usr/share/calc/help/bindings
|
|
||||||
/usr/share/calc/help/bit
|
|
||||||
/usr/share/calc/help/blk
|
|
||||||
/usr/share/calc/help/blkcpy
|
|
||||||
/usr/share/calc/help/blkfree
|
|
||||||
/usr/share/calc/help/blocks
|
|
||||||
/usr/share/calc/help/bround
|
|
||||||
/usr/share/calc/help/btrunc
|
|
||||||
/usr/share/calc/help/bug
|
|
||||||
/usr/share/calc/help/bugs
|
|
||||||
/usr/share/calc/help/builtin
|
|
||||||
/usr/share/calc/help/calc_tty
|
|
||||||
/usr/share/calc/help/calclevel
|
|
||||||
/usr/share/calc/help/catalan
|
|
||||||
/usr/share/calc/help/ceil
|
|
||||||
/usr/share/calc/help/cfappr
|
|
||||||
/usr/share/calc/help/cfsim
|
|
||||||
/usr/share/calc/help/change
|
|
||||||
/usr/share/calc/help/changes
|
|
||||||
/usr/share/calc/help/char
|
|
||||||
/usr/share/calc/help/cmdbuf
|
|
||||||
/usr/share/calc/help/cmp
|
|
||||||
/usr/share/calc/help/comb
|
|
||||||
/usr/share/calc/help/command
|
|
||||||
/usr/share/calc/help/config
|
|
||||||
/usr/share/calc/help/conj
|
|
||||||
/usr/share/calc/help/contrib
|
|
||||||
/usr/share/calc/help/cos
|
|
||||||
/usr/share/calc/help/cosh
|
|
||||||
/usr/share/calc/help/cot
|
|
||||||
/usr/share/calc/help/coth
|
|
||||||
/usr/share/calc/help/count
|
|
||||||
/usr/share/calc/help/cp
|
|
||||||
/usr/share/calc/help/credit
|
|
||||||
/usr/share/calc/help/csc
|
|
||||||
/usr/share/calc/help/csch
|
|
||||||
/usr/share/calc/help/cscript
|
|
||||||
/usr/share/calc/help/ctime
|
|
||||||
/usr/share/calc/help/custom
|
|
||||||
/usr/share/calc/help/custom_cal
|
|
||||||
/usr/share/calc/help/define
|
|
||||||
/usr/share/calc/help/delete
|
|
||||||
/usr/share/calc/help/den
|
|
||||||
/usr/share/calc/help/dereference
|
|
||||||
/usr/share/calc/help/det
|
|
||||||
/usr/share/calc/help/digit
|
|
||||||
/usr/share/calc/help/digits
|
|
||||||
/usr/share/calc/help/dp
|
|
||||||
/usr/share/calc/help/environment
|
|
||||||
/usr/share/calc/help/epsilon
|
|
||||||
/usr/share/calc/help/errcount
|
|
||||||
/usr/share/calc/help/errmax
|
|
||||||
/usr/share/calc/help/errno
|
|
||||||
/usr/share/calc/help/error
|
|
||||||
/usr/share/calc/help/errorcode
|
|
||||||
/usr/share/calc/help/errorcodes
|
|
||||||
/usr/share/calc/help/euler
|
|
||||||
/usr/share/calc/help/eval
|
|
||||||
/usr/share/calc/help/exp
|
|
||||||
/usr/share/calc/help/expression
|
|
||||||
/usr/share/calc/help/fact
|
|
||||||
/usr/share/calc/help/factor
|
|
||||||
/usr/share/calc/help/fclose
|
|
||||||
/usr/share/calc/help/fcnt
|
|
||||||
/usr/share/calc/help/feof
|
|
||||||
/usr/share/calc/help/ferror
|
|
||||||
/usr/share/calc/help/fflush
|
|
||||||
/usr/share/calc/help/fgetc
|
|
||||||
/usr/share/calc/help/fgetfield
|
|
||||||
/usr/share/calc/help/fgetline
|
|
||||||
/usr/share/calc/help/fgets
|
|
||||||
/usr/share/calc/help/fgetstr
|
|
||||||
/usr/share/calc/help/fib
|
|
||||||
/usr/share/calc/help/file
|
|
||||||
/usr/share/calc/help/files
|
|
||||||
/usr/share/calc/help/floor
|
|
||||||
/usr/share/calc/help/fopen
|
|
||||||
/usr/share/calc/help/forall
|
|
||||||
/usr/share/calc/help/fprintf
|
|
||||||
/usr/share/calc/help/fputc
|
|
||||||
/usr/share/calc/help/fputs
|
|
||||||
/usr/share/calc/help/fputstr
|
|
||||||
/usr/share/calc/help/frac
|
|
||||||
/usr/share/calc/help/free
|
|
||||||
/usr/share/calc/help/freebernoulli
|
|
||||||
/usr/share/calc/help/freeeuler
|
|
||||||
/usr/share/calc/help/freeglobals
|
|
||||||
/usr/share/calc/help/freeredc
|
|
||||||
/usr/share/calc/help/freestatics
|
|
||||||
/usr/share/calc/help/frem
|
|
||||||
/usr/share/calc/help/freopen
|
|
||||||
/usr/share/calc/help/fscan
|
|
||||||
/usr/share/calc/help/fscanf
|
|
||||||
/usr/share/calc/help/fseek
|
|
||||||
/usr/share/calc/help/fsize
|
|
||||||
/usr/share/calc/help/ftell
|
|
||||||
/usr/share/calc/help/full
|
|
||||||
/usr/share/calc/help/gcd
|
|
||||||
/usr/share/calc/help/gcdrem
|
|
||||||
/usr/share/calc/help/gd
|
|
||||||
/usr/share/calc/help/getenv
|
|
||||||
/usr/share/calc/help/hash
|
|
||||||
/usr/share/calc/help/head
|
|
||||||
/usr/share/calc/help/help
|
|
||||||
/usr/share/calc/help/highbit
|
|
||||||
/usr/share/calc/help/history
|
|
||||||
/usr/share/calc/help/hmean
|
|
||||||
/usr/share/calc/help/hnrmod
|
|
||||||
/usr/share/calc/help/hypot
|
|
||||||
/usr/share/calc/help/ilog
|
|
||||||
/usr/share/calc/help/ilog10
|
|
||||||
/usr/share/calc/help/ilog2
|
|
||||||
/usr/share/calc/help/im
|
|
||||||
/usr/share/calc/help/indices
|
|
||||||
/usr/share/calc/help/inputlevel
|
|
||||||
/usr/share/calc/help/insert
|
|
||||||
/usr/share/calc/help/int
|
|
||||||
/usr/share/calc/help/interrupt
|
|
||||||
/usr/share/calc/help/intro
|
|
||||||
/usr/share/calc/help/inverse
|
|
||||||
/usr/share/calc/help/iroot
|
|
||||||
/usr/share/calc/help/isassoc
|
|
||||||
/usr/share/calc/help/isatty
|
|
||||||
/usr/share/calc/help/isblk
|
|
||||||
/usr/share/calc/help/isconfig
|
|
||||||
/usr/share/calc/help/isdefined
|
|
||||||
/usr/share/calc/help/iserror
|
|
||||||
/usr/share/calc/help/iseven
|
|
||||||
/usr/share/calc/help/isfile
|
|
||||||
/usr/share/calc/help/ishash
|
|
||||||
/usr/share/calc/help/isident
|
|
||||||
/usr/share/calc/help/isint
|
|
||||||
/usr/share/calc/help/islist
|
|
||||||
/usr/share/calc/help/ismat
|
|
||||||
/usr/share/calc/help/ismult
|
|
||||||
/usr/share/calc/help/isnull
|
|
||||||
/usr/share/calc/help/isnum
|
|
||||||
/usr/share/calc/help/isobj
|
|
||||||
/usr/share/calc/help/isobjtype
|
|
||||||
/usr/share/calc/help/isodd
|
|
||||||
/usr/share/calc/help/isprime
|
|
||||||
/usr/share/calc/help/isptr
|
|
||||||
/usr/share/calc/help/isqrt
|
|
||||||
/usr/share/calc/help/isrand
|
|
||||||
/usr/share/calc/help/israndom
|
|
||||||
/usr/share/calc/help/isreal
|
|
||||||
/usr/share/calc/help/isrel
|
|
||||||
/usr/share/calc/help/issimple
|
|
||||||
/usr/share/calc/help/issq
|
|
||||||
/usr/share/calc/help/isstr
|
|
||||||
/usr/share/calc/help/istype
|
|
||||||
/usr/share/calc/help/jacobi
|
|
||||||
/usr/share/calc/help/join
|
|
||||||
/usr/share/calc/help/lcm
|
|
||||||
/usr/share/calc/help/lcmfact
|
|
||||||
/usr/share/calc/help/lfactor
|
|
||||||
/usr/share/calc/help/libcalc
|
|
||||||
/usr/share/calc/help/list
|
|
||||||
/usr/share/calc/help/ln
|
|
||||||
/usr/share/calc/help/lowbit
|
|
||||||
/usr/share/calc/help/ltol
|
|
||||||
/usr/share/calc/help/makelist
|
|
||||||
/usr/share/calc/help/mat
|
|
||||||
/usr/share/calc/help/matdim
|
|
||||||
/usr/share/calc/help/matfill
|
|
||||||
/usr/share/calc/help/matmax
|
|
||||||
/usr/share/calc/help/matmin
|
|
||||||
/usr/share/calc/help/matsum
|
|
||||||
/usr/share/calc/help/mattrace
|
|
||||||
/usr/share/calc/help/mattrans
|
|
||||||
/usr/share/calc/help/max
|
|
||||||
/usr/share/calc/help/md5
|
|
||||||
/usr/share/calc/help/memsize
|
|
||||||
/usr/share/calc/help/meq
|
|
||||||
/usr/share/calc/help/min
|
|
||||||
/usr/share/calc/help/minv
|
|
||||||
/usr/share/calc/help/mmin
|
|
||||||
/usr/share/calc/help/mne
|
|
||||||
/usr/share/calc/help/mod
|
|
||||||
/usr/share/calc/help/modify
|
|
||||||
/usr/share/calc/help/name
|
|
||||||
/usr/share/calc/help/near
|
|
||||||
/usr/share/calc/help/new_custom
|
|
||||||
/usr/share/calc/help/newerror
|
|
||||||
/usr/share/calc/help/nextcand
|
|
||||||
/usr/share/calc/help/nextprime
|
|
||||||
/usr/share/calc/help/norm
|
|
||||||
/usr/share/calc/help/null
|
|
||||||
/usr/share/calc/help/num
|
|
||||||
/usr/share/calc/help/obj
|
|
||||||
/usr/share/calc/help/oldvalue
|
|
||||||
/usr/share/calc/help/operator
|
|
||||||
/usr/share/calc/help/ord
|
|
||||||
/usr/share/calc/help/overview
|
|
||||||
/usr/share/calc/help/param
|
|
||||||
/usr/share/calc/help/perm
|
|
||||||
/usr/share/calc/help/pfact
|
|
||||||
/usr/share/calc/help/pi
|
|
||||||
/usr/share/calc/help/pix
|
|
||||||
/usr/share/calc/help/places
|
|
||||||
/usr/share/calc/help/pmod
|
|
||||||
/usr/share/calc/help/polar
|
|
||||||
/usr/share/calc/help/poly
|
|
||||||
/usr/share/calc/help/pop
|
|
||||||
/usr/share/calc/help/popcnt
|
|
||||||
/usr/share/calc/help/power
|
|
||||||
/usr/share/calc/help/prevcand
|
|
||||||
/usr/share/calc/help/prevprime
|
|
||||||
/usr/share/calc/help/printf
|
|
||||||
/usr/share/calc/help/prompt
|
|
||||||
/usr/share/calc/help/protect
|
|
||||||
/usr/share/calc/help/ptest
|
|
||||||
/usr/share/calc/help/push
|
|
||||||
/usr/share/calc/help/putenv
|
|
||||||
/usr/share/calc/help/quo
|
|
||||||
/usr/share/calc/help/quomod
|
|
||||||
/usr/share/calc/help/rand
|
|
||||||
/usr/share/calc/help/randbit
|
|
||||||
/usr/share/calc/help/random
|
|
||||||
/usr/share/calc/help/randombit
|
|
||||||
/usr/share/calc/help/randperm
|
|
||||||
/usr/share/calc/help/rcin
|
|
||||||
/usr/share/calc/help/rcmul
|
|
||||||
/usr/share/calc/help/rcout
|
|
||||||
/usr/share/calc/help/rcpow
|
|
||||||
/usr/share/calc/help/rcsq
|
|
||||||
/usr/share/calc/help/re
|
|
||||||
/usr/share/calc/help/remove
|
|
||||||
/usr/share/calc/help/resource
|
|
||||||
/usr/share/calc/help/reverse
|
|
||||||
/usr/share/calc/help/rewind
|
|
||||||
/usr/share/calc/help/rm
|
|
||||||
/usr/share/calc/help/root
|
|
||||||
/usr/share/calc/help/round
|
|
||||||
/usr/share/calc/help/rsearch
|
|
||||||
/usr/share/calc/help/runtime
|
|
||||||
/usr/share/calc/help/saveval
|
|
||||||
/usr/share/calc/help/scale
|
|
||||||
/usr/share/calc/help/scan
|
|
||||||
/usr/share/calc/help/scanf
|
|
||||||
/usr/share/calc/help/script
|
|
||||||
/usr/share/calc/help/search
|
|
||||||
/usr/share/calc/help/sec
|
|
||||||
/usr/share/calc/help/sech
|
|
||||||
/usr/share/calc/help/seed
|
|
||||||
/usr/share/calc/help/segment
|
|
||||||
/usr/share/calc/help/select
|
|
||||||
/usr/share/calc/help/sgn
|
|
||||||
/usr/share/calc/help/sha
|
|
||||||
/usr/share/calc/help/sha1
|
|
||||||
/usr/share/calc/help/sin
|
|
||||||
/usr/share/calc/help/sinh
|
|
||||||
/usr/share/calc/help/size
|
|
||||||
/usr/share/calc/help/sizeof
|
|
||||||
/usr/share/calc/help/sleep
|
|
||||||
/usr/share/calc/help/sort
|
|
||||||
/usr/share/calc/help/sqrt
|
|
||||||
/usr/share/calc/help/srand
|
|
||||||
/usr/share/calc/help/srandom
|
|
||||||
/usr/share/calc/help/ssq
|
|
||||||
/usr/share/calc/help/statement
|
|
||||||
/usr/share/calc/help/str
|
|
||||||
/usr/share/calc/help/strcat
|
|
||||||
/usr/share/calc/help/strerror
|
|
||||||
/usr/share/calc/help/strlen
|
|
||||||
/usr/share/calc/help/strpos
|
|
||||||
/usr/share/calc/help/strprintf
|
|
||||||
/usr/share/calc/help/strscan
|
|
||||||
/usr/share/calc/help/strscanf
|
|
||||||
/usr/share/calc/help/substr
|
|
||||||
/usr/share/calc/help/sum
|
|
||||||
/usr/share/calc/help/swap
|
|
||||||
/usr/share/calc/help/system
|
|
||||||
/usr/share/calc/help/tail
|
|
||||||
/usr/share/calc/help/tan
|
|
||||||
/usr/share/calc/help/tanh
|
|
||||||
/usr/share/calc/help/test
|
|
||||||
/usr/share/calc/help/time
|
|
||||||
/usr/share/calc/help/todo
|
|
||||||
/usr/share/calc/help/trunc
|
|
||||||
/usr/share/calc/help/type
|
|
||||||
/usr/share/calc/help/types
|
|
||||||
/usr/share/calc/help/unexpected
|
|
||||||
/usr/share/calc/help/usage
|
|
||||||
/usr/share/calc/help/variable
|
|
||||||
/usr/share/calc/help/version
|
|
||||||
/usr/share/calc/help/wishlist
|
|
||||||
/usr/share/calc/help/xor
|
|
||||||
/usr/share/calc/intfile.cal
|
|
||||||
/usr/share/calc/lucas.cal
|
|
||||||
/usr/share/calc/lucas_chk.cal
|
|
||||||
/usr/share/calc/lucas_tbl.cal
|
|
||||||
/usr/share/calc/mersenne.cal
|
|
||||||
/usr/share/calc/mfactor.cal
|
|
||||||
/usr/share/calc/mod.cal
|
|
||||||
/usr/share/calc/natnumset.cal
|
|
||||||
/usr/share/calc/pell.cal
|
|
||||||
/usr/share/calc/pi.cal
|
|
||||||
/usr/share/calc/pix.cal
|
|
||||||
/usr/share/calc/pollard.cal
|
|
||||||
/usr/share/calc/poly.cal
|
|
||||||
/usr/share/calc/prompt.cal
|
|
||||||
/usr/share/calc/psqrt.cal
|
|
||||||
/usr/share/calc/qtime.cal
|
|
||||||
/usr/share/calc/quat.cal
|
|
||||||
/usr/share/calc/randbitrun.cal
|
|
||||||
/usr/share/calc/randmprime.cal
|
|
||||||
/usr/share/calc/randombitrun.cal
|
|
||||||
/usr/share/calc/randomrun.cal
|
|
||||||
/usr/share/calc/randrun.cal
|
|
||||||
/usr/share/calc/regress.cal
|
|
||||||
/usr/share/calc/seedrandom.cal
|
|
||||||
/usr/share/calc/solve.cal
|
|
||||||
/usr/share/calc/sumsq.cal
|
|
||||||
/usr/share/calc/surd.cal
|
|
||||||
/usr/share/calc/test1700.cal
|
|
||||||
/usr/share/calc/test2300.cal
|
|
||||||
/usr/share/calc/test2600.cal
|
|
||||||
/usr/share/calc/test2700.cal
|
|
||||||
/usr/share/calc/test3100.cal
|
|
||||||
/usr/share/calc/test3300.cal
|
|
||||||
/usr/share/calc/test3400.cal
|
|
||||||
/usr/share/calc/test3500.cal
|
|
||||||
/usr/share/calc/test4000.cal
|
|
||||||
/usr/share/calc/test4100.cal
|
|
||||||
/usr/share/calc/test4600.cal
|
|
||||||
/usr/share/calc/test5100.cal
|
|
||||||
/usr/share/calc/test5200.cal
|
|
||||||
/usr/share/calc/test8400.cal
|
|
||||||
/usr/share/calc/test8500.cal
|
|
||||||
/usr/share/calc/test8600.cal
|
|
||||||
/usr/share/calc/unitfrac.cal
|
|
||||||
/usr/share/calc/varargs.cal
|
|
||||||
/usr/share/calc/xx_print.cal
|
|
||||||
/usr/share/man/man1/calc.1
|
|
@@ -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.8 $
|
||||||
* @(#) $Id: lib_calc.c,v 29.7 2001/04/08 22:05:40 chongo Exp $
|
* @(#) $Id: lib_calc.c,v 29.8 2002/03/12 09:40:57 chongo Exp $
|
||||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/lib_calc.c,v $
|
* @(#) $Source: /usr/local/src/cmd/calc/RCS/lib_calc.c,v $
|
||||||
*
|
*
|
||||||
* Under source code control: 1996/06/17 18:06:19
|
* Under source code control: 1996/06/17 18:06:19
|
||||||
@@ -217,6 +217,11 @@ libcalc_call_me_first(void)
|
|||||||
*/
|
*/
|
||||||
if (program != NULL) {
|
if (program != NULL) {
|
||||||
p = strrchr(program, '/');
|
p = strrchr(program, '/');
|
||||||
|
#if defined(_WIN32) || defined(__MSDOS__)
|
||||||
|
if (p == NULL) {
|
||||||
|
p = strrchr(program, '\\');
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
base_name = program;
|
base_name = program;
|
||||||
} else {
|
} else {
|
||||||
|
117
rpm.mk.patch
117
rpm.mk.patch
@@ -1,117 +0,0 @@
|
|||||||
*** Makefile Fri Jun 8 16:07:27 2001
|
|
||||||
--- Makefile.linux Fri Jun 8 16:07:27 2001
|
|
||||||
***************
|
|
||||||
*** 2,10 ****
|
|
||||||
#
|
|
||||||
# calc - arbitrary precision calculator
|
|
||||||
#
|
|
||||||
! # (Generic calc makefile)
|
|
||||||
#
|
|
||||||
! # Copyright (C) 1999 Landon Curt Noll
|
|
||||||
#
|
|
||||||
# Calc is open software; you can redistribute it and/or modify it under
|
|
||||||
# the terms of the version 2.1 of the GNU Lesser General Public License
|
|
||||||
--- 2,14 ----
|
|
||||||
#
|
|
||||||
# calc - arbitrary precision calculator
|
|
||||||
#
|
|
||||||
! # (Linux calc makefile)
|
|
||||||
#
|
|
||||||
! # NOTE: The Makefile.linux is the Makefile used to make the calc rpm.
|
|
||||||
! # It differs from the standard calc Makefile in the ''You may
|
|
||||||
! # want to change some values below'' section.
|
|
||||||
! #
|
|
||||||
! # Copyright (C) 2001 Landon Curt Noll
|
|
||||||
#
|
|
||||||
# Calc is open software; you can redistribute it and/or modify it under
|
|
||||||
# the terms of the version 2.1 of the GNU Lesser General Public License
|
|
||||||
***************
|
|
||||||
*** 21,28 ****
|
|
||||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
#
|
|
||||||
MAKEFILE_REV= $$Revision: 29.36 $$
|
|
||||||
! # @(#) $Id: Makefile.ship,v 29.36 2001/06/08 23:00:19 chongo Exp $
|
|
||||||
! # @(#) $Source: /usr/local/src/cmd/calc/RCS/Makefile.ship,v $
|
|
||||||
#
|
|
||||||
# Under source code control: 1990/02/15 01:48:41
|
|
||||||
# File existed as early as: before 1990
|
|
||||||
--- 25,32 ----
|
|
||||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
#
|
|
||||||
MAKEFILE_REV= $$Revision: 29.36 $$
|
|
||||||
! # @(#) $Id: Makefile.linux,v 29.36 2001/06/08 23:00:19 chongo Exp $
|
|
||||||
! # @(#) $Source: /usr/local/src/cmd/calc/RCS/Makefile.linux,v $
|
|
||||||
#
|
|
||||||
# Under source code control: 1990/02/15 01:48:41
|
|
||||||
# File existed as early as: before 1990
|
|
||||||
***************
|
|
||||||
*** 669,676 ****
|
|
||||||
#
|
|
||||||
# If in doubt, set USE_READLINE, READLINE_LIB and READLINE_INCLUDE to nothing.
|
|
||||||
#
|
|
||||||
! USE_READLINE=
|
|
||||||
! #USE_READLINE= -DUSE_READLINE
|
|
||||||
#
|
|
||||||
#READLINE_LIB=
|
|
||||||
READLINE_LIB= -lreadline -lhistory -lncurses
|
|
||||||
--- 673,680 ----
|
|
||||||
#
|
|
||||||
# If in doubt, set USE_READLINE, READLINE_LIB and READLINE_INCLUDE to nothing.
|
|
||||||
#
|
|
||||||
! #USE_READLINE=
|
|
||||||
! USE_READLINE= -DUSE_READLINE
|
|
||||||
#
|
|
||||||
#READLINE_LIB=
|
|
||||||
READLINE_LIB= -lreadline -lhistory -lncurses
|
|
||||||
***************
|
|
||||||
*** 683,692 ****
|
|
||||||
|
|
||||||
# If $PAGER is not set, use this program to display a help file
|
|
||||||
#
|
|
||||||
! CALCPAGER= more
|
|
||||||
#CALCPAGER= pg
|
|
||||||
#CALCPAGER= cat
|
|
||||||
! #CALCPAGER= less
|
|
||||||
|
|
||||||
# Debug/Optimize options for ${CC} and ${LCC}
|
|
||||||
#
|
|
||||||
--- 687,696 ----
|
|
||||||
|
|
||||||
# If $PAGER is not set, use this program to display a help file
|
|
||||||
#
|
|
||||||
! #CALCPAGER= more
|
|
||||||
#CALCPAGER= pg
|
|
||||||
#CALCPAGER= cat
|
|
||||||
! CALCPAGER= less
|
|
||||||
|
|
||||||
# Debug/Optimize options for ${CC} and ${LCC}
|
|
||||||
#
|
|
||||||
***************
|
|
||||||
*** 702,714 ****
|
|
||||||
#
|
|
||||||
#DEBUG= -O2
|
|
||||||
#DEBUG= -O2 -g
|
|
||||||
! DEBUG= -O2 -g3
|
|
||||||
#DEBUG= -O2 -ipa
|
|
||||||
#DEBUG= -O2 -g3 -ipa
|
|
||||||
#
|
|
||||||
#DEBUG= -O3
|
|
||||||
#DEBUG= -O3 -g
|
|
||||||
! #DEBUG= -O3 -g3
|
|
||||||
#DEBUG= -O3 -ipa
|
|
||||||
#DEBUG= -O3 -g3 -ipa
|
|
||||||
#
|
|
||||||
--- 706,718 ----
|
|
||||||
#
|
|
||||||
#DEBUG= -O2
|
|
||||||
#DEBUG= -O2 -g
|
|
||||||
! #DEBUG= -O2 -g3
|
|
||||||
#DEBUG= -O2 -ipa
|
|
||||||
#DEBUG= -O2 -g3 -ipa
|
|
||||||
#
|
|
||||||
#DEBUG= -O3
|
|
||||||
#DEBUG= -O3 -g
|
|
||||||
! DEBUG= -O3 -g3
|
|
||||||
#DEBUG= -O3 -ipa
|
|
||||||
#DEBUG= -O3 -g3 -ipa
|
|
||||||
#
|
|
@@ -17,9 +17,9 @@
|
|||||||
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
# received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||||
# 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.15 $
|
||||||
# @(#) $Id: Makefile,v 29.14 2001/06/08 22:38:53 chongo Exp $
|
# @(#) $Id: Makefile,v 29.15 2002/03/12 08:41:05 chongo Exp $
|
||||||
# @(#) $Source: /usr/local/src/cmd/calc/sample/RCS/Makefile,v $
|
# @(#) $Source: /usr/local/src/cmd/calc/cal/../sample/RCS/Makefile,v $
|
||||||
#
|
#
|
||||||
# Under source code control: 1997/04/19 22:46:49
|
# Under source code control: 1997/04/19 22:46:49
|
||||||
# File existed as early as: 1997
|
# File existed as early as: 1997
|
||||||
@@ -359,8 +359,10 @@ many_random: many_random.o ../libcalc.a
|
|||||||
##
|
##
|
||||||
|
|
||||||
distlist: ${DISTLIST}
|
distlist: ${DISTLIST}
|
||||||
${Q}for i in ${DISTLIST}; do \
|
${Q}for i in ${DISTLIST} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
echo sample/$$i; \
|
echo sample/$$i; \
|
||||||
|
fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
distdir:
|
distdir:
|
||||||
@@ -396,11 +398,14 @@ depend:
|
|||||||
-${Q}rm -rf skel
|
-${Q}rm -rf skel
|
||||||
${Q}mkdir skel
|
${Q}mkdir skel
|
||||||
${Q}mkdir skel/sample
|
${Q}mkdir skel/sample
|
||||||
-${Q}for i in ${C_SRC}; do \
|
-${Q}for i in ${C_SRC} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
${SED} -n '/^#[ ]*include[ ]*"/p' \
|
${SED} -n '/^#[ ]*include[ ]*"/p' \
|
||||||
"$$i" > "skel/sample/$$i"; \
|
"$$i" > "skel/sample/$$i"; \
|
||||||
|
fi; \
|
||||||
done
|
done
|
||||||
-${Q}for i in ${H_SRC} /dev/null; do \
|
-${Q}for i in ${H_SRC} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
if [ X"$$i" != X"/dev/null" ]; then \
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \
|
tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \
|
||||||
echo "#if !defined($$tag)" > "skel/sample/$$i"; \
|
echo "#if !defined($$tag)" > "skel/sample/$$i"; \
|
||||||
@@ -409,18 +414,21 @@ depend:
|
|||||||
>> "skel/sample/$$i"; \
|
>> "skel/sample/$$i"; \
|
||||||
echo '#endif /* '"$$tag"' */' >> "skel/sample/$$i"; \
|
echo '#endif /* '"$$tag"' */' >> "skel/sample/$$i"; \
|
||||||
fi; \
|
fi; \
|
||||||
|
fi; \
|
||||||
done
|
done
|
||||||
${Q}(cd ..; ${MAKE} hsrc)
|
${Q}(cd ..; ${MAKE} hsrc)
|
||||||
${Q}for i in `cd ..; ${MAKE} h_list 2>&1 | \
|
${Q}for i in `cd ..; ${MAKE} h_list 2>&1 | \
|
||||||
${SED} -e '/Entering directory/d' \
|
${SED} -e '/Entering directory/d' \
|
||||||
-e '/Nothing to be done/d' \
|
-e '/Nothing to be done/d' \
|
||||||
-e '/Leaving directory/d'`; do \
|
-e '/Leaving directory/d'` /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \
|
tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \
|
||||||
echo "#if !defined($$tag)" > "skel/$$i"; \
|
echo "#if !defined($$tag)" > "skel/$$i"; \
|
||||||
echo "#define $$tag" >> "skel/$$i"; \
|
echo "#define $$tag" >> "skel/$$i"; \
|
||||||
${SED} -n '/^#[ ]*include[ ]*"/p' "../$$i" \
|
${SED} -n '/^#[ ]*include[ ]*"/p' "../$$i" \
|
||||||
>> "skel/$$i"; \
|
>> "skel/$$i"; \
|
||||||
echo '#endif /* '"$$tag"' */' >> "skel/$$i"; \
|
echo '#endif /* '"$$tag"' */' >> "skel/$$i"; \
|
||||||
|
fi; \
|
||||||
done
|
done
|
||||||
-${Q}rm -f skel/sample/makedep.out
|
-${Q}rm -f skel/sample/makedep.out
|
||||||
${Q}echo sample/skel formed
|
${Q}echo sample/skel formed
|
||||||
@@ -428,8 +436,10 @@ depend:
|
|||||||
${Q}echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > \
|
${Q}echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > \
|
||||||
skel/sample/makedep.out
|
skel/sample/makedep.out
|
||||||
${Q}cd skel/sample; ${MAKEDEPEND} -w 1 -f makedep.out -I.. ${C_SRC}
|
${Q}cd skel/sample; ${MAKEDEPEND} -w 1 -f makedep.out -I.. ${C_SRC}
|
||||||
-${Q}for i in ${C_SRC}; do \
|
-${Q}for i in ${C_SRC} /dev/null; do \
|
||||||
|
if [ X"$$i" != X"/dev/null" ]; then \
|
||||||
echo "$$i" | ${SED} 's/^\(.*\)\.c/\1.o: \1.c/'; \
|
echo "$$i" | ${SED} 's/^\(.*\)\.c/\1.o: \1.c/'; \
|
||||||
|
fi; \
|
||||||
done >> skel/sample/makedep.out
|
done >> skel/sample/makedep.out
|
||||||
${Q}echo sample dependency list formed
|
${Q}echo sample dependency list formed
|
||||||
${Q}echo forming new sample/Makefile
|
${Q}echo forming new sample/Makefile
|
||||||
|
@@ -1,60 +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
|
|
||||||
Patch0: rpm.mk.patch
|
|
||||||
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 -f Makefile.linux all RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
|
|
||||||
|
|
||||||
%install
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
make -f Makefile.linux install RPM_OPT_FLAGS="$RPM_OPT_FLAGS" T="$RPM_BUILD_ROOT"
|
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
%files -f install.list
|
|
||||||
%dir ${CSHAREDIR}
|
|
||||||
%dir ${HELPDIR}
|
|
||||||
%dir ${INCDIRCALC}
|
|
||||||
%dir ${CUSTOMLIBDIR}
|
|
||||||
%dir ${CUSTOMHELPDIR}
|
|
||||||
%dir ${CUSTOMINCDIR}
|
|
||||||
%dir ${SCRIPTDIR}
|
|
||||||
%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}
|
|
182
version.c
182
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.31 $
|
* @(#) $Revision: 29.38 $
|
||||||
* @(#) $Id: version.c,v 29.31 2001/06/08 22:32:42 chongo Exp $
|
* @(#) $Id: version.c,v 29.38 2002/03/12 11:00:08 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.5" /* test number or empty string if no patch */
|
#define MINOR_PATCH 7 /* 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;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -89,13 +93,29 @@ char *Copyright = "\n"
|
|||||||
"\n";
|
"\n";
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(HAVE_SNPRINTF)
|
||||||
|
/* Simulate snprintf with vsprintf, hoping that BUFSIZ is large enough. */
|
||||||
|
#include <stdarg.h>
|
||||||
|
int
|
||||||
|
snprintf (char *buf, size_t n, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
int retval;
|
||||||
|
va_list arg;
|
||||||
|
|
||||||
|
va_start (arg, fmt);
|
||||||
|
retval = vsprintf (buf, fmt, arg);
|
||||||
|
va_end (arg);
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* version - return version string
|
* version - return version string
|
||||||
*
|
*
|
||||||
* 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 +134,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 +153,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 +168,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 +296,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 */
|
||||||
|
Reference in New Issue
Block a user