From ca0dd4560b0c36a9acc2dd10d62f67c88fbcf148 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Sun, 2 Sep 2007 02:18:44 -0700 Subject: [PATCH] Release calc version 2.12.2 --- BUGS | 39 +- CHANGES | 180 +- COPYING | 12 +- COPYING-LGPL | 6 +- HOWTO.INSTALL | 50 +- LIBRARY | 6 +- Makefile | 2368 ++++++++++------- Makefile.simple | 5544 ++++++++++++++++++++++++++++++++++++++++ README | 6 +- README.WINDOWS | 6 +- addop.c | 6 +- align32.c | 6 +- alloc.h | 6 +- assocfunc.c | 6 +- blkcpy.c | 6 +- blkcpy.h | 6 +- block.c | 6 +- block.h | 6 +- byteswap.c | 6 +- byteswap.h | 6 +- cal/Makefile | 27 +- cal/README | 6 +- cal/alg_config.cal | 6 +- cal/beer.cal | 6 +- cal/bernoulli.cal | 6 +- cal/bigprime.cal | 6 +- cal/bindings | 6 +- cal/chi.cal | 6 +- cal/chrem.cal | 6 +- cal/deg.cal | 6 +- cal/dotest.cal | 4 +- cal/ellip.cal | 6 +- cal/hello.cal | 6 +- cal/intfile.cal | 6 +- cal/linear.cal | 30 + cal/lucas.cal | 6 +- cal/lucas_chk.cal | 6 +- cal/lucas_tbl.cal | 6 +- cal/mersenne.cal | 6 +- cal/mfactor.cal | 6 +- cal/mod.cal | 6 +- cal/natnumset.cal | 6 +- cal/pell.cal | 6 +- cal/pi.cal | 6 +- cal/pix.cal | 6 +- cal/pollard.cal | 6 +- cal/poly.cal | 6 +- cal/prompt.cal | 6 +- cal/psqrt.cal | 6 +- cal/qtime.cal | 6 +- cal/quat.cal | 6 +- cal/randbitrun.cal | 6 +- cal/randmprime.cal | 6 +- cal/randombitrun.cal | 6 +- cal/randomrun.cal | 6 +- cal/randrun.cal | 6 +- cal/regress.cal | 297 +-- cal/repeat.cal | 6 +- cal/screen.cal | 4 +- cal/seedrandom.cal | 6 +- cal/set8700.cal | 6 +- cal/set8700.line | 6 +- cal/solve.cal | 6 +- cal/sumsq.cal | 6 +- cal/sumtimes.cal | 6 +- cal/surd.cal | 6 +- cal/test1700.cal | 6 +- cal/test2300.cal | 6 +- cal/test2600.cal | 103 +- cal/test2700.cal | 6 +- cal/test3100.cal | 6 +- cal/test3300.cal | 6 +- cal/test3400.cal | 6 +- cal/test3500.cal | 6 +- cal/test4000.cal | 6 +- cal/test4100.cal | 6 +- cal/test4600.cal | 6 +- cal/test5100.cal | 6 +- cal/test5200.cal | 6 +- cal/test8400.cal | 6 +- cal/test8500.cal | 6 +- cal/test8600.cal | 6 +- cal/unitfrac.cal | 6 +- cal/varargs.cal | 6 +- cal/xx_print.cal | 6 +- calc.c | 25 +- calc.h | 7 +- calc.man | 18 +- calc.spec.in | 68 +- calcerr.tbl | 6 +- calcerr_c.awk | 6 +- calcerr_c.sed | 6 +- calcerr_h.awk | 6 +- calcerr_h.sed | 6 +- check.awk | 6 +- cmath.h | 6 +- codegen.c | 8 +- comfunc.c | 10 +- commath.c | 6 +- config.c | 10 +- config.h | 6 +- const.c | 6 +- cscript/4dsphere.calc | 6 +- cscript/Makefile | 75 +- cscript/README.src | 6 +- cscript/fproduct.calc | 6 +- cscript/mersenne.calc | 6 +- cscript/piforever.calc | 6 +- cscript/plus.calc | 6 +- cscript/powerterm.calc | 6 +- cscript/simple.calc | 6 +- cscript/square.calc | 6 +- custom.c | 6 +- custom.h | 13 +- custom/CUSTOM_CAL | 6 +- custom/HOW_TO_ADD | 25 +- custom/Makefile | 863 ++++--- custom/Makefile.head | 456 ++++ custom/Makefile.simple | 1220 +++++++++ custom/Makefile.tail | 723 ++++++ custom/argv | 6 +- custom/argv.cal | 6 +- custom/c_argv.c | 6 +- custom/c_devnull.c | 6 +- custom/c_help.c | 6 +- custom/c_pmodm127.c | 6 +- custom/c_pzasusb8.c | 6 +- custom/c_register.c | 130 + custom/c_sysinfo.c | 7 +- custom/custtbl.c | 10 +- custom/devnull | 6 +- custom/halflen.cal | 6 +- custom/help | 6 +- custom/pmodm127 | 6 +- custom/pmodm127.cal | 6 +- custom/pzasusb8 | 6 +- custom/pzasusb8.cal | 6 +- custom/register | 82 + custom/register.cal | 70 + custom/sysinfo | 6 +- decl.h | 13 +- endian.c | 6 +- file.c | 10 +- file.h | 6 +- fposval.c | 18 +- func.c | 158 +- func.h | 6 +- hash.c | 12 +- hash.h | 32 +- have_const.c | 6 +- have_fpos.c | 6 +- have_fpos_pos.c | 8 +- have_getpgid.c | 6 +- have_getprid.c | 6 +- have_getsid.c | 6 +- have_gettime.c | 6 +- have_memmv.c | 6 +- have_newstr.c | 6 +- have_offscl.c | 6 +- have_posscl.c | 6 +- have_rusage.c | 6 +- have_stdvs.c | 6 +- have_strdup.c | 6 +- have_uid_t.c | 6 +- have_unused.c | 6 +- have_ustat.c | 6 +- have_varvs.c | 6 +- help.c | 6 +- help/Makefile | 85 +- help/abs | 6 +- help/access | 6 +- help/acos | 6 +- help/acosh | 6 +- help/acot | 6 +- help/acoth | 6 +- help/acsc | 6 +- help/acsch | 6 +- help/address | 6 +- help/agd | 6 +- help/append | 6 +- help/appr | 6 +- help/archive | 6 +- help/arg | 6 +- help/argv | 6 +- help/arrow | 6 +- help/asec | 6 +- help/asech | 6 +- help/asin | 6 +- help/asinh | 6 +- help/assign | 6 +- help/assoc | 6 +- help/atan | 6 +- help/atan2 | 6 +- help/atanh | 6 +- help/avg | 6 +- help/base | 6 +- help/base2 | 6 +- help/bernoulli | 6 +- help/bit | 6 +- help/blk | 6 +- help/blkcpy | 6 +- help/blkfree | 6 +- help/blocks | 6 +- help/bround | 6 +- help/btrunc | 6 +- help/builtin.end | 6 +- help/builtin.top | 6 +- help/calc_tty | 6 +- help/calclevel | 6 +- help/calcpath | 56 + help/catalan | 6 +- help/ceil | 6 +- help/cfappr | 6 +- help/cfsim | 6 +- help/char | 6 +- help/cmdbuf | 6 +- help/cmp | 6 +- help/comb | 6 +- help/command | 6 +- help/config | 12 +- help/conj | 6 +- help/contrib | 6 +- help/cos | 6 +- help/cosh | 6 +- help/cot | 6 +- help/coth | 6 +- help/count | 6 +- help/cp | 63 + help/credit | 12 +- help/csc | 6 +- help/csch | 6 +- help/ctime | 6 +- help/custom | 6 +- help/define | 6 +- help/delete | 6 +- help/den | 6 +- help/dereference | 6 +- help/det | 6 +- help/digit | 6 +- help/digits | 6 +- help/display | 6 +- help/dp | 6 +- help/environment | 6 +- help/epsilon | 6 +- help/errcount | 6 +- help/errmax | 6 +- help/errno | 6 +- help/error | 6 +- help/errorcodes.hdr | 6 +- help/errorcodes.sed | 6 +- help/estr | 26 +- help/euler | 6 +- help/eval | 6 +- help/exp | 6 +- help/expression | 6 +- help/fact | 6 +- help/factor | 6 +- help/fclose | 6 +- help/fcnt | 6 +- help/feof | 6 +- help/ferror | 6 +- help/fflush | 6 +- help/fgetc | 6 +- help/fgetfield | 6 +- help/fgetfile | 6 +- help/fgetline | 6 +- help/fgets | 6 +- help/fgetstr | 6 +- help/fib | 6 +- help/file | 6 +- help/files | 6 +- help/floor | 6 +- help/fopen | 6 +- help/forall | 6 +- help/fpathopen | 6 +- help/fprintf | 6 +- help/fputc | 6 +- help/fputs | 6 +- help/fputstr | 6 +- help/frac | 6 +- help/free | 6 +- help/freebernoulli | 6 +- help/freeeuler | 6 +- help/freeglobals | 6 +- help/freeredc | 6 +- help/freestatics | 6 +- help/frem | 6 +- help/freopen | 6 +- help/fscan | 6 +- help/fscanf | 6 +- help/fseek | 6 +- help/fsize | 6 +- help/ftell | 6 +- help/funclist.sed | 6 +- help/gcd | 6 +- help/gcdrem | 6 +- help/gd | 6 +- help/getenv | 6 +- help/hash | 10 +- help/head | 6 +- help/help | 6 +- help/highbit | 6 +- help/history | 6 +- help/hmean | 6 +- help/hnrmod | 6 +- help/hypot | 6 +- help/ilog | 6 +- help/ilog10 | 6 +- help/ilog2 | 6 +- help/im | 6 +- help/indices | 6 +- help/inputlevel | 6 +- help/insert | 6 +- help/int | 6 +- help/interrupt | 6 +- help/intro | 6 +- help/inverse | 6 +- help/iroot | 6 +- help/isassoc | 6 +- help/isatty | 6 +- help/isblk | 6 +- help/isconfig | 6 +- help/isdefined | 6 +- help/iserror | 6 +- help/iseven | 6 +- help/isfile | 6 +- help/ishash | 19 +- help/isident | 6 +- help/isint | 6 +- help/islist | 6 +- help/ismat | 6 +- help/ismult | 6 +- help/isnull | 6 +- help/isnum | 6 +- help/isobj | 6 +- help/isobjtype | 6 +- help/isodd | 6 +- help/isprime | 6 +- help/isptr | 6 +- help/isqrt | 6 +- help/isrand | 6 +- help/israndom | 6 +- help/isreal | 6 +- help/isrel | 6 +- help/issimple | 6 +- help/issq | 6 +- help/isstr | 6 +- help/istype | 6 +- help/jacobi | 6 +- help/join | 6 +- help/lcm | 6 +- help/lcmfact | 6 +- help/lfactor | 6 +- help/list | 6 +- help/ln | 6 +- help/log | 6 +- help/lowbit | 6 +- help/ltol | 6 +- help/makelist | 6 +- help/mat | 6 +- help/matdim | 6 +- help/matfill | 6 +- help/matmax | 6 +- help/matmin | 6 +- help/matsum | 6 +- help/mattrace | 6 +- help/mattrans | 6 +- help/max | 6 +- help/md5 | 128 - help/memsize | 6 +- help/meq | 6 +- help/min | 6 +- help/minv | 6 +- help/mmin | 6 +- help/mne | 6 +- help/mod | 6 +- help/modify | 6 +- help/name | 6 +- help/near | 6 +- help/newerror | 6 +- help/nextcand | 6 +- help/nextprime | 6 +- help/norm | 6 +- help/null | 6 +- help/num | 6 +- help/obj.file | 6 +- help/oldvalue | 6 +- help/operator | 12 +- help/ord | 6 +- help/overview | 6 +- help/param | 6 +- help/perm | 6 +- help/pfact | 6 +- help/pi | 6 +- help/pix | 6 +- help/places | 6 +- help/pmod | 6 +- help/polar | 6 +- help/poly | 6 +- help/pop | 6 +- help/popcnt | 6 +- help/pound | 6 +- help/power | 6 +- help/prevcand | 6 +- help/prevprime | 6 +- help/printf | 6 +- help/prompt | 6 +- help/protect | 6 +- help/ptest | 10 +- help/push | 6 +- help/putenv | 6 +- help/quo | 6 +- help/quomod | 6 +- help/rand | 6 +- help/randbit | 6 +- help/random | 6 +- help/randombit | 6 +- help/randperm | 6 +- help/rcin | 6 +- help/rcmul | 6 +- help/rcout | 6 +- help/rcpow | 6 +- help/rcsq | 6 +- help/re | 6 +- help/remove | 6 +- help/reverse | 6 +- help/rewind | 6 +- help/rm | 6 +- help/root | 6 +- help/round | 6 +- help/rsearch | 6 +- help/runtime | 6 +- help/saveval | 6 +- help/scale | 6 +- help/scan | 6 +- help/scanf | 6 +- help/script | 6 +- help/search | 6 +- help/sec | 6 +- help/sech | 6 +- help/seed | 6 +- help/segment | 6 +- help/select | 6 +- help/sgn | 6 +- help/sha | 126 - help/sha1 | 10 +- help/sin | 6 +- help/sinh | 6 +- help/size | 6 +- help/sizeof | 6 +- help/sleep | 6 +- help/sort | 6 +- help/sqrt | 6 +- help/srand | 6 +- help/srandom | 6 +- help/ssq | 6 +- help/statement | 6 +- help/stoponerror | 62 + help/str | 6 +- help/strcat | 6 +- help/strcmp | 4 +- help/strcpy | 4 +- help/strerror | 6 +- help/strlen | 6 +- help/strncmp | 4 +- help/strncpy | 4 +- help/strpos | 6 +- help/strprintf | 6 +- help/strscan | 6 +- help/strscanf | 6 +- help/substr | 6 +- help/sum | 6 +- help/swap | 6 +- help/system | 6 +- help/systime | 6 +- help/tail | 6 +- help/tan | 6 +- help/tanh | 6 +- help/test | 6 +- help/time | 6 +- help/todo | 6 +- help/trunc | 6 +- help/types | 6 +- help/unexpected | 62 +- help/usertime | 6 +- help/variable | 6 +- help/version | 6 +- help/wishlist | 6 +- help/xor | 6 +- hist.c | 6 +- hist.h | 6 +- input.c | 6 +- jump.c | 6 +- jump.h | 6 +- label.c | 6 +- label.h | 6 +- lib_calc.c | 19 +- lib_calc.h | 6 +- lib_util.c | 6 +- lib_util.h | 6 +- listfunc.c | 6 +- longbits.c | 6 +- matfunc.c | 8 +- math_error.c | 6 +- md5.c | 689 ----- md5.h | 86 - nametype.h | 6 +- no_implicit.c | 6 +- obj.c | 6 +- opcodes.c | 8 +- opcodes.h | 6 +- pix.c | 6 +- poly.c | 6 +- prime.c | 6 +- prime.h | 6 +- qfunc.c | 6 +- qio.c | 6 +- qmath.c | 6 +- qmath.h | 7 +- qmod.c | 6 +- qtrans.c | 6 +- quickhash.c | 6 +- rpm.mk | 53 +- sample.README | 6 +- sample_many.c | 6 +- sample_rand.c | 6 +- seed.c | 6 +- shs1.c => sha1.c | 212 +- shs1.h => sha1.h | 52 +- shs.c | 727 ------ shs.h | 85 - size.c | 6 +- str.c | 6 +- str.h | 6 +- symbol.c | 6 +- symbol.h | 6 +- token.c | 6 +- token.h | 10 +- value.c | 189 +- value.h | 12 +- version.c | 12 +- win32/fposval.h | 8 + zfunc.c | 6 +- zio.c | 6 +- zmath.c | 6 +- zmath.h | 10 +- zmod.c | 6 +- zmul.c | 6 +- zprime.c | 6 +- zrand.c | 6 +- zrand.h | 6 +- zrandom.c | 6 +- zrandom.h | 6 +- 553 files changed, 13059 insertions(+), 5440 deletions(-) create mode 100644 Makefile.simple create mode 100644 custom/Makefile.head create mode 100644 custom/Makefile.simple create mode 100644 custom/Makefile.tail create mode 100644 custom/c_register.c create mode 100644 custom/register create mode 100644 custom/register.cal create mode 100644 help/calcpath create mode 100644 help/cp delete mode 100644 help/md5 delete mode 100644 help/sha create mode 100644 help/stoponerror delete mode 100644 md5.c delete mode 100644 md5.h rename shs1.c => sha1.c (76%) rename shs1.h => sha1.h (52%) delete mode 100644 shs.c delete mode 100644 shs.h diff --git a/BUGS b/BUGS index 3a841f7..8e05487 100644 --- a/BUGS +++ b/BUGS @@ -74,6 +74,14 @@ Known bugs: =-= +Problems that have known work-a-rounds: + + * There is a bug in gcc v4.1.0 that causes calc to fail the regression + test. The work-a-round is to compile with gcc v4.1.1 or later. This + problems was observed on Fedora 5. + +=-= + mis-features in calc: Some problems are not bugs but rarther mis-features / things that could @@ -121,30 +129,7 @@ mis-features in calc: will not. -=-= - -Problems with old systems that have known work-a-rounds: - - * 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 - or to use gcc-2.96 or later. - - * There are problems compiling calc on the sparcv9 under 64 bit - Solaris. On that platform, gcc-2.96 is able to compile calc, but - calc dumps core very early on in startup. It is said that sparcv9 - support in gcc-2.96 is very unofficial and thus there is no - work-a-round for gcc-2-96. - - There is a work-a-round for this architecture us one is using the - Solaris CC on the sparcv9. It has been reported that setting the - following Makefile variables will produce a working version of - calc on the sparcv9 under 64 bit Solaris: - - LCC="cc -xarch=v9" - CCWARN="-DFORCE_STDC -w" - DEBUG="-fast -xarch=v9" - -## Copyright (C) 1999-2006 Landon Curt Noll +## Copyright (C) 1999-2007 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 @@ -158,10 +143,10 @@ Problems with old systems that have known work-a-rounds: ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.26 $ -## @(#) $Id: BUGS,v 29.26 2007/01/03 21:26:22 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: BUGS,v 30.1 2007/03/16 11:09:46 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/RCS/BUGS,v $ ## ## Under source code control: 1994/03/18 14:06:13 diff --git a/CHANGES b/CHANGES index 4702133..9c63fd6 100644 --- a/CHANGES +++ b/CHANGES @@ -10,12 +10,10 @@ The following are the changes from calc version 2.12.1.10 to date: All extern functions are now declared with the symbol E_FUNC. The include file decl.h defines these 4 symbols by default to static, extern, static, and extern respectively. Under - Windoz, DLL is also defined accorind to the _EXPORTING symbol + Windoz, DLL is also defined according to the _EXPORTING symbol and is prepended to the EXTERN and E_FUNC symbols. The decl.h file has replaced the win32dll.h file. - Added Apple Mac OS X compiler set in the Makefile. - When WITH_TLS is defined, calc attempts to compile with Thread Local Storage. As of version 2.12.1.12 this mode is extremely experimental. Calc may not compile when WITH_TLS defined. @@ -29,10 +27,6 @@ The following are the changes from calc version 2.12.1.10 to date: and contains an forced error saying that stdlib.h should be used instead. The Makefile symbol HAVE_MALLOC has been removed. - Fixed FreeBSD dereferencing type-punned pointer error in filepos2z(). - - Removed SGI IRIX from the compiler section. - Moved the sample code in the sample sub-directory up into the main source level. The sample/many_random.c source file is now sample_many.c. The sample/test_random.c source file is now @@ -94,6 +88,165 @@ The following are the changes from calc version 2.12.1.10 to date: string.h, and win32dll.h from ${INCDIR} if they exist. These calc include files are no longer supported. + Do reduce the number of special case .o build rules, the + ${ALLOW_CUSTOM} make flag is added to ${CFLAGS} by default. This means + that if ALLOW_CUSTOM= -DCUSTOM, then -DCUSTOM is given to the compile + line of most .c files. + + Calc -v reports "w/custom functions" or "w/o custom functions" on + the version string depending on if calc was compiled with the + ALLOW_CUSTOM= -DCUSTOM or not. + + Replaced the concept of compiler sets in the Makefile with + host target section in the Makefile. Initial host targets are: + + Linux + Darwin + FreeBSD + (default) <<== Target does not match any previous target name + Simple + + NOTE: If your target is not supported below and the default target + is not suitable for your needs, please send to the: + + calc-contrib at asthe dot com + + EMail address an "ifeq ($(target),YOUR_TARGET_NAME)" + ... "endif" set of lines from the Makefile so that + we can consider them for the next release. + + The custom/Makefile is now constructed from 3 parts: custom/Makefile.head, + the host target section in Makefile, and the custom/Makefile.tail. + + The top level Makefile and the custom/Makefile require a GNU Make + (such as gmake) or an equivalently advanced make. On many targets, + the default make is sufficient. On FreeBSD for example, one must + use gmake instead of make. + + If your target system does not have GNU Make (or equivalent), then + you should try using the Makefile.simple and custom/Makefile.simple + files: + + mv Makefile Makefile.gmake + cp Makefile.simple Makefile + mv custom/Makefile custom/Makefile.gmake + cp custom/Makefile.simple custom/Makefile + make all + + Added the ability to build calc with dynamic libraries, static + libraries or both. Many thanks goes to Matthew Miller (mattdm + at mattdm dot org) and Mirko Viviani (mirko at objectlab dot + org) for this help, encouragement, and testing of this major change! + + Added BLD_TYPE Makefile variable to control how calc is + built. The BLD_TYPE value may be one of: + + BLD_TYPE= calc-dynamic-only + BLD_TYPE= calc-static-only + + Each host target establishes a default BLD_TYPE value. Of course + one can override the host target BLD_TYPE on the make command line: + + make clobber + make calc-dynamic-only BLD_TYPE=calc-dynamic-only + + make clobber + make calc-static-only BLD_TYPE=calc-static-only + + NOTE: It is a very good idea to first clobber (remove) any previously + built .o, libs and executables before switching the build + between static and dynamic. + + which have the same effect as make all with a given build phase set. + + For Linux and Darwin, the default BLD_TYPE is calc-dynamic-only. + For the simple case, BLD_TYPE is calc-static-only. For the + default target (the target does not match any of the previous + defined targets), BLD_TYPE is calc-static-only. + + Added ${CSFLAGS} make variable to hold the {$CC} flags for compiling + without shared library. By default, ${CFLAGS} is ${CSFLAGS} with + ${CC_SHARE} added to it. + + Added ${CC_SHARE}, ${LIBCALC_SHLIB}, ${LIBCUSTCALC_SHLIB}, and + ${LD_SHARE} to the remaining compiler sets. + + Fixed make depend and make uninstall rules. Performed various + makefile syntax cleanups. + + Removed ${PROGS} and ${STATIC_PROGS} Makefile variables due to + the new BLD_TYPE system (see above). + + Added missing help for cp, calcpath, and stoponerror. + + Noted that calc fails the regression test (and will crash at + various times) when compiled with gcc v4.1.0. This problem was + first reported under Fedora Core 5 by Christian Siebert. + + Set the LESSCHARSET to iso8859 so that less will not confuse or + upset the col utility with Invalid or incomplete multi-byte or wide + characters. + + Updated the Free Software Foundation postal address and updated + the COPYING-LGPL from http://www.fsf.org/licensing/licenses/lgpl.txt + on 2007-Mar-14. Calc is using the same Version 2.1 of the LGPL, + only the postal address of the Free Software Foundation has + been updated. All source files were updated to RCS level 30. + Thanks goes to Martin Buck (m at rtin-buck dor de) for this patch. + + Added printf arg checking for GNU C compilers that helps check + printf-style functions in calc. Thanks goes to Martin Buck (m at + rtin-buck dor de) for this patch. + + Fixed issues where the argument of a printf-like did not match the + format type. + + Removed build function md5(). The MD5 hash has been compromised to + such a degree that is it no longer advisable to use this function. + + Removed build function sha(). The SHA hash has been compromised to + such a degree that is it no longer advisable to use this function. + Note that the SHA-1 hash has not been compromised to the same degree + and so this hash function remains. + + Renamed shs1.c to sha1.c. Renamed shs1.h to sha1.h. + + Added custom registers. The custom register function: + + custom("register", 3) + + returns the value of custom register 3. Custom registers, initialized + with 0, may take on any calc value: + + custom("register", regnum, value) + + Added REGNUM_MAX to the sysinfo custom function to return the maximum + register number: + + custom("sysinfo", "REGNUM_MAX") + + which defaults to 31. The first custom register is 0 and thus the + default number of custom registers is 32. + + Added E_OK #define in calc.h to indicate no error (0). + + Renamed C function powivalue() in value.c to powvalue() because it + now handles raising NUMBER or COMPLEX to a NUMBER or COMPLEX power. + + The powervalue() function in value.c may be given a NULL epsilon + which will cause to the builtin epsilon value to be used. + + Calc supports both real and complex exponentiation bases and exponents. + For a ^ b and a ** b, "a" and "b" can be a real value or a complex value: + + 2^3 3i^4 + 2.5 ^ 3.5 0.5i ^ 0.25 + 2.5 ^ 2.718i 3.13145i ^ 0.30103i + + Fixed typos in the calc man page thanks to a Debian bug report + by A. Costa that wsa kindly forwarded + to us by Martin Buck . + The following are the changes from calc version 2.12.1.8 to 2.12.1.9: @@ -125,7 +278,7 @@ The following are the changes from calc version 2.12.1.8 to 2.12.1.9: The usage help file is now formed from the contents of the calc man page. So "help usage" prints the version of the calc man page. Added ${COL} makefile symbol to support the formation of the calc.usage file from - calc.1 via the CALCPAGER (less). + calc.1 via the CALCPAGER (less) or NROFF (if NROFF is non-empty). The "help calc" command is now equivalent to "help help". @@ -154,6 +307,9 @@ The following are the changes from calc version 2.12.1.8 to 2.12.1.9: Calc and cscripts are installed mode 0755 instead of 0555 to make rpmlint happy. + Make clobber cleanup as suggested by Martin Buck . + The clobber rule now depends on the clean rule. + The following are the changes from calc version 2.12.1.6 to 2.12.1.7: @@ -162,7 +318,7 @@ The following are the changes from calc version 2.12.1.6 to 2.12.1.7: builtin, the CPU time reported for long running processes will not wrap around to 0 after only a few months. - Added the calc builtin function, systime(), to return the amount of + Added the calc built0in function, systime(), to return the amount of kernel CPU time used by the current process. The runtime() builtin function now returns the total amount of CPU @@ -6434,10 +6590,10 @@ Following is a list of visible changes to calc from version 1.24.7 to 1.26.1: ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.102 $ -## @(#) $Id: CHANGES,v 29.102 2007/02/18 14:45:46 chongo Exp $ +## @(#) $Revision: 30.8 $ +## @(#) $Id: CHANGES,v 30.8 2007/09/02 06:26:38 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/RCS/CHANGES,v $ ## ## Under source code control: 1993/06/02 18:12:57 diff --git a/COPYING b/COPYING index 9da615d..3446e88 100644 --- a/COPYING +++ b/COPYING @@ -12,8 +12,8 @@ This file is Copyrighted Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - # @(#) $Revision: 29.9 $ - # @(#) $Id: COPYING,v 29.9 2007/02/11 10:16:31 chongo Exp $ + # @(#) $Revision: 30.1 $ + # @(#) $Id: COPYING,v 30.1 2007/03/16 11:09:46 chongo Exp $ # @(#) $Source: /usr/local/src/cmd/calc/RCS/COPYING,v $ =-= @@ -45,12 +45,12 @@ Calc is covered by the GNU Lesser General Public License Public License by the calc command: help copying-lgpl You should have received a copy of the version 2.1 GNU Lesser General - Public License with calc; if not, write to: + Public License with calc; if not, write to the following address: Free Software Foundation, Inc. - 59 Temple Place - Suite 330 - Boston, MA 02111-1307 + 51 Franklin Street + Fifth Floor + Boston, MA 02110-1301 USA The contact addresses for calc is as follows: diff --git a/COPYING-LGPL b/COPYING-LGPL index 223ede7..a2a1d92 100644 --- a/COPYING-LGPL +++ b/COPYING-LGPL @@ -2,7 +2,7 @@ Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -476,7 +476,7 @@ convey the exclusion of warranty; and each file should have at least the This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -485,7 +485,7 @@ convey the exclusion of warranty; and each file should have at least the You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Also add information on how to contact you by electronic and paper mail. diff --git a/HOWTO.INSTALL b/HOWTO.INSTALL index 66ac6d6..18e1159 100644 --- a/HOWTO.INSTALL +++ b/HOWTO.INSTALL @@ -27,6 +27,20 @@ Installing calc from the gziped tarball in 4 easy steps: 1) Look at the makefile, and adjust it to suit your needs. + The top level Makefile and the custom/Makefile require a GNU + Make (such as gmake) or an equivalently advanced make. On many + targets, the default make is sufficent. On FreeBSD for example, + one must use gmake instead of make. + + If your target system does not have GNU Make (or equivalent), then + you should try using the Makefile.simple and custom/Makefile.simple + files: + + mv Makefile Makefile.gmake + cp Makefile.simple Makefile + mv custom/Makefile custom/Makefile.gmake + cp custom/Makefile.simple custom/Makefile + The Makefile, as shipped, is suitable for installation under Linux and Un*x-like environments. For the most part, the default values should work. If in doubt, follow the 'When in doubt' @@ -126,12 +140,36 @@ Installing calc from the gziped tarball in 4 easy steps: 2) build calc: + The top level Makefile and the custom/Makefile require a GNU + Make (such as gmake) or an equivalently advanced make. On many + targets, the default make is sufficent. On FreeBSD for example, + one must use gmake instead of make. + + If your target system does not have GNU Make (or equivalent), then + you should try using the Makefile.simple and custom/Makefile.simple + files: + + mv Makefile Makefile.gmake + cp Makefile.simple Makefile + mv custom/Makefile custom/Makefile.gmake + cp custom/Makefile.simple custom/Makefile + make all ==> We are interested in any compiler warnings (and errors) that you may find. See the BUGS file if you find any compiler warning or errors. + NOTE: You can force calc to build with only static libs: + + make clobber + make calc-static-only BLD_TYPE=calc-static-only + + or force calc to build with only dynamic libs: + + make clobber + make calc-dynamic-only BLD_TYPE=calc-dynamic-only + 3) test calc: make check @@ -139,6 +177,10 @@ Installing calc from the gziped tarball in 4 easy steps: ==> If you run into problems, read the BUGS file and follow the instructions found in there. + NOTE: For a quiet check which only prints if something goes wrong: + + make chk + 4) install calc: make install @@ -146,7 +188,7 @@ Installing calc from the gziped tarball in 4 easy steps: We suggest that you might want to read the README file and look at the calc help subsystem. See the README file for details. -## Copyright (C) 1999 Landon Curt Noll +## Copyright (C) 1999-2007 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 @@ -160,10 +202,10 @@ the calc help subsystem. See the README file for details. ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.9 $ -## @(#) $Id: HOWTO.INSTALL,v 29.9 2006/09/18 13:11:57 chongo Exp $ +## @(#) $Revision: 30.5 $ +## @(#) $Id: HOWTO.INSTALL,v 30.5 2007/09/01 19:54:03 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/RCS/HOWTO.INSTALL,v $ ## ## Under source code control: 1999/09/27 20:48:44 diff --git a/LIBRARY b/LIBRARY index c7ce7f6..be3d529 100644 --- a/LIBRARY +++ b/LIBRARY @@ -636,10 +636,10 @@ need call libcalc_call_me_last() only once. ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.7 $ -## @(#) $Id: LIBRARY,v 29.7 2007/02/18 14:45:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: LIBRARY,v 30.1 2007/03/16 11:09:46 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/RCS/LIBRARY,v $ ## ## Under source code control: 1993/07/30 19:44:49 diff --git a/Makefile b/Makefile index 0a7cfb9..c6c8696 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,12 @@ # # calc - arbitrary precision calculator # +######################################################################## +# Gnu makefile: # This is a Gnu make makefile. If your make does not # +# Gnu makefile: # understand this makefilkke format, then edit and use # +# Gnu makefile: # Makefile.simple instead of this Makefile. # +######################################################################## +# # (Generic calc makefile) # # NOTE: This is NOT the calc rpm Makefile. This Makefile is a generic @@ -32,8 +38,8 @@ # received a copy with calc; if not, write to Free Software Foundation, Inc. # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. # -MAKEFILE_REV= $$Revision: 29.94 $$ -# @(#) $Id: Makefile.ship,v 29.94 2007/02/18 15:29:23 chongo Exp $ +MAKEFILE_REV= $$Revision: 30.18 $$ +# @(#) $Id: Makefile.ship,v 30.18 2007/09/02 05:38:34 chongo Exp $ # @(#) $Source: /usr/local/src/cmd/calc/RCS/Makefile.ship,v $ # # Under source code control: 1990/02/15 01:48:41 @@ -45,6 +51,22 @@ MAKEFILE_REV= $$Revision: 29.94 $$ # calculator by David I. Bell with help/mods from others # Makefile by Landon Curt Noll +#if 0 /* start of skip for non-Gnu makefiles */ +############################################################################## +#-=-=-=-=-=-=-=-=- Identify the target machine, if possible -=-=-=-=-=-=-=-=-# +############################################################################## + +# NOTE: You can force a target value by defining target as in: +# +# make ...__optional_arguments_... target=value + +# Try uname -s if the target was not alreadhy set on the make command line +# +ifeq ($(target),) +target=$(shell uname -s 2>/dev/null) +endif +#endif /* end of skip for non-Gnu makefiles */ + ############################################################################## #-=-=-=-=-=-=-=-=- You may want to change some values below -=-=-=-=-=-=-=-=-# ############################################################################## @@ -812,6 +834,8 @@ CALCPAGER= less # Select DEBUG= -O2 -gstabs+ -DWINDOZ for DJGPP. # #DEBUG= +#DEBUG= -g +#DEBUG= -g3 # #DEBUG= -O #DEBUG= -O -g @@ -832,80 +856,6 @@ CALCPAGER= less DEBUG= -O3 -g3 #DEBUG= -O3 -ipa #DEBUG= -O3 -g3 -ipa -# -#DEBUG= -std0 -fast -O4 -static -# -#DEBUG= -g -#DEBUG= -g3 -#DEBUG= -gx -#DEBUG= -WM,-g -# -#DEBUG= -O2 -gstabs+ -DWINDOZ - -# How to compile .c files so that we can form a shared library. -# -# CC_SHARE= -fPIC -# Building for shared library using the gcc position independent code -# (PIC) model. -# CC_SHARE= -# Do not build for shared libraries. -# -# NOTE: If CC_SHARE= is empty, then you very likely want to set -# CC_SHLIB= and LD_SHARE= to empty. -# -# If in doubt, try: -# CC_SHARE= -fPIC -# If that fails try: -# CC_SHARE= -# -# NOTE: Shared libraries are not yet supported. For now, use CC_SHARE= -# -#CC_SHARE= -fPIC -CC_SHARE= - -# How build a shared librtary -# NOTE: This is not yet supported -# -# CC_SHLIB= -shared "-Wl,-soname,libcalc.so.`./ver_calc${EXE} -V`" -# Building for shared library using the gcc position independent code -# (PIC) model. -# CC_SHLIB= -# Do not build for shared libraries. -# -# NOTE: If CC_SHARE= is empty, then you very likely want to set -# CC_SHLIB= and LD_SHARE= to empty. -# -# If in doubt, try: -# CC_SHLIB= -shared "-Wl,-soname,libcalc.so.`./ver_calc${EXE} -V`" -# If that fails, try: -# CC_SHLIB= -# -# NOTE: Shared libraries are not yet supported. For now, use CC_SHLIB= -# -#CC_SHLIB= -shared "-Wl,-soname,libcalc.so.`./ver_calc${EXE} -V`" -CC_SHLIB= - -# How to link with a shared library -# NOTE: This is not yet supported -# -# LD_SHARE= -L. -# Building for shared library using the gcc position independent code -# (PIC) model. -# LD_SHARE= -# -# NOTE: If CC_SHARE= is empty, then you very likely want to set -# CC_SHLIB= and LD_SHARE= to empty. -# Do not build for shared libraries. -# -# If in doubt, try: -# LD_SHARE= -L. -# If that fails, try: -# LD_SHARE= -# -# NOTE: Shared libraries are not yet supported. For now, use LD_SHARE= -# -#LD_SHARE= -L. -LD_SHARE= # Some systems require one to use ranlib to add a symbol table to # a *.a link library. Set RANLIB to the utility that performs this @@ -922,7 +872,15 @@ RANLIB=ranlib # If in doubt, set MAKE_FILE to Makefile # MAKE_FILE= Makefile -#MAKE_FILE= + +# Controlling file makefile basename (without the path) +# +# This is the basename same of the makefile that may/does/will drive +# this makefile. +# +# If in doubt, set TOP_MAKE_FILE to Makefile +# +TOP_MAKE_FILE= Makefile # If you do not wish to use purify, set PURIFY to an empty string. # @@ -956,14 +914,14 @@ LD_DEBUG= # are useful for SGI IRIX people who have 'WorkShop Performance Tools' # and who also set 'LD_DEBUG= -lmalloc_cv' above. # -# If in doubt, use CALC_ENV= CALCPATH=./cal. +# If in doubt, use CALC_ENV= CALCPATH=./cal LD_LIBRARY_PATH=.:./custom # -CALC_ENV= CALCPATH=./cal +CALC_ENV= CALCPATH=./cal LD_LIBRARY_PATH=. #CALC_ENV= CALCPATH=./cal MALLOC_VERBOSE=1 MALLOC_TRACING=1 \ -# MALLOC_FASTCHK=1 MALLOC_FULLWARN=1 +# MALLOC_FASTCHK=1 MALLOC_FULLWARN=1 LD_LIBRARY_PATH=.:./custom #CALC_ENV= CALCPATH=./cal MALLOC_VERBOSE=1 MALLOC_TRACING=1 \ # MALLOC_FASTCHK=1 MALLOC_FULLWARN=1 MALLOC_CLEAR_FREE=1 \ -# MALLOC_CLEAR_MALLOC=1 +# MALLOC_CLEAR_MALLOC=1 LD_LIBRARY_PATH=.:./custom # By default, custom builtin functions may only be executed if calc # is given the -C option. This is because custom builtin functions @@ -1005,195 +963,19 @@ MKDIR_ARG= -p EXT= #EXT=.exe -################ -# compiler set # -################ +# The default calc versions # -# Select your compiler type by commenting out one of the cc sets below: -# -# CCOPT are flags given to ${CC} for optimization -# CCWARN are flags given to ${CC} for warning message control -# CCWERR are flags given to ${CC} to make warnings fatal errors -# NOTE: CCWERR is only set in development Makefiles and must -# only be used with ${CC}, not ${LCC}. -# CCMISC are misc flags given to ${CC} -# -# CFLAGS are all flags given to ${CC} [[often includes CCOPT, CCWARN, CCMISC]] -# ICFLAGS are given to ${CC} for intermediate progs -# -# LDFLAGS are flags given to ${CC} for linking .o files -# ILDFLAGS are flags given to ${CC} for linking .o files for intermediate progs -# -# LCC how the the C compiler is invoked on locally executed intermediate progs -# CC is how the the C compiler is invoked (with an optional Purify) -# -### -# -# Linux set -# -CCWARN= -Wall -W -Wno-comment -CCWERR= -CCOPT= ${DEBUG} ${CC_SHARE} -CCMISC= -# -CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC} -ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC} -# -LDFLAGS= ${LD_SHARE} -ILDFLAGS= -# -LCC= gcc -CC= ${PURIFY} ${LCC} ${CCWERR} -# -### -# -# Apple Mac OS X -# -#CCWARN= -Wall -W -Wno-comment -#CCWERR= -#CCOPT= ${DEBUG} ${CC_SHARE} -#CCMISC= -arch i386 -arch ppc -# -#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC} -#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC} -# -#LDFLAGS= ${LD_SHARE} -arch i386 -arch ppc -#ILDFLAGS= -# -#LCC= gcc -#CC= ${PURIFY} ${LCC} ${CCWERR} -# -### -# -# gcc set -# -#CCWARN= -Wall -W -Wno-comment -#CCWERR= -#CCOPT= ${DEBUG} ${CC_SHARE} -#CCMISC= -# -#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC} -#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC} -# -#LDFLAGS= ${LD_SHARE} -#ILDFLAGS= -# -#LCC= gcc -#CC= ${PURIFY} ${LCC} ${CCWERR} -# -### -# -# common cc set -# -# If -O3 -g3 is not supported try: DEBUG= -O2 -g -# If -O2 -g is not supported try: DEBUG= -O -g -# -#CCWARN= -#CCWERR= -#CCOPT= ${DEBUG} ${CC_SHARE} -#CCMISC= -# -#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC} -#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC} -# -#LDFLAGS= ${LD_SHARE} -#ILDFLAGS= -# -#LCC= cc -#CC= ${PURIFY} ${LCC} ${CCWERR} -# -### -# -# HP-UX set -# -# If -O3 -g3 is not supported try: DEBUG= -O2 -g -# If -O2 -g is not supported try: DEBUG= -O -g -# -# Warning: Some HP-UX optimizers are brain-damaged. -# If 'make check' fails use: DEBUG= -g -# -#CCWARN= -#CCWERR= -#CCOPT= ${DEBUG} ${CC_SHARE} -#CCMISC= +e -# -#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC} -#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC} -# -#LDFLAGS= ${LD_SHARE} -#ILDFLAGS= -# -#LCC= cc -#CC= ${PURIFY} ${LCC} ${CCWERR} -# -### -# -# AIX RS/6000 set -# -# If -O3 -g3 is not supported try: DEBUG= -O2 -g -# If -O2 -g is not supported try: DEBUG= -O -g -# -#CCWARN= -#CCWERR= -#CCOPT= ${DEBUG} ${CC_SHARE} -#CCMISC= -qlanglvl=ansi -# -#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC} -#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC} -# -#LDFLAGS= ${LD_SHARE} -#ILDFLAGS= -# -#LCC= cc -#CC= ${PURIFY} ${LCC} ${CCWERR} -# -### -# -# Solaris Sun cc compiler set -# -# If -O3 -g3 is not supported try: DEBUG= -O2 -g -# If -O2 -g is not supported try: DEBUG= -O -g -# -# We need -DFORCE_STDC to make use of ANSI-C like features and -# to avoid the use of -Xc (which as a lose performance wise). -# -#CCWARN= -#CCWERR= -#CCOPT= ${DEBUG} ${CC_SHARE} -#CCMISC= -DFORCE_STDC -# -#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC} -#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC} -# -#LDFLAGS= ${LD_SHARE} -#ILDFLAGS= -# -#LCC= cc -#CC= ${PURIFY} ${LCC} ${CCWERR} -# -### -# -# Dec Alpha / Compaq Tru64 cc (non-gnu) compiler set -# -# For better performance, set the following: DEBUG= -std0 -fast -O4 -static -# -#CCWARN= -#CCWERR= -#CCOPT= ${DEBUG} ${CC_SHARE} -#CCMISC= -# -#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC} -#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC} -Wno-unused -# -#LDFLAGS= ${LD_SHARE} -#ILDFLAGS= -# -#LCC= cc -#CC= ${PURIFY} ${LCC} ${CCWERR} +VERSION= 2.12.2 +VERS= 2.12.2 +VER= 2.12 +VE= 2 -############################################################################## -#-=-=-=-=-=-=-=-=- Be careful if you change something below -=-=-=-=-=-=-=-=-# -############################################################################## +# Names of shared libraries with versions +# +LIB_EXT= .so +LIB_EXT_VERS= ${LIB_EXT}.${VERS} +LIB_EXT_VER= ${LIB_EXT}.${VER} +LIB_EXT_VE= ${LIB_EXT}.${VE} # standard utilities used during make # @@ -1224,9 +1006,317 @@ AR= ar TRUE= true CAT= cat COL= col +LN= ln +LDCONFIG= ldconfig # assume the X11 makedepend tool for the depend rule MAKEDEPEND= makedepend +# Extra compiling and linking flags +# +# EXTRA_CFLAGS are flags given to ${CC} when compiling C files +# EXTRA_LDFLAGS are flags given to ${CC} when linking progs +# +# Both CFLAGS and LDFLAGS are left blank in this Makefile by +# default so that users may use them on the make command line +# to always the way that C is compiled and files are linked +# respectively. For example: +# +# make all EXTRA_CFLAGS="-DMAGIC" EXTRA_LDFLAGS="-lmagic" +# +# NOTE: These should be left blank in this Makefile to make it +# easier to add stuff on the command line. If you want to +# to change the way calc is compiled by this Makefile, change +# the appropirate host target section below or a flag above. +# +EXTRA_CFLAGS= +EXTRA_LDFLAGS= + +# COMMON_CFLAGS are the common ${CC} flags used for all progs, both +# intermediate and final calc and calc related progs +# +COMMON_CFLAGS= -DCALC_SRC ${ALLOW_CUSTOM} ${CCWARN} ${CCMISC} ${EXTRA_CFLAGS} + +# COMMON_LDFLAGS are the common flags used for linking all progs, both +# intermediate and final calc and calc related progs +# +COMMON_LDFLAGS= ${EXTRA_LDFLAGS} + +# start of host target cut - Do not remove this line +############################################################################## +#-=-=-=-=-=- host target section - targets that override defaults -=-=-=-=-=-# +############################################################################## + +# Common values set in targets +# +# BLD_TYPE determines if calc is built with static and/or dynamic libs. +# Set this value to one of: +# +# BLD_TYPE= calc-dynamic-only +# BLD_TYPE= calc-static-only +# +# CC_SHARE are flags given to ${CC} to build .o files suitable for shared libs +# DEFAULT_LIB_INSTALL_PATH is where calc progs look for calc shared libs +# LD_SHARE are common flags given to ${CC} to link with shared libraries +# LIBCALC_SHLIB are flags given to ${CC} to build libcalc shared lib +# LIBCUSTCALC_SHLIB are flags given to ${CC} to build libcustcalc shared lib +# +# NOTE: The above 4 values are unused if BLD_TYPE= calc-static-only +# +# CC_STATIC are flags given to ${CC} to build .o files suitable for static libs +# LD_STATIC are common flags given to ${CC} to link with static libraries +# LIBCALC_STATIC are flags given to ${CC} to build libcalc static lib +# LIBCUSTCALC_STATIC are flags given to ${CC} to build libcustcalc static lib +# +# NOTE: The above 4 values are unused if BLD_TYPE= calc-dynamic-only +# +# CCOPT are flags given to ${CC} for optimization +# CCWARN are flags given to ${CC} for warning message control +# CCWERR are flags given to ${CC} to make warnings fatal errors +# NOTE: CCWERR is only set in development Makefiles and must only be +# used with ${CC}, not ${LCC}. If you do not want the compiler +# to abort on warnings, then leave CCWERR blank. +# CCMISC are misc flags given to ${CC} +# +# LCC how the the C compiler is invoked on locally executed intermediate progs +# CC is how the the C compiler is invoked (with an optional Purify) +# +# Specific target overrides or modifications to default values + +########################################################################## +# NOTE: If your target is not supported below and the default target # +# is not suitable for your needs, please send to the: # +# # +# calc-contrib at asthe dot com # +# # +# EMail address an "ifeq ($(target),YOUR_TARGET_NAME)" ... "endif" # +# set of lines so that we can consider them for the next release. # +########################################################################## + +#if 0 /* start of skip for non-Gnu makefiles */ +################ +# Linux target # +################ + +ifeq ($(target),Linux) +# +BLD_TYPE= calc-dynamic-only +# +CC_SHARE= -fPIC +DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib +LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \ + "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}" +LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERS}" +LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERS}" +# +CC_STATIC= +LD_STATIC= +LIBCALC_STATIC= +LIBCUSTCALC_STATIC= +# +CCWARN= -Wall -W -Wno-comment +CCWERR= +CCOPT= ${DEBUG} +CCMISC= +# +LCC= gcc +CC= ${PURIFY} ${LCC} ${CCWERR} +# +endif + +################################# +# Apple MacOS X / Darwin target # +################################# + +ifeq ($(target),Darwin) +# +BLD_TYPE= calc-dynamic-only +# +CC_SHARE= -fPIC +DEFAULT_LIB_INSTALL_PATH= ${PWD}:/sw/lib:/usr/lib:${LIBDIR}:/usr/local/lib +LD_SHARE= ${DARWIN_ARCH} +LIBCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib +LIBCUSTCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib +# +CC_STATIC= +LD_STATIC= ${DARWIN_ARCH} +LIBCALC_STATIC= +LIBCUSTCALC_STATIC= +# +CCWARN= -Wall -W -Wno-comment +CCWERR= +CCOPT= ${DEBUG} +CCMISC= ${DARWIN_ARCH} +# +LCC= MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} gcc +CC= ${PURIFY} ${LCC} ${CCWERR} +# +# Darmin dynamic shared lib filenames +LIB_EXT:= .dylib +LIB_EXT_VERS:= .${VERS}${LIB_EXT} +LIB_EXT_VER:= .${VER}${LIB_EXT} +LIB_EXT_VE:= .${VE}${LIB_EXT} +# compile Universal by default +DARWIN_ARCH= -arch i386 -arch ppc +MACOSX_DEPLOYMENT_TARGET=10.4 +# +endif + +################## +# FreeBSD target # +################## + +######################################################################## +# NOTE: You MUST either use gmake (GNU Make) or you must try your luck # +# with Makefile.simple and custom/Makefile.simple versions. # +# See HOWTO.INSTALL for more information. # +######################################################################## + +ifeq ($(target),FreeBSD) +# +BLD_TYPE= calc-dynamic-only +# +CC_SHARE= -fPIC +DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib +LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \ + "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}" +LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERS}" +LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERS}" +# +CC_STATIC= +LD_STATIC= +LIBCALC_STATIC= +LIBCUSTCALC_STATIC= +# +CCWARN= -Wall -W -Wno-comment +CCWERR= +CCOPT= ${DEBUG} +CCMISC= +# +LCC= gcc +CC= ${PURIFY} ${LCC} ${CCWERR} +# +MAKE= gmake +# +endif + +####################################################### +# simple target - values used to form Makefile.simple # +####################################################### + +# NOTE: This is not a real host target. The simple target +# exists only to form the Makefile.simple file. + +ifeq ($(target),simple) +#endif /* end of skip for non-Gnu makefiles */ +# +BLD_TYPE= calc-static-only +# +CC_SHARE= -fPIC +DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib +LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \ + "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}" +LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERS}" +LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERS}" +# +CC_STATIC= +LD_STATIC= +LIBCALC_STATIC= +LIBCUSTCALC_STATIC= +# +CCWARN= -Wall -W -Wno-comment +CCWERR= +CCOPT= ${DEBUG} +CCMISC= +# +LCC= cc +CC= ${PURIFY} ${LCC} ${CCWERR} +# +# The simple makefile forces the use of static ${CC} flags +# +# ICFLAGS are given to ${CC} for intermediate progs used to help compile calc +# CFLAGS are given to ${CC} for calc progs other than intermediate progs +# ILDFLAGS for ${CC} in linking intermediate progs used to help compile calc +# LDFLAGS for ${CC} in linking calc progs other than intermediate progs +# +ICFLAGS= ${COMMON_CFLAGS} ${CC_STATIC} +CFLAGS= ${ICFLAGS} ${CCOPT} +# +ILDFLAGS= ${COMMON_LDFLAGS} ${LD_STATIC} +LDFLAGS= ${LD_DEBUG} ${ILDFLAGS} ${LIBCALC_STATIC} ${LIBCUSTCALC_STATIC} +# +#if 0 /* start of skip for non-Gnu makefiles */ +endif + +################################################### +# default target - when no specific target exists # +################################################### + +# NOTE: This is the default generic host target. Used when no other +# host target matches. + +ifeq ($(target),) +# +BLD_TYPE= calc-static-only +# +CC_SHARE= -fPIC +DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib +LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \ + "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}" +LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERS}" +LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERS}" +# +CC_STATIC= +LIBCALC_STATIC= +LIBCUSTCALC_STATIC= +LD_STATIC= +# +CCWARN= -Wall -W -Wno-comment +CCWERR= +CCOPT= ${DEBUG} +CCMISC= +# +LCC= gcc +CC= ${PURIFY} ${LCC} ${CCWERR} +# +endif + +########################################### +# Set the default compile flags for ${CC} # +########################################### + +# Required flags to compile C files for calc +# +# ICFLAGS are given to ${CC} for intermediate progs used to help compile calc +# CFLAGS are given to ${CC} for calc progs other than intermediate progs +# +# NOTE: This does not work for: make-XYZ-only and BLD_TYPE != make-XYZ-only +# +ifeq ($(BLD_TYPE),calc-static-only) +ICFLAGS= ${COMMON_CFLAGS} ${CC_STATIC} +else +ICFLAGS= ${COMMON_CFLAGS} ${CC_SHARE} +endif +CFLAGS= ${ICFLAGS} ${CCOPT} + +# Required flags to link files for calc +# +# ILDFLAGS for ${CC} in linking intermediate progs used to help compile calc +# LDFLAGS for ${CC} in linking calc progs other than intermediate progs +# +ILDFLAGS= ${COMMON_LDFLAGS} +LDFLAGS= ${LD_DEBUG} ${ILDFLAGS} + +#endif /* end of skip for non-Gnu makefiles */ + +####################################################################### +#-=-=-=-=-=- end of target section - only make rules below -=-=-=-=-=-# +####################################################################### +# end of host target cut - Do not remove this line + +############################################################################### +#=-=-=-=-=- Be careful if you change something in this next section -=-=-=-=-=# +############################################################################### + # Makefile debug # # Q=@ do not echo internal Makefile actions (quiet mode) @@ -1248,8 +1338,8 @@ LIBSRC= addop.c assocfunc.c blkcpy.c block.c byteswap.c \ codegen.c comfunc.c commath.c config.c const.c custom.c \ file.c func.c hash.c help.c hist.c input.c jump.c label.c \ lib_calc.c lib_util.c listfunc.c matfunc.c math_error.c \ - md5.c obj.c opcodes.c pix.c poly.c prime.c qfunc.c qio.c \ - qmath.c qmod.c qtrans.c quickhash.c seed.c shs.c shs1.c size.c \ + obj.c opcodes.c pix.c poly.c prime.c qfunc.c qio.c \ + qmath.c qmod.c qtrans.c quickhash.c seed.c sha1.c size.c \ str.c symbol.c token.c value.c version.c zfunc.c zio.c \ zmath.c zmod.c zmul.c zprime.c zrand.c zrandom.c @@ -1262,8 +1352,8 @@ LIBOBJS= addop.o assocfunc.o blkcpy.o block.o byteswap.o calcerr.o \ codegen.o comfunc.o commath.o config.o const.o custom.o \ file.o func.o hash.o help.o hist.o input.o jump.o label.o \ lib_calc.o lib_util.o listfunc.o matfunc.o math_error.o \ - md5.o obj.o opcodes.o pix.o poly.o prime.o qfunc.o qio.o \ - qmath.o qmod.o qtrans.o quickhash.o seed.o shs.o shs1.o size.o \ + obj.o opcodes.o pix.o poly.o prime.o qfunc.o qio.o \ + qmath.o qmod.o qtrans.o quickhash.o seed.o sha1.o size.o \ str.o symbol.o token.o value.o version.o zfunc.o zio.o \ zmath.o zmod.o zmul.o zprime.o zrand.o zrandom.o @@ -1279,12 +1369,12 @@ CALCSRC= calc.c # CALCOBJS= calc.o -# these .h files are needed by programs that use libcalc.a +# these .h files are needed to build the math link library # LIB_H_SRC= alloc.h blkcpy.h block.h byteswap.h calc.h cmath.h \ config.h custom.h decl.h file.h func.h hash.h hist.h jump.h \ - label.h lib_util.h lib_calc.h md5.h nametype.h \ - opcodes.h prime.h qmath.h shs.h shs1.h str.h \ + label.h lib_util.h lib_calc.h nametype.h \ + opcodes.h prime.h qmath.h sha1.h str.h \ symbol.h token.h value.h zmath.h zrand.h zrandom.h # we build these .h files during the make @@ -1364,146 +1454,171 @@ SAMPLE_OBJ= sample_many.o sample_rand.o # The complete list of Makefile vars passed down to custom/Makefile. # -CUSTOM_PASSDOWN= Q="${Q}" \ - INCDIR="${INCDIR}" \ +CUSTOM_PASSDOWN= \ + ALLOW_CUSTOM="${ALLOW_CUSTOM}" \ + AR=${AR} \ + AWK=${AWK} \ BINDIR="${BINDIR}" \ - LIBDIR="${LIBDIR}" \ - CALC_SHAREDIR="${CALC_SHAREDIR}" \ - HELPDIR="${HELPDIR}" \ + BLD_TYPE="${BLD_TYPE}" \ CALC_INCDIR="${CALC_INCDIR}" \ + CALC_SHAREDIR="${CALC_SHAREDIR}" \ + CAT=${CAT} \ + CC="${CC}" \ + CCERR="${CCERR}" \ + CCMISC="${CCMISC}" \ + CCOPT="${CCOPT}" \ + CCWARN="${CCWARN}" \ + CC_SHARE="${CC_SHARE}" \ + CFLAGS="${CFLAGS} -I.." \ + CHMOD=${CHMOD} \ + CMP=${CMP} \ + CO=${CO} \ + COMMON_CFLAGS="${COMMON_CFLAGS} -I.." \ + COMMON_LDFLAGS="${COMMON_LDFLAGS}" \ + CP=${CP} \ CUSTOMCALDIR="${CUSTOMCALDIR}" \ CUSTOMHELPDIR="${CUSTOMHELPDIR}" \ CUSTOMINCDIR="${CUSTOMINCDIR}" \ - SCRIPTDIR="${SCRIPTDIR}" \ DEBUG="${DEBUG}" \ - CC_SHARE="${CC_SHARE}" \ - LD_SHARE="${LD_SHARE}" \ - RANLIB="${RANLIB}" \ - PURIFY="${PURIFY}" \ - ALLOW_CUSTOM="${ALLOW_CUSTOM}" \ - CCWARN="${CCWARN}" \ - CCOPT="${CCOPT}" \ - CCMISC="${CCMISC}" \ - CFLAGS="${CFLAGS} ${ALLOW_CUSTOM} -I/usr/include -I.." \ - ICFLAGS="${ICFLAGS}" \ - LDFLAGS="${LDFLAGS}" \ + DEFAULT_LIB_INSTALL_PATH="${DEFAULT_LIB_INSTALL_PATH}" \ + FMT=${FMT} \ + GREP=${GREP} \ + HELPDIR="${HELPDIR}" \ + ICFLAGS="${ICFLAGS} -I.." \ ILDFLAGS="${ILDFLAGS}" \ - LCC="${LCC}" \ - CC="${CC}" \ - MAKE_FILE=${MAKE_FILE} \ - SED=${SED} \ - CHMOD=${CHMOD} \ - CMP=${CMP} \ - MAKEDEPEND=${MAKEDEPEND} \ - SORT=${SORT} \ + INCDIR="${INCDIR}" \ LANG=${LANG} \ - RM=${RM} \ - TOUCH=${TOUCH} \ + LCC="${LCC}" \ + LDCONFIG=${LDCONFIG} \ + LDFLAGS="${LDFLAGS}" \ + LD_SHARE="${LD_SHARE}" \ + LIBCUSTCALC_SHLIB="${LIBCUSTCALC_SHLIB}" \ + LIBDIR="${LIBDIR}" \ + LN=${LN} \ + MAKE=${MAKE} \ + MAKEDEPEND=${MAKEDEPEND} \ + MAKE_FILE=Makefile \ MKDIR=${MKDIR} \ - RMDIR=${RMDIR} \ - CP=${CP} \ MV=${MV} \ - CO=${CO} \ - AR=${AR} \ + PURIFY="${PURIFY}" \ + Q="${Q}" \ + RANLIB="${RANLIB}" \ + RM=${RM} \ + RMDIR=${RMDIR} \ + SCRIPTDIR="${SCRIPTDIR}" \ + SED=${SED} \ + SORT=${SORT} \ + T=${T} \ + TOP_MAKE_FILE=${MAKE_FILE} \ + TOUCH=${TOUCH} \ TRUE=${TRUE} \ - CAT=${CAT} \ - T=${T} + VERSION=${VERSION} \ + target=${target} # The compelte list of Makefile vars passed down to help/Makefile. # -HELP_PASSDOWN= Q="${Q}" \ - INCDIR="${INCDIR}" \ +HELP_PASSDOWN= \ + AR=${AR} \ BINDIR="${BINDIR}" \ - LIBDIR="${LIBDIR}" \ - CALC_SHAREDIR="${CALC_SHAREDIR}" \ - HELPDIR="${HELPDIR}" \ CALC_INCDIR="${CALC_INCDIR}" \ + CALC_SHAREDIR="${CALC_SHAREDIR}" \ + CAT=${CAT} \ + CFLAGS="${CFLAGS}" \ + CHMOD=${CHMOD} \ + CMP=${CMP} \ + CO=${CO} \ + COMMON_CFLAGS="${COMMON_CFLAGS}" \ + COMMON_LDFLAGS="${COMMON_LDFLAGS}" \ + CP=${CP} \ CUSTOMCALDIR="${CUSTOMCALDIR}" \ CUSTOMHELPDIR="${CUSTOMHELPDIR}" \ CUSTOMINCDIR="${CUSTOMINCDIR}" \ - SCRIPTDIR="${SCRIPTDIR}" \ + EXT=${EXT} \ + FMT=${FMT} \ + HELPDIR="${HELPDIR}" \ ICFLAGS="${ICFLAGS}" \ ILDFLAGS="${ILDFLAGS}" \ - LCC="${LCC}" \ - MAKE_FILE=${MAKE_FILE} \ - SED=${SED} \ - CHMOD=${CHMOD} \ - CMP=${CMP} \ - FMT=${FMT} \ + INCDIR="${INCDIR}" \ LANG=${LANG} \ - EXT=${EXT} \ - RM=${RM} \ - TOUCH=${TOUCH} \ + LCC="${LCC}" \ + LIBDIR="${LIBDIR}" \ + MAKE_FILE=Makefile \ MKDIR=${MKDIR} \ - RMDIR=${RMDIR} \ - CP=${CP} \ MV=${MV} \ - CO=${CO} \ - AR=${AR} \ - TRUE=${TRUE} \ - CAT=${CAT} \ - T=${T} + Q="${Q}" \ + RM=${RM} \ + RMDIR=${RMDIR} \ + SCRIPTDIR="${SCRIPTDIR}" \ + SED=${SED} \ + T=${T} \ + TOP_MAKE_FILE=${MAKE_FILE} \ + TOUCH=${TOUCH} \ + TRUE=${TRUE} # The compelte list of Makefile vars passed down to cal/Makefile. # -CAL_PASSDOWN= Q="${Q}" \ - INCDIR="${INCDIR}" \ +CAL_PASSDOWN= \ + AR=${AR} \ BINDIR="${BINDIR}" \ - LIBDIR="${LIBDIR}" \ - CALC_SHAREDIR="${CALC_SHAREDIR}" \ - HELPDIR="${HELPDIR}" \ CALC_INCDIR="${CALC_INCDIR}" \ + CALC_SHAREDIR="${CALC_SHAREDIR}" \ + CAT=${CAT} \ + CHMOD=${CHMOD} \ + CMP=${CMP} \ + CO=${CO} \ + CP=${CP} \ CUSTOMCALDIR="${CUSTOMCALDIR}" \ CUSTOMHELPDIR="${CUSTOMHELPDIR}" \ CUSTOMINCDIR="${CUSTOMINCDIR}" \ - SCRIPTDIR="${SCRIPTDIR}" \ - MAKE_FILE=${MAKE_FILE} \ - CHMOD=${CHMOD} \ - CMP=${CMP} \ + HELPDIR="${HELPDIR}" \ + INCDIR="${INCDIR}" \ LANG=${LANG} \ - RM=${RM} \ - TOUCH=${TOUCH} \ + LIBDIR="${LIBDIR}" \ + MAKE_FILE=Makefile \ MKDIR=${MKDIR} \ - RMDIR=${RMDIR} \ - CP=${CP} \ MV=${MV} \ - CO=${CO} \ - AR=${AR} \ - TRUE=${TRUE} \ - CAT=${CAT} \ - T=${T} + Q="${Q}" \ + RM=${RM} \ + RMDIR=${RMDIR} \ + SCRIPTDIR="${SCRIPTDIR}" \ + T=${T} \ + TOP_MAKE_FILE=${MAKE_FILE} \ + TOUCH=${TOUCH} \ + TRUE=${TRUE} # The compelte list of Makefile vars passed down to cscript/Makefile. # -CSCRIPT_PASSDOWN= Q="${Q}" \ - INCDIR="${INCDIR}" \ +CSCRIPT_PASSDOWN= \ + AR=${AR} \ BINDIR="${BINDIR}" \ - LIBDIR="${LIBDIR}" \ - CALC_SHAREDIR="${CALC_SHAREDIR}" \ - HELPDIR="${HELPDIR}" \ CALC_INCDIR="${CALC_INCDIR}" \ + CALC_SHAREDIR="${CALC_SHAREDIR}" \ + CAT=${CAT} \ + CHMOD=${CHMOD} \ + CMP=${CMP} \ + CO=${CO} \ + CP=${CP} \ CUSTOMCALDIR="${CUSTOMCALDIR}" \ CUSTOMHELPDIR="${CUSTOMHELPDIR}" \ CUSTOMINCDIR="${CUSTOMINCDIR}" \ - SCRIPTDIR="${SCRIPTDIR}" \ - MAKE_FILE=${MAKE_FILE} \ - CHMOD=${CHMOD} \ - SED=${SED} \ FMT=${FMT} \ - SORT=${SORT} \ - CMP=${CMP} \ + HELPDIR="${HELPDIR}" \ + INCDIR="${INCDIR}" \ LANG=${LANG} \ - RM=${RM} \ - TOUCH=${TOUCH} \ + LIBDIR="${LIBDIR}" \ + MAKE_FILE=Makefile \ MKDIR=${MKDIR} \ - RMDIR=${RMDIR} \ - CP=${CP} \ MV=${MV} \ - CO=${CO} \ - AR=${AR} \ - TRUE=${TRUE} \ - CAT=${CAT} \ - T=${T} + Q="${Q}" \ + RM=${RM} \ + RMDIR=${RMDIR} \ + SCRIPTDIR="${SCRIPTDIR}" \ + SED=${SED} \ + SORT=${SORT} \ + T=${T} \ + TOP_MAKE_FILE=${MAKE_FILE} \ + TOUCH=${TOUCH} \ + TRUE=${TRUE} # complete list of .h files found (but not built) in the distribution # @@ -1532,15 +1647,30 @@ CALCLIBLIST= ${LIBSRC} ${UTIL_C_SRC} ${LIB_H_SRC} ${MAKE_FILE} \ # OBJS= ${LIBOBJS} ${CALCOBJS} ${UTIL_OBJS} ${SAMPLE_OBJS} +# static library build +# +CALC_STATIC_LIBS= libcalc.a libcustcalc.a + # Libaraies created and used to build calc # -CALC_STATIC_LIBS= libcalc.a custom/libcustcalc.a +CALC_DYNAMIC_LIBS= libcalc${LIB_EXT_VERS} libcustcalc${LIB_EXT_VERS} + +# Symlinks of dymanic shared libraries +# +SYM_DYNAMIC_LIBS= libcalc${LIB_EXT_VER} libcalc${LIB_EXT_VE} libcalc${LIB_EXT} \ + libcustcalc${LIB_EXT_VERS} libcustcalc${LIB_EXT_VER} \ + libcustcalc${LIB_EXT_VE} libcustcalc${LIB_EXT} # list of sample programs to that need to be built to satisfy sample rule # -# NOTE: The ${SAMPLE_TARGETS} are built but not installed at this time. +# NOTE: The ${SAMPLE_TARGETS} and ${SAMPLE_STATIC_TARGETS} are built but +# not installed at this time. +# +# NOTE: There must be a foo-static${EXE} in SAMPLE_STATIC_TARGETS for +# every foo${EXE} in ${SAMPLE_TARGETS}. # SAMPLE_TARGETS= sample_rand${EXE} sample_many${EXE} +SAMPLE_STATIC_TARGETS= sample_rand-static${EXE} sample_many-static${EXE} # list of cscript programs to that need to be built to satisfy cscript/.all # @@ -1550,16 +1680,27 @@ SAMPLE_TARGETS= sample_rand${EXE} sample_many${EXE} CSCRIPT_TARGETS= cscript/mersenne cscript/piforever cscript/plus \ cscript/square cscript/fproduct cscript/powerterm -# complete list of progs built +# dynamic first targets # -PROGS= calc${EXT} ${UTIL_PROGS} +DYNAMIC_FIRST_TARGETS= ${LICENSE} .dynamic + +# static first targets +# +STATIC_FIRST_TARGETS= ${LICENSE} .static + +# early targets - things needed before the main build phase can begin +# +EARLY_TARGETS= custom/Makefile hsrc .hsrc custom/.all + +# late targets - things needed after the main build phase is complete +# +LATE_TARGETS= calc.1 calc.usage \ + cal/.all help/.all help/builtin cscript/.all \ + Makefile.simple # complete list of targets # -TARGETS= ${LICENSE} ${CALC_STATIC_LIBS} custom/.all calc${EXT} \ - ${SAMPLE_TARGETS} calc.1 calc.usage \ - cal/.all help/.all help/builtin cscript/.all - +TARGETS= ${EARLY_TARGETS} ${BLD_TYPE} ${LATE_TARGETS} ### # @@ -1567,26 +1708,118 @@ TARGETS= ${LICENSE} ${CALC_STATIC_LIBS} custom/.all calc${EXT} \ # ### -all: .hsrc ver_calc${EXE} ${TARGETS} CHANGES +all: ${BLD_TYPE} CHANGES -calc${EXT}: .hsrc ${CALC_STATIC_LIBS} ${CALCOBJS} ${MAKE_FILE} +calc-dynamic-only: ${DYNAMIC_FIRST_TARGETS} ${EARLY_TARGETS} \ + ${CALC_DYNAMIC_LIBS} ${SYM_DYNAMIC_LIBS} calc${EXT} \ + ${SAMPLE_TARGETS} ${LATE_TARGETS} + +.dynamic: ${MAKE_FILE} + ${Q} r="calc-dynamic-only"; \ + if [ "${BLD_TYPE}" != "$$r" ]; then \ + echo "NOTE: The host target $(target) defaults to a build" 1>&2; \ + echo " type of: ${BLD_TYPE}, so you need to use" 1>&2; \ + echo " the following make command:" 1>&2; \ + echo "" 1>&2; \ + echo " ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \ + echo " ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \ + echo "" 1>&2; \ + echo "NOTE: It is a very good idea to c first clobber any" 1>&2; \ + echo " previously built .o, libs and executables" 1>&2; \ + echo " before switching to $$r!" 1>&2; \ + echo "" 1>&2; \ + echo "=== aborting make ===" 1>&2; \ + exit 1; \ + fi + ${Q} for i in .static calc-static${EXT} ${SAMPLE_STATIC_TARGETS} \ + libcalc.a custom/libcustcalc.a; do \ + r="calc-dynamic-only"; \ + if [ -e "$$i" ]; then \ + echo "Found the static target $$i file. You must:" 1>&2; \ + echo "" 1>&2; \ + echo " ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \ + echo " ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \ + echo "" 1>&2; \ + echo "to clean out any previously build static files." 1>&2; \ + echo "" 1>&2; \ + echo "=== aborting make ===" 1>&2; \ + exit 2; \ + fi; \ + done + -${Q} ${TOUCH} $@ + +calc-static-only: ${STATIC_FIRST_TARGETS} ${EARLY_TARGETS} \ + ${CALC_STATIC_LIBS} calc-static${EXT} \ + ${SAMPLE_STATIC_TARGETS} ${LATE_TARGETS} + ${Q} for i in calc${EXT} ${SAMPLE_TARGETS}; do \ + if ! ${CMP} -s "$$i-static" "$$i"; then \ + ${RM} -f "$$i"; \ + ${LN} "$$i-static" "$$i"; \ + fi; \ + done + +.static: ${MAKE_FILE} + ${Q} r="calc-static-only"; \ + if [ "${BLD_TYPE}" != "$$r" ]; then \ + echo "NOTE: The host target $(target) defaults to a build" 1>&2; \ + echo " type of: ${BLD_TYPE}, so you need to use" 1>&2; \ + echo " the following make command:" 1>&2; \ + echo "" 1>&2; \ + echo " ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \ + echo " ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \ + echo "" 1>&2; \ + echo "NOTE: It is a very good idea to c first clobber any" 1>&2; \ + echo " previously built .o, libs and executables" 1>&2; \ + echo " before switching to $$r!" 1>&2; \ + echo "" 1>&2; \ + echo "=== aborting make ===" 1>&2; \ + exit 3; \ + fi + ${Q} for i in .dynamic ${CALC_DYNAMIC_LIBS} ${SYM_DYNAMIC_LIBS} \ + custom/libcustcalc${LIB_EXT_VERS}; do \ + r="calc-static-only"; \ + if [ -e "$$i" ]; then \ + echo "Found the dynamic target $$i file. You must:" 1>&2; \ + echo "" 1>&2; \ + echo " ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \ + echo " ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \ + echo "" 1>&2; \ + echo "to clean out any previously build dynamic files." 1>&2; \ + echo "" 1>&2; \ + echo "=== aborting make ===" 1>&2; \ + exit 4; \ + fi; \ + done + -${Q} ${TOUCH} $@ + +calc${EXT}: .hsrc ${CALCOBJS} ${CALC_DYNAMIC_LIBS} ${MAKE_FILE} ${RM} -f $@ - ${CC} ${LDFLAGS} ${CALCOBJS} ${CALC_STATIC_LIBS} \ - ${LD_DEBUG} ${READLINE_LIB} -o $@; \ + ${CC} ${CALCOBJS} ${LDFLAGS} ${LD_SHARE} ${CALC_DYNAMIC_LIBS} \ + ${READLINE_LIB} -o $@ -libcalc.a: ${LIBOBJS} ${MAKE_FILE} - -${RM} -f libcalc.a - ${AR} qc libcalc.a ${LIBOBJS} - ${RANLIB} libcalc.a - ${CHMOD} 0644 libcalc.a +libcalc${LIB_EXT_VERS}: ${LIBOBJS} ver_calc${EXE} ${MAKE_FILE} + ${CC} ${LIBCALC_SHLIB} ${LIBOBJS} -o libcalc${LIB_EXT_VERS} -# NOTE: Shared libraries are not yet supported. +libcalc${LIB_EXT_VER}: libcalc${LIB_EXT_VERS} + ${Q} ${RM} -f $@ + ${LN} -s $? $@ + +libcalc${LIB_EXT_VE}: libcalc${LIB_EXT_VERS} + ${Q} ${RM} -f $@ + ${LN} -s $? $@ + +libcalc${LIB_EXT}: libcalc${LIB_EXT_VERS} + ${Q} ${RM} -f $@ + ${LN} -s $? $@ + +### # -libcalc.so: ${LIBOBJS} ver_calc${EXE} ${MAKE_FILE} - ${CC} ${CC_SHLIB} ${LIBOBJS} -o libcalc.so.`./ver_calc${EXE}` +# calc documentation +# +### calc.1: calc.man ${MAKE_FILE} - -${RM} -f $@ + ${RM} -f $@ ${Q} echo forming calc.1 from calc.man @${SED} -e 's:$${LIBDIR}:${LIBDIR}:g' \ -e 's,$${BINDIR},${BINDIR},g' \ @@ -1599,10 +1832,14 @@ calc.1: calc.man ${MAKE_FILE} -e 's,$${CALCRC},${CALCRC},g' < calc.man > calc.1 ${Q} echo calc.man formed -calc.usage: calc.1 - -${RM} -f $@ +calc.usage: calc.1 ${MAKE_FILE} + ${RM} -f $@ ${Q} echo forming calc.usage from calc.1 - ${CALCPAGER} calc.1 | ${COL} -b > $@ + ${Q} if [ -z "${NROFF}" ]; then \ + LESSCHARSET=iso8859 ${CALCPAGER} calc.1; \ + else \ + ${NROFF} -man calc.1; \ + fi | ${COL} -b > $@ ${Q} echo calc.usage formed @@ -1614,47 +1851,28 @@ calc.usage: calc.1 sample: ${SAMPLE_TARGETS} -sample_rand.o: sample_rand.c - ${CC} ${CFLAGS} ${ALLOW_CUSTOM} sample_rand.c -c +sample_rand${EXE}: sample_rand.o ${CALC_DYNAMIC_LIBS} ${MAKE_FILE} + ${CC} sample_rand.o ${CLDFALGS} ${LD_SHARE} ${CALC_DYNAMIC_LIBS} \ + ${READLINE_LIB} -o $@ -sample_rand${EXE}: sample_rand.o ${CALC_STATIC_LIBS} ${MAKE_FILE} - ${CC} ${LDFLAGS} sample_rand.o ${CALC_STATIC_LIBS} \ - ${LD_DEBUG} ${READLINE_LIB} -o $@ +sample_many${EXE}: sample_many.o ${CALC_DYNAMIC_LIBS} ${MAKE_FILE} + ${CC} sample_many.o ${CLDFALGS} ${LD_SHARE} ${CALC_DYNAMIC_LIBS} \ + ${READLINE_LIB} -o $@ -sample_many.o: sample_many.c - ${CC} ${CFLAGS} ${ALLOW_CUSTOM} sample_many.c -c - -sample_many${EXE}: sample_many.o ${CALC_STATIC_LIBS} ${MAKE_FILE} - ${CC} ${LDFLAGS} sample_many.o ${CALC_STATIC_LIBS} \ - ${LD_DEBUG} ${READLINE_LIB} -o $@ - - -## +### # # Special .o files # -## - -calc.o: calc.c ${MAKE_FILE} - ${CC} ${CFLAGS} ${ALLOW_CUSTOM} -c calc.c - -config.o: config.c ${MAKE_FILE} - ${CC} ${CFLAGS} ${ALLOW_CUSTOM} -c config.c - -custom.o: custom.c ${MAKE_FILE} - ${CC} ${CFLAGS} ${ALLOW_CUSTOM} -c custom.c +### hist.o: hist.c ${MAKE_FILE} - ${CC} ${CFLAGS} ${TERMCONTROL} ${USE_READLINE} ${READLINE_INCLUDE} -c hist.c - -func.o: func.c ${MAKE_FILE} - ${CC} ${CFLAGS} ${ALLOW_CUSTOM} -c func.c + ${CC} ${CFLAGS} ${TERMCONTROL} ${USE_READLINE} ${READLINE_INCLUDE} \ + -c hist.c seed.o: seed.c no_implicit.arg ${MAKE_FILE} ${CC} ${CFLAGS} `${CAT} no_implicit.arg` -c seed.c - -## +### # # The next set of rules cause the .h files BUILD_H_SRC files to be built # according tot he system and the Makefile variables above. The hsrc rule @@ -1668,16 +1886,16 @@ seed.o: seed.c no_implicit.arg ${MAKE_FILE} # We also place ; ${TRUE} at the end of some commands to avoid # meaningless cosmetic messages by the same system. # -## +### hsrc: ${BUILD_H_SRC} ${BUILD_C_SRC} .hsrc: ${BUILD_H_SRC} ${BUILD_C_SRC} - -${Q} ${RM} -f .hsrc + ${Q} ${RM} -f .hsrc -${Q} ${TOUCH} .hsrc conf.h: ${MAKE_FILE} - -${Q} ${RM} -f conf.h + ${Q} ${RM} -f conf.h ${Q} echo 'forming conf.h' ${Q} echo '/*' > conf.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> conf.h @@ -1727,7 +1945,7 @@ conf.h: ${MAKE_FILE} fi endian_calc.h: endian${EXT} ${MAKE_FILE} - -${Q} ${RM} -f endian_calc.h + ${Q} ${RM} -f endian_calc.h ${Q} echo 'forming endian_calc.h' ${Q} echo '/*' > endian_calc.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> endian_calc.h @@ -1779,7 +1997,7 @@ endian_calc.h: endian${EXT} ${MAKE_FILE} fi longbits.h: longbits${EXT} ${MAKE_FILE} - -${Q} ${RM} -f longbits.h + ${Q} ${RM} -f longbits.h ${Q} echo 'forming longbits.h' ${Q} echo '/*' > longbits.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> longbits.h @@ -1806,7 +2024,7 @@ longbits.h: longbits${EXT} ${MAKE_FILE} fi have_times.h: ${MAKE_FILE} - -${Q} ${RM} -f have_times.h + ${Q} ${RM} -f have_times.h ${Q} echo 'forming have_times.h' ${Q} echo '/*' > have_times.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_times.h @@ -1877,7 +2095,7 @@ have_times.h: ${MAKE_FILE} fi have_stdlib.h: ${MAKE_FILE} - -${Q} ${RM} -f have_stdlib.h + ${Q} ${RM} -f have_stdlib.h ${Q} echo 'forming have_stdlib.h' ${Q} echo '/*' > have_stdlib.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_stdlib.h @@ -1915,7 +2133,7 @@ have_stdlib.h: ${MAKE_FILE} fi have_unistd.h: ${MAKE_FILE} - -${Q} ${RM} -f have_unistd.h + ${Q} ${RM} -f have_unistd.h ${Q} echo 'forming have_unistd.h' ${Q} echo '/*' > have_unistd.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_unistd.h @@ -1953,7 +2171,7 @@ have_unistd.h: ${MAKE_FILE} fi have_string.h: ${MAKE_FILE} - -${Q} ${RM} -f have_string.h + ${Q} ${RM} -f have_string.h ${Q} echo 'forming have_string.h' ${Q} echo '/*' > have_string.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_string.h @@ -1991,7 +2209,7 @@ have_string.h: ${MAKE_FILE} fi terminal.h: ${MAKE_FILE} - -${Q} ${RM} -f terminal.h + ${Q} ${RM} -f terminal.h ${Q} echo 'forming terminal.h' ${Q} echo '/*' > terminal.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> terminal.h @@ -2055,7 +2273,7 @@ terminal.h: ${MAKE_FILE} fi have_fpos.h: have_fpos.c ${MAKE_FILE} - -${Q} ${RM} -f fpos_tmp have_fpos.h + ${Q} ${RM} -f fpos_tmp have_fpos.h ${Q} echo 'forming have_fpos.h' ${Q} echo '/*' > have_fpos.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_fpos.h @@ -2067,7 +2285,7 @@ have_fpos.h: have_fpos.c ${MAKE_FILE} ${Q} echo '' >> have_fpos.h ${Q} echo '' >> have_fpos.h ${Q} echo '/* do we have fgetpos & fsetpos functions? */' >> have_fpos.h - -${Q} ${RM} -f have_fpos.o have_fpos${EXT} + ${Q} ${RM} -f have_fpos.o have_fpos${EXT} -${Q} ${LCC} ${HAVE_FPOS} ${ICFLAGS} have_fpos.c -c >/dev/null 2>&1; ${TRUE} -${Q} ${LCC} ${ILDFLAGS} have_fpos.o -o have_fpos${EXT} >/dev/null 2>&1; ${TRUE} -${Q} ${SHELL} -c "./have_fpos${EXT} > fpos_tmp 2>/dev/null" \ @@ -2082,7 +2300,7 @@ have_fpos.h: have_fpos.c ${MAKE_FILE} ${Q} echo '' >> have_fpos.h ${Q} echo '' >> have_fpos.h ${Q} echo '#endif /* !__HAVE_FPOS_H__ */' >> have_fpos.h - -${Q} ${RM} -f have_fpos${EXT} have_fpos.o fpos_tmp + ${Q} ${RM} -f have_fpos${EXT} have_fpos.o fpos_tmp ${Q} echo 'have_fpos.h formed' -@if [ -z "${Q}" ]; then \ echo ''; \ @@ -2095,7 +2313,7 @@ have_fpos.h: have_fpos.c ${MAKE_FILE} fi have_fpos_pos.h: have_fpos_pos.c have_fpos.h have_posscl.h ${MAKE_FILE} - -${Q} ${RM} -f fpos_tmp have_fpos_pos.h + ${Q} ${RM} -f fpos_tmp have_fpos_pos.h ${Q} echo 'forming have_fpos_pos.h' ${Q} echo '/*' > have_fpos_pos.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' \ @@ -2109,7 +2327,7 @@ have_fpos_pos.h: have_fpos_pos.c have_fpos.h have_posscl.h ${MAKE_FILE} ${Q} echo '' >> have_fpos_pos.h ${Q} echo '/* do we have fgetpos & fsetpos functions? */' \ >> have_fpos_pos.h - -${Q} ${RM} -f have_fpos_pos.o have_fpos_pos${EXT} + ${Q} ${RM} -f have_fpos_pos.o have_fpos_pos${EXT} -${Q} ${LCC} ${HAVE_FPOS} ${HAVE_FPOS_POS} \ ${ICFLAGS} have_fpos_pos.c -c >/dev/null 2>&1; ${TRUE} -${Q} ${LCC} ${ILDFLAGS} have_fpos_pos.o -o have_fpos_pos${EXT} \ @@ -2126,7 +2344,7 @@ have_fpos_pos.h: have_fpos_pos.c have_fpos.h have_posscl.h ${MAKE_FILE} ${Q} echo '' >> have_fpos_pos.h ${Q} echo '' >> have_fpos_pos.h ${Q} echo '#endif /* !__HAVE_FPOS_POS_H__ */' >> have_fpos_pos.h - -${Q} ${RM} -f have_fpos_pos${EXT} have_fpos_pos.o fpos_tmp + ${Q} ${RM} -f have_fpos_pos${EXT} have_fpos_pos.o fpos_tmp ${Q} echo 'have_fpos_pos.h formed' -@if [ -z "${Q}" ]; then \ echo ''; \ @@ -2140,7 +2358,7 @@ have_fpos_pos.h: have_fpos_pos.c have_fpos.h have_posscl.h ${MAKE_FILE} fposval.h: fposval.c have_fpos.h have_fpos_pos.h have_offscl.h have_posscl.h \ endian_calc.h ${MAKE_FILE} - -${Q} ${RM} -f fposv_tmp fposval.h + ${Q} ${RM} -f fposv_tmp fposval.h ${Q} echo 'forming fposval.h' ${Q} echo '/*' > fposval.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> fposval.h @@ -2152,7 +2370,7 @@ fposval.h: fposval.c have_fpos.h have_fpos_pos.h have_offscl.h have_posscl.h \ ${Q} echo '' >> fposval.h ${Q} echo '' >> fposval.h ${Q} echo '/* what are our file position & size types? */' >> fposval.h - -${Q} ${RM} -f fposval.o fposval${EXT} + ${Q} ${RM} -f fposval.o fposval${EXT} -${Q} ${LCC} ${ICFLAGS} ${FPOS_BITS} ${OFF_T_BITS} \ ${DEV_BITS} ${INODE_BITS} fposval.c -c >/dev/null 2>&1; ${TRUE} -${Q} ${LCC} ${ILDFLAGS} fposval.o -o fposval${EXT} >/dev/null 2>&1; ${TRUE} @@ -2161,7 +2379,7 @@ fposval.h: fposval.c have_fpos.h have_fpos_pos.h have_offscl.h have_posscl.h \ ${Q} echo '' >> fposval.h ${Q} echo '' >> fposval.h ${Q} echo '#endif /* !__FPOSVAL_H__ */' >> fposval.h - -${Q} ${RM} -f fposval${EXT} fposval.o fposv_tmp + ${Q} ${RM} -f fposval${EXT} fposval.o fposv_tmp ${Q} echo 'fposval.h formed' -@if [ -z "${Q}" ]; then \ echo ''; \ @@ -2174,7 +2392,7 @@ fposval.h: fposval.c have_fpos.h have_fpos_pos.h have_offscl.h have_posscl.h \ fi have_const.h: have_const.c ${MAKE_FILE} - -${Q} ${RM} -f have_const const_tmp have_const.h + ${Q} ${RM} -f have_const const_tmp have_const.h ${Q} echo 'forming have_const.h' ${Q} echo '/*' > have_const.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_const.h @@ -2186,7 +2404,7 @@ have_const.h: have_const.c ${MAKE_FILE} ${Q} echo '' >> have_const.h ${Q} echo '' >> have_const.h ${Q} echo '/* do we have or want const? */' >> have_const.h - -${Q} ${RM} -f have_const.o have_const${EXT} + ${Q} ${RM} -f have_const.o have_const${EXT} -${Q} ${LCC} ${ICFLAGS} ${HAVE_CONST} have_const.c -c \ >/dev/null 2>&1; ${TRUE} -${Q} ${LCC} ${ILDFLAGS} have_const.o -o have_const${EXT} >/dev/null 2>&1; ${TRUE} @@ -2202,7 +2420,7 @@ have_const.h: have_const.c ${MAKE_FILE} ${Q} echo '' >> have_const.h ${Q} echo '' >> have_const.h ${Q} echo '#endif /* !__HAVE_CONST_H__ */' >> have_const.h - -${Q} ${RM} -f have_const${EXT} have_const.o const_tmp + ${Q} ${RM} -f have_const${EXT} have_const.o const_tmp ${Q} echo 'have_const.h formed' -@if [ -z "${Q}" ]; then \ echo ''; \ @@ -2215,7 +2433,7 @@ have_const.h: have_const.c ${MAKE_FILE} fi have_offscl.h: have_offscl.c ${MAKE_FILE} - -${Q} ${RM} -f offscl_tmp have_offscl.h + ${Q} ${RM} -f offscl_tmp have_offscl.h ${Q} echo 'forming have_offscl.h' ${Q} echo '/*' > have_offscl.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_offscl.h @@ -2226,7 +2444,7 @@ have_offscl.h: have_offscl.c ${MAKE_FILE} ${Q} echo '#define __HAVE_OFFSCL_H__' >> have_offscl.h ${Q} echo '' >> have_offscl.h ${Q} echo '' >> have_offscl.h - -${Q} ${RM} -f have_offscl.o have_offscl${EXT} + ${Q} ${RM} -f have_offscl.o have_offscl${EXT} -${Q} ${LCC} ${ICFLAGS} ${HAVE_OFFSCL} have_offscl.c -c \ >/dev/null 2>&1; ${TRUE} -${Q} ${LCC} ${ILDFLAGS} have_offscl.o -o have_offscl${EXT} \ @@ -2242,7 +2460,7 @@ have_offscl.h: have_offscl.c ${MAKE_FILE} ${Q} echo '' >> have_offscl.h ${Q} echo '' >> have_offscl.h ${Q} echo '#endif /* !__HAVE_OFFSCL_H__ */' >> have_offscl.h - -${Q} ${RM} -f have_offscl${EXT} have_offscl.o offscl_tmp + ${Q} ${RM} -f have_offscl${EXT} have_offscl.o offscl_tmp ${Q} echo 'have_offscl.h formed' -@if [ -z "${Q}" ]; then \ echo ''; \ @@ -2255,7 +2473,7 @@ have_offscl.h: have_offscl.c ${MAKE_FILE} fi have_posscl.h: have_posscl.c have_fpos.h ${MAKE_FILE} - -${Q} ${RM} -f have_posscl have_posscl.o posscl_tmp have_posscl.h + ${Q} ${RM} -f have_posscl have_posscl.o posscl_tmp have_posscl.h ${Q} echo 'forming have_posscl.h' ${Q} echo '/*' > have_posscl.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_posscl.h @@ -2266,7 +2484,7 @@ have_posscl.h: have_posscl.c have_fpos.h ${MAKE_FILE} ${Q} echo '#define __HAVE_POSSCL_H__' >> have_posscl.h ${Q} echo '' >> have_posscl.h ${Q} echo '' >> have_posscl.h - -${Q} ${RM} -f have_posscl.o have_posscl + ${Q} ${RM} -f have_posscl.o have_posscl -${Q} ${LCC} ${ICFLAGS} ${HAVE_POSSCL} have_posscl.c -c \ >/dev/null 2>&1; ${TRUE} -${Q} ${LCC} ${ILDFLAGS} have_posscl.o -o have_posscl \ @@ -2282,7 +2500,7 @@ have_posscl.h: have_posscl.c have_fpos.h ${MAKE_FILE} ${Q} echo '' >> have_posscl.h ${Q} echo '' >> have_posscl.h ${Q} echo '#endif /* !__HAVE_POSSCL_H__ */' >> have_posscl.h - -${Q} ${RM} -f have_posscl have_posscl.o posscl_tmp + ${Q} ${RM} -f have_posscl have_posscl.o posscl_tmp ${Q} echo 'have_posscl.h formed' -@if [ -z "${Q}" ]; then \ echo ''; \ @@ -2295,7 +2513,7 @@ have_posscl.h: have_posscl.c have_fpos.h ${MAKE_FILE} fi align32.h: align32.c longbits.h have_unistd.h ${MAKE_FILE} - -${Q} ${RM} -f align32 align32_tmp align32.h + ${Q} ${RM} -f align32 align32_tmp align32.h ${Q} echo 'forming align32.h' ${Q} echo '/*' > align32.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> align32.h @@ -2349,7 +2567,7 @@ align32.h: align32.c longbits.h have_unistd.h ${MAKE_FILE} fi have_uid_t.h: have_uid_t.c have_unistd.h ${MAKE_FILE} - -${Q} ${RM} -f have_uid_t uid_tmp have_uid_t.h + ${Q} ${RM} -f have_uid_t uid_tmp have_uid_t.h ${Q} echo 'forming have_uid_t.h' ${Q} echo '/*' > have_uid_t.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_uid_t.h @@ -2361,7 +2579,7 @@ have_uid_t.h: have_uid_t.c have_unistd.h ${MAKE_FILE} ${Q} echo '' >> have_uid_t.h ${Q} echo '' >> have_uid_t.h ${Q} echo '/* do we have or want uid_t? */' >> have_uid_t.h - -${Q} ${RM} -f have_uid_t.o have_uid_t${EXT} + ${Q} ${RM} -f have_uid_t.o have_uid_t${EXT} -${Q} ${LCC} ${ICFLAGS} ${HAVE_UID_T} have_uid_t.c -c \ >/dev/null 2>&1; ${TRUE} -${Q} ${LCC} ${ILDFLAGS} have_uid_t.o -o have_uid_t${EXT} >/dev/null 2>&1; ${TRUE} @@ -2375,7 +2593,7 @@ have_uid_t.h: have_uid_t.c have_unistd.h ${MAKE_FILE} ${Q} echo '' >> have_uid_t.h ${Q} echo '' >> have_uid_t.h ${Q} echo '#endif /* !__HAVE_UID_T_H__ */' >> have_uid_t.h - -${Q} ${RM} -f have_uid_t${EXT} have_uid_t.o uid_tmp + ${Q} ${RM} -f have_uid_t${EXT} have_uid_t.o uid_tmp ${Q} echo 'have_uid_t.h formed' -@if [ -z "${Q}" ]; then \ echo ''; \ @@ -2388,7 +2606,7 @@ have_uid_t.h: have_uid_t.c have_unistd.h ${MAKE_FILE} fi have_newstr.h: have_newstr.c ${MAKE_FILE} - -${Q} ${RM} -f newstr_tmp have_newstr.h + ${Q} ${RM} -f newstr_tmp have_newstr.h ${Q} echo 'forming have_newstr.h' ${Q} echo '/*' > have_newstr.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_newstr.h @@ -2401,7 +2619,7 @@ have_newstr.h: have_newstr.c ${MAKE_FILE} ${Q} echo '' >> have_newstr.h ${Q} echo '/* do we have or want memcpy(), memset() & strchr()? */' \ >> have_newstr.h - -${Q} ${RM} -f have_newstr.o have_newstr${EXT} + ${Q} ${RM} -f have_newstr.o have_newstr${EXT} -${Q} ${LCC} ${ICFLAGS} ${HAVE_NEWSTR} have_newstr.c -c \ >/dev/null 2>&1; ${TRUE} -${Q} ${LCC} ${ILDFLAGS} have_newstr.o -o have_newstr${EXT} \ @@ -2416,7 +2634,7 @@ have_newstr.h: have_newstr.c ${MAKE_FILE} ${Q} echo '' >> have_newstr.h ${Q} echo '' >> have_newstr.h ${Q} echo '#endif /* !__HAVE_NEWSTR_H__ */' >> have_newstr.h - -${Q} ${RM} -f have_newstr${EXT} have_newstr.o newstr_tmp + ${Q} ${RM} -f have_newstr${EXT} have_newstr.o newstr_tmp ${Q} echo 'have_newstr.h formed' -@if [ -z "${Q}" ]; then \ echo ''; \ @@ -2429,7 +2647,7 @@ have_newstr.h: have_newstr.c ${MAKE_FILE} fi have_memmv.h: have_memmv.c ${MAKE_FILE} - -${Q} ${RM} -f have_memmv have_memmv.o memmv_tmp have_memmv.h + ${Q} ${RM} -f have_memmv have_memmv.o memmv_tmp have_memmv.h ${Q} echo 'forming have_memmv.h' ${Q} echo '/*' > have_memmv.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_memmv.h @@ -2441,7 +2659,7 @@ have_memmv.h: have_memmv.c ${MAKE_FILE} ${Q} echo '' >> have_memmv.h ${Q} echo '' >> have_memmv.h ${Q} echo '/* do we have or want memmove()? */' >> have_memmv.h - -${Q} ${RM} -f have_memmv.o have_memmv + ${Q} ${RM} -f have_memmv.o have_memmv -${Q} ${LCC} ${ICFLAGS} ${HAVE_MEMMOVE} have_memmv.c -c \ >/dev/null 2>&1; ${TRUE} -${Q} ${LCC} ${ILDFLAGS} have_memmv.o -o have_memmv \ @@ -2456,7 +2674,7 @@ have_memmv.h: have_memmv.c ${MAKE_FILE} ${Q} echo '' >> have_memmv.h ${Q} echo '' >> have_memmv.h ${Q} echo '#endif /* !__HAVE_MEMMV_H__ */' >> have_memmv.h - -${Q} ${RM} -f have_memmv have_memmv.o memmv_tmp + ${Q} ${RM} -f have_memmv have_memmv.o memmv_tmp ${Q} echo 'have_memmv.h formed' -@if [ -z "${Q}" ]; then \ echo ''; \ @@ -2469,7 +2687,7 @@ have_memmv.h: have_memmv.c ${MAKE_FILE} fi have_ustat.h: have_ustat.c ${MAKE_FILE} - -${Q} ${RM} -f ustat_tmp have_ustat.h + ${Q} ${RM} -f ustat_tmp have_ustat.h ${Q} echo 'forming have_ustat.h' ${Q} echo '/*' > have_ustat.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_ustat.h @@ -2481,7 +2699,7 @@ have_ustat.h: have_ustat.c ${MAKE_FILE} ${Q} echo '' >> have_ustat.h ${Q} echo '' >> have_ustat.h ${Q} echo '/* do we have or want ustat()? */' >> have_ustat.h - -${Q} ${RM} -f have_ustat.o have_ustat${EXT} + ${Q} ${RM} -f have_ustat.o have_ustat${EXT} -${Q} ${LCC} ${ICFLAGS} ${HAVE_USTAT} have_ustat.c -c \ >/dev/null 2>&1; ${TRUE} -${Q} ${LCC} ${ILDFLAGS} have_ustat.o -o have_ustat${EXT} \ @@ -2496,7 +2714,7 @@ have_ustat.h: have_ustat.c ${MAKE_FILE} ${Q} echo '' >> have_ustat.h ${Q} echo '' >> have_ustat.h ${Q} echo '#endif /* !__HAVE_USTAT_H__ */' >> have_ustat.h - -${Q} ${RM} -f have_ustat${EXT} have_ustat.o ustat_tmp + ${Q} ${RM} -f have_ustat${EXT} have_ustat.o ustat_tmp ${Q} echo 'have_ustat.h formed' -@if [ -z "${Q}" ]; then \ echo ''; \ @@ -2509,7 +2727,7 @@ have_ustat.h: have_ustat.c ${MAKE_FILE} fi have_getsid.h: have_getsid.c ${MAKE_FILE} - -${Q} ${RM} -f getsid_tmp have_getsid.h + ${Q} ${RM} -f getsid_tmp have_getsid.h ${Q} echo 'forming have_getsid.h' ${Q} echo '/*' > have_getsid.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_getsid.h @@ -2521,7 +2739,7 @@ have_getsid.h: have_getsid.c ${MAKE_FILE} ${Q} echo '' >> have_getsid.h ${Q} echo '' >> have_getsid.h ${Q} echo '/* do we have or want getsid()? */' >> have_getsid.h - -${Q} ${RM} -f have_getsid.o have_getsid${EXT} + ${Q} ${RM} -f have_getsid.o have_getsid${EXT} -${Q} ${LCC} ${ICFLAGS} ${HAVE_GETSID} have_getsid.c -c \ >/dev/null 2>&1; ${TRUE} -${Q} ${LCC} ${ILDFLAGS} have_getsid.o -o have_getsid \ @@ -2536,7 +2754,7 @@ have_getsid.h: have_getsid.c ${MAKE_FILE} ${Q} echo '' >> have_getsid.h ${Q} echo '' >> have_getsid.h ${Q} echo '#endif /* !__HAVE_GETSID_H__ */' >> have_getsid.h - -${Q} ${RM} -f have_getsid${EXT} have_getsid.o getsid_tmp + ${Q} ${RM} -f have_getsid${EXT} have_getsid.o getsid_tmp ${Q} echo 'have_getsid.h formed' -@if [ -z "${Q}" ]; then \ echo ''; \ @@ -2549,7 +2767,7 @@ have_getsid.h: have_getsid.c ${MAKE_FILE} fi have_getpgid.h: have_getpgid.c ${MAKE_FILE} - -${Q} ${RM} -f getpgid_tmp have_getpgid.h + ${Q} ${RM} -f getpgid_tmp have_getpgid.h ${Q} echo 'forming have_getpgid.h' ${Q} echo '/*' > have_getpgid.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_getpgid.h @@ -2561,7 +2779,7 @@ have_getpgid.h: have_getpgid.c ${MAKE_FILE} ${Q} echo '' >> have_getpgid.h ${Q} echo '' >> have_getpgid.h ${Q} echo '/* do we have or want getpgid()? */' >> have_getpgid.h - -${Q} ${RM} -f have_getpgid.o have_getpgid${EXT} + ${Q} ${RM} -f have_getpgid.o have_getpgid${EXT} -${Q} ${LCC} ${ICFLAGS} ${HAVE_GETPGID} have_getpgid.c -c \ >/dev/null 2>&1; ${TRUE} -${Q} ${LCC} ${ILDFLAGS} have_getpgid.o -o have_getpgid${EXT} \ @@ -2576,7 +2794,7 @@ have_getpgid.h: have_getpgid.c ${MAKE_FILE} ${Q} echo '' >> have_getpgid.h ${Q} echo '' >> have_getpgid.h ${Q} echo '#endif /* !__HAVE_GETPGID_H__ */' >> have_getpgid.h - -${Q} ${RM} -f have_getpgid${EXT} have_getpgid.o getpgid_tmp + ${Q} ${RM} -f have_getpgid${EXT} have_getpgid.o getpgid_tmp ${Q} echo 'have_getpgid.h formed' -@if [ -z "${Q}" ]; then \ echo ''; \ @@ -2589,7 +2807,7 @@ have_getpgid.h: have_getpgid.c ${MAKE_FILE} fi have_gettime.h: have_gettime.c ${MAKE_FILE} - -${Q} ${RM} -f gettime_tmp have_gettime.h + ${Q} ${RM} -f gettime_tmp have_gettime.h ${Q} echo 'forming have_gettime.h' ${Q} echo '/*' > have_gettime.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_gettime.h @@ -2601,7 +2819,7 @@ have_gettime.h: have_gettime.c ${MAKE_FILE} ${Q} echo '' >> have_gettime.h ${Q} echo '' >> have_gettime.h ${Q} echo '/* do we have or want clock_gettime()? */' >> have_gettime.h - -${Q} ${RM} -f have_gettime.o have_gettime${EXT} + ${Q} ${RM} -f have_gettime.o have_gettime${EXT} -${Q} ${LCC} ${ICFLAGS} ${HAVE_GETTIME} have_gettime.c -c \ >/dev/null 2>&1; ${TRUE} -${Q} ${LCC} ${ILDFLAGS} have_gettime.o -o have_gettime \ @@ -2616,7 +2834,7 @@ have_gettime.h: have_gettime.c ${MAKE_FILE} ${Q} echo '' >> have_gettime.h ${Q} echo '' >> have_gettime.h ${Q} echo '#endif /* !__HAVE_GETTIME_H__ */' >> have_gettime.h - -${Q} ${RM} -f have_gettime${EXT} have_gettime.o gettime_tmp + ${Q} ${RM} -f have_gettime${EXT} have_gettime.o gettime_tmp ${Q} echo 'have_gettime.h formed' -@if [ -z "${Q}" ]; then \ echo ''; \ @@ -2629,7 +2847,7 @@ have_gettime.h: have_gettime.c ${MAKE_FILE} fi have_getprid.h: have_getprid.c ${MAKE_FILE} - -${Q} ${RM} -f getprid_tmp have_getprid.h + ${Q} ${RM} -f getprid_tmp have_getprid.h ${Q} echo 'forming have_getprid.h' ${Q} echo '/*' > have_getprid.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_getprid.h @@ -2641,7 +2859,7 @@ have_getprid.h: have_getprid.c ${MAKE_FILE} ${Q} echo '' >> have_getprid.h ${Q} echo '' >> have_getprid.h ${Q} echo '/* do we have or want getprid()? */' >> have_getprid.h - -${Q} ${RM} -f have_getprid.o have_getprid${EXT} + ${Q} ${RM} -f have_getprid.o have_getprid${EXT} -${Q} ${LCC} ${ICFLAGS} ${HAVE_GETPRID} have_getprid.c -c \ >/dev/null 2>&1; ${TRUE} -${Q} ${LCC} ${ILDFLAGS} have_getprid.o -o have_getprid${EXT} \ @@ -2656,7 +2874,7 @@ have_getprid.h: have_getprid.c ${MAKE_FILE} ${Q} echo '' >> have_getprid.h ${Q} echo '' >> have_getprid.h ${Q} echo '#endif /* !__HAVE_GETPRID_H__ */' >> have_getprid.h - -${Q} ${RM} -f have_getprid${EXT} have_getprid.o getprid_tmp + ${Q} ${RM} -f have_getprid${EXT} have_getprid.o getprid_tmp ${Q} echo 'have_getprid.h formed' -@if [ -z "${Q}" ]; then \ echo ''; \ @@ -2669,7 +2887,7 @@ have_getprid.h: have_getprid.c ${MAKE_FILE} fi have_urandom.h: ${MAKE_FILE} - -${Q} ${RM} -f have_urandom.h + ${Q} ${RM} -f have_urandom.h ${Q} echo 'forming have_urandom.h' ${Q} echo '/*' > have_urandom.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_urandom.h @@ -2705,7 +2923,7 @@ have_urandom.h: ${MAKE_FILE} fi have_rusage.h: have_rusage.c ${MAKE_FILE} - -${Q} ${RM} -f rusage_tmp have_rusage.h + ${Q} ${RM} -f rusage_tmp have_rusage.h ${Q} echo 'forming have_rusage.h' ${Q} echo '/*' > have_rusage.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_rusage.h @@ -2717,7 +2935,7 @@ have_rusage.h: have_rusage.c ${MAKE_FILE} ${Q} echo '' >> have_rusage.h ${Q} echo '' >> have_rusage.h ${Q} echo '/* do we have or want getrusage()? */' >> have_rusage.h - -${Q} ${RM} -f have_rusage.o have_rusage${EXT} + ${Q} ${RM} -f have_rusage.o have_rusage${EXT} -${Q} ${LCC} ${ICFLAGS} ${HAVE_GETRUSAGE} have_rusage.c -c \ >/dev/null 2>&1; ${TRUE} -${Q} ${LCC} ${ILDFLAGS} have_rusage.o -o have_rusage${EXT} \ @@ -2732,7 +2950,7 @@ have_rusage.h: have_rusage.c ${MAKE_FILE} ${Q} echo '' >> have_rusage.h ${Q} echo '' >> have_rusage.h ${Q} echo '#endif /* !__HAVE_RUSAGE_H__ */' >> have_rusage.h - -${Q} ${RM} -f have_rusage${EXT} have_rusage.o rusage_tmp + ${Q} ${RM} -f have_rusage${EXT} have_rusage.o rusage_tmp ${Q} echo 'have_rusage.h formed' -@if [ -z "${Q}" ]; then \ echo ''; \ @@ -2745,7 +2963,7 @@ have_rusage.h: have_rusage.c ${MAKE_FILE} fi have_strdup.h: have_strdup.c ${MAKE_FILE} - -${Q} ${RM} -f strdup_tmp have_strdup.h + ${Q} ${RM} -f strdup_tmp have_strdup.h ${Q} echo 'forming have_strdup.h' ${Q} echo '/*' > have_strdup.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_strdup.h @@ -2757,7 +2975,7 @@ have_strdup.h: have_strdup.c ${MAKE_FILE} ${Q} echo '' >> have_strdup.h ${Q} echo '' >> have_strdup.h ${Q} echo '/* do we have or want getstrdup()? */' >> have_strdup.h - -${Q} ${RM} -f have_strdup.o have_strdup${EXT} + ${Q} ${RM} -f have_strdup.o have_strdup${EXT} -${Q} ${LCC} ${ICFLAGS} ${HAVE_STRDUP} have_strdup.c -c \ >/dev/null 2>&1; ${TRUE} -${Q} ${LCC} ${ILDFLAGS} have_strdup.o -o have_strdup \ @@ -2772,7 +2990,7 @@ have_strdup.h: have_strdup.c ${MAKE_FILE} ${Q} echo '' >> have_strdup.h ${Q} echo '' >> have_strdup.h ${Q} echo '#endif /* !__HAVE_STRDUP_H__ */' >> have_strdup.h - -${Q} ${RM} -f have_strdup${EXT} have_strdup.o strdup_tmp + ${Q} ${RM} -f have_strdup${EXT} have_strdup.o strdup_tmp ${Q} echo 'have_strdup.h formed' -@if [ -z "${Q}" ]; then \ echo ''; \ @@ -2785,7 +3003,7 @@ have_strdup.h: have_strdup.c ${MAKE_FILE} fi args.h: have_stdvs.c have_varvs.c have_string.h have_unistd.h have_string.h - -${Q} ${RM} -f args.h + ${Q} ${RM} -f args.h ${Q} echo 'forming args.h' ${Q} echo '/*' > args.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> args.h @@ -2796,7 +3014,7 @@ args.h: have_stdvs.c have_varvs.c have_string.h have_unistd.h have_string.h ${Q} echo '#define __ARGS_H__' >> args.h ${Q} echo '' >> args.h ${Q} echo '' >> args.h - -${Q} ${RM} -f have_stdvs.o have_stdvs${EXT} + ${Q} ${RM} -f have_stdvs.o have_stdvs${EXT} -${Q} ${LCC} ${ICFLAGS} ${HAVE_VSPRINTF} have_stdvs.c -c \ >/dev/null 2>&1; ${TRUE} -${Q} ${LCC} ${ILDFLAGS} have_stdvs.o -o have_stdvs${EXT} >/dev/null 2>&1; ${TRUE} @@ -2830,7 +3048,7 @@ args.h: have_stdvs.c have_varvs.c have_string.h have_unistd.h have_string.h ${Q} echo '' >> args.h ${Q} echo '' >> args.h ${Q} echo '#endif /* !__ARGS_H__ */' >> args.h - -${Q} ${RM} -f have_stdvs.o have_varvs.o have_varvs${EXT} have_args.sh core + ${Q} ${RM} -f have_stdvs.o have_varvs.o have_varvs${EXT} have_args.sh core ${Q} echo 'args.h formed' -@if [ -z "${Q}" ]; then \ echo ''; \ @@ -2843,7 +3061,7 @@ args.h: have_stdvs.c have_varvs.c have_string.h have_unistd.h have_string.h fi calcerr.h: calcerr.tbl calcerr_h.sed calcerr_h.awk ${MAKE_FILE} - -${Q} ${RM} -f calerr.h + ${Q} ${RM} -f calerr.h ${Q} echo 'forming calcerr.h' ${Q} echo '/*' > calcerr.h ${Q} echo ' * DO NOT EDIT' >> calcerr.h @@ -2873,7 +3091,7 @@ calcerr.h: calcerr.tbl calcerr_h.sed calcerr_h.awk ${MAKE_FILE} fi calcerr.c: calcerr.tbl calcerr_c.sed calcerr_c.awk ${MAKE_FILE} - -${Q} ${RM} -f calerr.c + ${Q} ${RM} -f calerr.c ${Q} echo 'forming calcerr.c' ${Q} echo '/*' > calcerr.c ${Q} echo ' * DO NOT EDIT' >> calcerr.c @@ -2895,7 +3113,7 @@ calcerr.c: calcerr.tbl calcerr_c.sed calcerr_c.awk ${MAKE_FILE} fi no_implicit.arg: no_implicit.c ${MAKE_FILE} - -${Q} ${RM} -f no_implicit${EXT} no_implicit.o no_implicit.arg + ${Q} ${RM} -f no_implicit${EXT} no_implicit.o no_implicit.arg ${Q} echo 'forming no_implicit.arg' -${Q} if [ X"${HAVE_NO_IMPLICIT}" = X"YES" ]; then \ echo ""'-Wno-implicit' > no_implicit.arg; \ @@ -2920,7 +3138,7 @@ no_implicit.arg: no_implicit.c ${MAKE_FILE} fi have_unused.h: have_unused.c ${MAKE_FILE} - -${Q} ${RM} -f unused_tmp have_unused.h + ${Q} ${RM} -f unused_tmp have_unused.h ${Q} echo 'forming have_unused.h' ${Q} echo '/*' > have_unused.h ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_unused.h @@ -2932,7 +3150,7 @@ have_unused.h: have_unused.c ${MAKE_FILE} ${Q} echo '' >> have_unused.h ${Q} echo '' >> have_unused.h ${Q} echo '/* do we have/want the unused attribute? */' >> have_unused.h - -${Q} ${RM} -f have_unused.o have_unused${EXT} + ${Q} ${RM} -f have_unused.o have_unused${EXT} -${Q} ${LCC} ${ICFLAGS} ${HAVE_UNUSED} have_unused.c -c \ >/dev/null 2>&1; ${TRUE} -${Q} ${LCC} ${ILDFLAGS} have_unused.o -o have_unused \ @@ -2949,7 +3167,7 @@ have_unused.h: have_unused.c ${MAKE_FILE} ${Q} echo '' >> have_unused.h ${Q} echo '' >> have_unused.h ${Q} echo '#endif /* !__HAVE_UNUSED_H__ */' >> have_unused.h - -${Q} ${RM} -f have_unused${EXT} have_unused.o unused_tmp + ${Q} ${RM} -f have_unused${EXT} have_unused.o unused_tmp ${Q} echo 'have_unused.h formed' -@if [ -z "${Q}" ]; then \ echo ''; \ @@ -2961,39 +3179,37 @@ have_unused.h: have_unused.c ${MAKE_FILE} ${TRUE}; \ fi - -## +### # # Build .h files for windoz based systems # # This is really a internal utility rule that is used to create the # win32 sub-directory for distribution. # -## +### -win32_hsrc: ${MAKE_FILE} win32.mkdef +win32_hsrc: win32.mkdef ${MAKE_FILE} ${Q} echo 'forming win32 directory' ${Q} ${RM} -rf win32 ${Q} ${MKDIR} win32 ${Q} ${CP} ${UTIL_C_SRC} win32 - ${Q} ${CP} ${UTIL_MISC_SRC} Makefile win32 + ${Q} ${CP} ${UTIL_MISC_SRC} win32 + ${Q} ${CP} ${MAKE_FILE} win32/${MAKE_FILE} ${Q} (cd win32; \ - echo "cd win32"; \ - echo "$(MAKE) hsrc `${CAT} win32.mkdef` EXT="; \ - $(MAKE) hsrc `${CAT} win32.mkdef` EXT=; \ + echo "${MAKE} -f ${MAKE_FILE} hsrc `${CAT} win32.mkdef` EXT="; \ + ${MAKE} -f ${MAKE_FILE} hsrc `${CAT} win32.mkdef` EXT=; \ ${RM} -f ${UTIL_C_SRC}; \ ${RM} -f ${UTIL_MISC_SRC}; \ ${RM} -f ${UTIL_OBJS}; \ ${RM} -f ${UTIL_PROGS}; \ - ${RM} -f Makefile) + ${RM} -f ${MAKE_FILE}) ${Q} echo 'win32 directory formed' - -## +### # # These rules are used in the process of building the BUILD_H_SRC. # -## +### endian.o: endian.c have_unistd.h ${LCC} ${ICFLAGS} ${BYTE_ORDER} endian.c -c @@ -3009,89 +3225,113 @@ longbits${EXT}: longbits.o ${RM} -f $@ ${LCC} ${ICFLAGS} longbits.o -o $@ - -## +### # # These two .all rules are used to determine of the lower level # directory has had its all rule performed. # -## +### -cal/.all: - ${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-=' +cal/.all: cal/Makefile + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= Invoking all rule for cal =-=-=-=-=' + ${RM} -f $@ cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} all ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' - ${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' -help/.all: - ${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-=' +help/.all: help/Makefile + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= Invoking all rule for help =-=-=-=-=' + ${RM} -f $@ cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} all ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' - ${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' -help/builtin: func.c help/builtin.top help/builtin.end help/funclist.sed - ${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-=' +help/builtin: help/Makefile \ + func.c help/builtin.top help/builtin.end help/funclist.sed + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= Invoking builtin rule for help =-=-=-=-=' + ${RM} -f $@ cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} builtin ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' - ${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' cscript/.all: ${CSCRIPT_TARGETS} -${CSCRIPT_TARGETS}: - ${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-=' +${CSCRIPT_TARGETS}: cscript/Makefile + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= Invoking all rule for cscript =-=-=-=-=' + ${RM} -f cscript/.all cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} all ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' - ${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' -custom/.all: - ${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-=' +custom/.all: custom/Makefile + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= Invoking all rule for custom =-=-=-=-=' + ${RM} -f $@ cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} all ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' - ${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' -# This is a special rule that first tries to determine of a lower level -# make is needed, and it so a make will be performed. Because it is -# triggered as the first dependent of the all rule, it will ensure -# that custom/libcustcalc.a is ready. -# -custom/libcustcalc: - ${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-=' +custom/libcustcalc${LIB_EXT_VERS}: custom/Makefile + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= Invoking all rule for custom =-=-=-=-=' - -${Q} ${RM} -f .libcustcalc_error - -${Q} NEED="`cd custom; ${MAKE} -n -f Makefile all`"; \ - if [ ! -z "$$NEED" ]; then \ - echo " cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} all";\ - cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} all; \ - status="$$?"; \ - if [ "$$status" -ne 0 ]; then \ - echo "$$status" > ../.libcustcalc_error; \ - fi; \ - fi - ${Q} if [ -f .libcustcalc_error ]; then \ - echo "custom make failed, code: `${CAT} .libcustcalc_error`" 1>&2; \ - exit "`${CAT} .libcustcalc_error`"; \ - else \ - ${TRUE} ; \ - fi + cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} $@ ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' - ${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' -# This is the real custom/libcustcalc.a rule. +libcustcalc${LIB_EXT_VERS}: custom/libcustcalc${LIB_EXT_VERS} + ${Q} ${RM} -f $@ + ${CP} -p $? $@ + +libcustcalc${LIB_EXT_VER}: libcustcalc${LIB_EXT_VERS} + ${Q} ${RM} -f $@ + ${LN} -s $? $@ + +libcustcalc${LIB_EXT_VE}: libcustcalc${LIB_EXT_VERS} + ${Q} ${RM} -f $@ + ${LN} -s $? $@ + +libcustcalc${LIB_EXT}: libcustcalc${LIB_EXT_VERS} + ${Q} ${RM} -f $@ + ${LN} -s $? $@ + +### # -custom/libcustcalc.a: - ${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-=' - ${V} echo '=-=-=-=-= Invoking all rule for custom =-=-=-=-=' - ${Q} cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} all - ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' - ${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-=' +# building calc-static and static lib*.a libraires +# +### +calc-static${EXT}: .hsrc ${CALCOBJS} \ + ${CALC_STATIC_LIBS} ${MAKE_FILE} + ${RM} -f $@ + ${CC} ${LDFLAGS} ${CALCOBJS} ${LD_STATIC} ${CALC_STATIC_LIBS} \ + ${READLINE_LIB} -o $@ -## +libcustcalc.a: custom/libcustcalc.a + ${Q} ${RM} -f $@ + ${CP} -f $? $@ + +libcalc.a: ${LIBOBJS} ${MAKE_FILE} + ${RM} -f libcalc.a + ${AR} qc libcalc.a ${LIBOBJS} + ${RANLIB} libcalc.a + ${CHMOD} 0644 libcalc.a + +custom/libcustcalc.a: custom/Makefile + cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} libcustcalc.a + +sample_rand-static${EXE}: sample_rand.o ${CALC_STATIC_LIBS} ${MAKE_FILE} + ${CC} ${LDFLAGS} sample_rand.o ${LD_STATIC} \ + ${CALC_STATIC_LIBS} ${READLINE_LIB} -o $@ + +sample_many-static${EXE}: sample_many.o ${CALC_STATIC_LIBS} ${MAKE_FILE} + ${CC} ${LDFLAGS} sample_many.o ${LD_STATIC} \ + ${CALC_STATIC_LIBS} ${READLINE_LIB} -o $@ + +### # # Home grown make dependency rules. Your system make not support # or have the needed tools. You can ignore this section. @@ -3101,20 +3341,23 @@ custom/libcustcalc.a: # prevention lines. This allows us to build a static depend list that will # satisfy all possible cpp symbol definition combinations. # -## +### -depend: hsrc - ${Q} if [ -f Makefile.bak ]; then \ - echo "Makefile.bak exists, remove or move it out of the way"; \ +depend: custom/Makefile hsrc + ${Q} if [ -f ${MAKE_FILE}.bak ]; then \ + echo "${MAKE_FILE}.bak exists, remove or move it"; \ exit 1; \ else \ ${TRUE}; \ fi + ${V} echo '=-=-=-=-= Invoking depend rule for cscript =-=-=-=-=' + ${Q} cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} depend + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= Invoking depend rule for custom =-=-=-=-=' - -${Q} (cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} depend) + ${Q} cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} depend ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' ${Q} echo forming skel - -${Q} ${RM} -rf skel + ${Q} ${RM} -rf skel ${Q} ${MKDIR} skel -${Q} for i in ${C_SRC} ${BUILD_C_SRC}; do \ ${SED} -n '/^#[ ]*include[ ]*"/p' "$$i" | \ @@ -3131,31 +3374,40 @@ depend: hsrc echo '#endif /* '"$$tag"' */' >> "skel/$$i"; \ fi; \ done - -${Q} ${RM} -f skel/makedep.out + ${Q} ${RM} -f skel/makedep.out ${Q} echo skel formed ${Q} echo forming dependency list - ${Q} echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > \ - skel/makedep.out + ${Q} :> skel/makedep.out ${Q} cd skel; \ ${MAKEDEPEND} -w 1 -f makedep.out ${C_SRC} ${BUILD_C_SRC} -${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 + ${Q} LANG=C ${SORT} -u skel/makedep.out -o skel/makedep.out ${Q} echo dependency list formed - ${Q} echo forming new Makefile - -${Q} ${RM} -f Makefile.bak - ${Q} ${MV} Makefile Makefile.bak - ${Q} ${SED} -n '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak > Makefile - ${Q} echo "" >> Makefile - ${Q} ${SED} -n '3,$$p' skel/makedep.out | LANG=C ${SORT} -u >> Makefile - -${Q} ${RM} -rf skel - -${Q} if ${CMP} -s Makefile.bak Makefile; then \ - echo 'Makefile was already up to date'; \ - ${MV} -f Makefile.bak Makefile; \ + ${Q} echo forming new ${MAKE_FILE} + ${Q} ${RM} -f ${MAKE_FILE}.bak + ${Q} ${MV} ${MAKE_FILE} ${MAKE_FILE}.bak + ${Q} ${SED} -n '1,/^# DO NOT DELETE THIS LINE/p' ${MAKE_FILE}.bak > ${MAKE_FILE} + ${Q} ${GREP} -v '^#' skel/makedep.out >> ${MAKE_FILE} + ${Q} ${RM} -rf skel + -${Q} if ${CMP} -s ${MAKE_FILE}.bak ${MAKE_FILE}; then \ + echo 'top level ${MAKE_FILE} was already up to date'; \ + ${MV} -f ${MAKE_FILE}.bak ${MAKE_FILE}; \ else \ - echo 'new Makefile formed'; \ + ${RM} -f ${MAKE_FILE}.tmp; \ + ${MV} ${MAKE_FILE} ${MAKE_FILE}.tmp; \ + if [ -d RCS -a ! -w "${MAKE_FILE}" ]; then \ + ${CO} -l ${MAKE_FILE}; \ + fi ;\ + ${MV} ${MAKE_FILE}.tmp ${MAKE_FILE}; \ + if [ -d RCS ]; then \ + echo '********************************************************'; \ + echo 'new top level ${MAKE_FILE} formed -- need to check it in'; \ + echo '********************************************************'; \ + fi; \ fi # generate the list of h files for lower level depend use @@ -3167,23 +3419,89 @@ h_list: fi; \ done -# print the calc version +### # +# calc version +# +# calc_version: +# This rule is the most accurate as it uses calc source to +# produce the version value. This rule produces a full +# version string. Note that the full version could be 4 +# or 3 levels long depending on the minor patch number. +# +# calc_vers: +# This rule is the most accurate as it uses calc source to +# produce the version value. This rule produces only a +# 3 level version string. +# +# calc_ver: +# This rule is the most accurate as it uses calc source to +# produce the version value. This rule produces only a +# 2 level version string. +# +# calc_ve: +# This rule is the most accurate as it uses calc source to +# produce the version value. This rule produces only a +# 1 level version string. +# +# version: +# This rule simply echos the value found in this makefile. +# This rule produces the full version string. Note that the +# full version could be 4 or 3 levels long depending on the +# minor patch number. +# +# vers: +# This rule simply echos the value found in this makefile. +# This rule produces only a 3 level version string. +# +# ver: +# This rule simply echos the value found in this makefile. +# This rule produces only a 2 level version string. +# +# ve: +# This rule simply echos the value found in this makefile. +# This rule produces only a 1 level version string. +# +### + +calc_version: ver_calc${EXT} + @./ver_calc${EXT} + +calc_vers: ver_calc${EXT} + @./ver_calc${EXT} -V + +calc_ver: ver_calc${EXT} + @./ver_calc${EXT} -V | ${SED} -e 's/\.[^.]*$$//' + +calc_ve: ver_calc${EXT} + @./ver_calc${EXT} -V | ${SED} -e 's/\.[^.]*\.[^.]*$$//' + +version: + @echo ${VERSION} + +vers: + @echo ${VERS} + +ver: + @echo ${VER} + +ve: + @echo ${VE} + ver_calc${EXT}: version.c have_unused.h - -${RM} -f $@ + ${RM} -f $@ ${LCC} ${ICFLAGS} -DCALC_VER ${ILDFLAGS} version.c -o $@ - -## +### # # File distribution list generation. You can ignore this section. # # We will form the names of source files as if they were in a # sub-directory called calc. # -## +### -distlist: ${DISTLIST} +distlist: custom/Makefile ${DISTLIST} ${Q} (for i in ${DISTLIST} /dev/null; do \ if [ X"$$i" != X"/dev/null" ]; then \ echo $$i; \ @@ -3194,35 +3512,65 @@ distlist: ${DISTLIST} echo win32/$$i; \ fi; \ done; \ - (cd help; ${MAKE} ${HELP_PASSDOWN} $@); \ - (cd cal; ${MAKE} ${CAL_PASSDOWN} $@); \ - (cd custom; ${MAKE} ${CUSTOM_PASSDOWN} $@); \ - (cd cscript; ${MAKE} ${CSCRIPT_PASSDOWN} $@)) | LANG=C ${SORT} + (cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} $@); \ + (cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} $@); \ + (cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} $@); \ + (cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} $@) \ + ) | LANG=C ${SORT} -distdir: +distdir: custom/Makefile ${Q} (echo .; \ echo win32; \ - (cd help; ${MAKE} ${HELP_PASSDOWN} $@); \ - (cd cal; ${MAKE} ${CAL_PASSDOWN} $@); \ - (cd custom; ${MAKE} ${CUSTOM_PASSDOWN} $@); \ - (cd cscript; ${MAKE} ${CSCRIPT_PASSDOWN} $@)) | LANG=C ${SORT} + (cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} $@); \ + (cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} $@); \ + (cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} $@); \ + (cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} $@) \ + ) | LANG=C ${SORT} -calcliblist: +calcliblist: custom/Makefile ${Q} (for i in ${CALCLIBLIST} /dev/null; do \ if [ X"$$i" != X"/dev/null" ]; then \ echo $$i; \ fi; \ done; \ - (cd help; ${MAKE} ${HELP_PASSDOWN} $@); \ - (cd cal; ${MAKE} ${CAL_PASSDOWN} $@); \ - (cd custom; ${MAKE} ${CUSTOM_PASSDOWN} $@); \ - (cd cscript; ${MAKE} ${CSCRIPT_PASSDOWN} $@)) | LANG=C ${SORT} + (cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} $@); \ + (cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} $@); \ + (cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} $@); \ + (cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} $@) \ + ) | LANG=C ${SORT} calcliblistfmt: - ${Q} ${MAKE} calcliblist | ${FMT} -64 | ${SED} -e 's/^/ /' + ${Q} ${MAKE} -f Makefile calcliblist | \ + ${FMT} -64 | ${SED} -e 's/^/ /' +#if 0 /* start of skip for non-Gnu makefiles */ +custom/Makefile: ${MAKE_FILE} custom/Makefile.head custom/Makefile.tail + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${Q} ${RM} -f $@ + ${Q} ${CAT} custom/Makefile.head > $@ + ${Q} ${SED} -n -e \ + "/^# start of host target cut/,/^# end of host target cut/p" \ + ${MAKE_FILE} >> $@ + ${Q} ${CAT} custom/Makefile.tail >> $@ + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' -## +Makefile.simple: ${MAKE_FILE} custom/Makefile.simple + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${Q} ${RM} -f $@ + ${Q} ${AWK} '/^#if 0/{skp=1} {if(!skp){print $$0}} /^#endif/{skp=0}' \ + ${MAKE_FILE} | \ + ${SED} -e 's/cd custom; $${MAKE} -f Makefile/&.simple/g' > $@ + ${Q} echo >> $@ + ${Q} echo 'Makefile.simple:' >> $@ + ${Q} echo ' $${Q} if [ ! -f Makefile.simple ]; then '"\\" >> $@ + ${Q} echo ' $${CP} -f $${MAKE_FILE} $$@; fi' >> $@ + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +custom/Makefile.simple: custom/Makefile + ${Q} cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} Makefile.simple +#endif /* end of skip for non-Gnu makefiles */ + +### # # Doing a 'make check' will cause the regression test suite to be executed. # This rule will try to build anything that needs to be built as well. @@ -3232,18 +3580,17 @@ calcliblistfmt: # rule does not cause things to be built. I.e., the all rule is # not invoked. # -## +### check: all ./cal/regress.cal ${CALC_ENV} ./calc${EXT} -d -q read regress chk: ./cal/regress.cal - ${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' ${CALC_ENV} ./calc${EXT} -d -q read regress 2>&1 | ${AWK} -f check.awk - ${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' - -## +### # # debug # @@ -3259,119 +3606,171 @@ chk: ./cal/regress.cal # * print major Makefile variables # * make everything # * run the regression tests -## +### env: @echo '=-=-=-=-= dumping major make variables =-=-=-=-=' - @echo 'MAKEFILE_REV=${MAKEFILE_REV}'; echo '' - @echo 'TERMCONTROL=${TERMCONTROL}'; echo '' - @echo 'HAVE_VSPRINTF=${HAVE_VSPRINTF}'; echo '' - @echo 'BYTE_ORDER=${BYTE_ORDER}'; echo '' - @echo 'LONG_BITS=${LONG_BITS}'; echo '' - @echo 'HAVE_FPOS=${HAVE_FPOS}'; echo '' - @echo 'HAVE_FPOS_POS=${HAVE_FPOS_POS}'; echo '' - @echo 'HAVE_OFFSCL=${HAVE_OFFSCL}'; echo '' - @echo 'HAVE_POSSCL=${HAVE_POSSCL}'; echo '' - @echo 'HAVE_CONST=${HAVE_CONST}'; echo '' - @echo 'HAVE_UID_T=${HAVE_UID_T}'; echo '' - @echo 'HAVE_NEWSTR=${HAVE_NEWSTR}'; echo '' - @echo 'HAVE_USTAT=${HAVE_USTAT}'; echo '' - @echo 'HAVE_GETSID=${HAVE_GETSID}'; echo '' - @echo 'HAVE_GETPGID=${HAVE_GETPGID}'; echo '' - @echo 'HAVE_GETTIME=${HAVE_GETTIME}'; echo '' - @echo 'HAVE_GETPRID=${HAVE_GETPRID}'; echo '' - @echo 'HAVE_URANDOM_H=${HAVE_URANDOM_H}'; echo '' @echo 'ALIGN32=${ALIGN32}'; echo '' + @echo 'ALLOW_CUSTOM=${ALLOW_CUSTOM}'; echo '' + @echo 'AR=${AR}'; echo '' + @echo 'AWK=${AWK}'; echo '' @echo 'BINDIR=${BINDIR}'; echo '' - @echo 'CALC_SHAREDIR=${CALC_SHAREDIR}'; echo '' - @echo 'LIBDIR=${LIBDIR}'; echo '' - @echo 'HELPDIR=${HELPDIR}'; echo '' - @echo 'CUSTOMCALDIR=${CUSTOMCALDIR}'; echo '' - @echo 'CUSTOMINCDIR=${CUSTOMINCDIR}'; echo '' - @echo 'CUSTOMHELPDIR=${CUSTOMHELPDIR}'; echo '' - @echo 'SCRIPTDIR=${SCRIPTDIR}'; echo '' - @echo 'MANDIR=${MANDIR}'; echo '' - @echo 'CATDIR=${CATDIR}'; echo '' - @echo 'MANEXT=${MANEXT}'; echo '' - @echo 'CATEXT=${CATEXT}'; echo '' - @echo 'NROFF=${NROFF}'; echo '' - @echo 'NROFF_ARG=${NROFF_ARG}'; echo '' - @echo 'MANMAKE=${MANMAKE}'; echo '' + @echo 'BLD_TYPE=${BLD_TYPE}'; echo '' + @echo 'BUILD_C_SRC=${BUILD_C_SRC}'; echo '' + @echo 'BUILD_H_SRC=${BUILD_H_SRC}'; echo '' + @echo 'BYTE_ORDER=${BYTE_ORDER}'; echo '' + @echo 'CALCLIBLIST=${CALCLIBLIST}'; echo '' + @echo 'CALCOBJS=${CALCOBJS}'; echo '' + @echo 'CALCPAGER=${CALCPAGER}'; echo '' @echo 'CALCPATH=${CALCPATH}'; echo '' @echo 'CALCRC=${CALCRC}'; echo '' - @echo 'CALCPAGER=${CALCPAGER}'; echo '' - @echo 'DEBUG=${DEBUG}'; echo '' - @echo 'CC_SHARE=${CC_SHARE}'; echo '' - @echo 'LD_SHARE=${LD_SHARE}'; echo '' - @echo 'RANLIB=${RANLIB}'; echo '' - @echo 'MAKE_FILE=${MAKE_FILE}'; echo '' - @echo 'PURIFY=${PURIFY}'; echo '' - @echo 'LD_DEBUG=${LD_DEBUG}'; echo '' + @echo 'CALCSRC=${CALCSRC}'; echo '' + @echo 'CALC_DYNAMIC_LIBS=${CALC_DYNAMIC_LIBS}'; echo '' @echo 'CALC_ENV=${CALC_ENV}'; echo '' - @echo 'ALLOW_CUSTOM=${ALLOW_CUSTOM}'; echo '' + @echo 'CALC_INCDIR=${CALC_INCDIR}'; echo '' + @echo 'CALC_SHAREDIR=${CALC_SHAREDIR}'; echo '' + @echo 'CALC_STATIC_LIBS=${CALC_STATIC_LIBS}'; echo '' + @echo 'CAL_PASSDOWN=${CAL_PASSDOWN}'; echo '' + @echo 'CAT=${CAT}'; echo '' + @echo 'CATDIR=${CATDIR}'; echo '' + @echo 'CATEXT=${CATEXT}'; echo '' + @echo 'CATMODE=${CATMODE}'; echo '' + @echo 'CC=${CC}'; echo '' + @echo 'CCMISC=${CCMISC}'; echo '' @echo 'CCOPT=${CCOPT}'; echo '' @echo 'CCWARN=${CCWARN}'; echo '' - @echo 'CCMISC=${CCMISC}'; echo '' + @echo 'CCWERR=${CCWERR}'; echo '' @echo 'CFLAGS=${CFLAGS}'; echo '' - @echo 'ICFLAGS=${ICFLAGS}'; echo '' - @echo 'LDFLAGS=${LDFLAGS}'; echo '' - @echo 'ILDFLAGS=${ILDFLAGS}'; echo '' - @echo 'LCC=${LCC}'; echo '' - @echo 'CC=${CC}'; echo '' - @echo 'SHELL=${SHELL}'; echo '' - @echo 'MAKE=${MAKE}'; echo '' - @echo 'AWK=${AWK}'; echo '' - @echo 'SED=${SED}'; echo '' - @echo 'GREP=${GREP}'; echo '' - @echo 'RM=${RM}'; echo '' - @echo 'TOUCH=${TOUCH}'; echo '' - @echo 'MKDIR=${MKDIR}'; echo '' - @echo 'RMDIR=${RMDIR}'; echo '' - @echo 'CP=${CP}'; echo '' - @echo 'MV=${MV}'; echo '' + @echo 'CHMOD=${CHMOD}'; echo '' + @echo 'CMP=${CMP}'; echo '' @echo 'CO=${CO}'; echo '' - @echo 'AR=${AR}'; echo '' - @echo 'TRUE=${TRUE}'; echo '' - @echo 'CAT=${CAT}'; echo '' - @echo 'LANG=${LANG}'; echo '' - @echo 'T=${T}'; echo '' - @echo 'SORT=${SORT}'; echo '' - @echo 'TEE=${TEE}'; echo '' - @echo 'CTAGS=${CTAGS}'; echo '' @echo 'COL=${COL}'; echo '' - @echo 'MAKEDEPEND=${MAKEDEPEND}'; echo '' - @echo 'MKDIR_ARG=${MKDIR_ARG}'; echo '' + @echo 'COMMON_CFLAGS=${COMMON_CFLAGS}'; echo '' + @echo 'COMMON_LDFLAGS=${COMMON_LDFLAGS}'; echo '' + @echo 'CP=${CP}'; echo '' + @echo 'CSCRIPT_PASSDOWN=${CSCRIPT_PASSDOWN}'; echo '' + @echo 'CSCRIPT_TARGETS=${CSCRIPT_TARGETS}'; echo '' + @echo 'CTAGS=${CTAGS}'; echo '' + @echo 'CUSTOMCALDIR=${CUSTOMCALDIR}'; echo '' + @echo 'CUSTOMHELPDIR=${CUSTOMHELPDIR}'; echo '' + @echo 'CUSTOMINCDIR=${CUSTOMINCDIR}'; echo '' + @echo 'CUSTOM_PASSDOWN=${CUSTOM_PASSDOWN}'; echo '' + @echo 'C_SRC=${C_SRC}'; echo '' + @echo 'DEBUG=${DEBUG}'; echo '' + @echo 'DEFAULT_LIB_INSTALL_PATH=${DEFAULT_LIB_INSTALL_PATH}'; echo '' + @echo 'DEV_BITS=${DEV_BITS}'; echo '' + @echo 'DIFF=${DIFF}'; echo '' + @echo 'DISTLIST=${DISTLIST}'; echo '' @echo 'EXT=${EXT}'; echo '' - @echo 'Q=${Q}'; echo '' - @echo 'V=${V}'; echo '' - @echo 'LIBSRC=${LIBSRC}'; echo '' + @echo 'FMT=${FMT}'; echo '' + @echo 'FPOS_BITS=${FPOS_BITS}'; echo '' + @echo 'FPOS_POS_BITS=${FPOS_POS_BITS}'; echo '' + @echo 'GREP=${GREP}'; echo '' + @echo 'HAVE_CONST=${HAVE_CONST}'; echo '' + @echo 'HAVE_FPOS=${HAVE_FPOS}'; echo '' + @echo 'HAVE_FPOS_POS=${HAVE_FPOS_POS}'; echo '' + @echo 'HAVE_GETPGID=${HAVE_GETPGID}'; echo '' + @echo 'HAVE_GETPRID=${HAVE_GETPRID}'; echo '' + @echo 'HAVE_GETRUSAGE=${HAVE_GETRUSAGE}'; echo '' + @echo 'HAVE_GETSID=${HAVE_GETSID}'; echo '' + @echo 'HAVE_GETTIME=${HAVE_GETTIME}'; echo '' + @echo 'HAVE_MEMMOVE=${HAVE_MEMMOVE}'; echo '' + @echo 'HAVE_NEWSTR=${HAVE_NEWSTR}'; echo '' + @echo 'HAVE_NO_IMPLICIT=${HAVE_NO_IMPLICIT}'; echo '' + @echo 'HAVE_OFFSCL=${HAVE_OFFSCL}'; echo '' + @echo 'HAVE_POSSCL=${HAVE_POSSCL}'; echo '' + @echo 'HAVE_STDLIB_H=${HAVE_STDLIB_H}'; echo '' + @echo 'HAVE_STRDUP=${HAVE_STRDUP}'; echo '' + @echo 'HAVE_STRING_H=${HAVE_STRING_H}'; echo '' + @echo 'HAVE_SYS_TIMES_H=${HAVE_SYS_TIMES_H}'; echo '' + @echo 'HAVE_SYS_TIME_H=${HAVE_SYS_TIME_H}'; echo '' + @echo 'HAVE_TIMES_H=${HAVE_TIMES_H}'; echo '' + @echo 'HAVE_TIME_H=${HAVE_TIME_H}'; echo '' + @echo 'HAVE_UID_T=${HAVE_UID_T}'; echo '' + @echo 'HAVE_UNISTD_H=${HAVE_UNISTD_H}'; echo '' + @echo 'HAVE_UNUSED=${HAVE_UNUSED}'; echo '' + @echo 'HAVE_URANDOM_H=${HAVE_URANDOM_H}'; echo '' + @echo 'HAVE_USTAT=${HAVE_USTAT}'; echo '' + @echo 'HAVE_VSPRINTF=${HAVE_VSPRINTF}'; echo '' + @echo 'HELPDIR=${HELPDIR}'; echo '' + @echo 'HELP_PASSDOWN=${HELP_PASSDOWN}'; echo '' + @echo 'H_SRC=${H_SRC}'; echo '' + @echo 'ICFLAGS=${ICFLAGS}'; echo '' + @echo 'ILDFLAGS=${ILDFLAGS}'; echo '' + @echo 'INCDIR=${INCDIR}'; echo '' + @echo 'INODE_BITS=${INODE_BITS}'; echo '' + @echo 'LANG=${LANG}'; echo '' + @echo 'LCC=${LCC}'; echo '' + @echo 'LDCONFIG=${LDCONFIG}'; echo '' + @echo 'LDFLAGS=${LDFLAGS}'; echo '' + @echo 'LDFLAGS=${LDFLAGS}'; echo '' + @echo 'LD_DEBUG=${LD_DEBUG}'; echo '' + @echo 'LD_SHARE=${LD_SHARE}'; echo '' + @echo 'LIBCALC_SHLIB=${LIBCALC_SHLIB}'; echo '' + @echo 'LIBCUSTCALC_SHLIB=${LIBCUSTCALC_SHLIB}'; echo '' + @echo 'LIBDIR=${LIBDIR}'; echo '' @echo 'LIBOBJS=${LIBOBJS}'; echo '' - @echo 'CALCSRC=${CALCSRC}'; echo '' - @echo 'CALCOBJS=${CALCOBJS}'; echo '' - @echo 'BUILD_H_SRC=${BUILD_H_SRC}'; echo '' - @echo 'BUILD_C_SRC=${BUILD_C_SRC}'; echo '' + @echo 'LIBSRC=${LIBSRC}'; echo '' + @echo 'LIB_H_SRC=${LIB_H_SRC}'; echo '' + @echo 'LICENSE=${LICENSE}'; echo '' + @echo 'LN=${LN}'; echo '' + @echo 'LONG_BITS=${LONG_BITS}'; echo '' + @echo 'MAKE=${MAKE}'; echo '' + @echo 'MAKEDEPEND=${MAKEDEPEND}'; echo '' + @echo 'MAKEFILE_REV=${MAKEFILE_REV}'; echo '' + @echo 'MAKE_FILE=${MAKE_FILE}'; echo '' + @echo 'MANDIR=${MANDIR}'; echo '' + @echo 'MANEXT=${MANEXT}'; echo '' + @echo 'MANMAKE=${MANMAKE}'; echo '' + @echo 'MANMODE=${MANMODE}'; echo '' + @echo 'MKDIR=${MKDIR}'; echo '' + @echo 'MKDIR_ARG=${MKDIR_ARG}'; echo '' + @echo 'MV=${MV}'; echo '' + @echo 'NROFF=${NROFF}'; echo '' + @echo 'NROFF_ARG=${NROFF_ARG}'; echo '' + @echo 'OBJS=${OBJS}'; echo '' + @echo 'OFF_T_BITS=${OFF_T_BITS}'; echo '' + @echo 'PURIFY=${PURIFY}'; echo '' + @echo 'Q=${Q}'; echo '' + @echo 'RANLIB=${RANLIB}'; echo '' + @echo 'READLINE_INCLUDE=${READLINE_INCLUDE}'; echo '' + @echo 'READLINE_LIB=${READLINE_LIB}'; echo '' + @echo 'RM=${RM}'; echo '' + @echo 'RMDIR=${RMDIR}'; echo '' + @echo 'SAMPLE_C_SRC=${SAMPLE_C_SRC}'; echo '' + @echo 'SAMPLE_H_SRC=${SAMPLE_H_SRC}'; echo '' + @echo 'SAMPLE_OBJ=${SAMPLE_OBJ}'; echo '' + @echo 'SAMPLE_STATIC_TARGETS=${SAMPLE_STATIC_TARGETS}'; echo '' + @echo 'SAMPLE_TARGETS=${SAMPLE_TARGETS}'; echo '' + @echo 'SCRIPTDIR=${SCRIPTDIR}'; echo '' + @echo 'SED=${SED}'; echo '' + @echo 'SHELL=${SHELL}'; echo '' + @echo 'SORT=${SORT}'; echo '' + @echo 'SPLINT=${SPLINT}'; echo '' + @echo 'SPLINT_OPTS=${SPLINT_OPTS}'; echo '' + @echo 'SYM_DYNAMIC_LIBS=${SYM_DYNAMIC_LIBS}'; echo '' + @echo 'T=${T}'; echo '' + @echo 'TARGETS=${TARGETS}'; echo '' + @echo 'TEE=${TEE}'; echo '' + @echo 'TERMCONTROL=${TERMCONTROL}'; echo '' + @echo 'TOP_MAKE_FILE=${TOP_MAKE_FILE}'; echo '' + @echo 'TOUCH=${TOUCH}'; echo '' + @echo 'TRUE=${TRUE}'; echo '' + @echo 'USE_READLINE=${USE_READLINE}'; echo '' @echo 'UTIL_C_SRC=${UTIL_C_SRC}'; echo '' @echo 'UTIL_MISC_SRC=${UTIL_MISC_SRC}'; echo '' @echo 'UTIL_OBJS=${UTIL_OBJS}'; echo '' - @echo 'UTIL_TMP=${UTIL_TMP}'; echo '' @echo 'UTIL_PROGS=${UTIL_PROGS}'; echo '' - @echo 'LIB_H_SRC=${LIB_H_SRC}'; echo '' - @echo 'CUSTOM_PASSDOWN=${CUSTOM_PASSDOWN}'; echo '' - @echo 'SAMPLE_PASSDOWN=${SAMPLE_PASSDOWN}'; echo '' - @echo 'HELP_PASSDOWN=${HELP_PASSDOWN}'; echo '' - @echo 'CAL_PASSDOWN=${CAL_PASSDOWN}'; echo '' - @echo 'CSCRIPT_PASSDOWN=${CSCRIPT_PASSDOWN}'; echo '' - @echo 'H_SRC=${H_SRC}'; echo '' - @echo 'C_SRC=${C_SRC}'; echo '' - @echo 'DISTLIST=${DISTLIST}'; echo '' - @echo 'OBJS=${OBJS}'; echo '' - @echo 'CALC_STATIC_LIBS=${CALC_STATIC_LIBS}'; echo '' - @echo 'PROGS=${PROGS}'; echo '' - @echo 'TARGETS=${TARGETS}'; echo '' - @echo '=-=-=-=-= end of major make variable dump =-=-=-=-=' + @echo 'UTIL_TMP=${UTIL_TMP}'; echo '' + @echo 'V=${V}'; echo '' + @echo 'VERS=${VERS}'; echo '' + @echo 'VERSION=${VERSION}'; echo '' + @echo 'XARGS=${XARGS}'; echo '' + @echo 'target=${target}'; echo '' + @echo '=-=-=-=-= ${MAKE_FILE} end of major make variable dump =-=-=-=-=' mkdebug: env version.c rpm.release - @echo '=-=-=-=-= start of $@ rule =-=-=-=-=' + @echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' @echo '=-=-=-=-= Determining the source version =-=-=-=-=' @${MAKE} -f Makefile Q= V=@ ver_calc${EXT} -@./ver_calc${EXT} @@ -3382,10 +3781,10 @@ mkdebug: env version.c rpm.release @echo '=-=-=-=-= Determining the binary version =-=-=-=-=' -@./calc${EXT} -e -q -v @echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' - @echo '=-=-=-=-= end of $@ rule =-=-=-=-=' + @echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' debug: env rpm.release - @echo '=-=-=-=-= start of $@ rule =-=-=-=-=' + @echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' @echo '=-=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ clobber =-=-=-=-=' @${MAKE} -f Makefile Q= V=@ clobber @echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' @@ -3402,10 +3801,11 @@ debug: env rpm.release @echo '=-=-=-=-= this may take a while =-=-=-=-=' @${MAKE} -f Makefile Q= V=@ chk @echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' - @echo '=-=-=-=-= end of $@ rule =-=-=-=-=' + @echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' - -## +### +# +# testing rules # # make run # * only run calc interactively with the ${CALC_ENV} environment @@ -3419,7 +3819,7 @@ debug: env rpm.release # make gdb # * run the gdb debugger on calc with the ${CALC_ENV} environment # -## +### run: ${CALC_ENV} ./calc${EXT} @@ -3433,29 +3833,59 @@ dbx: gdb: ${CALC_ENV} gdb ./calc${EXT} - -## +### # # rpm rules # -## +### rpm: clobber rpm.mk calc.spec.in - ${RM} -rf /var/tmp/redhat - ${MAKE} -f rpm.mk RHDIR=/var/tmp/redhat TMPDIR=/var/tmp/redhat + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${RM} -rf /var/tmp/redhat /var/tmp/calc-root + ${MAKE} -f rpm.mk RHDIR=/var/tmp/redhat TMPDIR=/var/tmp/redhat V=${V} + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' +# rpm static rules +# +rpm-hide-static: + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${RM} -rf static + ${MKDIR} -p static + ${CP} -f -p calc-static${EXT} ${SAMPLE_STATIC_TARGETS} static + ${CP} -f -p libcalc.a custom/libcustcalc.a static + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' -## +rpm-unhide-static: + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${RM} -f calc-static${EXT} ${SAMPLE_STATIC_TARGETS} + cd static; ${CP} -f -p calc-static${EXT} ${SAMPLE_STATIC_TARGETS} .. + ${RM} -f libcalc.a + cd static; ${CP} -f -p libcalc.a .. + ${RM} -f custom/libcustcalc.a + cd static; ${CP} -f -p libcustcalc.a ../custom + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +rpm-chk-static: + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${CALC_ENV} ./calc-static${EXT} -d -q read regress 2>&1 | ${AWK} -f check.awk + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +rpm-clean-static: + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${RM} -rf static + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +### # # Utility rules # -## +### # Form the installed file list # inst_files: ${MAKE_FILE} help/Makefile cal/Makefile custom/Makefile \ - cscript/Makefile ver_calc${EXT} - ${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-=' + cscript/Makefile ver_calc${EXT} + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' ${Q} ${RM} -f inst_files ${Q} echo ${BINDIR}/calc${EXT} > inst_files ${Q} cd help; LANG=C \ @@ -3480,7 +3910,7 @@ inst_files: ${MAKE_FILE} help/Makefile cal/Makefile custom/Makefile \ echo ${MANDIR}/calc.${MANEXT}; \ fi >> inst_files ${Q} LANG=C ${SORT} -u inst_files -o inst_files - ${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' # The olduninstall rule will remove calc files from the older, histroic # locations under the /usr/local directory. If you are using the @@ -3489,7 +3919,7 @@ inst_files: ${MAKE_FILE} help/Makefile cal/Makefile custom/Makefile \ # the /usr/local directory. # olduninstall: - -${RM} -f inst_files + ${RM} -f inst_files ${MAKE} -f Makefile \ BINDIR=/usr/local/bin \ INCDIR=/usr/local/include \ @@ -3503,34 +3933,34 @@ olduninstall: SCRIPTDIR=/usr/local/bin/cscript \ MANDIR=/usr/local/man/man1 \ inst_files - -${XARGS} ${RM} -f < inst_files + ${XARGS} ${RM} -f < inst_files -${RMDIR} /usr/local/lib/calc/help/custhelp -${RMDIR} /usr/local/lib/calc/help -${RMDIR} /usr/local/lib/calc/custom -${RMDIR} /usr/local/lib/calc -${RMDIR} /usr/local/include/calc -${RMDIR} /usr/local/bin/cscript - -${RM} -f inst_files + ${RM} -f inst_files tags: ${CALCSRC} ${LIBSRC} ${H_SRC} ${BUILD_H_SRC} ${MAKE_FILE} -${CTAGS} ${CALCSRC} ${LIBSRC} ${H_SRC} ${BUILD_H_SRC} 2>&1 | \ ${GREP} -v 'Duplicate entry|Second entry ignored' -clean: - ${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-=' - -${RM} -f ${LIBOBJS} - -${RM} -f ${CALCOBJS} - -${RM} -f ${UTIL_OBJS} - -${RM} -f ${UTIL_TMP} - -${RM} -f ${UTIL_PROGS} - -${RM} -f ${SAMPLE_OBJ} - -${RM} -f .libcustcalc_error - -${RM} -f calc.spec.sed +clean: custom/Makefile + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${RM} -f ${LIBOBJS} + ${RM} -f ${CALCOBJS} + ${RM} -f ${UTIL_OBJS} + ${RM} -f ${UTIL_TMP} + ${RM} -f ${UTIL_PROGS} + ${RM} -f ${SAMPLE_OBJ} + ${RM} -f .libcustcalc_error + ${RM} -f calc.spec.sed ${Q} echo '=-=-=-=-= Invoking $@ rule for help =-=-=-=-=' - -cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} clean + cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} clean ${Q} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' ${Q} echo '=-=-=-=-= Invoking $@ rule for cal =-=-=-=-=' - -cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} clean + cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} clean ${Q} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' ${V} echo '=-=-=-=-= Invoking $@ rule for custom =-=-=-=-=' cd custom; ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} clean @@ -3539,30 +3969,40 @@ clean: cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} clean ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' ${Q} echo remove files that are obsolete - -${RM} -rf lib - -${RM} -f endian.h stdarg.h libcalcerr.a cal/obj help/obj - -${RM} -f have_vs.c std_arg.h try_stdarg.c fnvhash.c - -${RM} -f win32dll.h have_malloc.h math_error.h string.h string.c - ${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-=' + ${RM} -rf lib + ${RM} -f endian.h stdarg.h libcalcerr.a cal/obj help/obj + ${RM} -f have_vs.c std_arg.h try_stdarg.c fnvhash.c + ${RM} -f win32dll.h have_malloc.h math_error.h string.h string.c + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' -clobber: - ${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-=' - -${RM} -f ${LIBOBJS} - -${RM} -f ${CALCOBJS} - -${RM} -f ${UTIL_OBJS} - -${RM} -f ${UTIL_TMP} - -${RM} -f ${UTIL_PROGS} - -${RM} -f ${SAMPLE_TARGETS} - -${RM} -f tags .hsrc hsrc - -${RM} -f ${BUILD_H_SRC} - -${RM} -f ${BUILD_C_SRC} - -${RM} -f calc${EXT} *_pure_*.[oa] - -${RM} -f libcalc.a *.pure_hardlink - -${RM} -f calc.1 *.pure_linkinfo - -${RM} -f *.u - -${RM} -f calc.pixie calc.rf calc.Counts calc.cord - -${RM} -rf gen_h skel Makefile.bak tmp.patch - -${RM} -f calc.spec inst_files rpm.mk.patch tmp +clobber: custom/Makefile clean + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${RM} -f ${SAMPLE_TARGETS} + ${RM} -f ${SAMPLE_STATIC_TARGETS} + ${RM} -f tags .hsrc hsrc + ${RM} -f ${BUILD_H_SRC} + ${RM} -f ${BUILD_C_SRC} + ${RM} -f calc${EXT} + ${RM} -f *_pure_*.[oa] + ${RM} -f *.pure_linkinfo + ${RM} -f *.pure_hardlin + ${RM} -f *.u + ${RM} -f libcalc.a + ${RM} -f calc.1 calc.usage + ${RM} -f calc.pixie calc.rf calc.Counts calc.cord + ${RM} -rf gen_h skel Makefile.bak tmp.patch + ${RM} -f calc.spec inst_files rpm.mk.patch tmp + ${RM} -f libcalc${LIB_EXT_VERS} + ${RM} -f libcalc${LIB_EXT_VER} + ${RM} -f libcalc${LIB_EXT_VE} + ${RM} -f libcalc*${LIB_EXT} + ${RM} -f libcustcalc${LIB_EXT_VERS} + ${RM} -f libcustcalc${LIB_EXT_VER} + ${RM} -f libcustcalc${LIB_EXT_VE} + ${RM} -f libcustcalc*${LIB_EXT} + ${RM} -f libcustcalc.a + ${RM} -f calc-static${EXE} + ${RM} -f ${CALC_STATIC_LIBS} ${V} echo '=-=-=-=-= Invoking $@ rule for help =-=-=-=-=' -cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} clobber ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' @@ -3576,19 +4016,20 @@ clobber: cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} clobber ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' ${V} echo remove files that are obsolete - -${RM} -rf lib - -${RM} -f endian.h stdarg.h libcalcerr.a cal/obj help/obj - -${RM} -f have_vs.c std_arg.h try_stdarg.c fnvhash.c - -${RM} -f win32dll.h have_malloc.h math_error.h string.h string.c - -${RM} -rf win32 - ${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-=' + ${RM} -rf win32 build +#if 0 /* start of skip for non-Gnu makefiles */ + ${RM} -f Makefile.simple + ${RM} -f custom/Makefile +#endif /* end of skip for non-Gnu makefiles */ + ${RM} -f .static .dynamic + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' # install everything # # NOTE: Keep the uninstall rule in reverse order to the install rule # -install: calc libcalc.a ${LIB_H_SRC} ${BUILD_H_SRC} calc.1 - ${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-=' +install: custom/Makefile ${LIB_H_SRC} ${BUILD_H_SRC} calc.1 all + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' -${Q} if [ ! -z "${T}" ]; then \ if [ ! -d ${T} ]; then \ echo ${MKDIR} ${MKDIR_ARG} ${T}; \ @@ -3706,10 +4147,24 @@ install: calc libcalc.a ${LIB_H_SRC} ${BUILD_H_SRC} calc.1 else \ ${RM} -f ${T}${BINDIR}/calc.new${EXT}; \ ${CP} -f calc${EXT} ${T}${BINDIR}/calc.new${EXT}; \ - ${CHMOD} 0555 ${T}${BINDIR}/calc.new${EXT}; \ + ${CHMOD} 0755 ${T}${BINDIR}/calc.new${EXT}; \ ${MV} -f ${T}${BINDIR}/calc.new${EXT} ${T}${BINDIR}/calc${EXT}; \ echo "installed ${T}${BINDIR}/calc${EXT}"; \ fi + -${Q} if [ -f calc-static${EXE} ]; then \ + if ${CMP} -s calc-static${EXT} \ + ${T}${BINDIR}/calc-static${EXT}; then \ + ${TRUE}; \ + else \ + ${RM} -f ${T}${BINDIR}/calc-static.new${EXT}; \ + ${CP} -f calc-static${EXT} \ + ${T}${BINDIR}/calc-static.new${EXT}; \ + ${CHMOD} 0755 ${T}${BINDIR}/calc-static.new${EXT}; \ + ${MV} -f ${T}${BINDIR}/calc-static.new${EXT} \ + ${T}${BINDIR}/calc-static${EXT}; \ + echo "installed ${T}${BINDIR}/calc-static${EXT}"; \ + fi; \ + fi ${V} echo '=-=-=-=-= Invoking $@ rule for help =-=-=-=-=' ${Q} cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} install ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' @@ -3722,15 +4177,62 @@ install: calc libcalc.a ${LIB_H_SRC} ${BUILD_H_SRC} calc.1 ${V} echo '=-=-=-=-= Invoking $@ rule for cscript =-=-=-=-=' ${Q} cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} install ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' - -${Q} if ${CMP} -s libcalc.a ${T}${LIBDIR}/libcalc.a; then \ + -${Q} if [ -f libcalc.a ]; then \ + if ${CMP} -s libcalc.a ${T}${LIBDIR}/libcalc.a; then \ ${TRUE}; \ - else \ + else \ ${RM} -f ${T}${LIBDIR}/libcalc.a.new; \ ${CP} -f libcalc.a ${T}${LIBDIR}/libcalc.a.new; \ ${MV} -f ${T}${LIBDIR}/libcalc.a.new ${T}${LIBDIR}/libcalc.a; \ ${RANLIB} ${T}${LIBDIR}/libcalc.a; \ ${CHMOD} 0444 ${T}${LIBDIR}/libcalc.a; \ echo "installed ${T}${LIBDIR}/libcalc.a"; \ + fi; \ + fi + ${Q}# NOTE: The this makefile installs libcustcalc${LIB_EXT_VERS} + ${Q}# because we only want to perform one ${LDCONFIG} for both + ${Q}# libcalc${LIB_EXT_VERS} and libcustcalc${LIB_EXT_VERS}. + -${Q} if ${CMP} -s libcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcalc${LIB_EXT_VERS} && \ + ${CMP} -s custom/libcustcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}; then \ + ${TRUE}; \ + else \ + ${RM} -f ${T}${LIBDIR}/libcalc${LIB_EXT_VERS}.new; \ + ${CP} -f libcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcalc${LIB_EXT_VERS}.new; \ + ${MV} -f ${T}${LIBDIR}/libcalc${LIB_EXT_VERS}.new \ + ${T}${LIBDIR}/libcalc${LIB_EXT_VERS}; \ + echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT_VERS}"; \ + ${LN} -f -s libcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcalc${LIB_EXT_VER}; \ + echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT_VER}"; \ + ${LN} -f -s libcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcalc${LIB_EXT_VE}; \ + echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT_VE}"; \ + ${LN} -f -s libcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcalc${LIB_EXT}; \ + echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT}"; \ + ${RM} -f ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}.new; \ + ${CP} -f custom/libcustcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}.new; \ + ${MV} -f ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}.new \ + ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}; \ + echo "installed ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}"; \ + ${LN} -f -s libcustcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcustcalc${LIB_EXT_VER}; \ + echo "installed ${T}${LIBDIR}/libcustcalc${LIB_EXT_VER}"; \ + ${LN} -f -s libcustcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcustcalc${LIB_EXT_VE}; \ + echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT_VE}"; \ + ${LN} -f -s libcustcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcustcalc${LIB_EXT}; \ + echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT}"; \ + if [ -z "${T}" -o "/" = "${T}" ]; then \ + echo "running ${LDCONFIG}"; \ + ${LDCONFIG}; \ + echo "finished ${LDCONFIG}"; \ + fi; \ fi -${Q} for i in ${LIB_H_SRC} ${BUILD_H_SRC} /dev/null; do \ if [ "$$i" = "/dev/null" ]; then \ @@ -3768,7 +4270,6 @@ install: calc libcalc.a ${LIB_H_SRC} ${BUILD_H_SRC} calc.1 echo "removed old ${T}${CALC_INCDIR}/string.h"; \ fi; \ done - ${Q} ${RM} -f tmp -${Q} if [ -z "${MANDIR}" ]; then \ ${TRUE}; \ else \ @@ -3803,14 +4304,18 @@ install: calc libcalc.a ${LIB_H_SRC} ${BUILD_H_SRC} calc.1 fi; \ fi; \ fi - ${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-=' + ${V} # NOTE: remove ${T}${CALC_INCDIR}/custom if it is empty + -${Q} ${RMDIR} ${T}${CALC_INCDIR}/custom 2>/dev/null + ${V} # NOTE: misc install cleanup + ${Q} ${RM} -f tmp + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' # Try to remove everything that was installed # # NOTE: Keep the uninstall rule in reverse order to the install rule # -uninstall: - ${V} echo '=-=-=-=-= start of $@ rule =-=-=-=-=' +uninstall: custom/Makefile + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' -${Q} if [ -z "${CATDIR}" ]; then \ ${TRUE}; \ else \ @@ -3848,6 +4353,91 @@ uninstall: fi; \ fi; \ done + -${Q} if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcustcalc${LIB_EXT}"; \ + if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcustcalc${LIB_EXT}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcustcalc${LIB_EXT}"; \ + fi; \ + fi + -${Q} if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VE}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VE}"; \ + if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VE}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcustcalc${LIB_EXT_VE}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcustcalc${LIB_EXT_VE}"; \ + fi; \ + fi + -${Q} if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VER}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VER}"; \ + if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VER}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcustcalc${LIB_EXT_VER}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcustcalc${LIB_EXT_VER}"; \ + fi; \ + fi + -${Q} if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}"; \ + if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}"; \ + fi; \ + fi + -${Q} if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}"; \ + if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}"; \ + fi; \ + fi + -${Q} if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcalc${LIB_EXT}"; \ + if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcalc${LIB_EXT}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcalc${LIB_EXT}"; \ + fi; \ + fi + -${Q} if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VE}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcalc${LIB_EXT_VE}"; \ + if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VE}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcalc${LIB_EXT_VE}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcalc${LIB_EXT_VE}"; \ + fi; \ + fi + -${Q} if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VER}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcalc${LIB_EXT_VER}"; \ + if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VER}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcalc${LIB_EXT_VER}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcalc${LIB_EXT_VER}"; \ + fi; \ + fi + -${Q} if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERS}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERS}"; \ + if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERS}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcalc${LIB_EXT_VERS}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcalc${LIB_EXT_VERS}"; \ + fi; \ + fi + -${Q} if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERS}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERS}"; \ + if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERS}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcalc${LIB_EXT_VERS}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcalc${LIB_EXT_VERS}"; \ + fi; \ + fi + -${Q} if [ -z "${T}" -o "/" = "${T}" ]; then \ + echo "running ${LDCONFIG}"; \ + ${LDCONFIG}; \ + echo "finished ${LDCONFIG}"; \ + fi -${Q} if [ -f "${T}${LIBDIR}/libcalc.a" ]; then \ ${RM} -f "${T}${LIBDIR}/libcalc.a"; \ if [ -f "${T}${LIBDIR}/libcalc.a" ]; then \ @@ -3868,6 +4458,14 @@ uninstall: ${V} echo '=-=-=-=-= Invoking $@ rule for help =-=-=-=-=' ${Q} cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} uninstall ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + -${Q} if [ -f "${T}${BINDIR}/calc-static${EXT}" ]; then \ + ${RM} -f "${T}${BINDIR}/calc-static${EXT}"; \ + if [ -f "${T}${BINDIR}/calc-static${EXT}" ]; then \ + echo "cannot uninstall ${T}${BINDIR}/calc-static${EXT}"; \ + else \ + echo "uninstalled ${T}${BINDIR}/calc-static${EXT}"; \ + fi; \ + fi -${Q} if [ -f "${T}${BINDIR}/calc${EXT}" ]; then \ ${RM} -f "${T}${BINDIR}/calc${EXT}"; \ if [ -f "${T}${BINDIR}/calc${EXT}" ]; then \ @@ -3890,7 +4488,7 @@ uninstall: echo "cleaned up ${T}"; \ fi; \ fi - ${V} echo '=-=-=-=-= end of $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' # splint - A tool for statically checking C programs # @@ -3898,12 +4496,11 @@ splint: #hsrc ${SPLINT} ${SPLINT_OPTS} -DCALC_SRC -I. \ ${CALCSRC} ${LIBSRC} ${BUILD_C_SRC} ${UTIL_C_SRC} - -## +### # # make depend stuff # -## +### # DO NOT DELETE THIS LINE -- make depend depends on it. @@ -3926,12 +4523,10 @@ addop.o: have_stdlib.h addop.o: have_string.h addop.o: label.h addop.o: longbits.h -addop.o: md5.h addop.o: nametype.h addop.o: opcodes.h addop.o: qmath.h -addop.o: shs.h -addop.o: shs1.h +addop.o: sha1.h addop.o: str.h addop.o: symbol.h addop.o: token.h @@ -3956,11 +4551,9 @@ assocfunc.o: have_newstr.h assocfunc.o: have_stdlib.h assocfunc.o: have_string.h assocfunc.o: longbits.h -assocfunc.o: md5.h assocfunc.o: nametype.h assocfunc.o: qmath.h -assocfunc.o: shs.h -assocfunc.o: shs1.h +assocfunc.o: sha1.h assocfunc.o: str.h assocfunc.o: value.h assocfunc.o: zmath.h @@ -3984,11 +4577,9 @@ blkcpy.o: have_newstr.h blkcpy.o: have_stdlib.h blkcpy.o: have_string.h blkcpy.o: longbits.h -blkcpy.o: md5.h blkcpy.o: nametype.h blkcpy.o: qmath.h -blkcpy.o: shs.h -blkcpy.o: shs1.h +blkcpy.o: sha1.h blkcpy.o: str.h blkcpy.o: value.h blkcpy.o: zmath.h @@ -4008,11 +4599,9 @@ block.o: have_newstr.h block.o: have_stdlib.h block.o: have_string.h block.o: longbits.h -block.o: md5.h block.o: nametype.h block.o: qmath.h -block.o: shs.h -block.o: shs1.h +block.o: sha1.h block.o: str.h block.o: value.h block.o: zmath.h @@ -4058,12 +4647,10 @@ calc.o: hist.h calc.o: label.h calc.o: lib_calc.h calc.o: longbits.h -calc.o: md5.h calc.o: nametype.h calc.o: opcodes.h calc.o: qmath.h -calc.o: shs.h -calc.o: shs1.h +calc.o: sha1.h calc.o: str.h calc.o: symbol.h calc.o: token.h @@ -4094,12 +4681,10 @@ codegen.o: have_unistd.h codegen.o: label.h codegen.o: lib_calc.h codegen.o: longbits.h -codegen.o: md5.h codegen.o: nametype.h codegen.o: opcodes.h codegen.o: qmath.h -codegen.o: shs.h -codegen.o: shs1.h +codegen.o: sha1.h codegen.o: str.h codegen.o: symbol.h codegen.o: token.h @@ -4155,11 +4740,9 @@ config.o: have_strdup.h config.o: have_string.h config.o: have_times.h config.o: longbits.h -config.o: md5.h config.o: nametype.h config.o: qmath.h -config.o: shs.h -config.o: shs1.h +config.o: sha1.h config.o: str.h config.o: token.h config.o: value.h @@ -4182,11 +4765,9 @@ const.o: have_newstr.h const.o: have_stdlib.h const.o: have_string.h const.o: longbits.h -const.o: md5.h const.o: nametype.h const.o: qmath.h -const.o: shs.h -const.o: shs1.h +const.o: sha1.h const.o: str.h const.o: value.h const.o: zmath.h @@ -4208,11 +4789,9 @@ custom.o: have_newstr.h custom.o: have_stdlib.h custom.o: have_string.h custom.o: longbits.h -custom.o: md5.h custom.o: nametype.h custom.o: qmath.h -custom.o: shs.h -custom.o: shs1.h +custom.o: sha1.h custom.o: str.h custom.o: value.h custom.o: zmath.h @@ -4241,11 +4820,9 @@ file.o: have_stdlib.h file.o: have_string.h file.o: have_unistd.h file.o: longbits.h -file.o: md5.h file.o: nametype.h file.o: qmath.h -file.o: shs.h -file.o: shs1.h +file.o: sha1.h file.o: str.h file.o: value.h file.o: zmath.h @@ -4282,13 +4859,11 @@ func.o: have_unistd.h func.o: have_unused.h func.o: label.h func.o: longbits.h -func.o: md5.h func.o: nametype.h func.o: opcodes.h func.o: prime.h func.o: qmath.h -func.o: shs.h -func.o: shs1.h +func.o: sha1.h func.o: str.h func.o: symbol.h func.o: token.h @@ -4313,11 +4888,9 @@ hash.o: have_newstr.h hash.o: have_stdlib.h hash.o: have_string.h hash.o: longbits.h -hash.o: md5.h hash.o: nametype.h hash.o: qmath.h -hash.o: shs.h -hash.o: shs1.h +hash.o: sha1.h hash.o: str.h hash.o: value.h hash.o: zmath.h @@ -4368,11 +4941,9 @@ help.o: have_string.h help.o: have_unistd.h help.o: help.c help.o: longbits.h -help.o: md5.h help.o: nametype.h help.o: qmath.h -help.o: shs.h -help.o: shs1.h +help.o: sha1.h help.o: str.h help.o: value.h help.o: zmath.h @@ -4397,11 +4968,9 @@ hist.o: have_unused.h hist.o: hist.c hist.o: hist.h hist.o: longbits.h -hist.o: md5.h hist.o: nametype.h hist.o: qmath.h -hist.o: shs.h -hist.o: shs1.h +hist.o: sha1.h hist.o: str.h hist.o: value.h hist.o: zmath.h @@ -4425,11 +4994,9 @@ input.o: have_unistd.h input.o: hist.h input.o: input.c input.o: longbits.h -input.o: md5.h input.o: nametype.h input.o: qmath.h -input.o: shs.h -input.o: shs1.h +input.o: sha1.h input.o: str.h input.o: value.h input.o: zmath.h @@ -4456,12 +5023,10 @@ label.o: have_string.h label.o: label.c label.o: label.h label.o: longbits.h -label.o: md5.h label.o: nametype.h label.o: opcodes.h label.o: qmath.h -label.o: shs.h -label.o: shs1.h +label.o: sha1.h label.o: str.h label.o: token.h label.o: value.h @@ -4474,6 +5039,7 @@ lib_calc.o: calcerr.h lib_calc.o: cmath.h lib_calc.o: conf.h lib_calc.o: config.h +lib_calc.o: custom.h lib_calc.o: decl.h lib_calc.o: endian_calc.h lib_calc.o: func.h @@ -4489,11 +5055,9 @@ lib_calc.o: label.h lib_calc.o: lib_calc.c lib_calc.o: lib_calc.h lib_calc.o: longbits.h -lib_calc.o: md5.h lib_calc.o: nametype.h lib_calc.o: qmath.h -lib_calc.o: shs.h -lib_calc.o: shs1.h +lib_calc.o: sha1.h lib_calc.o: str.h lib_calc.o: symbol.h lib_calc.o: terminal.h @@ -4530,11 +5094,9 @@ listfunc.o: have_stdlib.h listfunc.o: have_string.h listfunc.o: listfunc.c listfunc.o: longbits.h -listfunc.o: md5.h listfunc.o: nametype.h listfunc.o: qmath.h -listfunc.o: shs.h -listfunc.o: shs1.h +listfunc.o: sha1.h listfunc.o: str.h listfunc.o: value.h listfunc.o: zmath.h @@ -4559,11 +5121,9 @@ matfunc.o: have_string.h matfunc.o: have_unused.h matfunc.o: longbits.h matfunc.o: matfunc.c -matfunc.o: md5.h matfunc.o: nametype.h matfunc.o: qmath.h -matfunc.o: shs.h -matfunc.o: shs1.h +matfunc.o: sha1.h matfunc.o: str.h matfunc.o: value.h matfunc.o: zmath.h @@ -4587,39 +5147,12 @@ math_error.o: have_string.h math_error.o: lib_calc.h math_error.o: longbits.h math_error.o: math_error.c -math_error.o: md5.h math_error.o: nametype.h math_error.o: qmath.h -math_error.o: shs.h -math_error.o: shs1.h +math_error.o: sha1.h math_error.o: str.h math_error.o: value.h math_error.o: zmath.h -md5.o: align32.h -md5.o: alloc.h -md5.o: block.h -md5.o: byteswap.h -md5.o: calcerr.h -md5.o: cmath.h -md5.o: config.h -md5.o: decl.h -md5.o: endian_calc.h -md5.o: hash.h -md5.o: have_const.h -md5.o: have_memmv.h -md5.o: have_newstr.h -md5.o: have_stdlib.h -md5.o: have_string.h -md5.o: longbits.h -md5.o: md5.c -md5.o: md5.h -md5.o: nametype.h -md5.o: qmath.h -md5.o: shs.h -md5.o: shs1.h -md5.o: str.h -md5.o: value.h -md5.o: zmath.h no_implicit.o: no_implicit.c obj.o: alloc.h obj.o: block.h @@ -4639,13 +5172,11 @@ obj.o: have_stdlib.h obj.o: have_string.h obj.o: label.h obj.o: longbits.h -obj.o: md5.h obj.o: nametype.h obj.o: obj.c obj.o: opcodes.h obj.o: qmath.h -obj.o: shs.h -obj.o: shs1.h +obj.o: sha1.h obj.o: str.h obj.o: symbol.h obj.o: value.h @@ -4674,13 +5205,11 @@ opcodes.o: hist.h opcodes.o: label.h opcodes.o: lib_calc.h opcodes.o: longbits.h -opcodes.o: md5.h opcodes.o: nametype.h opcodes.o: opcodes.c opcodes.o: opcodes.h opcodes.o: qmath.h -opcodes.o: shs.h -opcodes.o: shs1.h +opcodes.o: sha1.h opcodes.o: str.h opcodes.o: symbol.h opcodes.o: value.h @@ -4716,12 +5245,10 @@ poly.o: have_newstr.h poly.o: have_stdlib.h poly.o: have_string.h poly.o: longbits.h -poly.o: md5.h poly.o: nametype.h poly.o: poly.c poly.o: qmath.h -poly.o: shs.h -poly.o: shs1.h +poly.o: sha1.h poly.o: str.h poly.o: value.h poly.o: zmath.h @@ -4831,12 +5358,10 @@ quickhash.o: have_newstr.h quickhash.o: have_stdlib.h quickhash.o: have_string.h quickhash.o: longbits.h -quickhash.o: md5.h quickhash.o: nametype.h quickhash.o: qmath.h quickhash.o: quickhash.c -quickhash.o: shs.h -quickhash.o: shs1.h +quickhash.o: sha1.h quickhash.o: str.h quickhash.o: value.h quickhash.o: zmath.h @@ -4859,12 +5384,10 @@ sample_many.o: have_stdlib.h sample_many.o: have_string.h sample_many.o: lib_util.h sample_many.o: longbits.h -sample_many.o: md5.h sample_many.o: nametype.h sample_many.o: qmath.h sample_many.o: sample_many.c -sample_many.o: shs.h -sample_many.o: shs1.h +sample_many.o: sha1.h sample_many.o: str.h sample_many.o: value.h sample_many.o: zmath.h @@ -4886,12 +5409,10 @@ sample_rand.o: have_stdlib.h sample_rand.o: have_string.h sample_rand.o: lib_util.h sample_rand.o: longbits.h -sample_rand.o: md5.h sample_rand.o: nametype.h sample_rand.o: qmath.h sample_rand.o: sample_rand.c -sample_rand.o: shs.h -sample_rand.o: shs1.h +sample_rand.o: sha1.h sample_rand.o: str.h sample_rand.o: value.h sample_rand.o: zmath.h @@ -4919,56 +5440,29 @@ seed.o: longbits.h seed.o: qmath.h seed.o: seed.c seed.o: zmath.h -shs.o: align32.h -shs.o: alloc.h -shs.o: block.h -shs.o: byteswap.h -shs.o: calcerr.h -shs.o: cmath.h -shs.o: config.h -shs.o: decl.h -shs.o: endian_calc.h -shs.o: hash.h -shs.o: have_const.h -shs.o: have_memmv.h -shs.o: have_newstr.h -shs.o: have_stdlib.h -shs.o: have_string.h -shs.o: longbits.h -shs.o: md5.h -shs.o: nametype.h -shs.o: qmath.h -shs.o: shs.c -shs.o: shs.h -shs.o: shs1.h -shs.o: str.h -shs.o: value.h -shs.o: zmath.h -shs1.o: align32.h -shs1.o: alloc.h -shs1.o: block.h -shs1.o: byteswap.h -shs1.o: calcerr.h -shs1.o: cmath.h -shs1.o: config.h -shs1.o: decl.h -shs1.o: endian_calc.h -shs1.o: hash.h -shs1.o: have_const.h -shs1.o: have_memmv.h -shs1.o: have_newstr.h -shs1.o: have_stdlib.h -shs1.o: have_string.h -shs1.o: longbits.h -shs1.o: md5.h -shs1.o: nametype.h -shs1.o: qmath.h -shs1.o: shs.h -shs1.o: shs1.c -shs1.o: shs1.h -shs1.o: str.h -shs1.o: value.h -shs1.o: zmath.h +sha1.o: align32.h +sha1.o: alloc.h +sha1.o: block.h +sha1.o: byteswap.h +sha1.o: calcerr.h +sha1.o: cmath.h +sha1.o: config.h +sha1.o: decl.h +sha1.o: endian_calc.h +sha1.o: hash.h +sha1.o: have_const.h +sha1.o: have_memmv.h +sha1.o: have_newstr.h +sha1.o: have_stdlib.h +sha1.o: have_string.h +sha1.o: longbits.h +sha1.o: nametype.h +sha1.o: qmath.h +sha1.o: sha1.c +sha1.o: sha1.h +sha1.o: str.h +sha1.o: value.h +sha1.o: zmath.h size.o: alloc.h size.o: block.h size.o: byteswap.h @@ -4984,11 +5478,9 @@ size.o: have_newstr.h size.o: have_stdlib.h size.o: have_string.h size.o: longbits.h -size.o: md5.h size.o: nametype.h size.o: qmath.h -size.o: shs.h -size.o: shs1.h +size.o: sha1.h size.o: size.c size.o: str.h size.o: value.h @@ -5011,11 +5503,9 @@ str.o: have_newstr.h str.o: have_stdlib.h str.o: have_string.h str.o: longbits.h -str.o: md5.h str.o: nametype.h str.o: qmath.h -str.o: shs.h -str.o: shs1.h +str.o: sha1.h str.o: str.c str.o: str.h str.o: value.h @@ -5038,12 +5528,10 @@ symbol.o: have_stdlib.h symbol.o: have_string.h symbol.o: label.h symbol.o: longbits.h -symbol.o: md5.h symbol.o: nametype.h symbol.o: opcodes.h symbol.o: qmath.h -symbol.o: shs.h -symbol.o: shs1.h +symbol.o: sha1.h symbol.o: str.h symbol.o: symbol.c symbol.o: symbol.h @@ -5068,11 +5556,9 @@ token.o: have_stdlib.h token.o: have_string.h token.o: lib_calc.h token.o: longbits.h -token.o: md5.h token.o: nametype.h token.o: qmath.h -token.o: shs.h -token.o: shs1.h +token.o: sha1.h token.o: str.h token.o: token.c token.o: token.h @@ -5098,12 +5584,10 @@ value.o: have_stdlib.h value.o: have_string.h value.o: label.h value.o: longbits.h -value.o: md5.h value.o: nametype.h value.o: opcodes.h value.o: qmath.h -value.o: shs.h -value.o: shs1.h +value.o: sha1.h value.o: str.h value.o: symbol.h value.o: value.c @@ -5128,11 +5612,9 @@ version.o: have_stdlib.h version.o: have_string.h version.o: have_unused.h version.o: longbits.h -version.o: md5.h version.o: nametype.h version.o: qmath.h -version.o: shs.h -version.o: shs1.h +version.o: sha1.h version.o: str.h version.o: value.h version.o: version.c @@ -5223,12 +5705,10 @@ zprime.o: have_stdlib.h zprime.o: have_string.h zprime.o: jump.h zprime.o: longbits.h -zprime.o: md5.h zprime.o: nametype.h zprime.o: prime.h zprime.o: qmath.h -zprime.o: shs.h -zprime.o: shs1.h +zprime.o: sha1.h zprime.o: str.h zprime.o: value.h zprime.o: zmath.h @@ -5250,11 +5730,9 @@ zrand.o: have_stdlib.h zrand.o: have_string.h zrand.o: have_unused.h zrand.o: longbits.h -zrand.o: md5.h zrand.o: nametype.h zrand.o: qmath.h -zrand.o: shs.h -zrand.o: shs1.h +zrand.o: sha1.h zrand.o: str.h zrand.o: value.h zrand.o: zmath.h @@ -5276,11 +5754,9 @@ zrandom.o: have_stdlib.h zrandom.o: have_string.h zrandom.o: have_unused.h zrandom.o: longbits.h -zrandom.o: md5.h zrandom.o: nametype.h zrandom.o: qmath.h -zrandom.o: shs.h -zrandom.o: shs1.h +zrandom.o: sha1.h zrandom.o: str.h zrandom.o: value.h zrandom.o: zmath.h diff --git a/Makefile.simple b/Makefile.simple new file mode 100644 index 0000000..a7df956 --- /dev/null +++ b/Makefile.simple @@ -0,0 +1,5544 @@ +#!/bin/make +# +# calc - arbitrary precision calculator +# +######################################################################## +# Gnu makefile: # This is a Gnu make makefile. If your make does not # +# Gnu makefile: # understand this makefilkke format, then edit and use # +# Gnu makefile: # Makefile.simple instead of this Makefile. # +######################################################################## +# +# (Generic calc makefile) +# +# NOTE: This is NOT the calc rpm Makefile. This Makefile is a generic +# Makefile for the people who build calc from the gziped tarball. +# Without modification, it not assume the system has readline, ncurses +# or less. It compiles with gcc -O3 -g3 as well. You can change all +# this by modifying the Makefile variables below. +# +# NOTE: You might want use the READLINE facility if your system +# has the GNU readline headers and libaraies: +# +# USE_READLINE= -DUSE_READLINE +# READLINE_LIB= -lreadline -lhistory -lncurses +# +# Copyright (C) 1999-2007 Landon Curt Noll +# +# Calc is open software; you can redistribute it and/or modify it under +# the terms of the version 2.1 of the GNU Lesser General Public License +# as published by the Free Software Foundation. +# +# Calc is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General +# Public License for more details. +# +# A copy of version 2.1 of the GNU Lesser General Public License is +# distributed with calc under the filename COPYING-LGPL. You should have +# received a copy with calc; if not, write to Free Software Foundation, Inc. +# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +# +MAKEFILE_REV= $$Revision: 30.18 $$ +# @(#) $Id: Makefile.ship,v 30.18 2007/09/02 05:38:34 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 +# +# chongo /\oo/\ http://www.isthe.com/chongo/ +# Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ +# +# calculator by David I. Bell with help/mods from others +# Makefile by Landon Curt Noll + + +############################################################################## +#-=-=-=-=-=-=-=-=- You may want to change some values below -=-=-=-=-=-=-=-=-# +############################################################################## + +# Determine the type of terminal controls that you want to use +# +# value meaning +# -------- ------- +# (nothing) let the Makefile guess at what you need +# -DUSE_TERMIOS use struct termios from +# -DUSE_TERMIO use struct termios from +# -DUSE_SGTTY use struct sgttyb from +# -DUSE_NOTHING windoz system, don't use any of them +# +# Select TERMCONTROL= -DUSE_TERMIOS for DJGPP. +# +# If in doubt, leave TERMCONTROL empty. +# +TERMCONTROL= +#TERMCONTROL= -DUSE_TERMIOS +#TERMCONTROL= -DUSE_TERMIO +#TERMCONTROL= -DUSE_SGTTY +#TERMCONTROL= -DUSE_WIN32 + +# If your system does not have a vsprintf() function, you could be in trouble. +# +# vsprintf(string, format, ap) +# +# This function works like sprintf except that the 3rd arg is a va_list +# strarg (or varargs) list. Some old systems do not have vsprintf(). +# If you do not have vsprintf(), then calc will try sprintf() and hope +# for the best. +# +# A simular problem occurs if your system does not have a vsnprintf() +# function. This function is like the vsprintf() function except that +# there is an extra second argument that controls the maximum size +# string that is produced. +# +# If HAVE_VSPRINTF is empty, this Makefile will run the have_stdvs.c and/or +# have_varvs.c program to determine if vsprintf() is supported. If +# HAVE_VSPRINTF is set to -DDONT_HAVE_VSPRINTF then calc will hope that +# sprintf() will work. +# +# If in doubt, leave HAVE_VSPRINTF empty. +# +HAVE_VSPRINTF= +#HAVE_VSPRINTF= -DDONT_HAVE_VSPRINTF + +# Determine the byte order of your machine +# +# Big Endian: Amdahl, 68k, Pyramid, Mips, Sparc, ... +# Little Endian: Vax, 32k, Spim (Dec Mips), i386, i486, ... +# +# If in doubt, leave BYTE_ORDER empty. This Makefile will attempt to +# use BYTE_ORDER in or it will attempt to run +# the endian program. If you get syntax errors when you compile, +# try forcing the value to be -DBIG_ENDIAN and run the calc regression +# tests. (see the README file) If the calc regression tests fail, do +# a make clobber and try -DLITTLE_ENDIAN. If that fails, ask a wizard +# for help. +# +# Select BYTE_ORDER= -DLITTLE_ENDIAN for DJGPP. +# +BYTE_ORDER= +#BYTE_ORDER= -DBIG_ENDIAN +#BYTE_ORDER= -DLITTLE_ENDIAN + +# Determine the number of bits in a long +# +# If in doubt, leave LONG_BITS empty. This Makefile will run +# the longbits program to determine the length. +# +# In order to avoid make brain damage in some systems, we avoid placing +# a space after the ='s below. +# +# Select LONG_BITS= 32 for DJGPP. +# +LONG_BITS= +#LONG_BITS= 32 +#LONG_BITS= 64 + +# Determine if we have the ANSI C fgetpos and fsetpos alternate interface +# to the ftell() and fseek() (with whence set to SEEK_SET) functions. +# +# If HAVE_FPOS is empty, this Makefile will run the have_fpos program +# to determine if there is are fgetpos and fsetpos functions. If HAVE_FPOS +# is set to -DHAVE_NO_FPOS, then calc will use ftell() and fseek(). +# +# If in doubt, leave HAVE_FPOS empty and this Makefile will figure it out. +# +HAVE_FPOS= +#HAVE_FPOS= -DHAVE_NO_FPOS + +# Determine if we have an __pos element of a file position (fpos_t) structure. +# +# If HAVE_FPOS_POS is empty, this Makefile will run the have_fpos_pos program +# 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. +# +# 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. +# +HAVE_FPOS_POS= +#HAVE_FPOS_POS= -DHAVE_NO_FPOS_POS + +# Determine the size of the __pos element in fpos_t, if it exists. +# +# If FPOS_POS_BITS is empty, then the Makefile will determine the size of +# the file position value of the __pos element. +# +# If there is no __pos element in fpos_t (say because fpos_t is a scalar), +# 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= 32 +#FPOS_POS_BITS= 64 + +# Determine the size of a file position value. +# +# If FPOS_BITS is empty, then the Makefile will determine the size of +# the file position value. +# +# Select FPOS_BITS= 32 for DJGPP. +# +# If in doubt, leave FPOS_BITS empty and this Makefile will figure it out. +# +FPOS_BITS= +#FPOS_BITS= 32 +#FPOS_BITS= 64 + +# Determine the size of the off_t file offset element +# +# If OFF_T_BITS is empty, then the Makefile will determine the size of +# 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. +# +OFF_T_BITS= +#OFF_T_BITS= 32 +#OFF_T_BITS= 64 + +# Determine the size of the dev_t device value +# +# If DEV_BITS is empty, then the Makefile will determine the size of +# 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. +# +DEV_BITS= +#DEV_BITS= 16 +#DEV_BITS= 32 +#DEV_BITS= 64 + +# Determine the size of the ino_t device value +# +# If INODE_BITS is empty, then the Makefile will determine the size of +# 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. +# +INODE_BITS= +#INODE_BITS= 16 +#INODE_BITS= 32 +#INODE_BITS= 64 + +# Determine if we have an off_t which one can perform arithmetic operations, +# assignments and comparisons. On some systems off_t is some sort of union +# or struct. +# +# If HAVE_OFFSCL is empty, this Makefile will run the have_offscl program +# to determine if off_t is a scalar. If HAVE_OFFSCL is set to the value +# -DOFF_T_NON_SCALAR when calc will assume that off_t some sort of +# union or struct which. +# +# If in doubt, leave HAVE_OFFSCL empty and this Makefile will figure it out. +# +HAVE_OFFSCL= +#HAVE_OFFSCL= -DOFF_T_NON_SCALAR + +# Determine if we have an fpos_t which one can perform arithmetic operations, +# assignments and comparisons. On some systems fpos_t is some sort of union +# or struct. Some systems do not have an fpos_t and long is as a file +# offset instead. +# +# If HAVE_POSSCL is empty, this Makefile will run the have_offscl program +# to determine if off_t is a scalar, or if there is no off_t and long +# (a scalar) should be used instead. If HAVE_POSSCL is set to the value +# -DFILEPOS_NON_SCALAR when calc will assume that fpos_t exists and is +# some sort of union or struct which. +# +# If in doubt, leave HAVE_POSSCL empty and this Makefile will figure it out. +# +HAVE_POSSCL= +#HAVE_POSSCL= -DFILEPOS_NON_SCALAR + +# Determine if we have ANSI C const. +# +# If HAVE_CONST is empty, this Makefile will run the have_const program +# to determine if const is supported. If HAVE_CONST is set to -DHAVE_NO_CONST, +# then calc will not use const. +# +# If in doubt, leave HAVE_CONST empty and this Makefile will figure it out. +# +HAVE_CONST= +#HAVE_CONST= -DHAVE_NO_CONST + +# Determine if we have uid_t +# +# If HAVE_UID_T is empty, this Makefile will run the have_uid_t program +# to determine if const is supported. If HAVE_UID_T is set to -DHAVE_NO_UID_T, +# then calc will treat uid_t as an unsigned short. This only matters if +# $HOME is not set and calc must look up the home directory in /etc/passwd. +# +# If in doubt, leave HAVE_UID_T empty and this Makefile will figure it out. +# +HAVE_UID_T= +#HAVE_UID_T= -DHAVE_NO_UID_T + +# Determine if we have memcpy(), memset() and strchr() +# +# If HAVE_NEWSTR is empty, this Makefile will run the have_newstr program +# to determine if memcpy(), memset() and strchr() are supported. If +# HAVE_NEWSTR is set to -DHAVE_NO_NEWSTR, then calc will use bcopy() instead +# of memcpy(), use bfill() instead of memset(), and use index() instead of +# strchr(). +# +# If in doubt, leave HAVE_NEWSTR empty and this Makefile will figure it out. +# +HAVE_NEWSTR= +#HAVE_NEWSTR= -DHAVE_NO_NEWSTR + +# Determine if we have memmove() +# +# If HAVE_MEMMOVE is empty, this Makefile will run the have_memmv program +# to determine if memmove() is supported. If HAVE_MEMMOVE is set to +# -DHAVE_NO_MEMMOVE, then calc will use internal functions to simulate +# the memory move function that does correct overlapping memory modes. +# +# If in doubt, leave HAVE_MEMMOVE empty and this Makefile will figure it out. +# +HAVE_MEMMOVE= +#HAVE_MEMMOVE= -DHAVE_NO_MEMMOVE + +# Determine if we have ustat() +# +# If HAVE_USTAT is empty, this Makefile will run the have_memmv program +# to determine if ustat() is supported. If HAVE_USTAT is set to +# -DHAVE_NO_USTAT, then calc will use internal functions to simulate +# 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. +# +HAVE_USTAT= +#HAVE_USTAT= -DHAVE_NO_USTAT + +# Determine if we have getsid() +# +# If HAVE_GETSID is empty, this Makefile will run the have_memmv program +# to determine if getsid() is supported. If HAVE_GETSID is set to +# -DHAVE_NO_GETSID, then calc will use internal functions to simulate +# the memory move function that does correct overlapping memory modes. +# +# Select HAVE_GETSID= -DHAVE_NO_GETSID for DJGPP. +# +# If in doubt, leave HAVE_GETSID empty and this Makefile will figure it out. +# +HAVE_GETSID= +#HAVE_GETSID= -DHAVE_NO_GETSID + +# Determine if we have getpgid() +# +# If HAVE_GETPGID is empty, this Makefile will run the have_memmv program +# to determine if getpgid() is supported. If HAVE_GETPGID is set to +# -DHAVE_NO_GETPGID, then calc will use internal functions to simulate +# the memory move function that does correct overlapping memory modes. +# +# Select HAVE_GETPGID= -DHAVE_NO_GETPGID for DJGPP. +# +# If in doubt, leave HAVE_GETPGID empty and this Makefile will figure it out. +# +HAVE_GETPGID= +#HAVE_GETPGID= -DHAVE_NO_GETPGID + +# Determine if we have clock_gettime() +# +# If HAVE_GETTIME is empty, this Makefile will run the have_memmv program +# to determine if clock_gettime() is supported. If HAVE_GETTIME is set to +# -DHAVE_NO_GETTIME, then calc will use internal functions to simulate +# 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. +# +HAVE_GETTIME= +#HAVE_GETTIME= -DHAVE_NO_GETTIME + +# Determine if we have getprid() +# +# If HAVE_GETPRID is empty, this Makefile will run the have_memmv program +# to determine if getprid() is supported. If HAVE_GETPRID is set to +# -DHAVE_NO_GETPRID, then calc will use internal functions to simulate +# the memory move function that does correct overlapping memory modes. +# +# Select HAVE_GETPRID= -DHAVE_NO_GETPRID for DJGPP. +# +# If in doubt, leave HAVE_GETPRID empty and this Makefile will figure it out. +# +HAVE_GETPRID= +#HAVE_GETPRID= -DHAVE_NO_GETPRID + +# Determine if we have the /dev/urandom +# +# HAVE_URANDOM_H= let the Makefile look /dev/urandom +# HAVE_URANDOM_H= YES assume that /dev/urandom exists +# 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. +# +HAVE_URANDOM_H= +#HAVE_URANDOM_H= YES +#HAVE_URANDOM_H= NO + +# Determine if we have getrusage() +# +# If HAVE_GETRUSAGE is empty, this Makefile will run the have_memmv program +# to determine if getrusage() is supported. If HAVE_GETRUSAGE is set to +# -DHAVE_NO_GETRUSAGE, then calc will use internal functions to simulate +# the memory move function that does correct overlapping memory modes. +# +# If in doubt, leave HAVE_GETRUSAGE empty and this Makefile will figure it out. +# +HAVE_GETRUSAGE= +#HAVE_GETRUSAGE= -DHAVE_NO_GETRUSAGE + +# Determine if we have strdup() +# +# If HAVE_STRDUP is empty, this Makefile will run the have_memmv program +# to determine if strdup() is supported. If HAVE_STRDUP is set to +# -DHAVE_NO_STRDUP, then calc will use internal functions to simulate +# the memory move function that does correct overlapping memory modes. +# +# If in doubt, leave HAVE_STRDUP empty and this Makefile will figure it out. +# +HAVE_STRDUP= +#HAVE_STRDUP= -DHAVE_NO_STRDUP + +# Some architectures such as Sparc do not allow one to access 32 bit values +# that are not alligned on a 32 bit boundary. +# +# The Dec Alpha running OSF/1 will produce alignment error messages when +# align32.c tries to figure out if alignment is needed. Use the +# ALIGN32= -DMUST_ALIGN32 to force alignment and avoid such error messages. +# +# ALIGN32= let align32.c figure out if alignment is needed +# ALIGN32= -DMUST_ALIGN32 force 32 bit alignment +# 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. +# +ALIGN32= +#ALIGN32= -DMUST_ALIGN32 +#ALIGN32= -UMUST_ALIGN32 + +# Determine if we have the include file. +# +# HAVE_STDLIB_H= let the Makefile look for the include file +# HAVE_STDLIB_H= YES assume that the include file exists +# 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. +# +HAVE_STDLIB_H= +#HAVE_STDLIB_H= YES +#HAVE_STDLIB_H= NO + +# Determine if we have the include file. +# +# HAVE_STRING_H= let the Makefile look for the include file +# HAVE_STRING_H= YES assume that the include file exists +# 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. +# +HAVE_STRING_H= +#HAVE_STRING_H= YES +#HAVE_STRING_H= NO + +# Determine if we have the include file. +# +# HAVE_TIMES_H= let the Makefile look for the include file +# HAVE_TIMES_H= YES assume that the include file exists +# 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. +# +HAVE_TIMES_H= +#HAVE_TIMES_H= YES +#HAVE_TIMES_H= NO + +# Determine if we have the include file. +# +# HAVE_SYS_TIMES_H= let the Makefile look for the include file +# HAVE_SYS_TIMES_H= YES assume that the include file exists +# 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. +# +HAVE_SYS_TIMES_H= +#HAVE_SYS_TIMES_H= YES +#HAVE_SYS_TIMES_H= NO + +# Determine if we have the include file. +# +# HAVE_TIME_H= let the Makefile look for the include file +# HAVE_TIME_H= YES assume that the include file exists +# 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. +# +HAVE_TIME_H= +#HAVE_TIME_H= YES +#HAVE_TIME_H= NO + +# Determine if we have the include file. +# +# HAVE_SYS_TIME_H= let the Makefile look for the include file +# HAVE_SYS_TIME_H= YES assume that the include file exists +# 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. +# +HAVE_SYS_TIME_H= +#HAVE_SYS_TIME_H= YES +#HAVE_SYS_TIME_H= NO + +# Determine if we have the include file. +# +# HAVE_UNISTD_H= let the Makefile look for the include file +# HAVE_UNISTD_H= YES assume that the include file exists +# 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. +# +HAVE_UNISTD_H= +#HAVE_UNISTD_H= YES +#HAVE_UNISTD_H= NO + +# Determine if our compiler allows the -Wno-implicit flag +# +# HAVE_NO_IMPLICIT= let the Makefile test the -Wno-implicit flag +# HAVE_NO_IMPLICIT= NO Our compiler does not have -Wno-implicit flags +# HAVE_NO_IMPLICIT= YES Our compiler has a -Wno-implicit flag +# +# Select HAVE_NO_IMPLICIT= for DJGPP. +# +HAVE_NO_IMPLICIT= +# HAVE_NO_IMPLICIT= NO +# HAVE_NO_IMPLICIT= YES + +# Determine if our compiler allows the unused attribute +# +# If HAVE_UNUSED is empty, this Makefile will run the have_unused program +# to determine if the unused attribute is supported. If HAVE_UNUSED is set to +# -DHAVE_NO_UNUSED, then the unused attribute will not be used. +# +# Select HAVE_UNUSED= for DJGPP. +# +# If in doubt, leave HAVE_UNUSED empty and this Makefile will figure it out. +# +HAVE_UNUSED= +#HAVE_UNUSED= -DHAVE_NO_UNUSED + +# System include files +# +# ${INCDIR} where the system include (.h) files are kept +# +# For DJGPP, select: +# +# INCDIR= /dev/env/DJDIR/include +# +# If in doubt, set: +# +# INCDIR= /usr/include +# + +#INCDIR= /usr/local/include +#INCDIR= /dev/env/DJDIR/include +INCDIR= /usr/include + +# Where to install calc realted things +# +# ${BINDIR} where to install calc binary files +# ${LIBDIR} where calc link library (*.a) files are installed +# ${CALC_SHAREDIR} where to install calc help, .cal, startup, config files +# ${CALC_INCDIR} where the calc include files are installed +# +# NOTE: The install rule prepends installation paths with ${T}, which +# by default is empty. If ${T} is non-empty, then installation +# locations will be relative to the ${T} directory. +# +# For DJGPP, select: +# +# BINDIR= /dev/env/DJDIR/bin +# LIBDIR= /dev/env/DJDIR/lib +# CALC_SHAREDIR= /dev/env/DJDIR/share/calc +# +# If in doubt, set: +# +# BINDIR= /usr/bin +# LIBDIR= /usr/lib +# CALC_SHAREDIR= /usr/share/calc +# +#BINDIR= /usr/local/bin +#BINDIR= /dev/env/DJDIR/bin +BINDIR= /usr/bin + +#LIBDIR= /usr/local/lib +#LIBDIR= /dev/env/DJDIR/lib +LIBDIR= /usr/lib + +#CALC_SHAREDIR= /usr/local/lib/calc +#CALC_SHAREDIR= /dev/env/DJDIR/share/calc +CALC_SHAREDIR= /usr/share/calc + +# NOTE: Do not set CALC_INCDIR to /usr/include or /usr/local/include!!! +# Always be sure that the CALC_INCDIR path ends in /calc to avoid +# conflicts with system or other application include files!!! +# +#CALC_INCDIR= /usr/local/include/calc +#CALC_INCDIR= /dev/env/DJDIR/include/calc +CALC_INCDIR= ${INCDIR}/calc + +# By default, these values are based CALC_SHAREDIR, INCDIR, BINDIR +# --------------------------------------------------------------- +# ${HELPDIR} where the help directory is installed +# ${CUSTOMCALDIR} where custom *.cal files are installed +# ${CUSTOMHELPDIR} where custom help files are installed +# ${CUSTOMINCDIR} where custom .h files are installed +# ${SCRIPTDIR} where calc shell scripts are installed +# +# NOTE: The install rule prepends installation paths with ${T}, which +# by default is empty. If ${T} is non-empty, then installation +# locations will be relative to the ${T} directory. +# +# If in doubt, set: +# +# HELPDIR= ${CALC_SHAREDIR}/help +# CALC_INCDIR= ${INCDIR}/calc +# CUSTOMCALDIR= ${CALC_SHAREDIR}/custom +# CUSTOMHELPDIR= ${CALC_SHAREDIR}/custhelp +# CUSTOMINCDIR= ${CALC_INCDIR}/custom +# SCRIPTDIR= ${BINDIR}/cscript +# +HELPDIR= ${CALC_SHAREDIR}/help +CUSTOMCALDIR= ${CALC_SHAREDIR}/custom +CUSTOMHELPDIR= ${CALC_SHAREDIR}/custhelp +CUSTOMINCDIR= ${CALC_INCDIR}/custom +SCRIPTDIR= ${BINDIR}/cscript + +# T - top level directory under which calc will be installed +# +# The calc install is performed under ${T}, the calc build is +# performed under /. The purpose for ${T} is to allow someone +# to install calc somewhere other than into the system area. +# +# For example, if: +# +# BINDIR= /usr/bin +# LIBDIR= /usr/lib +# CALC_SHAREDIR= /usr/share/calc +# +# and if: +# +# T= /var/tmp/testing +# +# Then the installation locations will be: +# +# calc binary files: /var/tmp/testing/usr/bin +# calc link library: /var/tmp/testing/usr/lib +# calc help, .cal ...: /var/tmp/testing/usr/share/calc +# ... etc ... /var/tmp/testing/... +# +# If ${T} is empty, calc is installed under /, which is the same +# top of tree for which it was built. If ${T} is non-empty, then +# calc is installed under ${T}, as if one had to chroot under +# ${T} for calc to operate. +# +# If in doubt, use T= +# +T= + +# 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. +# +#MANDIR= +#MANDIR= /usr/local/man/man1 +#MANDIR= /usr/man/man1 +MANDIR= /usr/share/man/man1 +#MANDIR= /dev/env/DJDIR/man/man1 +#MANDIR= /usr/man/u_man/man1 +#MANDIR= /usr/contrib/man/man1 + +# 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. +# +CATDIR= +#CATDIR= /usr/local/man/cat1 +#CATDIR= /usr/local/catman/cat1 +#CATDIR= /usr/man/cat1 +#CATDIR= /usr/share/man/cat1 +#CATDIR= /dev/env/DJDIR/man/cat1 +#CATDIR= /var/cache/man/cat1 +#CATDIR= /usr/man/u_man/cat1 +#CATDIR= /usr/contrib/man/cat1 + +# extension to add on to the calc man page filename +# +# This is ignored if CATDIR is empty. +# +MANEXT= 1 +#MANEXT= l + +# extension to add on to the calc man page filename +# +# This is ignored if CATDIR is empty. +# +CATEXT= 1 +#CATEXT= 1.gz +#CATEXT= 0 +#CATEXT= l + +# how to format a man page +# +# If CATDIR is non-empty, then +# +# If NROFF is non-empty, then +# +# ${NROFF} ${NROFF_ARG} calc.1 > ${CATDIR}/calc.${CATEXT} +# is used to built and install the cat page +# +# else (NROFF is empty) +# +# ${MANMAKE} calc.1 ${CATDIR} +# is used to built and install the cat page +# else +# +# 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 +# and CATDIR to empty and ignore the NROFF, NROFF_ARG and MANMAKE +# lines below. +# +#NROFF= nroff +NROFF= +#NROFF= groff +NROFF_ARG= -man +#NROFF_ARG= -mandoc +MANMAKE= /usr/local/bin/manmake +#MANMAKE= manmake +MANMODE= 0444 +CATMODE= 0444 + +# If the $CALCPATH environment variable is not defined, then the following +# path will be search for calc resource file routines. +# +# Select CALCPATH= .;./cal;~/.cal;${CALC_SHAREDIR};${CUSTOMCALDIR} for DJGPP. +# +CALCPATH= .:./cal:~/.cal:${CALC_SHAREDIR}:${CUSTOMCALDIR} +#CALCPATH= .;./cal;~/.cal;${CALC_SHAREDIR};${CUSTOMCALDIR} + +# If the $CALCRC environment variable is not defined, then the following +# path will be search for calc resource files. +# +# Select CALCRC= ${CALC_SHAREDIR}/startup;~/.calcrc;./.calcinit for DJGPP. +# +CALCRC= ${CALC_SHAREDIR}/startup:~/.calcrc:./.calcinit +#CALCRC= ${CALC_SHAREDIR}/startup;~/.calcrc;./.calcinit + +# Determine of the GNU-readline facility will be used instead of the +# built-in calc binding method. +# +# USE_READLINE= Do not use GNU-readline, use calc bindings +# USE_READLINE= -DUSE_READLINE Use GNU-readline, do not use calc bindings +# +# NOTE: If you select the 'USE_READLINE= -DUSE_READLINE' mode, you must set: +# +# READLINE_LIB The flags needed to link in the readline +# and history link libraries +# READLINE_INCLUDE Where the readline include files reside +# (leave blank if they are /usr/include/readline) +# +# NOTE: The GNU-readline code is not shipped with calc. You must have +# the appropriate headers and link libs installed on your system in +# order to use it. +# +# 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 +#READLINE_LIB= -L/usr/gnu/lib -lreadline -lhistory -lncurses +#READLINE_LIB= -L/usr/local/lib -lreadline -lhistory -lncurses +# +# For Apple OS X: install fink from http://fink.sourceforge.net +# and then do a 'fink install readline' and then use: +# +#READLINE_LIB= -L/sw/lib -lreadline -lhistory -lncurses +# +READLINE_INCLUDE= +#READLINE_INCLUDE= -I/usr/gnu/include +#READLINE_INCLUDE= -I/usr/local/include + +# If $PAGER is not set, use this program to display a help file +# +# Select CALCPAGER= less.exe -ci for DJGPP. +# +#CALCPAGER= more +#CALCPAGER= pg +#CALCPAGER= cat +CALCPAGER= less +#CALCPAGER= less.exe -ci + +# Debug/Optimize options for ${CC} and ${LCC} +# +# Select DEBUG= -O2 -gstabs+ -DWINDOZ for DJGPP. +# +#DEBUG= +#DEBUG= -g +#DEBUG= -g3 +# +#DEBUG= -O +#DEBUG= -O -g +#DEBUG= -O -g3 +# +#DEBUG= -O1 +#DEBUG= -O1 -g +#DEBUG= -O1 -g3 +# +#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 + +# Some systems require one to use ranlib to add a symbol table to +# a *.a link library. Set RANLIB to the utility that performs this +# action. Set RANLIB to : if your system does not need such a utility. +# +RANLIB=ranlib +#RANLIB=: + +# Normally certain files depend on the Makefile. If the Makefile is +# changed, then certain steps should be redone. If MAKE_FILE is +# set to Makefile, then these files will depend on Makefile. If +# MAKE_FILE is empty, then they wont. +# +# If in doubt, set MAKE_FILE to Makefile +# +MAKE_FILE= Makefile + +# Controlling file makefile basename (without the path) +# +# This is the basename same of the makefile that may/does/will drive +# this makefile. +# +# If in doubt, set TOP_MAKE_FILE to Makefile +# +TOP_MAKE_FILE= Makefile + +# If you do not wish to use purify, set PURIFY to an empty string. +# +# If in doubt, use PURIFY= +# +#PURIFY= purify +#PURIFY= purify -m71-engine +#PURIFY= purify -logfile=pure.out +#PURIFY= purify -m71-engine -logfile=pure.out +PURIFY= + +# If you want to use a debugging link library such as a malloc debug link +# library, or need to add special ld flags after the calc link libraries +# are included, set ${LD_DEBUG} below. +# +# If in doubt, set LD_DEBUG to empty. +# +#LD_DEBUG= -lmalloc_cv +LD_DEBUG= + +# When doing a: +# +# make check +# make chk +# make debug +# +# the ${CALC_ENV} is used to supply the proper environment variables +# to calc. Most people will simply need 'CALCPATH=./cal' to ensure +# that these debug rules will only use calc resource files under the +# local source directory. The longer lines (with MALLOC_VERBOSE=1 ...) +# are useful for SGI IRIX people who have 'WorkShop Performance Tools' +# and who also set 'LD_DEBUG= -lmalloc_cv' above. +# +# If in doubt, use CALC_ENV= CALCPATH=./cal LD_LIBRARY_PATH=.:./custom +# +CALC_ENV= CALCPATH=./cal LD_LIBRARY_PATH=. +#CALC_ENV= CALCPATH=./cal MALLOC_VERBOSE=1 MALLOC_TRACING=1 \ +# MALLOC_FASTCHK=1 MALLOC_FULLWARN=1 LD_LIBRARY_PATH=.:./custom +#CALC_ENV= CALCPATH=./cal MALLOC_VERBOSE=1 MALLOC_TRACING=1 \ +# MALLOC_FASTCHK=1 MALLOC_FULLWARN=1 MALLOC_CLEAR_FREE=1 \ +# MALLOC_CLEAR_MALLOC=1 LD_LIBRARY_PATH=.:./custom + +# By default, custom builtin functions may only be executed if calc +# is given the -C option. This is because custom builtin functions +# may invoke non-standard or non-portable code. One may completely +# disable custom builtin functions by not compiling any of code +# +# ALLOW_CUSTOM= -DCUSTOM # allow custom only if -C is given +# ALLOW_CUSTOM= # disable custom even if -C is given +# +# If in doubt, use ALLOW_CUSTOM= -DCUSTOM +# +ALLOW_CUSTOM= -DCUSTOM +#ALLOW_CUSTOM= + +# The install rule uses: +# +# ${MKDIR} ${MKDIR_ARG} +# +# to create directorties. Normall this amounts to usins mkdir -p dir ... +# Some older systems may not have mkdir -p. If you system does not +# make mkdir -p, then set MKDIR_ARG to empty. +# +# MKDIR_ARG= -p # use mkdir -p when creating paths +# MKDIR_ARG= # use if system does not understand mkdir -p +# +MKDIR_ARG= -p +#MKDIR_ARG= + +# Some out of date operating systems require / want an executable to +# end with a certain file extension. Some compile systems such as +# Cygwin build calc as calc.exe. The EXT variable is used to denote +# the extension required by such. +# +# EXT= # normal Un*x / Linux / GNU/Linux systems +# EXT=.exe # windoz / Cygwin +# +# If in doubt, use EXT= +# +EXT= +#EXT=.exe + +# The default calc versions +# +VERSION= 2.12.2 +VERS= 2.12.2 +VER= 2.12 +VE= 2 + +# Names of shared libraries with versions +# +LIB_EXT= .so +LIB_EXT_VERS= ${LIB_EXT}.${VERS} +LIB_EXT_VER= ${LIB_EXT}.${VER} +LIB_EXT_VE= ${LIB_EXT}.${VE} + +# standard utilities used during make +# +SHELL= /bin/sh +LANG= C +MAKE= make +AWK= awk +SED= sed +DIFF= diff +GREP= egrep +SORT= sort +TEE= tee +CTAGS= ctags +CHMOD= chmod +FMT= fmt +XARGS= xargs +CMP= cmp +MKDIR= mkdir +SPLINT= splint +SPLINT_OPTS= +RM= rm +TOUCH= touch +RMDIR= rmdir +CP= cp +MV= mv +CO= co +AR= ar +TRUE= true +CAT= cat +COL= col +LN= ln +LDCONFIG= ldconfig +# assume the X11 makedepend tool for the depend rule +MAKEDEPEND= makedepend + +# Extra compiling and linking flags +# +# EXTRA_CFLAGS are flags given to ${CC} when compiling C files +# EXTRA_LDFLAGS are flags given to ${CC} when linking progs +# +# Both CFLAGS and LDFLAGS are left blank in this Makefile by +# default so that users may use them on the make command line +# to always the way that C is compiled and files are linked +# respectively. For example: +# +# make all EXTRA_CFLAGS="-DMAGIC" EXTRA_LDFLAGS="-lmagic" +# +# NOTE: These should be left blank in this Makefile to make it +# easier to add stuff on the command line. If you want to +# to change the way calc is compiled by this Makefile, change +# the appropirate host target section below or a flag above. +# +EXTRA_CFLAGS= +EXTRA_LDFLAGS= + +# COMMON_CFLAGS are the common ${CC} flags used for all progs, both +# intermediate and final calc and calc related progs +# +COMMON_CFLAGS= -DCALC_SRC ${ALLOW_CUSTOM} ${CCWARN} ${CCMISC} ${EXTRA_CFLAGS} + +# COMMON_LDFLAGS are the common flags used for linking all progs, both +# intermediate and final calc and calc related progs +# +COMMON_LDFLAGS= ${EXTRA_LDFLAGS} + +# start of host target cut - Do not remove this line +############################################################################## +#-=-=-=-=-=- host target section - targets that override defaults -=-=-=-=-=-# +############################################################################## + +# Common values set in targets +# +# BLD_TYPE determines if calc is built with static and/or dynamic libs. +# Set this value to one of: +# +# BLD_TYPE= calc-dynamic-only +# BLD_TYPE= calc-static-only +# +# CC_SHARE are flags given to ${CC} to build .o files suitable for shared libs +# DEFAULT_LIB_INSTALL_PATH is where calc progs look for calc shared libs +# LD_SHARE are common flags given to ${CC} to link with shared libraries +# LIBCALC_SHLIB are flags given to ${CC} to build libcalc shared lib +# LIBCUSTCALC_SHLIB are flags given to ${CC} to build libcustcalc shared lib +# +# NOTE: The above 4 values are unused if BLD_TYPE= calc-static-only +# +# CC_STATIC are flags given to ${CC} to build .o files suitable for static libs +# LD_STATIC are common flags given to ${CC} to link with static libraries +# LIBCALC_STATIC are flags given to ${CC} to build libcalc static lib +# LIBCUSTCALC_STATIC are flags given to ${CC} to build libcustcalc static lib +# +# NOTE: The above 4 values are unused if BLD_TYPE= calc-dynamic-only +# +# CCOPT are flags given to ${CC} for optimization +# CCWARN are flags given to ${CC} for warning message control +# CCWERR are flags given to ${CC} to make warnings fatal errors +# NOTE: CCWERR is only set in development Makefiles and must only be +# used with ${CC}, not ${LCC}. If you do not want the compiler +# to abort on warnings, then leave CCWERR blank. +# CCMISC are misc flags given to ${CC} +# +# LCC how the the C compiler is invoked on locally executed intermediate progs +# CC is how the the C compiler is invoked (with an optional Purify) +# +# Specific target overrides or modifications to default values + +########################################################################## +# NOTE: If your target is not supported below and the default target # +# is not suitable for your needs, please send to the: # +# # +# calc-contrib at asthe dot com # +# # +# EMail address an "ifeq ($(target),YOUR_TARGET_NAME)" ... "endif" # +# set of lines so that we can consider them for the next release. # +########################################################################## + +# +BLD_TYPE= calc-static-only +# +CC_SHARE= -fPIC +DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib +LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \ + "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}" +LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERS}" +LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERS}" +# +CC_STATIC= +LD_STATIC= +LIBCALC_STATIC= +LIBCUSTCALC_STATIC= +# +CCWARN= -Wall -W -Wno-comment +CCWERR= +CCOPT= ${DEBUG} +CCMISC= +# +LCC= cc +CC= ${PURIFY} ${LCC} ${CCWERR} +# +# The simple makefile forces the use of static ${CC} flags +# +# ICFLAGS are given to ${CC} for intermediate progs used to help compile calc +# CFLAGS are given to ${CC} for calc progs other than intermediate progs +# ILDFLAGS for ${CC} in linking intermediate progs used to help compile calc +# LDFLAGS for ${CC} in linking calc progs other than intermediate progs +# +ICFLAGS= ${COMMON_CFLAGS} ${CC_STATIC} +CFLAGS= ${ICFLAGS} ${CCOPT} +# +ILDFLAGS= ${COMMON_LDFLAGS} ${LD_STATIC} +LDFLAGS= ${LD_DEBUG} ${ILDFLAGS} ${LIBCALC_STATIC} ${LIBCUSTCALC_STATIC} +# + +####################################################################### +#-=-=-=-=-=- end of target section - only make rules below -=-=-=-=-=-# +####################################################################### +# end of host target cut - Do not remove this line + +############################################################################### +#=-=-=-=-=- Be careful if you change something in this next section -=-=-=-=-=# +############################################################################### + +# Makefile debug +# +# Q=@ do not echo internal Makefile actions (quiet mode) +# Q= echo internal Makefile actions (debug / verbose mode) +# +# V=@: do not echo debug statements (quiet mode) +# V=@ do echo debug statements (debug / verbose mode) +# +#Q= +Q=@ +V=@: +#V=@ + +# the source files which are built into a math link library +# +# There MUST be a .o for every .c in LIBOBJS +# +LIBSRC= addop.c assocfunc.c blkcpy.c block.c byteswap.c \ + codegen.c comfunc.c commath.c config.c const.c custom.c \ + file.c func.c hash.c help.c hist.c input.c jump.c label.c \ + lib_calc.c lib_util.c listfunc.c matfunc.c math_error.c \ + obj.c opcodes.c pix.c poly.c prime.c qfunc.c qio.c \ + qmath.c qmod.c qtrans.c quickhash.c seed.c sha1.c size.c \ + str.c symbol.c token.c value.c version.c zfunc.c zio.c \ + zmath.c zmod.c zmul.c zprime.c zrand.c zrandom.c + +# the object files which are built into a math link library +# +# There MUST be a .o for every .c in LIBSRC plus calcerr.o +# which is built via this Makefile. +# +LIBOBJS= addop.o assocfunc.o blkcpy.o block.o byteswap.o calcerr.o \ + codegen.o comfunc.o commath.o config.o const.o custom.o \ + file.o func.o hash.o help.o hist.o input.o jump.o label.o \ + lib_calc.o lib_util.o listfunc.o matfunc.o math_error.o \ + obj.o opcodes.o pix.o poly.o prime.o qfunc.o qio.o \ + qmath.o qmod.o qtrans.o quickhash.o seed.o sha1.o size.o \ + str.o symbol.o token.o value.o version.o zfunc.o zio.o \ + zmath.o zmod.o zmul.o zprime.o zrand.o zrandom.o + +# the calculator source files +# +# There MUST be a .c for every .o in CALCOBJS. +# +CALCSRC= calc.c + +# we build these .o files for calc +# +# There MUST be a .o for every .c in CALCSRC. +# +CALCOBJS= calc.o + +# these .h files are needed to build the math link library +# +LIB_H_SRC= alloc.h blkcpy.h block.h byteswap.h calc.h cmath.h \ + config.h custom.h decl.h file.h func.h hash.h hist.h jump.h \ + label.h lib_util.h lib_calc.h nametype.h \ + opcodes.h prime.h qmath.h sha1.h str.h \ + symbol.h token.h value.h zmath.h zrand.h zrandom.h + +# we build these .h files during the make +# +BUILD_H_SRC= align32.h args.h calcerr.h conf.h endian_calc.h \ + fposval.h have_const.h have_fpos.h have_fpos_pos.h \ + have_memmv.h have_newstr.h have_offscl.h have_posscl.h \ + have_stdlib.h have_string.h have_times.h have_uid_t.h \ + have_unistd.h longbits.h terminal.h \ + have_ustat.h have_getsid.h have_getpgid.h \ + have_gettime.h have_getprid.h have_urandom.h have_rusage.h \ + have_strdup.h have_unused.h + +# we build these .c files during the make +# +BUILD_C_SRC= calcerr.c + +# these .c files may be used in the process of building BUILD_H_SRC +# +# There MUST be a .c for every .o in UTIL_OBJS. +# +UTIL_C_SRC= align32.c endian.c longbits.c have_newstr.c have_uid_t.c \ + have_const.c have_stdvs.c have_varvs.c fposval.c have_fpos.c \ + have_fpos_pos.c have_offscl.c have_posscl.c have_memmv.c \ + have_ustat.c have_getsid.c have_getpgid.c \ + have_gettime.c have_getprid.c have_rusage.c have_strdup.c \ + no_implicit.c have_unused.c + +# these awk and sed tools are used in the process of building BUILD_H_SRC +# and BUILD_C_SRC +# +UTIL_MISC_SRC= calcerr_h.sed calcerr_h.awk calcerr_c.sed calcerr_c.awk \ + calcerr.tbl check.awk win32.mkdef + +# these .o files may get built in the process of building BUILD_H_SRC +# +# There MUST be a .o for every .c in UTIL_C_SRC. +# +UTIL_OBJS= endian.o longbits.o have_newstr.o have_uid_t.o \ + have_const.o fposval.o have_fpos.o have_fpos_pos.o \ + try_strarg.o have_stdvs.o have_varvs.o have_posscl.o have_memmv.o \ + have_ustat.o have_getsid.o have_getpgid.o \ + have_gettime.o have_getprid.o ver_calc.o have_rusage.o have_strdup.o \ + no_implicit.o have_unused.o + +# these temp files may be created (and removed) during the build of BUILD_C_SRC +# +UTIL_TMP= ll_tmp fpos_tmp fposv_tmp const_tmp uid_tmp newstr_tmp vs_tmp \ + memmv_tmp offscl_tmp posscl_tmp newstr_tmp \ + getsid_tmp gettime_tmp getprid_tmp rusage_tmp strdup_tmp + +# these utility progs may be created in the process of building BUILD_H_SRC +# +UTIL_PROGS= align32${EXT} fposval${EXT} have_uid_t${EXT} have_const${EXT} \ + endian${EXT} longbits${EXT} have_newstr${EXT} have_stdvs${EXT} \ + have_varvs${EXT} have_ustat${EXT} have_getsid${EXT} \ + have_getpgid${EXT} have_gettime${EXT} have_getprid${EXT} \ + ver_calc${EXT} have_strdup${EXT} no_implicit${EXT} no_implicit.arg \ + have_unused${EXT} have_fpos${EXT} have_fpos_pos${EXT} \ + have_offscl${EXT} have_rusage${EXT} have_args.sh + +# Any .h files that are needed to compile sample code. +# +SAMPLE_H_SRC= + +# Any .c files that are needed to compile sample code. +# +# There MUST be a .c in SAMPLE_C_SRC for every .o in SAMPLE_OBJ. +# +SAMPLE_C_SRC= sample_many.c sample_rand.c + +# Any .o files that are needed to compile sample code. +# +# There MUST be a .c in SAMPLE_C_SRC for every .o in SAMPLE_OBJ. +# +SAMPLE_OBJ= sample_many.o sample_rand.o + +# The complete list of Makefile vars passed down to custom/Makefile. +# +CUSTOM_PASSDOWN= \ + ALLOW_CUSTOM="${ALLOW_CUSTOM}" \ + AR=${AR} \ + AWK=${AWK} \ + BINDIR="${BINDIR}" \ + BLD_TYPE="${BLD_TYPE}" \ + CALC_INCDIR="${CALC_INCDIR}" \ + CALC_SHAREDIR="${CALC_SHAREDIR}" \ + CAT=${CAT} \ + CC="${CC}" \ + CCERR="${CCERR}" \ + CCMISC="${CCMISC}" \ + CCOPT="${CCOPT}" \ + CCWARN="${CCWARN}" \ + CC_SHARE="${CC_SHARE}" \ + CFLAGS="${CFLAGS} -I.." \ + CHMOD=${CHMOD} \ + CMP=${CMP} \ + CO=${CO} \ + COMMON_CFLAGS="${COMMON_CFLAGS} -I.." \ + COMMON_LDFLAGS="${COMMON_LDFLAGS}" \ + CP=${CP} \ + CUSTOMCALDIR="${CUSTOMCALDIR}" \ + CUSTOMHELPDIR="${CUSTOMHELPDIR}" \ + CUSTOMINCDIR="${CUSTOMINCDIR}" \ + DEBUG="${DEBUG}" \ + DEFAULT_LIB_INSTALL_PATH="${DEFAULT_LIB_INSTALL_PATH}" \ + FMT=${FMT} \ + GREP=${GREP} \ + HELPDIR="${HELPDIR}" \ + ICFLAGS="${ICFLAGS} -I.." \ + ILDFLAGS="${ILDFLAGS}" \ + INCDIR="${INCDIR}" \ + LANG=${LANG} \ + LCC="${LCC}" \ + LDCONFIG=${LDCONFIG} \ + LDFLAGS="${LDFLAGS}" \ + LD_SHARE="${LD_SHARE}" \ + LIBCUSTCALC_SHLIB="${LIBCUSTCALC_SHLIB}" \ + LIBDIR="${LIBDIR}" \ + LN=${LN} \ + MAKE=${MAKE} \ + MAKEDEPEND=${MAKEDEPEND} \ + MAKE_FILE=Makefile \ + MKDIR=${MKDIR} \ + MV=${MV} \ + PURIFY="${PURIFY}" \ + Q="${Q}" \ + RANLIB="${RANLIB}" \ + RM=${RM} \ + RMDIR=${RMDIR} \ + SCRIPTDIR="${SCRIPTDIR}" \ + SED=${SED} \ + SORT=${SORT} \ + T=${T} \ + TOP_MAKE_FILE=${MAKE_FILE} \ + TOUCH=${TOUCH} \ + TRUE=${TRUE} \ + VERSION=${VERSION} \ + target=${target} + +# The compelte list of Makefile vars passed down to help/Makefile. +# +HELP_PASSDOWN= \ + AR=${AR} \ + BINDIR="${BINDIR}" \ + CALC_INCDIR="${CALC_INCDIR}" \ + CALC_SHAREDIR="${CALC_SHAREDIR}" \ + CAT=${CAT} \ + CFLAGS="${CFLAGS}" \ + CHMOD=${CHMOD} \ + CMP=${CMP} \ + CO=${CO} \ + COMMON_CFLAGS="${COMMON_CFLAGS}" \ + COMMON_LDFLAGS="${COMMON_LDFLAGS}" \ + CP=${CP} \ + CUSTOMCALDIR="${CUSTOMCALDIR}" \ + CUSTOMHELPDIR="${CUSTOMHELPDIR}" \ + CUSTOMINCDIR="${CUSTOMINCDIR}" \ + EXT=${EXT} \ + FMT=${FMT} \ + HELPDIR="${HELPDIR}" \ + ICFLAGS="${ICFLAGS}" \ + ILDFLAGS="${ILDFLAGS}" \ + INCDIR="${INCDIR}" \ + LANG=${LANG} \ + LCC="${LCC}" \ + LIBDIR="${LIBDIR}" \ + MAKE_FILE=Makefile \ + MKDIR=${MKDIR} \ + MV=${MV} \ + Q="${Q}" \ + RM=${RM} \ + RMDIR=${RMDIR} \ + SCRIPTDIR="${SCRIPTDIR}" \ + SED=${SED} \ + T=${T} \ + TOP_MAKE_FILE=${MAKE_FILE} \ + TOUCH=${TOUCH} \ + TRUE=${TRUE} + +# The compelte list of Makefile vars passed down to cal/Makefile. +# +CAL_PASSDOWN= \ + AR=${AR} \ + BINDIR="${BINDIR}" \ + CALC_INCDIR="${CALC_INCDIR}" \ + CALC_SHAREDIR="${CALC_SHAREDIR}" \ + CAT=${CAT} \ + CHMOD=${CHMOD} \ + CMP=${CMP} \ + CO=${CO} \ + CP=${CP} \ + CUSTOMCALDIR="${CUSTOMCALDIR}" \ + CUSTOMHELPDIR="${CUSTOMHELPDIR}" \ + CUSTOMINCDIR="${CUSTOMINCDIR}" \ + HELPDIR="${HELPDIR}" \ + INCDIR="${INCDIR}" \ + LANG=${LANG} \ + LIBDIR="${LIBDIR}" \ + MAKE_FILE=Makefile \ + MKDIR=${MKDIR} \ + MV=${MV} \ + Q="${Q}" \ + RM=${RM} \ + RMDIR=${RMDIR} \ + SCRIPTDIR="${SCRIPTDIR}" \ + T=${T} \ + TOP_MAKE_FILE=${MAKE_FILE} \ + TOUCH=${TOUCH} \ + TRUE=${TRUE} + +# The compelte list of Makefile vars passed down to cscript/Makefile. +# +CSCRIPT_PASSDOWN= \ + AR=${AR} \ + BINDIR="${BINDIR}" \ + CALC_INCDIR="${CALC_INCDIR}" \ + CALC_SHAREDIR="${CALC_SHAREDIR}" \ + CAT=${CAT} \ + CHMOD=${CHMOD} \ + CMP=${CMP} \ + CO=${CO} \ + CP=${CP} \ + CUSTOMCALDIR="${CUSTOMCALDIR}" \ + CUSTOMHELPDIR="${CUSTOMHELPDIR}" \ + CUSTOMINCDIR="${CUSTOMINCDIR}" \ + FMT=${FMT} \ + HELPDIR="${HELPDIR}" \ + INCDIR="${INCDIR}" \ + LANG=${LANG} \ + LIBDIR="${LIBDIR}" \ + MAKE_FILE=Makefile \ + MKDIR=${MKDIR} \ + MV=${MV} \ + Q="${Q}" \ + RM=${RM} \ + RMDIR=${RMDIR} \ + SCRIPTDIR="${SCRIPTDIR}" \ + SED=${SED} \ + SORT=${SORT} \ + T=${T} \ + TOP_MAKE_FILE=${MAKE_FILE} \ + TOUCH=${TOUCH} \ + TRUE=${TRUE} + +# complete list of .h files found (but not built) in the distribution +# +H_SRC= ${LIB_H_SRC} ${SAMPLE_H_SRC} + +# complete list of .c files found (but not built) in the distribution +# +C_SRC= ${LIBSRC} ${CALCSRC} ${UTIL_C_SRC} ${SAMPLE_C_SRC} + +# The list of files that describe calc's GNU Lesser General Public License +# +LICENSE= COPYING COPYING-LGPL + +# These files are found (but not built) in the distribution +# +DISTLIST= ${C_SRC} ${H_SRC} ${MAKE_FILE} BUGS CHANGES LIBRARY README \ + README.WINDOWS calc.man HOWTO.INSTALL ${UTIL_MISC_SRC} ${LICENSE} \ + sample.README calc.spec.in rpm.mk + +# These files are used to make (but not built) a calc .a link library +# +CALCLIBLIST= ${LIBSRC} ${UTIL_C_SRC} ${LIB_H_SRC} ${MAKE_FILE} \ + ${UTIL_MISC_SRC} BUGS CHANGES LIBRARY + +# complete list of .o files +# +OBJS= ${LIBOBJS} ${CALCOBJS} ${UTIL_OBJS} ${SAMPLE_OBJS} + +# static library build +# +CALC_STATIC_LIBS= libcalc.a libcustcalc.a + +# Libaraies created and used to build calc +# +CALC_DYNAMIC_LIBS= libcalc${LIB_EXT_VERS} libcustcalc${LIB_EXT_VERS} + +# Symlinks of dymanic shared libraries +# +SYM_DYNAMIC_LIBS= libcalc${LIB_EXT_VER} libcalc${LIB_EXT_VE} libcalc${LIB_EXT} \ + libcustcalc${LIB_EXT_VERS} libcustcalc${LIB_EXT_VER} \ + libcustcalc${LIB_EXT_VE} libcustcalc${LIB_EXT} + +# list of sample programs to that need to be built to satisfy sample rule +# +# NOTE: The ${SAMPLE_TARGETS} and ${SAMPLE_STATIC_TARGETS} are built but +# not installed at this time. +# +# NOTE: There must be a foo-static${EXE} in SAMPLE_STATIC_TARGETS for +# every foo${EXE} in ${SAMPLE_TARGETS}. +# +SAMPLE_TARGETS= sample_rand${EXE} sample_many${EXE} +SAMPLE_STATIC_TARGETS= sample_rand-static${EXE} sample_many-static${EXE} + +# list of cscript programs to that need to be built to satisfy cscript/.all +# +# NOTE: This list MUST be coordinated with the ${CSCRIPT_TARGETS} variable +# in the cscript/Makefile +# +CSCRIPT_TARGETS= cscript/mersenne cscript/piforever cscript/plus \ + cscript/square cscript/fproduct cscript/powerterm + +# dynamic first targets +# +DYNAMIC_FIRST_TARGETS= ${LICENSE} .dynamic + +# static first targets +# +STATIC_FIRST_TARGETS= ${LICENSE} .static + +# early targets - things needed before the main build phase can begin +# +EARLY_TARGETS= custom/Makefile hsrc .hsrc custom/.all + +# late targets - things needed after the main build phase is complete +# +LATE_TARGETS= calc.1 calc.usage \ + cal/.all help/.all help/builtin cscript/.all \ + Makefile.simple + +# complete list of targets +# +TARGETS= ${EARLY_TARGETS} ${BLD_TYPE} ${LATE_TARGETS} + +### +# +# The reason for this Makefile :-) +# +### + +all: ${BLD_TYPE} CHANGES + +calc-dynamic-only: ${DYNAMIC_FIRST_TARGETS} ${EARLY_TARGETS} \ + ${CALC_DYNAMIC_LIBS} ${SYM_DYNAMIC_LIBS} calc${EXT} \ + ${SAMPLE_TARGETS} ${LATE_TARGETS} + +.dynamic: ${MAKE_FILE} + ${Q} r="calc-dynamic-only"; \ + if [ "${BLD_TYPE}" != "$$r" ]; then \ + echo "NOTE: The host target $(target) defaults to a build" 1>&2; \ + echo " type of: ${BLD_TYPE}, so you need to use" 1>&2; \ + echo " the following make command:" 1>&2; \ + echo "" 1>&2; \ + echo " ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \ + echo " ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \ + echo "" 1>&2; \ + echo "NOTE: It is a very good idea to c first clobber any" 1>&2; \ + echo " previously built .o, libs and executables" 1>&2; \ + echo " before switching to $$r!" 1>&2; \ + echo "" 1>&2; \ + echo "=== aborting make ===" 1>&2; \ + exit 1; \ + fi + ${Q} for i in .static calc-static${EXT} ${SAMPLE_STATIC_TARGETS} \ + libcalc.a custom/libcustcalc.a; do \ + r="calc-dynamic-only"; \ + if [ -e "$$i" ]; then \ + echo "Found the static target $$i file. You must:" 1>&2; \ + echo "" 1>&2; \ + echo " ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \ + echo " ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \ + echo "" 1>&2; \ + echo "to clean out any previously build static files." 1>&2; \ + echo "" 1>&2; \ + echo "=== aborting make ===" 1>&2; \ + exit 2; \ + fi; \ + done + -${Q} ${TOUCH} $@ + +calc-static-only: ${STATIC_FIRST_TARGETS} ${EARLY_TARGETS} \ + ${CALC_STATIC_LIBS} calc-static${EXT} \ + ${SAMPLE_STATIC_TARGETS} ${LATE_TARGETS} + ${Q} for i in calc${EXT} ${SAMPLE_TARGETS}; do \ + if ! ${CMP} -s "$$i-static" "$$i"; then \ + ${RM} -f "$$i"; \ + ${LN} "$$i-static" "$$i"; \ + fi; \ + done + +.static: ${MAKE_FILE} + ${Q} r="calc-static-only"; \ + if [ "${BLD_TYPE}" != "$$r" ]; then \ + echo "NOTE: The host target $(target) defaults to a build" 1>&2; \ + echo " type of: ${BLD_TYPE}, so you need to use" 1>&2; \ + echo " the following make command:" 1>&2; \ + echo "" 1>&2; \ + echo " ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \ + echo " ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \ + echo "" 1>&2; \ + echo "NOTE: It is a very good idea to c first clobber any" 1>&2; \ + echo " previously built .o, libs and executables" 1>&2; \ + echo " before switching to $$r!" 1>&2; \ + echo "" 1>&2; \ + echo "=== aborting make ===" 1>&2; \ + exit 3; \ + fi + ${Q} for i in .dynamic ${CALC_DYNAMIC_LIBS} ${SYM_DYNAMIC_LIBS} \ + custom/libcustcalc${LIB_EXT_VERS}; do \ + r="calc-static-only"; \ + if [ -e "$$i" ]; then \ + echo "Found the dynamic target $$i file. You must:" 1>&2; \ + echo "" 1>&2; \ + echo " ${MAKE} -f ${MAKE_FILE} clobber" 1>&2; \ + echo " ${MAKE} -f ${MAKE_FILE} $$r BLD_TYPE=$$r" 1>&2; \ + echo "" 1>&2; \ + echo "to clean out any previously build dynamic files." 1>&2; \ + echo "" 1>&2; \ + echo "=== aborting make ===" 1>&2; \ + exit 4; \ + fi; \ + done + -${Q} ${TOUCH} $@ + +calc${EXT}: .hsrc ${CALCOBJS} ${CALC_DYNAMIC_LIBS} ${MAKE_FILE} + ${RM} -f $@ + ${CC} ${CALCOBJS} ${LDFLAGS} ${LD_SHARE} ${CALC_DYNAMIC_LIBS} \ + ${READLINE_LIB} -o $@ + +libcalc${LIB_EXT_VERS}: ${LIBOBJS} ver_calc${EXE} ${MAKE_FILE} + ${CC} ${LIBCALC_SHLIB} ${LIBOBJS} -o libcalc${LIB_EXT_VERS} + +libcalc${LIB_EXT_VER}: libcalc${LIB_EXT_VERS} + ${Q} ${RM} -f $@ + ${LN} -s $? $@ + +libcalc${LIB_EXT_VE}: libcalc${LIB_EXT_VERS} + ${Q} ${RM} -f $@ + ${LN} -s $? $@ + +libcalc${LIB_EXT}: libcalc${LIB_EXT_VERS} + ${Q} ${RM} -f $@ + ${LN} -s $? $@ + +### +# +# calc documentation +# +### + +calc.1: calc.man ${MAKE_FILE} + ${RM} -f $@ + ${Q} echo forming calc.1 from calc.man + @${SED} -e 's:$${LIBDIR}:${LIBDIR}:g' \ + -e 's,$${BINDIR},${BINDIR},g' \ + -e 's,$${CALCPATH},${CALCPATH},g' \ + -e 's,$${SCRIPTDIR},${SCRIPTDIR},g' \ + -e 's,$${CALC_INCDIR},${CALC_INCDIR},g' \ + -e 's,$${CUSTOMCALDIR},${CUSTOMCALDIR},g' \ + -e 's,$${CUSTOMINCDIR},${CUSTOMINCDIR},g' \ + -e 's,$${CUSTOMHELPDIR},${CUSTOMHELPDIR},g' \ + -e 's,$${CALCRC},${CALCRC},g' < calc.man > calc.1 + ${Q} echo calc.man formed + +calc.usage: calc.1 ${MAKE_FILE} + ${RM} -f $@ + ${Q} echo forming calc.usage from calc.1 + ${Q} if [ -z "${NROFF}" ]; then \ + LESSCHARSET=iso8859 ${CALCPAGER} calc.1; \ + else \ + ${NROFF} -man calc.1; \ + fi | ${COL} -b > $@ + ${Q} echo calc.usage formed + + +## +# +# These rules compile the sample code against the calc library +# +## + +sample: ${SAMPLE_TARGETS} + +sample_rand${EXE}: sample_rand.o ${CALC_DYNAMIC_LIBS} ${MAKE_FILE} + ${CC} sample_rand.o ${CLDFALGS} ${LD_SHARE} ${CALC_DYNAMIC_LIBS} \ + ${READLINE_LIB} -o $@ + +sample_many${EXE}: sample_many.o ${CALC_DYNAMIC_LIBS} ${MAKE_FILE} + ${CC} sample_many.o ${CLDFALGS} ${LD_SHARE} ${CALC_DYNAMIC_LIBS} \ + ${READLINE_LIB} -o $@ + +### +# +# Special .o files +# +### + +hist.o: hist.c ${MAKE_FILE} + ${CC} ${CFLAGS} ${TERMCONTROL} ${USE_READLINE} ${READLINE_INCLUDE} \ + -c hist.c + +seed.o: seed.c no_implicit.arg ${MAKE_FILE} + ${CC} ${CFLAGS} `${CAT} no_implicit.arg` -c seed.c + +### +# +# The next set of rules cause the .h files BUILD_H_SRC files to be built +# according tot he system and the Makefile variables above. The hsrc rule +# is a convenient rule to invoke to built all of the BUILD_H_SRC. +# +# We add in the BUILD_C_SRC files because they are similar to the +# BUILD_H_SRC files in terms of the build process. +# +# NOTE: Due to bogus shells found on one common system we must have +# an non-empty else clause for every if condition. *sigh* +# We also place ; ${TRUE} at the end of some commands to avoid +# meaningless cosmetic messages by the same system. +# +### + +hsrc: ${BUILD_H_SRC} ${BUILD_C_SRC} + +.hsrc: ${BUILD_H_SRC} ${BUILD_C_SRC} + ${Q} ${RM} -f .hsrc + -${Q} ${TOUCH} .hsrc + +conf.h: ${MAKE_FILE} + ${Q} ${RM} -f conf.h + ${Q} echo 'forming conf.h' + ${Q} echo '/*' > conf.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> conf.h + ${Q} echo ' */' >> conf.h + ${Q} echo '' >> conf.h + ${Q} echo '' >> conf.h + ${Q} echo '#if !defined(__CONF_H__)' >> conf.h + ${Q} echo '#define __CONF_H__' >> conf.h + ${Q} echo '' >> conf.h + ${Q} echo '' >> conf.h + ${Q} echo '/* the default :-separated search path */' >> conf.h + ${Q} echo '#if !defined(DEFAULTCALCPATH)' >> conf.h + ${Q} echo '#define DEFAULTCALCPATH "${CALCPATH}"' >> conf.h + ${Q} echo '#endif /* DEFAULTCALCPATH */' >> conf.h + ${Q} echo '' >> conf.h + ${Q} echo '/* the default :-separated startup file list */' >> conf.h + ${Q} echo '#if !defined(DEFAULTCALCRC)' >> conf.h + ${Q} echo '#define DEFAULTCALCRC "${CALCRC}"' >> conf.h + ${Q} echo '#endif /* DEFAULTCALCRC */' >> conf.h + ${Q} echo '' >> conf.h + ${Q} echo '/* the location of the help directory */' >> conf.h + ${Q} echo '#if !defined(HELPDIR)' >> conf.h + ${Q} echo '#define HELPDIR "${HELPDIR}"' >> conf.h + ${Q} echo '#endif /* HELPDIR */' >> conf.h + ${Q} echo '' >> conf.h + ${Q} echo '/* the location of the custom help directory */' >> conf.h + ${Q} echo '#if !defined(CUSTOMHELPDIR)' >> conf.h + ${Q} echo '#define CUSTOMHELPDIR "${CUSTOMHELPDIR}"' >> conf.h + ${Q} echo '#endif /* CUSTOMHELPDIR */' >> conf.h + ${Q} echo '' >> conf.h + ${Q} echo '/* the default pager to use */' >> conf.h + ${Q} echo '#if !defined(DEFAULTCALCPAGER)' >> conf.h + ${Q} echo '#define DEFAULTCALCPAGER "${CALCPAGER}"' >> conf.h + ${Q} echo '#endif /* DEFAULTCALCPAGER */' >> conf.h + ${Q} echo '' >> conf.h + ${Q} echo '' >> conf.h + ${Q} echo '#endif /* !__CONF_H__ */' >> conf.h + ${Q} echo 'conf.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +endian_calc.h: endian${EXT} ${MAKE_FILE} + ${Q} ${RM} -f endian_calc.h + ${Q} echo 'forming endian_calc.h' + ${Q} echo '/*' > endian_calc.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> endian_calc.h + ${Q} echo ' */' >> endian_calc.h + ${Q} echo '' >> endian_calc.h + ${Q} echo '' >> endian_calc.h + ${Q} echo '#if !defined(__ENDIAN_CALC_H__)' >> endian_calc.h + ${Q} echo '#define __ENDIAN_CALC_H__' >> endian_calc.h + ${Q} echo '' >> endian_calc.h + ${Q} echo '' >> endian_calc.h + ${Q} echo '/* what byte order are we? */' >> endian_calc.h + -${Q} if [ X"${BYTE_ORDER}" = X ]; then \ + if [ -f ${INCDIR}/endian.h ]; then \ + echo '#include ' >> endian_calc.h; \ + echo '#define CALC_BYTE_ORDER BYTE_ORDER' >> endian_calc.h; \ + elif [ -f ${INCDIR}/machine/endian.h ]; then \ + echo '#include ' >> endian_calc.h; \ + echo '#define CALC_BYTE_ORDER BYTE_ORDER' >> endian_calc.h; \ + elif [ -f ${INCDIR}/sys/endian.h ]; then \ + echo '#include ' >> endian_calc.h; \ + echo '#define CALC_BYTE_ORDER BYTE_ORDER' >> endian_calc.h; \ + elif [ -f /usr/include/endian.h ]; then \ + echo '#include ' >> endian_calc.h; \ + echo '#define CALC_BYTE_ORDER BYTE_ORDER' >> endian_calc.h; \ + elif [ -f /usr/include/machine/endian.h ]; then \ + echo '#include ' >> endian_calc.h; \ + echo '#define CALC_BYTE_ORDER BYTE_ORDER' >> endian_calc.h; \ + elif [ -f /usr/include/sys/endian.h ]; then \ + echo '#include ' >> endian_calc.h; \ + echo '#define CALC_BYTE_ORDER BYTE_ORDER' >> endian_calc.h; \ + else \ + ./endian${EXT} >> endian_calc.h; \ + fi; \ + else \ + ./endian${EXT} >> endian_calc.h; \ + fi + ${Q} echo '' >> endian_calc.h + ${Q} echo '' >> endian_calc.h + ${Q} echo '#endif /* !__ENDIAN_CALC_H__ */' >> endian_calc.h + ${Q} echo 'endian_calc.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +longbits.h: longbits${EXT} ${MAKE_FILE} + ${Q} ${RM} -f longbits.h + ${Q} echo 'forming longbits.h' + ${Q} echo '/*' > longbits.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> longbits.h + ${Q} echo ' */' >> longbits.h + ${Q} echo '' >> longbits.h + ${Q} echo '' >> longbits.h + ${Q} echo '#if !defined(__LONGBITS_H__)' >> longbits.h + ${Q} echo '#define __LONGBITS_H__' >> longbits.h + ${Q} echo '' >> longbits.h + ${Q} echo '' >> longbits.h + ${Q} ./longbits${EXT} ${LONG_BITS} >> longbits.h + ${Q} echo '' >> longbits.h + ${Q} echo '' >> longbits.h + ${Q} echo '#endif /* !__LONGBITS_H__ */' >> longbits.h + ${Q} echo 'longbits.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_times.h: ${MAKE_FILE} + ${Q} ${RM} -f have_times.h + ${Q} echo 'forming have_times.h' + ${Q} echo '/*' > have_times.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_times.h + ${Q} echo ' */' >> have_times.h + ${Q} echo '' >> have_times.h + ${Q} echo '' >> have_times.h + ${Q} echo '#if !defined(__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 '/* do we have ? */' >> have_times.h + -${Q} if [ X"${HAVE_TIMES_H}" = X"YES" ]; then \ + echo '#define HAVE_TIMES_H /* yes */' >> have_times.h; \ + elif [ X"${HAVE_TIMES_H}" = X"NO" ]; then \ + echo '#undef HAVE_TIMES_H /* no */' >> have_times.h; \ + elif [ -f ${INCDIR}/times.h ]; then \ + echo '#define HAVE_TIMES_H /* yes */' >> have_times.h; \ + elif [ -f /usr/include/times.h ]; then \ + echo '#define HAVE_TIMES_H /* yes */' >> have_times.h; \ + else \ + echo '#undef HAVE_TIMES_H /* no */' >> have_times.h; \ + fi + -${Q} if [ X"${HAVE_SYS_TIMES_H}" = X"YES" ]; then \ + echo '#define HAVE_SYS_TIMES_H /* yes */' >> have_times.h; \ + elif [ X"${HAVE_SYS_TIMES_H}" = X"NO" ]; then \ + echo '#undef HAVE_SYS_TIMES_H /* no */' >> have_times.h; \ + elif [ -f ${INCDIR}/sys/times.h ]; then \ + echo '#define HAVE_SYS_TIMES_H /* yes */' >> have_times.h; \ + elif [ -f /usr/include/sys/times.h ]; then \ + echo '#define HAVE_SYS_TIMES_H /* yes */' >> have_times.h; \ + else \ + echo '#undef HAVE_SYS_TIMES_H /* no */' >> have_times.h; \ + fi + -${Q} if [ X"${HAVE_TIME_H}" = X"YES" ]; then \ + echo '#define HAVE_TIME_H /* yes */' >> have_times.h; \ + elif [ X"${HAVE_TIME_H}" = X"NO" ]; then \ + echo '#undef HAVE_TIME_H /* no */' >> have_times.h; \ + elif [ -f ${INCDIR}/time.h ]; then \ + echo '#define HAVE_TIME_H /* yes */' >> have_times.h; \ + elif [ -f /usr/include/time.h ]; then \ + echo '#define HAVE_TIME_H /* yes */' >> have_times.h; \ + else \ + echo '#undef HAVE_TIME_H /* no */' >> have_times.h; \ + fi + -${Q} if [ X"${HAVE_SYS_TIME_H}" = X"YES" ]; then \ + echo '#define HAVE_SYS_TIME_H /* yes */' >> have_times.h; \ + elif [ X"${HAVE_SYS_TIME_H}" = X"NO" ]; then \ + echo '#undef HAVE_SYS_TIME_H /* no */' >> have_times.h; \ + elif [ -f ${INCDIR}/sys/time.h ]; then \ + echo '#define HAVE_SYS_TIME_H /* yes */' >> have_times.h; \ + elif [ -f /usr/include/sys/time.h ]; then \ + echo '#define HAVE_SYS_TIME_H /* yes */' >> have_times.h; \ + else \ + echo '#undef HAVE_SYS_TIME_H /* no */' >> have_times.h; \ + fi + ${Q} echo '' >> have_times.h + ${Q} echo '' >> have_times.h + ${Q} echo '#endif /* !__HAVE_TIMES_H__ */' >> have_times.h + ${Q} echo 'have_times.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_stdlib.h: ${MAKE_FILE} + ${Q} ${RM} -f have_stdlib.h + ${Q} echo 'forming have_stdlib.h' + ${Q} echo '/*' > have_stdlib.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_stdlib.h + ${Q} echo ' */' >> have_stdlib.h + ${Q} echo '' >> have_stdlib.h + ${Q} echo '' >> have_stdlib.h + ${Q} echo '#if !defined(__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 '/* do we have ? */' >> have_stdlib.h + -${Q} if [ X"${HAVE_STDLIB_H}" = X"YES" ]; then \ + echo '#define HAVE_STDLIB_H /* yes */' >> have_stdlib.h; \ + elif [ X"${HAVE_STDLIB_H}" = X"NO" ]; then \ + echo '#undef HAVE_STDLIB_H /* no */' >> have_stdlib.h; \ + elif [ -f ${INCDIR}/stdlib.h ]; then \ + echo '#define HAVE_STDLIB_H /* yes */' >> have_stdlib.h; \ + elif [ -f /usr/include/stdlib.h ]; then \ + echo '#define HAVE_STDLIB_H /* yes */' >> have_stdlib.h; \ + else \ + echo '#undef HAVE_STDLIB_H /* no */' >> have_stdlib.h; \ + fi + ${Q} echo '' >> have_stdlib.h + ${Q} echo '' >> have_stdlib.h + ${Q} echo '#endif /* !__HAVE_STDLIB_H__ */' >> have_stdlib.h + ${Q} echo 'have_stdlib.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_unistd.h: ${MAKE_FILE} + ${Q} ${RM} -f have_unistd.h + ${Q} echo 'forming have_unistd.h' + ${Q} echo '/*' > have_unistd.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_unistd.h + ${Q} echo ' */' >> have_unistd.h + ${Q} echo '' >> have_unistd.h + ${Q} echo '' >> have_unistd.h + ${Q} echo '#if !defined(__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 '/* do we have ? */' >> have_unistd.h + -${Q} if [ X"${HAVE_UNISTD_H}" = X"YES" ]; then \ + echo '#define HAVE_UNISTD_H /* yes */' >> have_unistd.h; \ + elif [ X"${HAVE_UNISTD_H}" = X"NO" ]; then \ + echo '#undef HAVE_UNISTD_H /* no */' >> have_unistd.h; \ + elif [ -f ${INCDIR}/unistd.h ]; then \ + echo '#define HAVE_UNISTD_H /* yes */' >> have_unistd.h; \ + elif [ -f /usr/include/unistd.h ]; then \ + echo '#define HAVE_UNISTD_H /* yes */' >> have_unistd.h; \ + else \ + echo '#undef HAVE_UNISTD_H /* no */' >> have_unistd.h; \ + fi + ${Q} echo '' >> have_unistd.h + ${Q} echo '' >> have_unistd.h + ${Q} echo '#endif /* !__HAVE_UNISTD_H__ */' >> have_unistd.h + ${Q} echo 'have_unistd.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_string.h: ${MAKE_FILE} + ${Q} ${RM} -f have_string.h + ${Q} echo 'forming have_string.h' + ${Q} echo '/*' > have_string.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_string.h + ${Q} echo ' */' >> have_string.h + ${Q} echo '' >> have_string.h + ${Q} echo '' >> have_string.h + ${Q} echo '#if !defined(__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 '/* do we have ? */' >> have_string.h + -${Q} if [ X"${HAVE_STRING_H}" = X"YES" ]; then \ + echo '#define HAVE_STRING_H /* yes */' >> have_string.h; \ + elif [ X"${HAVE_STRING_H}" = X"NO" ]; then \ + echo '#undef HAVE_STRING_H /* no */' >> have_string.h; \ + elif [ -f ${INCDIR}/string.h ]; then \ + echo '#define HAVE_STRING_H /* yes */' >> have_string.h; \ + elif [ -f /usr/include/string.h ]; then \ + echo '#define HAVE_STRING_H /* yes */' >> have_string.h; \ + else \ + echo '#undef HAVE_STRING_H /* no */' >> have_string.h; \ + fi + ${Q} echo '' >> have_string.h + ${Q} echo '' >> have_string.h + ${Q} echo '#endif /* !__HAVE_STRING_H__ */' >> have_string.h + ${Q} echo 'have_string.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +terminal.h: ${MAKE_FILE} + ${Q} ${RM} -f terminal.h + ${Q} echo 'forming terminal.h' + ${Q} echo '/*' > terminal.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> terminal.h + ${Q} echo ' */' >> terminal.h + ${Q} echo '' >> terminal.h + ${Q} echo '' >> terminal.h + ${Q} echo '#if !defined(__TERMINAL_H__)' >> terminal.h + ${Q} echo '#define __TERMINAL_H__' >> terminal.h + ${Q} echo '' >> terminal.h + ${Q} echo '' >> terminal.h + ${Q} echo '/* determine the type of terminal interface */' >> terminal.h + ${Q} echo '#if !defined(USE_TERMIOS)' >> terminal.h + ${Q} echo '#if !defined(USE_TERMIO)' >> terminal.h + ${Q} echo '#if !defined(USE_SGTTY)' >> terminal.h + -${Q} if [ X"${TERMCONTROL}" = X"-DUSE_WIN32" ]; then \ + echo '/* windoz, use none of these modes */' >> terminal.h; \ + echo '#undef USE_TERMIOS /* */' >> terminal.h; \ + echo '#undef USE_TERMIO /* */' >> terminal.h; \ + echo '#undef USE_SGTTY /* */' >> terminal.h; \ + elif [ -f ${INCDIR}/termios.h ]; then \ + echo '/* use termios */' >> terminal.h; \ + echo '#define USE_TERMIOS /* */' >> terminal.h; \ + echo '#undef USE_TERMIO /* */' >> terminal.h; \ + echo '#undef USE_SGTTY /* */' >> terminal.h; \ + elif [ -f ${INCDIR}/termio.h ]; then \ + echo '/* use termio */' >> terminal.h; \ + echo '#undef USE_TERMIOS /* */' >> terminal.h; \ + echo '#define USE_TERMIO /* */' >> terminal.h; \ + echo '#undef USE_SGTTY /* */' >> terminal.h; \ + elif [ -f /usr/include/termios.h ]; then \ + echo '/* use termios */' >> terminal.h; \ + echo '#define USE_TERMIOS /* */' >> terminal.h; \ + echo '#undef USE_TERMIO /* */' >> terminal.h; \ + echo '#undef USE_SGTTY /* */' >> terminal.h; \ + elif [ -f /usr/include/termio.h ]; then \ + echo '/* use termio */' >> terminal.h; \ + echo '#undef USE_TERMIOS /* */' >> terminal.h; \ + echo '#define USE_TERMIO /* */' >> terminal.h; \ + echo '#undef USE_SGTTY /* */' >> terminal.h; \ + else \ + echo '/* use sgtty */' >> terminal.h; \ + echo '#undef USE_TERMIOS /* */' >> terminal.h; \ + echo '#undef USE_TERMIO /* */' >> terminal.h; \ + echo '#define USE_SGTTY /* */' >> terminal.h; \ + fi + ${Q} echo '#endif' >> terminal.h + ${Q} echo '#endif' >> terminal.h + ${Q} echo '#endif' >> terminal.h + ${Q} echo '' >> terminal.h + ${Q} echo '' >> terminal.h + ${Q} echo '#endif /* !__TERMINAL_H__ */' >> terminal.h + ${Q} echo 'terminal.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_fpos.h: have_fpos.c ${MAKE_FILE} + ${Q} ${RM} -f fpos_tmp have_fpos.h + ${Q} echo 'forming have_fpos.h' + ${Q} echo '/*' > have_fpos.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_fpos.h + ${Q} echo ' */' >> have_fpos.h + ${Q} echo '' >> have_fpos.h + ${Q} echo '' >> have_fpos.h + ${Q} echo '#if !defined(__HAVE_FPOS_H__)' >> have_fpos.h + ${Q} echo '#define __HAVE_FPOS_H__' >> have_fpos.h + ${Q} echo '' >> have_fpos.h + ${Q} echo '' >> have_fpos.h + ${Q} echo '/* do we have fgetpos & fsetpos functions? */' >> have_fpos.h + ${Q} ${RM} -f have_fpos.o have_fpos${EXT} + -${Q} ${LCC} ${HAVE_FPOS} ${ICFLAGS} have_fpos.c -c >/dev/null 2>&1; ${TRUE} + -${Q} ${LCC} ${ILDFLAGS} have_fpos.o -o have_fpos${EXT} >/dev/null 2>&1; ${TRUE} + -${Q} ${SHELL} -c "./have_fpos${EXT} > fpos_tmp 2>/dev/null" \ + >/dev/null 2>&1; ${TRUE} + -${Q} if [ -s fpos_tmp ]; then \ + ${CAT} fpos_tmp >> have_fpos.h; \ + else \ + echo '#undef HAVE_FPOS /* no */' >> have_fpos.h; \ + echo '' >> have_fpos.h; \ + echo 'typedef long FILEPOS;' >> have_fpos.h; \ + fi + ${Q} echo '' >> have_fpos.h + ${Q} echo '' >> have_fpos.h + ${Q} echo '#endif /* !__HAVE_FPOS_H__ */' >> have_fpos.h + ${Q} ${RM} -f have_fpos${EXT} have_fpos.o fpos_tmp + ${Q} echo 'have_fpos.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_fpos_pos.h: have_fpos_pos.c have_fpos.h have_posscl.h ${MAKE_FILE} + ${Q} ${RM} -f fpos_tmp have_fpos_pos.h + ${Q} echo 'forming have_fpos_pos.h' + ${Q} echo '/*' > have_fpos_pos.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' \ + >> have_fpos_pos.h + ${Q} echo ' */' >> have_fpos_pos.h + ${Q} echo '' >> have_fpos_pos.h + ${Q} echo '' >> have_fpos_pos.h + ${Q} echo '#if !defined(__HAVE_FPOS_POS_H__)' >> have_fpos_pos.h + ${Q} echo '#define __HAVE_FPOS_POS_H__' >> have_fpos_pos.h + ${Q} echo '' >> have_fpos_pos.h + ${Q} echo '' >> have_fpos_pos.h + ${Q} echo '/* do we have fgetpos & fsetpos functions? */' \ + >> have_fpos_pos.h + ${Q} ${RM} -f have_fpos_pos.o have_fpos_pos${EXT} + -${Q} ${LCC} ${HAVE_FPOS} ${HAVE_FPOS_POS} \ + ${ICFLAGS} have_fpos_pos.c -c >/dev/null 2>&1; ${TRUE} + -${Q} ${LCC} ${ILDFLAGS} have_fpos_pos.o -o have_fpos_pos${EXT} \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${SHELL} -c "./have_fpos_pos${EXT} > fpos_tmp 2>/dev/null" \ + >/dev/null 2>&1; ${TRUE} + -${Q} if [ -s fpos_tmp ]; then \ + ${CAT} fpos_tmp >> have_fpos_pos.h; \ + else \ + echo '#undef HAVE_FPOS_POS /* no */' >> have_fpos_pos.h; \ + echo '' >> have_fpos_pos.h; \ + echo '#undef FPOS_POS_BITS' >> have_fpos_pos.h; \ + fi + ${Q} echo '' >> have_fpos_pos.h + ${Q} echo '' >> have_fpos_pos.h + ${Q} echo '#endif /* !__HAVE_FPOS_POS_H__ */' >> have_fpos_pos.h + ${Q} ${RM} -f have_fpos_pos${EXT} have_fpos_pos.o fpos_tmp + ${Q} echo 'have_fpos_pos.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +fposval.h: fposval.c have_fpos.h have_fpos_pos.h have_offscl.h have_posscl.h \ + endian_calc.h ${MAKE_FILE} + ${Q} ${RM} -f fposv_tmp fposval.h + ${Q} echo 'forming fposval.h' + ${Q} echo '/*' > fposval.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> fposval.h + ${Q} echo ' */' >> fposval.h + ${Q} echo '' >> fposval.h + ${Q} echo '' >> fposval.h + ${Q} echo '#if !defined(__FPOSVAL_H__)' >> fposval.h + ${Q} echo '#define __FPOSVAL_H__' >> fposval.h + ${Q} echo '' >> fposval.h + ${Q} echo '' >> fposval.h + ${Q} echo '/* what are our file position & size types? */' >> fposval.h + ${Q} ${RM} -f fposval.o fposval${EXT} + -${Q} ${LCC} ${ICFLAGS} ${FPOS_BITS} ${OFF_T_BITS} \ + ${DEV_BITS} ${INODE_BITS} fposval.c -c >/dev/null 2>&1; ${TRUE} + -${Q} ${LCC} ${ILDFLAGS} fposval.o -o fposval${EXT} >/dev/null 2>&1; ${TRUE} + ${Q} ${SHELL} -c "./fposval${EXT} fposv_tmp >> fposval.h 2>/dev/null" \ + >/dev/null 2>&1; ${TRUE} + ${Q} echo '' >> fposval.h + ${Q} echo '' >> fposval.h + ${Q} echo '#endif /* !__FPOSVAL_H__ */' >> fposval.h + ${Q} ${RM} -f fposval${EXT} fposval.o fposv_tmp + ${Q} echo 'fposval.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_const.h: have_const.c ${MAKE_FILE} + ${Q} ${RM} -f have_const const_tmp have_const.h + ${Q} echo 'forming have_const.h' + ${Q} echo '/*' > have_const.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_const.h + ${Q} echo ' */' >> have_const.h + ${Q} echo '' >> have_const.h + ${Q} echo '' >> have_const.h + ${Q} echo '#if !defined(__HAVE_CONST_H__)' >> have_const.h + ${Q} echo '#define __HAVE_CONST_H__' >> have_const.h + ${Q} echo '' >> have_const.h + ${Q} echo '' >> have_const.h + ${Q} echo '/* do we have or want const? */' >> have_const.h + ${Q} ${RM} -f have_const.o have_const${EXT} + -${Q} ${LCC} ${ICFLAGS} ${HAVE_CONST} have_const.c -c \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${LCC} ${ILDFLAGS} have_const.o -o have_const${EXT} >/dev/null 2>&1; ${TRUE} + -${Q} ${SHELL} -c "./have_const${EXT} > const_tmp 2>/dev/null" \ + >/dev/null 2>&1; ${TRUE} + -${Q} if [ -s const_tmp ]; then \ + ${CAT} const_tmp >> have_const.h; \ + else \ + echo '#undef HAVE_CONST /* no */' >> have_const.h; \ + echo '#undef CONST' >> have_const.h; \ + echo '#define CONST /* no */' >> have_const.h; \ + fi + ${Q} echo '' >> have_const.h + ${Q} echo '' >> have_const.h + ${Q} echo '#endif /* !__HAVE_CONST_H__ */' >> have_const.h + ${Q} ${RM} -f have_const${EXT} have_const.o const_tmp + ${Q} echo 'have_const.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_offscl.h: have_offscl.c ${MAKE_FILE} + ${Q} ${RM} -f offscl_tmp have_offscl.h + ${Q} echo 'forming have_offscl.h' + ${Q} echo '/*' > have_offscl.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_offscl.h + ${Q} echo ' */' >> have_offscl.h + ${Q} echo '' >> have_offscl.h + ${Q} echo '' >> have_offscl.h + ${Q} echo '#if !defined(__HAVE_OFFSCL_H__)' >> have_offscl.h + ${Q} echo '#define __HAVE_OFFSCL_H__' >> have_offscl.h + ${Q} echo '' >> have_offscl.h + ${Q} echo '' >> have_offscl.h + ${Q} ${RM} -f have_offscl.o have_offscl${EXT} + -${Q} ${LCC} ${ICFLAGS} ${HAVE_OFFSCL} have_offscl.c -c \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${LCC} ${ILDFLAGS} have_offscl.o -o have_offscl${EXT} \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${SHELL} -c "./have_offscl${EXT} > offscl_tmp 2>/dev/null" \ + >/dev/null 2>&1; ${TRUE} + -${Q} if [ -s offscl_tmp ]; then \ + ${CAT} offscl_tmp >> have_offscl.h; \ + else \ + echo '#undef HAVE_OFF_T_SCALAR /* off_t is not a simple value */' \ + >> have_offscl.h; \ + fi + ${Q} echo '' >> have_offscl.h + ${Q} echo '' >> have_offscl.h + ${Q} echo '#endif /* !__HAVE_OFFSCL_H__ */' >> have_offscl.h + ${Q} ${RM} -f have_offscl${EXT} have_offscl.o offscl_tmp + ${Q} echo 'have_offscl.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_posscl.h: have_posscl.c have_fpos.h ${MAKE_FILE} + ${Q} ${RM} -f have_posscl have_posscl.o posscl_tmp have_posscl.h + ${Q} echo 'forming have_posscl.h' + ${Q} echo '/*' > have_posscl.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_posscl.h + ${Q} echo ' */' >> have_posscl.h + ${Q} echo '' >> have_posscl.h + ${Q} echo '' >> have_posscl.h + ${Q} echo '#if !defined(__HAVE_POSSCL_H__)' >> have_posscl.h + ${Q} echo '#define __HAVE_POSSCL_H__' >> have_posscl.h + ${Q} echo '' >> have_posscl.h + ${Q} echo '' >> have_posscl.h + ${Q} ${RM} -f have_posscl.o have_posscl + -${Q} ${LCC} ${ICFLAGS} ${HAVE_POSSCL} have_posscl.c -c \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${LCC} ${ILDFLAGS} have_posscl.o -o have_posscl \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${SHELL} -c "./have_posscl > posscl_tmp 2>/dev/null" \ + >/dev/null 2>&1; ${TRUE} + -${Q} if [ -s posscl_tmp ]; then \ + ${CAT} posscl_tmp >> have_posscl.h; \ + else \ + echo '/* FILEPOS is not a simple value */' >> have_posscl.h; \ + echo '#undef HAVE_FILEPOS_SCALAR' >> have_posscl.h; \ + fi + ${Q} echo '' >> have_posscl.h + ${Q} echo '' >> have_posscl.h + ${Q} echo '#endif /* !__HAVE_POSSCL_H__ */' >> have_posscl.h + ${Q} ${RM} -f have_posscl have_posscl.o posscl_tmp + ${Q} echo 'have_posscl.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +align32.h: align32.c longbits.h have_unistd.h ${MAKE_FILE} + ${Q} ${RM} -f align32 align32_tmp align32.h + ${Q} echo 'forming align32.h' + ${Q} echo '/*' > align32.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> align32.h + ${Q} echo ' */' >> align32.h + ${Q} echo '' >> align32.h + ${Q} echo '' >> align32.h + ${Q} echo '#if !defined(__MUST_ALIGN32_H__)' >> align32.h + ${Q} echo '#define __MUST_ALIGN32_H__' >> align32.h + ${Q} echo '' >> align32.h + ${Q} echo '' >> align32.h + ${Q} echo '/* must we always align 32 bit accesses? */' >> align32.h + -${Q} if [ X"-DMUST_ALIGN32" = X${ALIGN32} ]; then \ + echo '/* forced to align 32 bit values */' >> align32.h; \ + echo '#define MUST_ALIGN32' >> align32.h; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ X"-UMUST_ALIGN32" = X${ALIGN32} ]; then \ + echo '/* forced to not require 32 bit alignment */' >> align32.h; \ + echo '#undef MUST_ALIGN32' >> align32.h; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ X = X${ALIGN32} ]; then \ + ${RM} -f align32.o align32${EXT}; \ + ${LCC} ${ICFLAGS} ${ALIGN32} align32.c -c >/dev/null 2>&1; \ + ${LCC} ${ILDFLAGS} align32.o -o align32${EXT} >/dev/null 2>&1; \ + ${SHELL} -c "./align32${EXT} >align32_tmp 2>/dev/null" >/dev/null 2>&1; \ + if [ -s align32_tmp ]; then \ + ${CAT} align32_tmp >> align32.h; \ + else \ + echo '/* guess we must align 32 bit values */' >> align32.h; \ + echo '#define MUST_ALIGN32' >> align32.h; \ + fi; \ + ${RM} -f align32${EXT} align32.o align32_tmp core; \ + else \ + ${TRUE}; \ + fi + ${Q} echo '' >> align32.h + ${Q} echo '' >> align32.h + ${Q} echo '#endif /* !__MUST_ALIGN32_H__ */' >> align32.h + ${Q} echo 'align32.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_uid_t.h: have_uid_t.c have_unistd.h ${MAKE_FILE} + ${Q} ${RM} -f have_uid_t uid_tmp have_uid_t.h + ${Q} echo 'forming have_uid_t.h' + ${Q} echo '/*' > have_uid_t.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_uid_t.h + ${Q} echo ' */' >> have_uid_t.h + ${Q} echo '' >> have_uid_t.h + ${Q} echo '' >> have_uid_t.h + ${Q} echo '#if !defined(__HAVE_UID_T_H__)' >> have_uid_t.h + ${Q} echo '#define __HAVE_UID_T_H__' >> have_uid_t.h + ${Q} echo '' >> have_uid_t.h + ${Q} echo '' >> have_uid_t.h + ${Q} echo '/* do we have or want uid_t? */' >> have_uid_t.h + ${Q} ${RM} -f have_uid_t.o have_uid_t${EXT} + -${Q} ${LCC} ${ICFLAGS} ${HAVE_UID_T} have_uid_t.c -c \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${LCC} ${ILDFLAGS} have_uid_t.o -o have_uid_t${EXT} >/dev/null 2>&1; ${TRUE} + -${Q} ${SHELL} -c "./have_uid_t${EXT} > uid_tmp 2>/dev/null" \ + >/dev/null 2>&1; ${TRUE} + -${Q} if [ -s uid_tmp ]; then \ + ${CAT} uid_tmp >> have_uid_t.h; \ + else \ + echo '#undef HAVE_UID_T /* no */' >> have_uid_t.h; \ + fi + ${Q} echo '' >> have_uid_t.h + ${Q} echo '' >> have_uid_t.h + ${Q} echo '#endif /* !__HAVE_UID_T_H__ */' >> have_uid_t.h + ${Q} ${RM} -f have_uid_t${EXT} have_uid_t.o uid_tmp + ${Q} echo 'have_uid_t.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_newstr.h: have_newstr.c ${MAKE_FILE} + ${Q} ${RM} -f newstr_tmp have_newstr.h + ${Q} echo 'forming have_newstr.h' + ${Q} echo '/*' > have_newstr.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_newstr.h + ${Q} echo ' */' >> have_newstr.h + ${Q} echo '' >> have_newstr.h + ${Q} echo '' >> have_newstr.h + ${Q} echo '#if !defined(__HAVE_NEWSTR_H__)' >> have_newstr.h + ${Q} echo '#define __HAVE_NEWSTR_H__' >> have_newstr.h + ${Q} echo '' >> have_newstr.h + ${Q} echo '' >> have_newstr.h + ${Q} echo '/* do we have or want memcpy(), memset() & strchr()? */' \ + >> have_newstr.h + ${Q} ${RM} -f have_newstr.o have_newstr${EXT} + -${Q} ${LCC} ${ICFLAGS} ${HAVE_NEWSTR} have_newstr.c -c \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${LCC} ${ILDFLAGS} have_newstr.o -o have_newstr${EXT} \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${SHELL} -c "./have_newstr${EXT} > newstr_tmp 2>/dev/null" \ + >/dev/null 2>&1; ${TRUE} + -${Q} if [ -s newstr_tmp ]; then \ + ${CAT} newstr_tmp >> have_newstr.h; \ + else \ + echo '#undef HAVE_NEWSTR /* no */' >> have_newstr.h; \ + fi + ${Q} echo '' >> have_newstr.h + ${Q} echo '' >> have_newstr.h + ${Q} echo '#endif /* !__HAVE_NEWSTR_H__ */' >> have_newstr.h + ${Q} ${RM} -f have_newstr${EXT} have_newstr.o newstr_tmp + ${Q} echo 'have_newstr.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_memmv.h: have_memmv.c ${MAKE_FILE} + ${Q} ${RM} -f have_memmv have_memmv.o memmv_tmp have_memmv.h + ${Q} echo 'forming have_memmv.h' + ${Q} echo '/*' > have_memmv.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_memmv.h + ${Q} echo ' */' >> have_memmv.h + ${Q} echo '' >> have_memmv.h + ${Q} echo '' >> have_memmv.h + ${Q} echo '#if !defined(__HAVE_MEMMV_H__)' >> have_memmv.h + ${Q} echo '#define __HAVE_MEMMV_H__' >> have_memmv.h + ${Q} echo '' >> have_memmv.h + ${Q} echo '' >> have_memmv.h + ${Q} echo '/* do we have or want memmove()? */' >> have_memmv.h + ${Q} ${RM} -f have_memmv.o have_memmv + -${Q} ${LCC} ${ICFLAGS} ${HAVE_MEMMOVE} have_memmv.c -c \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${LCC} ${ILDFLAGS} have_memmv.o -o have_memmv \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${SHELL} -c "./have_memmv > memmv_tmp 2>/dev/null" \ + >/dev/null 2>&1; ${TRUE} + -${Q} if [ -s memmv_tmp ]; then \ + ${CAT} memmv_tmp >> have_memmv.h; \ + else \ + echo '#undef HAVE_MEMMOVE /* no */' >> have_memmv.h; \ + fi + ${Q} echo '' >> have_memmv.h + ${Q} echo '' >> have_memmv.h + ${Q} echo '#endif /* !__HAVE_MEMMV_H__ */' >> have_memmv.h + ${Q} ${RM} -f have_memmv have_memmv.o memmv_tmp + ${Q} echo 'have_memmv.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_ustat.h: have_ustat.c ${MAKE_FILE} + ${Q} ${RM} -f ustat_tmp have_ustat.h + ${Q} echo 'forming have_ustat.h' + ${Q} echo '/*' > have_ustat.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_ustat.h + ${Q} echo ' */' >> have_ustat.h + ${Q} echo '' >> have_ustat.h + ${Q} echo '' >> have_ustat.h + ${Q} echo '#if !defined(__HAVE_USTAT_H__)' >> have_ustat.h + ${Q} echo '#define __HAVE_USTAT_H__' >> have_ustat.h + ${Q} echo '' >> have_ustat.h + ${Q} echo '' >> have_ustat.h + ${Q} echo '/* do we have or want ustat()? */' >> have_ustat.h + ${Q} ${RM} -f have_ustat.o have_ustat${EXT} + -${Q} ${LCC} ${ICFLAGS} ${HAVE_USTAT} have_ustat.c -c \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${LCC} ${ILDFLAGS} have_ustat.o -o have_ustat${EXT} \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${SHELL} -c "./have_ustat${EXT} > ustat_tmp 2>/dev/null" \ + >/dev/null 2>&1; ${TRUE} + -${Q} if [ -s ustat_tmp ]; then \ + ${CAT} ustat_tmp >> have_ustat.h; \ + else \ + echo '#undef HAVE_USTAT /* no */' >> have_ustat.h; \ + fi + ${Q} echo '' >> have_ustat.h + ${Q} echo '' >> have_ustat.h + ${Q} echo '#endif /* !__HAVE_USTAT_H__ */' >> have_ustat.h + ${Q} ${RM} -f have_ustat${EXT} have_ustat.o ustat_tmp + ${Q} echo 'have_ustat.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_getsid.h: have_getsid.c ${MAKE_FILE} + ${Q} ${RM} -f getsid_tmp have_getsid.h + ${Q} echo 'forming have_getsid.h' + ${Q} echo '/*' > have_getsid.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_getsid.h + ${Q} echo ' */' >> have_getsid.h + ${Q} echo '' >> have_getsid.h + ${Q} echo '' >> have_getsid.h + ${Q} echo '#if !defined(__HAVE_GETSID_H__)' >> have_getsid.h + ${Q} echo '#define __HAVE_GETSID_H__' >> have_getsid.h + ${Q} echo '' >> have_getsid.h + ${Q} echo '' >> have_getsid.h + ${Q} echo '/* do we have or want getsid()? */' >> have_getsid.h + ${Q} ${RM} -f have_getsid.o have_getsid${EXT} + -${Q} ${LCC} ${ICFLAGS} ${HAVE_GETSID} have_getsid.c -c \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${LCC} ${ILDFLAGS} have_getsid.o -o have_getsid \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${SHELL} -c "./have_getsid${EXT} > getsid_tmp 2>/dev/null" \ + >/dev/null 2>&1; ${TRUE} + -${Q} if [ -s getsid_tmp ]; then \ + ${CAT} getsid_tmp >> have_getsid.h; \ + else \ + echo '#undef HAVE_GETSID /* no */' >> have_getsid.h; \ + fi + ${Q} echo '' >> have_getsid.h + ${Q} echo '' >> have_getsid.h + ${Q} echo '#endif /* !__HAVE_GETSID_H__ */' >> have_getsid.h + ${Q} ${RM} -f have_getsid${EXT} have_getsid.o getsid_tmp + ${Q} echo 'have_getsid.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_getpgid.h: have_getpgid.c ${MAKE_FILE} + ${Q} ${RM} -f getpgid_tmp have_getpgid.h + ${Q} echo 'forming have_getpgid.h' + ${Q} echo '/*' > have_getpgid.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_getpgid.h + ${Q} echo ' */' >> have_getpgid.h + ${Q} echo '' >> have_getpgid.h + ${Q} echo '' >> have_getpgid.h + ${Q} echo '#if !defined(__HAVE_GETPGID_H__)' >> have_getpgid.h + ${Q} echo '#define __HAVE_GETPGID_H__' >> have_getpgid.h + ${Q} echo '' >> have_getpgid.h + ${Q} echo '' >> have_getpgid.h + ${Q} echo '/* do we have or want getpgid()? */' >> have_getpgid.h + ${Q} ${RM} -f have_getpgid.o have_getpgid${EXT} + -${Q} ${LCC} ${ICFLAGS} ${HAVE_GETPGID} have_getpgid.c -c \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${LCC} ${ILDFLAGS} have_getpgid.o -o have_getpgid${EXT} \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${SHELL} -c "./have_getpgid${EXT} > getpgid_tmp 2>/dev/null" \ + >/dev/null 2>&1; ${TRUE} + -${Q} if [ -s getpgid_tmp ]; then \ + ${CAT} getpgid_tmp >> have_getpgid.h; \ + else \ + echo '#undef HAVE_GETPGID /* no */' >> have_getpgid.h; \ + fi + ${Q} echo '' >> have_getpgid.h + ${Q} echo '' >> have_getpgid.h + ${Q} echo '#endif /* !__HAVE_GETPGID_H__ */' >> have_getpgid.h + ${Q} ${RM} -f have_getpgid${EXT} have_getpgid.o getpgid_tmp + ${Q} echo 'have_getpgid.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_gettime.h: have_gettime.c ${MAKE_FILE} + ${Q} ${RM} -f gettime_tmp have_gettime.h + ${Q} echo 'forming have_gettime.h' + ${Q} echo '/*' > have_gettime.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_gettime.h + ${Q} echo ' */' >> have_gettime.h + ${Q} echo '' >> have_gettime.h + ${Q} echo '' >> have_gettime.h + ${Q} echo '#if !defined(__HAVE_GETTIME_H__)' >> have_gettime.h + ${Q} echo '#define __HAVE_GETTIME_H__' >> have_gettime.h + ${Q} echo '' >> have_gettime.h + ${Q} echo '' >> have_gettime.h + ${Q} echo '/* do we have or want clock_gettime()? */' >> have_gettime.h + ${Q} ${RM} -f have_gettime.o have_gettime${EXT} + -${Q} ${LCC} ${ICFLAGS} ${HAVE_GETTIME} have_gettime.c -c \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${LCC} ${ILDFLAGS} have_gettime.o -o have_gettime \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${SHELL} -c "./have_gettime${EXT} > gettime_tmp 2>/dev/null" \ + >/dev/null 2>&1; ${TRUE} + -${Q} if [ -s gettime_tmp ]; then \ + ${CAT} gettime_tmp >> have_gettime.h; \ + else \ + echo '#undef HAVE_GETTIME /* no */' >> have_gettime.h; \ + fi + ${Q} echo '' >> have_gettime.h + ${Q} echo '' >> have_gettime.h + ${Q} echo '#endif /* !__HAVE_GETTIME_H__ */' >> have_gettime.h + ${Q} ${RM} -f have_gettime${EXT} have_gettime.o gettime_tmp + ${Q} echo 'have_gettime.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_getprid.h: have_getprid.c ${MAKE_FILE} + ${Q} ${RM} -f getprid_tmp have_getprid.h + ${Q} echo 'forming have_getprid.h' + ${Q} echo '/*' > have_getprid.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_getprid.h + ${Q} echo ' */' >> have_getprid.h + ${Q} echo '' >> have_getprid.h + ${Q} echo '' >> have_getprid.h + ${Q} echo '#if !defined(__HAVE_GETPRID_H__)' >> have_getprid.h + ${Q} echo '#define __HAVE_GETPRID_H__' >> have_getprid.h + ${Q} echo '' >> have_getprid.h + ${Q} echo '' >> have_getprid.h + ${Q} echo '/* do we have or want getprid()? */' >> have_getprid.h + ${Q} ${RM} -f have_getprid.o have_getprid${EXT} + -${Q} ${LCC} ${ICFLAGS} ${HAVE_GETPRID} have_getprid.c -c \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${LCC} ${ILDFLAGS} have_getprid.o -o have_getprid${EXT} \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${SHELL} -c "./have_getprid${EXT} > getprid_tmp 2>/dev/null" \ + >/dev/null 2>&1; ${TRUE} + -${Q} if [ -s getprid_tmp ]; then \ + ${CAT} getprid_tmp >> have_getprid.h; \ + else \ + echo '#undef HAVE_GETPRID /* no */' >> have_getprid.h; \ + fi + ${Q} echo '' >> have_getprid.h + ${Q} echo '' >> have_getprid.h + ${Q} echo '#endif /* !__HAVE_GETPRID_H__ */' >> have_getprid.h + ${Q} ${RM} -f have_getprid${EXT} have_getprid.o getprid_tmp + ${Q} echo 'have_getprid.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_urandom.h: ${MAKE_FILE} + ${Q} ${RM} -f have_urandom.h + ${Q} echo 'forming have_urandom.h' + ${Q} echo '/*' > have_urandom.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_urandom.h + ${Q} echo ' */' >> have_urandom.h + ${Q} echo '' >> have_urandom.h + ${Q} echo '' >> have_urandom.h + ${Q} echo '#if !defined(__HAVE_URANDOM_H__)' >> have_urandom.h + ${Q} echo '#define __HAVE_URANDOM_H__' >> have_urandom.h + ${Q} echo '' >> have_urandom.h + ${Q} echo '' >> have_urandom.h + ${Q} echo '/* do we have /dev/urandom? */' >> have_urandom.h + -${Q} if [ X"${HAVE_URANDOM_H}" = X"YES" ]; then \ + echo '#define HAVE_URANDOM_H /* yes */' >> have_urandom.h; \ + elif [ X"${HAVE_URANDOM_H}" = X"NO" ]; then \ + echo '#undef HAVE_URANDOM_H /* no */' >> have_urandom.h; \ + elif [ -e /dev/urandom ] 2>/dev/null; then \ + echo '#define HAVE_URANDOM_H /* yes */' >> have_urandom.h; \ + else \ + echo '#undef HAVE_URANDOM_H /* no */' >> have_urandom.h; \ + fi + ${Q} echo '' >> have_urandom.h + ${Q} echo '' >> have_urandom.h + ${Q} echo '#endif /* !__HAVE_URANDOM_H__ */' >> have_urandom.h + ${Q} echo 'have_urandom.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_rusage.h: have_rusage.c ${MAKE_FILE} + ${Q} ${RM} -f rusage_tmp have_rusage.h + ${Q} echo 'forming have_rusage.h' + ${Q} echo '/*' > have_rusage.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_rusage.h + ${Q} echo ' */' >> have_rusage.h + ${Q} echo '' >> have_rusage.h + ${Q} echo '' >> have_rusage.h + ${Q} echo '#if !defined(__HAVE_RUSAGE_H__)' >> have_rusage.h + ${Q} echo '#define __HAVE_RUSAGE_H__' >> have_rusage.h + ${Q} echo '' >> have_rusage.h + ${Q} echo '' >> have_rusage.h + ${Q} echo '/* do we have or want getrusage()? */' >> have_rusage.h + ${Q} ${RM} -f have_rusage.o have_rusage${EXT} + -${Q} ${LCC} ${ICFLAGS} ${HAVE_GETRUSAGE} have_rusage.c -c \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${LCC} ${ILDFLAGS} have_rusage.o -o have_rusage${EXT} \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${SHELL} -c "./have_rusage${EXT} > rusage_tmp 2>/dev/null" \ + >/dev/null 2>&1; ${TRUE} + -${Q} if [ -s rusage_tmp ]; then \ + ${CAT} rusage_tmp >> have_rusage.h; \ + else \ + echo '#undef HAVE_GETRUSAGE /* no */' >> have_rusage.h; \ + fi + ${Q} echo '' >> have_rusage.h + ${Q} echo '' >> have_rusage.h + ${Q} echo '#endif /* !__HAVE_RUSAGE_H__ */' >> have_rusage.h + ${Q} ${RM} -f have_rusage${EXT} have_rusage.o rusage_tmp + ${Q} echo 'have_rusage.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_strdup.h: have_strdup.c ${MAKE_FILE} + ${Q} ${RM} -f strdup_tmp have_strdup.h + ${Q} echo 'forming have_strdup.h' + ${Q} echo '/*' > have_strdup.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_strdup.h + ${Q} echo ' */' >> have_strdup.h + ${Q} echo '' >> have_strdup.h + ${Q} echo '' >> have_strdup.h + ${Q} echo '#if !defined(__HAVE_STRDUP_H__)' >> have_strdup.h + ${Q} echo '#define __HAVE_STRDUP_H__' >> have_strdup.h + ${Q} echo '' >> have_strdup.h + ${Q} echo '' >> have_strdup.h + ${Q} echo '/* do we have or want getstrdup()? */' >> have_strdup.h + ${Q} ${RM} -f have_strdup.o have_strdup${EXT} + -${Q} ${LCC} ${ICFLAGS} ${HAVE_STRDUP} have_strdup.c -c \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${LCC} ${ILDFLAGS} have_strdup.o -o have_strdup \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${SHELL} -c "./have_strdup${EXT} > strdup_tmp 2>/dev/null" \ + >/dev/null 2>&1; ${TRUE} + -${Q} if [ -s strdup_tmp ]; then \ + ${CAT} strdup_tmp >> have_strdup.h; \ + else \ + echo '#undef HAVE_STRDUP /* no */' >> have_strdup.h; \ + fi + ${Q} echo '' >> have_strdup.h + ${Q} echo '' >> have_strdup.h + ${Q} echo '#endif /* !__HAVE_STRDUP_H__ */' >> have_strdup.h + ${Q} ${RM} -f have_strdup${EXT} have_strdup.o strdup_tmp + ${Q} echo 'have_strdup.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +args.h: have_stdvs.c have_varvs.c have_string.h have_unistd.h have_string.h + ${Q} ${RM} -f args.h + ${Q} echo 'forming args.h' + ${Q} echo '/*' > args.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> args.h + ${Q} echo ' */' >> args.h + ${Q} echo '' >> args.h + ${Q} echo '' >> args.h + ${Q} echo '#if !defined(__ARGS_H__)' >> args.h + ${Q} echo '#define __ARGS_H__' >> args.h + ${Q} echo '' >> args.h + ${Q} echo '' >> args.h + ${Q} ${RM} -f have_stdvs.o have_stdvs${EXT} + -${Q} ${LCC} ${ICFLAGS} ${HAVE_VSPRINTF} have_stdvs.c -c \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${LCC} ${ILDFLAGS} have_stdvs.o -o have_stdvs${EXT} >/dev/null 2>&1; ${TRUE} + -${Q} if ./have_stdvs${EXT} >>args.h 2>/dev/null; then \ + ${TOUCH} have_args.sh; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -f have_args.sh ] && [ X"${HAVE_VSPRINTF}" = X ]; then \ + ${RM} -f have_stdvs.o have_stdvs${EXT} have_varvs.o have_varvs${EXT}; \ + ${LCC} ${ICFLAGS} ${HAVE_VSPRINTF} have_varvs.c -c \ + 2>/dev/null; \ + ${LCC} ${ILDFLAGS} have_varvs.o -o have_varvs${EXT} 2>/dev/null; \ + if ./have_varvs${EXT} >>args.h 2>/dev/null; then \ + ${TOUCH} have_args.sh; \ + else \ + ${TRUE}; \ + fi; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ -f have_args.sh ]; then \ + echo 'exit 0' > have_args.sh; \ + else \ + echo 'exit 1' > have_args.sh; \ + echo "Unable to determine what type of variable args and"; \ + echo "what type of vsprintf() should be used. Set or change"; \ + echo "the Makefile variable HAVE_VSPRINTF."; \ + fi + ${Q} sh ./have_args.sh + ${Q} echo '' >> args.h + ${Q} echo '' >> args.h + ${Q} echo '#endif /* !__ARGS_H__ */' >> args.h + ${Q} ${RM} -f have_stdvs.o have_varvs.o have_varvs${EXT} have_args.sh core + ${Q} echo 'args.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +calcerr.h: calcerr.tbl calcerr_h.sed calcerr_h.awk ${MAKE_FILE} + ${Q} ${RM} -f calerr.h + ${Q} echo 'forming calcerr.h' + ${Q} echo '/*' > calcerr.h + ${Q} echo ' * DO NOT EDIT' >> calcerr.h + ${Q} echo ' *' >> calcerr.h + ${Q} echo ' * generated by calcerr.tbl via Makefile' >> calcerr.h + ${Q} echo ' */' >> calcerr.h + ${Q} echo '' >> calcerr.h + ${Q} echo '' >> calcerr.h + ${Q} echo '#if !defined(__CALCERR_H__)' >> calcerr.h + ${Q} echo '#define __CALCERR_H__' >> calcerr.h + ${Q} echo '' >> calcerr.h + ${Q} echo '' >> calcerr.h + ${Q} ${SED} -f calcerr_h.sed < calcerr.tbl | \ + ${AWK} -f calcerr_h.awk >> calcerr.h + ${Q} echo '' >> calcerr.h + ${Q} echo '' >> calcerr.h + ${Q} echo '#endif /* !__CALCERR_H__ */' >> calcerr.h + ${Q} echo 'calcerr.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +calcerr.c: calcerr.tbl calcerr_c.sed calcerr_c.awk ${MAKE_FILE} + ${Q} ${RM} -f calerr.c + ${Q} echo 'forming calcerr.c' + ${Q} echo '/*' > calcerr.c + ${Q} echo ' * DO NOT EDIT' >> calcerr.c + ${Q} echo ' *' >> calcerr.c + ${Q} echo ' * generated by calcerr.tbl via Makefile' >> calcerr.c + ${Q} echo ' */' >> calcerr.c + ${Q} echo '' >> calcerr.c + ${Q} ${SED} -f calcerr_c.sed < calcerr.tbl | \ + ${AWK} -f calcerr_c.awk >> calcerr.c + ${Q} echo 'calcerr.c formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +no_implicit.arg: no_implicit.c ${MAKE_FILE} + ${Q} ${RM} -f no_implicit${EXT} no_implicit.o no_implicit.arg + ${Q} echo 'forming no_implicit.arg' + -${Q} if [ X"${HAVE_NO_IMPLICIT}" = X"YES" ]; then \ + echo ""'-Wno-implicit' > no_implicit.arg; \ + elif [ X"${HAVE_NO_IMPLICIT}" = X"NO" ]; then \ + ${TOUCH} no_implicit.arg; \ + else \ + ${LCC} -Wno-implicit ${ICFLAGS} -DHAVE_NO_IMPLICIT \ + no_implicit.c -c >/dev/null 2>&1; \ + ${LCC} ${ILDFLAGS} no_implicit.o -o no_implicit${EXT} >/dev/null 2>&1; \ + ${SHELL} -c "./no_implicit${EXT} > no_implicit.arg 2>/dev/null" \ + >/dev/null 2>&1; ${TRUE}; \ + fi + ${Q} echo 'no_implicit.arg formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +have_unused.h: have_unused.c ${MAKE_FILE} + ${Q} ${RM} -f unused_tmp have_unused.h + ${Q} echo 'forming have_unused.h' + ${Q} echo '/*' > have_unused.h + ${Q} echo ' * DO NOT EDIT -- generated by the Makefile' >> have_unused.h + ${Q} echo ' */' >> have_unused.h + ${Q} echo '' >> have_unused.h + ${Q} echo '' >> have_unused.h + ${Q} echo '#if !defined(__HAVE_UNUSED_H__)' >> have_unused.h + ${Q} echo '#define __HAVE_UNUSED_H__' >> have_unused.h + ${Q} echo '' >> have_unused.h + ${Q} echo '' >> have_unused.h + ${Q} echo '/* do we have/want the unused attribute? */' >> have_unused.h + ${Q} ${RM} -f have_unused.o have_unused${EXT} + -${Q} ${LCC} ${ICFLAGS} ${HAVE_UNUSED} have_unused.c -c \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${LCC} ${ILDFLAGS} have_unused.o -o have_unused \ + >/dev/null 2>&1; ${TRUE} + -${Q} ${SHELL} -c "./have_unused${EXT} > unused_tmp 2>/dev/null" \ + >/dev/null 2>&1; ${TRUE} + -${Q} if [ -s unused_tmp ]; then \ + ${CAT} unused_tmp >> have_unused.h; \ + else \ + echo '#undef HAVE_UNUSED /* no */' >> have_unused.h; \ + echo '#undef UNUSED' >> have_unused.h; \ + echo '#define UNUSED /* no */' >> have_unused.h; \ + fi + ${Q} echo '' >> have_unused.h + ${Q} echo '' >> have_unused.h + ${Q} echo '#endif /* !__HAVE_UNUSED_H__ */' >> have_unused.h + ${Q} ${RM} -f have_unused${EXT} have_unused.o unused_tmp + ${Q} echo 'have_unused.h formed' + -@if [ -z "${Q}" ]; then \ + echo ''; \ + echo '=-=-= start of $@ =-=-='; \ + ${CAT} $@; \ + echo '=-=-= end of $@ =-=-='; \ + echo ''; \ + else \ + ${TRUE}; \ + fi + +### +# +# Build .h files for windoz based systems +# +# This is really a internal utility rule that is used to create the +# win32 sub-directory for distribution. +# +### + +win32_hsrc: win32.mkdef ${MAKE_FILE} + ${Q} echo 'forming win32 directory' + ${Q} ${RM} -rf win32 + ${Q} ${MKDIR} win32 + ${Q} ${CP} ${UTIL_C_SRC} win32 + ${Q} ${CP} ${UTIL_MISC_SRC} win32 + ${Q} ${CP} ${MAKE_FILE} win32/${MAKE_FILE} + ${Q} (cd win32; \ + echo "${MAKE} -f ${MAKE_FILE} hsrc `${CAT} win32.mkdef` EXT="; \ + ${MAKE} -f ${MAKE_FILE} hsrc `${CAT} win32.mkdef` EXT=; \ + ${RM} -f ${UTIL_C_SRC}; \ + ${RM} -f ${UTIL_MISC_SRC}; \ + ${RM} -f ${UTIL_OBJS}; \ + ${RM} -f ${UTIL_PROGS}; \ + ${RM} -f ${MAKE_FILE}) + ${Q} echo 'win32 directory formed' + +### +# +# These rules are used in the process of building the BUILD_H_SRC. +# +### + +endian.o: endian.c have_unistd.h + ${LCC} ${ICFLAGS} ${BYTE_ORDER} endian.c -c + +endian${EXT}: endian.o + ${RM} -f $@ + ${LCC} ${ICFLAGS} endian.o -o $@ + +longbits.o: longbits.c have_unistd.h + ${LCC} ${ICFLAGS} longbits.c -c + +longbits${EXT}: longbits.o + ${RM} -f $@ + ${LCC} ${ICFLAGS} longbits.o -o $@ + +### +# +# These two .all rules are used to determine of the lower level +# directory has had its all rule performed. +# +### + +cal/.all: cal/Makefile + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= Invoking all rule for cal =-=-=-=-=' + ${RM} -f $@ + cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} all + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +help/.all: help/Makefile + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= Invoking all rule for help =-=-=-=-=' + ${RM} -f $@ + cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} all + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +help/builtin: help/Makefile \ + func.c help/builtin.top help/builtin.end help/funclist.sed + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= Invoking builtin rule for help =-=-=-=-=' + ${RM} -f $@ + cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} builtin + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +cscript/.all: ${CSCRIPT_TARGETS} + +${CSCRIPT_TARGETS}: cscript/Makefile + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= Invoking all rule for cscript =-=-=-=-=' + ${RM} -f cscript/.all + cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} all + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +custom/.all: custom/Makefile + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= Invoking all rule for custom =-=-=-=-=' + ${RM} -f $@ + cd custom; ${MAKE} -f Makefile.simple ${CUSTOM_PASSDOWN} all + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +custom/libcustcalc${LIB_EXT_VERS}: custom/Makefile + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= Invoking all rule for custom =-=-=-=-=' + cd custom; ${MAKE} -f Makefile.simple ${CUSTOM_PASSDOWN} $@ + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +libcustcalc${LIB_EXT_VERS}: custom/libcustcalc${LIB_EXT_VERS} + ${Q} ${RM} -f $@ + ${CP} -p $? $@ + +libcustcalc${LIB_EXT_VER}: libcustcalc${LIB_EXT_VERS} + ${Q} ${RM} -f $@ + ${LN} -s $? $@ + +libcustcalc${LIB_EXT_VE}: libcustcalc${LIB_EXT_VERS} + ${Q} ${RM} -f $@ + ${LN} -s $? $@ + +libcustcalc${LIB_EXT}: libcustcalc${LIB_EXT_VERS} + ${Q} ${RM} -f $@ + ${LN} -s $? $@ + +### +# +# building calc-static and static lib*.a libraires +# +### + +calc-static${EXT}: .hsrc ${CALCOBJS} \ + ${CALC_STATIC_LIBS} ${MAKE_FILE} + ${RM} -f $@ + ${CC} ${LDFLAGS} ${CALCOBJS} ${LD_STATIC} ${CALC_STATIC_LIBS} \ + ${READLINE_LIB} -o $@ + +libcustcalc.a: custom/libcustcalc.a + ${Q} ${RM} -f $@ + ${CP} -f $? $@ + +libcalc.a: ${LIBOBJS} ${MAKE_FILE} + ${RM} -f libcalc.a + ${AR} qc libcalc.a ${LIBOBJS} + ${RANLIB} libcalc.a + ${CHMOD} 0644 libcalc.a + +custom/libcustcalc.a: custom/Makefile + cd custom; ${MAKE} -f Makefile.simple ${CUSTOM_PASSDOWN} libcustcalc.a + +sample_rand-static${EXE}: sample_rand.o ${CALC_STATIC_LIBS} ${MAKE_FILE} + ${CC} ${LDFLAGS} sample_rand.o ${LD_STATIC} \ + ${CALC_STATIC_LIBS} ${READLINE_LIB} -o $@ + +sample_many-static${EXE}: sample_many.o ${CALC_STATIC_LIBS} ${MAKE_FILE} + ${CC} ${LDFLAGS} sample_many.o ${LD_STATIC} \ + ${CALC_STATIC_LIBS} ${READLINE_LIB} -o $@ + +### +# +# Home grown make dependency rules. Your system make not support +# or have the needed tools. You can ignore this section. +# +# We will form a skelaton tree of *.c files containing only #include "foo.h" +# lines and .h files containing the same lines surrounded by multiple include +# prevention lines. This allows us to build a static depend list that will +# satisfy all possible cpp symbol definition combinations. +# +### + +depend: custom/Makefile hsrc + ${Q} if [ -f ${MAKE_FILE}.bak ]; then \ + echo "${MAKE_FILE}.bak exists, remove or move it"; \ + exit 1; \ + else \ + ${TRUE}; \ + fi + ${V} echo '=-=-=-=-= Invoking depend rule for cscript =-=-=-=-=' + ${Q} cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} depend + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= Invoking depend rule for custom =-=-=-=-=' + ${Q} cd custom; ${MAKE} -f Makefile.simple ${CUSTOM_PASSDOWN} depend + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${Q} echo forming skel + ${Q} ${RM} -rf skel + ${Q} ${MKDIR} skel + -${Q} for i in ${C_SRC} ${BUILD_C_SRC}; do \ + ${SED} -n '/^#[ ]*include[ ]*"/p' "$$i" | \ + ${GREP} -v '\.\./getopt/getopt\.h' > "skel/$$i"; \ + done + ${Q} ${MKDIR} skel/custom + -${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'`"; \ + echo "#if !defined($$tag)" > "skel/$$i"; \ + echo "#define $$tag" >> "skel/$$i"; \ + ${SED} -n '/^#[ ]*include[ ]*"/p' "$$i" | \ + LANG=C ${SORT} -u >> "skel/$$i"; \ + echo '#endif /* '"$$tag"' */' >> "skel/$$i"; \ + fi; \ + done + ${Q} ${RM} -f skel/makedep.out + ${Q} echo skel formed + ${Q} echo forming dependency list + ${Q} :> skel/makedep.out + ${Q} cd skel; \ + ${MAKEDEPEND} -w 1 -f makedep.out ${C_SRC} ${BUILD_C_SRC} + -${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/'; \ + fi; \ + done >> skel/makedep.out + ${Q} LANG=C ${SORT} -u skel/makedep.out -o skel/makedep.out + ${Q} echo dependency list formed + ${Q} echo forming new ${MAKE_FILE} + ${Q} ${RM} -f ${MAKE_FILE}.bak + ${Q} ${MV} ${MAKE_FILE} ${MAKE_FILE}.bak + ${Q} ${SED} -n '1,/^# DO NOT DELETE THIS LINE/p' ${MAKE_FILE}.bak > ${MAKE_FILE} + ${Q} ${GREP} -v '^#' skel/makedep.out >> ${MAKE_FILE} + ${Q} ${RM} -rf skel + -${Q} if ${CMP} -s ${MAKE_FILE}.bak ${MAKE_FILE}; then \ + echo 'top level ${MAKE_FILE} was already up to date'; \ + ${MV} -f ${MAKE_FILE}.bak ${MAKE_FILE}; \ + else \ + ${RM} -f ${MAKE_FILE}.tmp; \ + ${MV} ${MAKE_FILE} ${MAKE_FILE}.tmp; \ + if [ -d RCS -a ! -w "${MAKE_FILE}" ]; then \ + ${CO} -l ${MAKE_FILE}; \ + fi ;\ + ${MV} ${MAKE_FILE}.tmp ${MAKE_FILE}; \ + if [ -d RCS ]; then \ + echo '********************************************************'; \ + echo 'new top level ${MAKE_FILE} formed -- need to check it in'; \ + echo '********************************************************'; \ + fi; \ + fi + +# generate the list of h files for lower level depend use +# +h_list: + -${Q} for i in ${H_SRC} ${BUILD_H_SRC} /dev/null; do \ + if [ X"$$i" != X"/dev/null" ]; then \ + echo $$i; \ + fi; \ + done + +### +# +# calc version +# +# calc_version: +# This rule is the most accurate as it uses calc source to +# produce the version value. This rule produces a full +# version string. Note that the full version could be 4 +# or 3 levels long depending on the minor patch number. +# +# calc_vers: +# This rule is the most accurate as it uses calc source to +# produce the version value. This rule produces only a +# 3 level version string. +# +# calc_ver: +# This rule is the most accurate as it uses calc source to +# produce the version value. This rule produces only a +# 2 level version string. +# +# calc_ve: +# This rule is the most accurate as it uses calc source to +# produce the version value. This rule produces only a +# 1 level version string. +# +# version: +# This rule simply echos the value found in this makefile. +# This rule produces the full version string. Note that the +# full version could be 4 or 3 levels long depending on the +# minor patch number. +# +# vers: +# This rule simply echos the value found in this makefile. +# This rule produces only a 3 level version string. +# +# ver: +# This rule simply echos the value found in this makefile. +# This rule produces only a 2 level version string. +# +# ve: +# This rule simply echos the value found in this makefile. +# This rule produces only a 1 level version string. +# +### + +calc_version: ver_calc${EXT} + @./ver_calc${EXT} + +calc_vers: ver_calc${EXT} + @./ver_calc${EXT} -V + +calc_ver: ver_calc${EXT} + @./ver_calc${EXT} -V | ${SED} -e 's/\.[^.]*$$//' + +calc_ve: ver_calc${EXT} + @./ver_calc${EXT} -V | ${SED} -e 's/\.[^.]*\.[^.]*$$//' + +version: + @echo ${VERSION} + +vers: + @echo ${VERS} + +ver: + @echo ${VER} + +ve: + @echo ${VE} + +ver_calc${EXT}: version.c have_unused.h + ${RM} -f $@ + ${LCC} ${ICFLAGS} -DCALC_VER ${ILDFLAGS} version.c -o $@ + +### +# +# File distribution list generation. You can ignore this section. +# +# We will form the names of source files as if they were in a +# sub-directory called calc. +# +### + +distlist: custom/Makefile ${DISTLIST} + ${Q} (for i in ${DISTLIST} /dev/null; do \ + if [ X"$$i" != X"/dev/null" ]; then \ + echo $$i; \ + fi; \ + done; \ + for i in ${BUILD_H_SRC} ${BUILD_C_SRC} /dev/null; do \ + if [ X"$$i" != X"/dev/null" ]; then \ + echo win32/$$i; \ + fi; \ + done; \ + (cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} $@); \ + (cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} $@); \ + (cd custom; ${MAKE} -f Makefile.simple ${CUSTOM_PASSDOWN} $@); \ + (cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} $@) \ + ) | LANG=C ${SORT} + +distdir: custom/Makefile + ${Q} (echo .; \ + echo win32; \ + (cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} $@); \ + (cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} $@); \ + (cd custom; ${MAKE} -f Makefile.simple ${CUSTOM_PASSDOWN} $@); \ + (cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} $@) \ + ) | LANG=C ${SORT} + +calcliblist: custom/Makefile + ${Q} (for i in ${CALCLIBLIST} /dev/null; do \ + if [ X"$$i" != X"/dev/null" ]; then \ + echo $$i; \ + fi; \ + done; \ + (cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} $@); \ + (cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} $@); \ + (cd custom; ${MAKE} -f Makefile.simple ${CUSTOM_PASSDOWN} $@); \ + (cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} $@) \ + ) | LANG=C ${SORT} + +calcliblistfmt: + ${Q} ${MAKE} -f Makefile calcliblist | \ + ${FMT} -64 | ${SED} -e 's/^/ /' + + +### +# +# Doing a 'make check' will cause the regression test suite to be executed. +# This rule will try to build anything that needs to be built as well. +# +# Doing a 'make chk' will cause only the context around interesting +# (and error) messages to be printed. Unlike 'make check', this +# rule does not cause things to be built. I.e., the all rule is +# not invoked. +# +### + +check: all ./cal/regress.cal + ${CALC_ENV} ./calc${EXT} -d -q read regress + +chk: ./cal/regress.cal + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${CALC_ENV} ./calc${EXT} -d -q read regress 2>&1 | ${AWK} -f check.awk + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +### +# +# debug +# +# make env: +# * print major Makefile variables +# +# make mkdebug: +# * print major Makefile variables +# * build anything not yet built +# +# make debug: +# * remove everything that was previously built +# * print major Makefile variables +# * make everything +# * run the regression tests +### + +env: + @echo '=-=-=-=-= dumping major make variables =-=-=-=-=' + @echo 'ALIGN32=${ALIGN32}'; echo '' + @echo 'ALLOW_CUSTOM=${ALLOW_CUSTOM}'; echo '' + @echo 'AR=${AR}'; echo '' + @echo 'AWK=${AWK}'; echo '' + @echo 'BINDIR=${BINDIR}'; echo '' + @echo 'BLD_TYPE=${BLD_TYPE}'; echo '' + @echo 'BUILD_C_SRC=${BUILD_C_SRC}'; echo '' + @echo 'BUILD_H_SRC=${BUILD_H_SRC}'; echo '' + @echo 'BYTE_ORDER=${BYTE_ORDER}'; echo '' + @echo 'CALCLIBLIST=${CALCLIBLIST}'; echo '' + @echo 'CALCOBJS=${CALCOBJS}'; echo '' + @echo 'CALCPAGER=${CALCPAGER}'; echo '' + @echo 'CALCPATH=${CALCPATH}'; echo '' + @echo 'CALCRC=${CALCRC}'; echo '' + @echo 'CALCSRC=${CALCSRC}'; echo '' + @echo 'CALC_DYNAMIC_LIBS=${CALC_DYNAMIC_LIBS}'; echo '' + @echo 'CALC_ENV=${CALC_ENV}'; echo '' + @echo 'CALC_INCDIR=${CALC_INCDIR}'; echo '' + @echo 'CALC_SHAREDIR=${CALC_SHAREDIR}'; echo '' + @echo 'CALC_STATIC_LIBS=${CALC_STATIC_LIBS}'; echo '' + @echo 'CAL_PASSDOWN=${CAL_PASSDOWN}'; echo '' + @echo 'CAT=${CAT}'; echo '' + @echo 'CATDIR=${CATDIR}'; echo '' + @echo 'CATEXT=${CATEXT}'; echo '' + @echo 'CATMODE=${CATMODE}'; echo '' + @echo 'CC=${CC}'; echo '' + @echo 'CCMISC=${CCMISC}'; echo '' + @echo 'CCOPT=${CCOPT}'; echo '' + @echo 'CCWARN=${CCWARN}'; echo '' + @echo 'CCWERR=${CCWERR}'; echo '' + @echo 'CFLAGS=${CFLAGS}'; echo '' + @echo 'CHMOD=${CHMOD}'; echo '' + @echo 'CMP=${CMP}'; echo '' + @echo 'CO=${CO}'; echo '' + @echo 'COL=${COL}'; echo '' + @echo 'COMMON_CFLAGS=${COMMON_CFLAGS}'; echo '' + @echo 'COMMON_LDFLAGS=${COMMON_LDFLAGS}'; echo '' + @echo 'CP=${CP}'; echo '' + @echo 'CSCRIPT_PASSDOWN=${CSCRIPT_PASSDOWN}'; echo '' + @echo 'CSCRIPT_TARGETS=${CSCRIPT_TARGETS}'; echo '' + @echo 'CTAGS=${CTAGS}'; echo '' + @echo 'CUSTOMCALDIR=${CUSTOMCALDIR}'; echo '' + @echo 'CUSTOMHELPDIR=${CUSTOMHELPDIR}'; echo '' + @echo 'CUSTOMINCDIR=${CUSTOMINCDIR}'; echo '' + @echo 'CUSTOM_PASSDOWN=${CUSTOM_PASSDOWN}'; echo '' + @echo 'C_SRC=${C_SRC}'; echo '' + @echo 'DEBUG=${DEBUG}'; echo '' + @echo 'DEFAULT_LIB_INSTALL_PATH=${DEFAULT_LIB_INSTALL_PATH}'; echo '' + @echo 'DEV_BITS=${DEV_BITS}'; echo '' + @echo 'DIFF=${DIFF}'; echo '' + @echo 'DISTLIST=${DISTLIST}'; echo '' + @echo 'EXT=${EXT}'; echo '' + @echo 'FMT=${FMT}'; echo '' + @echo 'FPOS_BITS=${FPOS_BITS}'; echo '' + @echo 'FPOS_POS_BITS=${FPOS_POS_BITS}'; echo '' + @echo 'GREP=${GREP}'; echo '' + @echo 'HAVE_CONST=${HAVE_CONST}'; echo '' + @echo 'HAVE_FPOS=${HAVE_FPOS}'; echo '' + @echo 'HAVE_FPOS_POS=${HAVE_FPOS_POS}'; echo '' + @echo 'HAVE_GETPGID=${HAVE_GETPGID}'; echo '' + @echo 'HAVE_GETPRID=${HAVE_GETPRID}'; echo '' + @echo 'HAVE_GETRUSAGE=${HAVE_GETRUSAGE}'; echo '' + @echo 'HAVE_GETSID=${HAVE_GETSID}'; echo '' + @echo 'HAVE_GETTIME=${HAVE_GETTIME}'; echo '' + @echo 'HAVE_MEMMOVE=${HAVE_MEMMOVE}'; echo '' + @echo 'HAVE_NEWSTR=${HAVE_NEWSTR}'; echo '' + @echo 'HAVE_NO_IMPLICIT=${HAVE_NO_IMPLICIT}'; echo '' + @echo 'HAVE_OFFSCL=${HAVE_OFFSCL}'; echo '' + @echo 'HAVE_POSSCL=${HAVE_POSSCL}'; echo '' + @echo 'HAVE_STDLIB_H=${HAVE_STDLIB_H}'; echo '' + @echo 'HAVE_STRDUP=${HAVE_STRDUP}'; echo '' + @echo 'HAVE_STRING_H=${HAVE_STRING_H}'; echo '' + @echo 'HAVE_SYS_TIMES_H=${HAVE_SYS_TIMES_H}'; echo '' + @echo 'HAVE_SYS_TIME_H=${HAVE_SYS_TIME_H}'; echo '' + @echo 'HAVE_TIMES_H=${HAVE_TIMES_H}'; echo '' + @echo 'HAVE_TIME_H=${HAVE_TIME_H}'; echo '' + @echo 'HAVE_UID_T=${HAVE_UID_T}'; echo '' + @echo 'HAVE_UNISTD_H=${HAVE_UNISTD_H}'; echo '' + @echo 'HAVE_UNUSED=${HAVE_UNUSED}'; echo '' + @echo 'HAVE_URANDOM_H=${HAVE_URANDOM_H}'; echo '' + @echo 'HAVE_USTAT=${HAVE_USTAT}'; echo '' + @echo 'HAVE_VSPRINTF=${HAVE_VSPRINTF}'; echo '' + @echo 'HELPDIR=${HELPDIR}'; echo '' + @echo 'HELP_PASSDOWN=${HELP_PASSDOWN}'; echo '' + @echo 'H_SRC=${H_SRC}'; echo '' + @echo 'ICFLAGS=${ICFLAGS}'; echo '' + @echo 'ILDFLAGS=${ILDFLAGS}'; echo '' + @echo 'INCDIR=${INCDIR}'; echo '' + @echo 'INODE_BITS=${INODE_BITS}'; echo '' + @echo 'LANG=${LANG}'; echo '' + @echo 'LCC=${LCC}'; echo '' + @echo 'LDCONFIG=${LDCONFIG}'; echo '' + @echo 'LDFLAGS=${LDFLAGS}'; echo '' + @echo 'LDFLAGS=${LDFLAGS}'; echo '' + @echo 'LD_DEBUG=${LD_DEBUG}'; echo '' + @echo 'LD_SHARE=${LD_SHARE}'; echo '' + @echo 'LIBCALC_SHLIB=${LIBCALC_SHLIB}'; echo '' + @echo 'LIBCUSTCALC_SHLIB=${LIBCUSTCALC_SHLIB}'; echo '' + @echo 'LIBDIR=${LIBDIR}'; echo '' + @echo 'LIBOBJS=${LIBOBJS}'; echo '' + @echo 'LIBSRC=${LIBSRC}'; echo '' + @echo 'LIB_H_SRC=${LIB_H_SRC}'; echo '' + @echo 'LICENSE=${LICENSE}'; echo '' + @echo 'LN=${LN}'; echo '' + @echo 'LONG_BITS=${LONG_BITS}'; echo '' + @echo 'MAKE=${MAKE}'; echo '' + @echo 'MAKEDEPEND=${MAKEDEPEND}'; echo '' + @echo 'MAKEFILE_REV=${MAKEFILE_REV}'; echo '' + @echo 'MAKE_FILE=${MAKE_FILE}'; echo '' + @echo 'MANDIR=${MANDIR}'; echo '' + @echo 'MANEXT=${MANEXT}'; echo '' + @echo 'MANMAKE=${MANMAKE}'; echo '' + @echo 'MANMODE=${MANMODE}'; echo '' + @echo 'MKDIR=${MKDIR}'; echo '' + @echo 'MKDIR_ARG=${MKDIR_ARG}'; echo '' + @echo 'MV=${MV}'; echo '' + @echo 'NROFF=${NROFF}'; echo '' + @echo 'NROFF_ARG=${NROFF_ARG}'; echo '' + @echo 'OBJS=${OBJS}'; echo '' + @echo 'OFF_T_BITS=${OFF_T_BITS}'; echo '' + @echo 'PURIFY=${PURIFY}'; echo '' + @echo 'Q=${Q}'; echo '' + @echo 'RANLIB=${RANLIB}'; echo '' + @echo 'READLINE_INCLUDE=${READLINE_INCLUDE}'; echo '' + @echo 'READLINE_LIB=${READLINE_LIB}'; echo '' + @echo 'RM=${RM}'; echo '' + @echo 'RMDIR=${RMDIR}'; echo '' + @echo 'SAMPLE_C_SRC=${SAMPLE_C_SRC}'; echo '' + @echo 'SAMPLE_H_SRC=${SAMPLE_H_SRC}'; echo '' + @echo 'SAMPLE_OBJ=${SAMPLE_OBJ}'; echo '' + @echo 'SAMPLE_STATIC_TARGETS=${SAMPLE_STATIC_TARGETS}'; echo '' + @echo 'SAMPLE_TARGETS=${SAMPLE_TARGETS}'; echo '' + @echo 'SCRIPTDIR=${SCRIPTDIR}'; echo '' + @echo 'SED=${SED}'; echo '' + @echo 'SHELL=${SHELL}'; echo '' + @echo 'SORT=${SORT}'; echo '' + @echo 'SPLINT=${SPLINT}'; echo '' + @echo 'SPLINT_OPTS=${SPLINT_OPTS}'; echo '' + @echo 'SYM_DYNAMIC_LIBS=${SYM_DYNAMIC_LIBS}'; echo '' + @echo 'T=${T}'; echo '' + @echo 'TARGETS=${TARGETS}'; echo '' + @echo 'TEE=${TEE}'; echo '' + @echo 'TERMCONTROL=${TERMCONTROL}'; echo '' + @echo 'TOP_MAKE_FILE=${TOP_MAKE_FILE}'; echo '' + @echo 'TOUCH=${TOUCH}'; echo '' + @echo 'TRUE=${TRUE}'; echo '' + @echo 'USE_READLINE=${USE_READLINE}'; echo '' + @echo 'UTIL_C_SRC=${UTIL_C_SRC}'; echo '' + @echo 'UTIL_MISC_SRC=${UTIL_MISC_SRC}'; echo '' + @echo 'UTIL_OBJS=${UTIL_OBJS}'; echo '' + @echo 'UTIL_PROGS=${UTIL_PROGS}'; echo '' + @echo 'UTIL_TMP=${UTIL_TMP}'; echo '' + @echo 'V=${V}'; echo '' + @echo 'VERS=${VERS}'; echo '' + @echo 'VERSION=${VERSION}'; echo '' + @echo 'XARGS=${XARGS}'; echo '' + @echo 'target=${target}'; echo '' + @echo '=-=-=-=-= ${MAKE_FILE} end of major make variable dump =-=-=-=-=' + +mkdebug: env version.c rpm.release + @echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + @echo '=-=-=-=-= Determining the source version =-=-=-=-=' + @${MAKE} -f Makefile Q= V=@ ver_calc${EXT} + -@./ver_calc${EXT} + -@./ver_calc${EXT} -r rpm.release + @echo '=-=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ all =-=-=-=-=' + @${MAKE} -f Makefile Q= V=@ all + @echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + @echo '=-=-=-=-= Determining the binary version =-=-=-=-=' + -@./calc${EXT} -e -q -v + @echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + @echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +debug: env rpm.release + @echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + @echo '=-=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ clobber =-=-=-=-=' + @${MAKE} -f Makefile Q= V=@ clobber + @echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + @echo '=-=-=-=-= Determining the source version =-=-=-=-=' + @${MAKE} -f Makefile Q= V=@ ver_calc${EXT} + -@./ver_calc${EXT} + -@./ver_calc${EXT} -r rpm.release + @echo '=-=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ all =-=-=-=-=' + @${MAKE} -f Makefile Q= V=@ all + @echo '=-=-=-=-= Determining the binary version =-=-=-=-=' + -@./calc${EXT} -e -q -v + @echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + @echo '=-=-=-=-= Invoking ${MAKE} -f Makefile Q= V=@ chk =-=-=-=-=' + @echo '=-=-=-=-= this may take a while =-=-=-=-=' + @${MAKE} -f Makefile Q= V=@ chk + @echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + @echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +### +# +# testing rules +# +# make run +# * only run calc interactively with the ${CALC_ENV} environment +# +# make cvd +# * run the SGI WorkShop debugger on calc with the ${CALC_ENV} environment +# +# make dbx +# * run the dbx debugger on calc with the ${CALC_ENV} environment +# +# make gdb +# * run the gdb debugger on calc with the ${CALC_ENV} environment +# +### + +run: + ${CALC_ENV} ./calc${EXT} + +cvd: + ${CALC_ENV} cvd ./calc${EXT} + +dbx: + ${CALC_ENV} dbx ./calc${EXT} + +gdb: + ${CALC_ENV} gdb ./calc${EXT} + +### +# +# rpm rules +# +### + +rpm: clobber rpm.mk calc.spec.in + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${RM} -rf /var/tmp/redhat /var/tmp/calc-root + ${MAKE} -f rpm.mk RHDIR=/var/tmp/redhat TMPDIR=/var/tmp/redhat V=${V} + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +# rpm static rules +# +rpm-hide-static: + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${RM} -rf static + ${MKDIR} -p static + ${CP} -f -p calc-static${EXT} ${SAMPLE_STATIC_TARGETS} static + ${CP} -f -p libcalc.a custom/libcustcalc.a static + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +rpm-unhide-static: + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${RM} -f calc-static${EXT} ${SAMPLE_STATIC_TARGETS} + cd static; ${CP} -f -p calc-static${EXT} ${SAMPLE_STATIC_TARGETS} .. + ${RM} -f libcalc.a + cd static; ${CP} -f -p libcalc.a .. + ${RM} -f custom/libcustcalc.a + cd static; ${CP} -f -p libcustcalc.a ../custom + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +rpm-chk-static: + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${CALC_ENV} ./calc-static${EXT} -d -q read regress 2>&1 | ${AWK} -f check.awk + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +rpm-clean-static: + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${RM} -rf static + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +### +# +# Utility rules +# +### + +# Form the installed file list +# +inst_files: ${MAKE_FILE} help/Makefile cal/Makefile custom/Makefile \ + cscript/Makefile ver_calc${EXT} + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${Q} ${RM} -f inst_files + ${Q} echo ${BINDIR}/calc${EXT} > inst_files + ${Q} cd help; LANG=C \ + ${MAKE} -f Makefile ${HELP_PASSDOWN} echo_inst_files | \ + ${GREP} '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files + ${Q} cd cal; LANG=C \ + ${MAKE} -f Makefile ${CAL_PASSDOWN} echo_inst_files | \ + ${GREP} '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files + ${Q} cd custom; LANG=C \ + ${MAKE} -f Makefile ${CUSTOM_PASSDOWN} echo_inst_files | \ + ${GREP} '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files + ${Q} cd cscript; LANG=C \ + ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} echo_inst_files | \ + ${GREP} '__file__..' | ${SED} -e s'/.*__file__ //' >> ../inst_files + ${Q} echo ${LIBDIR}/libcalc.a >> inst_files + ${Q} for i in ${LIB_H_SRC} ${BUILD_H_SRC} /dev/null; do \ + if [ X"$$i" != X"/dev/null" ]; then \ + echo ${CALC_INCDIR}/$$i; \ + fi; \ + done >> inst_files + ${Q} if [ ! -z "${MANDIR}" ]; then \ + echo ${MANDIR}/calc.${MANEXT}; \ + fi >> inst_files + ${Q} LANG=C ${SORT} -u inst_files -o inst_files + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +# The olduninstall rule will remove calc files from the older, histroic +# locations under the /usr/local directory. If you are using the +# new default values for ${BINDIR}, ${CALC_SHAREDIR}, ${INCDIR} and ${LIBDIR} +# then you can use this rule to clean out the older calc stuff under +# the /usr/local directory. +# +olduninstall: + ${RM} -f inst_files + ${MAKE} -f Makefile \ + BINDIR=/usr/local/bin \ + INCDIR=/usr/local/include \ + LIBDIR=/usr/local/lib/calc \ + CALC_SHAREDIR=/usr/local/lib/calc \ + HELPDIR=/usr/local/lib/calc/help \ + CALC_INCDIR=/usr/local/include/calc \ + CUSTOMCALDIR=/usr/local/lib/calc/custom \ + CUSTOMHELPDIR=/usr/local/lib/calc/help/custhelp \ + CUSTOMINCDIR=/usr/local/lib/calc/custom \ + SCRIPTDIR=/usr/local/bin/cscript \ + MANDIR=/usr/local/man/man1 \ + inst_files + ${XARGS} ${RM} -f < inst_files + -${RMDIR} /usr/local/lib/calc/help/custhelp + -${RMDIR} /usr/local/lib/calc/help + -${RMDIR} /usr/local/lib/calc/custom + -${RMDIR} /usr/local/lib/calc + -${RMDIR} /usr/local/include/calc + -${RMDIR} /usr/local/bin/cscript + ${RM} -f inst_files + +tags: ${CALCSRC} ${LIBSRC} ${H_SRC} ${BUILD_H_SRC} ${MAKE_FILE} + -${CTAGS} ${CALCSRC} ${LIBSRC} ${H_SRC} ${BUILD_H_SRC} 2>&1 | \ + ${GREP} -v 'Duplicate entry|Second entry ignored' + +clean: custom/Makefile + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${RM} -f ${LIBOBJS} + ${RM} -f ${CALCOBJS} + ${RM} -f ${UTIL_OBJS} + ${RM} -f ${UTIL_TMP} + ${RM} -f ${UTIL_PROGS} + ${RM} -f ${SAMPLE_OBJ} + ${RM} -f .libcustcalc_error + ${RM} -f calc.spec.sed + ${Q} echo '=-=-=-=-= Invoking $@ rule for help =-=-=-=-=' + cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} clean + ${Q} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${Q} echo '=-=-=-=-= Invoking $@ rule for cal =-=-=-=-=' + cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} clean + ${Q} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= Invoking $@ rule for custom =-=-=-=-=' + cd custom; ${MAKE} -f Makefile.simple ${CUSTOM_PASSDOWN} clean + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= Invoking $@ rule for cscript =-=-=-=-=' + cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} clean + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${Q} echo remove files that are obsolete + ${RM} -rf lib + ${RM} -f endian.h stdarg.h libcalcerr.a cal/obj help/obj + ${RM} -f have_vs.c std_arg.h try_stdarg.c fnvhash.c + ${RM} -f win32dll.h have_malloc.h math_error.h string.h string.c + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +clobber: custom/Makefile clean + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${RM} -f ${SAMPLE_TARGETS} + ${RM} -f ${SAMPLE_STATIC_TARGETS} + ${RM} -f tags .hsrc hsrc + ${RM} -f ${BUILD_H_SRC} + ${RM} -f ${BUILD_C_SRC} + ${RM} -f calc${EXT} + ${RM} -f *_pure_*.[oa] + ${RM} -f *.pure_linkinfo + ${RM} -f *.pure_hardlin + ${RM} -f *.u + ${RM} -f libcalc.a + ${RM} -f calc.1 calc.usage + ${RM} -f calc.pixie calc.rf calc.Counts calc.cord + ${RM} -rf gen_h skel Makefile.bak tmp.patch + ${RM} -f calc.spec inst_files rpm.mk.patch tmp + ${RM} -f libcalc${LIB_EXT_VERS} + ${RM} -f libcalc${LIB_EXT_VER} + ${RM} -f libcalc${LIB_EXT_VE} + ${RM} -f libcalc*${LIB_EXT} + ${RM} -f libcustcalc${LIB_EXT_VERS} + ${RM} -f libcustcalc${LIB_EXT_VER} + ${RM} -f libcustcalc${LIB_EXT_VE} + ${RM} -f libcustcalc*${LIB_EXT} + ${RM} -f libcustcalc.a + ${RM} -f calc-static${EXE} + ${RM} -f ${CALC_STATIC_LIBS} + ${V} echo '=-=-=-=-= Invoking $@ rule for help =-=-=-=-=' + -cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} clobber + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= Invoking $@ rule for cal =-=-=-=-=' + -cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} clobber + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= Invoking $@ rule for custom =-=-=-=-=' + cd custom; ${MAKE} -f Makefile.simple ${CUSTOM_PASSDOWN} clobber + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= Invoking $@ rule for cscript =-=-=-=-=' + cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} clobber + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${V} echo remove files that are obsolete + ${RM} -rf win32 build + ${RM} -f .static .dynamic + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +# install everything +# +# NOTE: Keep the uninstall rule in reverse order to the install rule +# +install: custom/Makefile ${LIB_H_SRC} ${BUILD_H_SRC} calc.1 all + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + -${Q} if [ ! -z "${T}" ]; then \ + if [ ! -d ${T} ]; then \ + echo ${MKDIR} ${MKDIR_ARG} ${T}; \ + ${MKDIR} ${MKDIR_ARG} ${T}; \ + echo ${CHMOD} 0755 ${T}; \ + ${CHMOD} 0755 ${T}; \ + fi; \ + fi + -${Q} if [ ! -d ${T}${BINDIR} ]; then \ + echo ${MKDIR} ${MKDIR_ARG} ${T}${BINDIR}; \ + ${MKDIR} ${MKDIR_ARG} ${T}${BINDIR}; \ + echo ${CHMOD} 0755 ${T}${BINDIR}; \ + ${CHMOD} 0755 ${T}${BINDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${INCDIR} ]; then \ + echo ${MKDIR} ${MKDIR_ARG} ${T}${INCDIR}; \ + ${MKDIR} ${MKDIR_ARG} ${T}${INCDIR}; \ + echo ${CHMOD} 0755 ${T}${INCDIR}; \ + ${CHMOD} 0755 ${T}${INCDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${LIBDIR} ]; then \ + echo ${MKDIR} ${MKDIR_ARG} ${T}${LIBDIR}; \ + ${MKDIR} ${MKDIR_ARG} ${T}${LIBDIR}; \ + echo ${CHMOD} 0755 ${T}${LIBDIR}; \ + ${CHMOD} 0755 ${T}${LIBDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${CALC_SHAREDIR} ]; then \ + ${MKDIR} ${MKDIR_ARG} ${T}${CALC_SHAREDIR}; \ + echo ${MKDIR} ${MKDIR_ARG} ${T}${CALC_SHAREDIR}; \ + echo ${CHMOD} 0755 ${T}${CALC_SHAREDIR}; \ + ${CHMOD} 0755 ${T}${CALC_SHAREDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${HELPDIR} ]; then \ + echo ${MKDIR} ${MKDIR_ARG} ${T}${HELPDIR}; \ + ${MKDIR} ${MKDIR_ARG} ${T}${HELPDIR}; \ + echo ${CHMOD} 0755 ${T}${HELPDIR}; \ + ${CHMOD} 0755 ${T}${HELPDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${CALC_INCDIR} ]; then \ + echo ${MKDIR} ${MKDIR_ARG} ${T}${CALC_INCDIR}; \ + ${MKDIR} ${MKDIR_ARG} ${T}${CALC_INCDIR}; \ + echo ${CHMOD} 0755 ${T}${CALC_INCDIR}; \ + ${CHMOD} 0755 ${T}${CALC_INCDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${CUSTOMCALDIR} ]; then \ + echo ${MKDIR} ${MKDIR_ARG} ${T}${CUSTOMCALDIR}; \ + ${MKDIR} ${MKDIR_ARG} ${T}${CUSTOMCALDIR}; \ + echo ${CHMOD} 0755 ${T}${CUSTOMCALDIR}; \ + ${CHMOD} 0755 ${T}${CUSTOMCALDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${CUSTOMHELPDIR} ]; then \ + echo ${MKDIR} ${MKDIR_ARG} ${T}${CUSTOMHELPDIR}; \ + ${MKDIR} ${MKDIR_ARG} ${T}${CUSTOMHELPDIR}; \ + echo ${CHMOD} 0755 ${T}${CUSTOMHELPDIR}; \ + ${CHMOD} 0755 ${T}${CUSTOMHELPDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${CUSTOMINCDIR} ]; then \ + echo ${MKDIR} ${MKDIR_ARG} ${T}${CUSTOMINCDIR}; \ + ${MKDIR} ${MKDIR_ARG} ${T}${CUSTOMINCDIR}; \ + echo ${CHMOD} 0755 ${T}${CUSTOMINCDIR}; \ + ${CHMOD} 0755 ${T}${CUSTOMINCDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${SCRIPTDIR} ]; then \ + echo ${MKDIR} ${MKDIR_ARG} ${T}${SCRIPTDIR}; \ + ${MKDIR} ${MKDIR_ARG} ${T}${SCRIPTDIR}; \ + echo ${CHMOD} 0755 ${T}${SCRIPTDIR}; \ + ${CHMOD} 0755 ${T}${SCRIPTDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -z "${MANDIR}" ]; then \ + if [ ! -d ${T}${MANDIR} ]; then \ + echo ${MKDIR} ${MKDIR_ARG} ${T}${MANDIR}; \ + ${MKDIR} ${MKDIR_ARG} ${T}${MANDIR}; \ + echo ${CHMOD} 0755 ${T}${MANDIR}; \ + ${CHMOD} 0755 ${T}${MANDIR}; \ + else \ + ${TRUE}; \ + fi; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -z "${CATDIR}" ]; then \ + if [ ! -d ${T}${CATDIR} ]; then \ + echo ${MKDIR} ${MKDIR_ARG} ${T}${CATDIR}; \ + ${MKDIR} ${MKDIR_ARG} ${T}${CATDIR}; \ + echo ${CHMOD} 0755 ${T}${CATDIR}; \ + ${CHMOD} 0755 ${T}${CATDIR}; \ + else \ + ${TRUE}; \ + fi; \ + else \ + ${TRUE}; \ + fi + -${Q} if ${CMP} -s calc${EXT} ${T}${BINDIR}/calc${EXT}; then \ + ${TRUE}; \ + else \ + ${RM} -f ${T}${BINDIR}/calc.new${EXT}; \ + ${CP} -f calc${EXT} ${T}${BINDIR}/calc.new${EXT}; \ + ${CHMOD} 0755 ${T}${BINDIR}/calc.new${EXT}; \ + ${MV} -f ${T}${BINDIR}/calc.new${EXT} ${T}${BINDIR}/calc${EXT}; \ + echo "installed ${T}${BINDIR}/calc${EXT}"; \ + fi + -${Q} if [ -f calc-static${EXE} ]; then \ + if ${CMP} -s calc-static${EXT} \ + ${T}${BINDIR}/calc-static${EXT}; then \ + ${TRUE}; \ + else \ + ${RM} -f ${T}${BINDIR}/calc-static.new${EXT}; \ + ${CP} -f calc-static${EXT} \ + ${T}${BINDIR}/calc-static.new${EXT}; \ + ${CHMOD} 0755 ${T}${BINDIR}/calc-static.new${EXT}; \ + ${MV} -f ${T}${BINDIR}/calc-static.new${EXT} \ + ${T}${BINDIR}/calc-static${EXT}; \ + echo "installed ${T}${BINDIR}/calc-static${EXT}"; \ + fi; \ + fi + ${V} echo '=-=-=-=-= Invoking $@ rule for help =-=-=-=-=' + ${Q} cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} install + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= Invoking $@ rule for cal =-=-=-=-=' + ${Q} cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} install + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= Invoking $@ rule for custom =-=-=-=-=' + ${Q} cd custom; ${MAKE} -f Makefile.simple ${CUSTOM_PASSDOWN} install + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= Invoking $@ rule for cscript =-=-=-=-=' + ${Q} cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} install + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + -${Q} if [ -f libcalc.a ]; then \ + if ${CMP} -s libcalc.a ${T}${LIBDIR}/libcalc.a; then \ + ${TRUE}; \ + else \ + ${RM} -f ${T}${LIBDIR}/libcalc.a.new; \ + ${CP} -f libcalc.a ${T}${LIBDIR}/libcalc.a.new; \ + ${MV} -f ${T}${LIBDIR}/libcalc.a.new ${T}${LIBDIR}/libcalc.a; \ + ${RANLIB} ${T}${LIBDIR}/libcalc.a; \ + ${CHMOD} 0444 ${T}${LIBDIR}/libcalc.a; \ + echo "installed ${T}${LIBDIR}/libcalc.a"; \ + fi; \ + fi + ${Q}# NOTE: The this makefile installs libcustcalc${LIB_EXT_VERS} + ${Q}# because we only want to perform one ${LDCONFIG} for both + ${Q}# libcalc${LIB_EXT_VERS} and libcustcalc${LIB_EXT_VERS}. + -${Q} if ${CMP} -s libcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcalc${LIB_EXT_VERS} && \ + ${CMP} -s custom/libcustcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}; then \ + ${TRUE}; \ + else \ + ${RM} -f ${T}${LIBDIR}/libcalc${LIB_EXT_VERS}.new; \ + ${CP} -f libcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcalc${LIB_EXT_VERS}.new; \ + ${MV} -f ${T}${LIBDIR}/libcalc${LIB_EXT_VERS}.new \ + ${T}${LIBDIR}/libcalc${LIB_EXT_VERS}; \ + echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT_VERS}"; \ + ${LN} -f -s libcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcalc${LIB_EXT_VER}; \ + echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT_VER}"; \ + ${LN} -f -s libcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcalc${LIB_EXT_VE}; \ + echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT_VE}"; \ + ${LN} -f -s libcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcalc${LIB_EXT}; \ + echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT}"; \ + ${RM} -f ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}.new; \ + ${CP} -f custom/libcustcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}.new; \ + ${MV} -f ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}.new \ + ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}; \ + echo "installed ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}"; \ + ${LN} -f -s libcustcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcustcalc${LIB_EXT_VER}; \ + echo "installed ${T}${LIBDIR}/libcustcalc${LIB_EXT_VER}"; \ + ${LN} -f -s libcustcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcustcalc${LIB_EXT_VE}; \ + echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT_VE}"; \ + ${LN} -f -s libcustcalc${LIB_EXT_VERS} \ + ${T}${LIBDIR}/libcustcalc${LIB_EXT}; \ + echo "installed ${T}${LIBDIR}/libcalc${LIB_EXT}"; \ + if [ -z "${T}" -o "/" = "${T}" ]; then \ + echo "running ${LDCONFIG}"; \ + ${LDCONFIG}; \ + echo "finished ${LDCONFIG}"; \ + fi; \ + fi + -${Q} for i in ${LIB_H_SRC} ${BUILD_H_SRC} /dev/null; do \ + if [ "$$i" = "/dev/null" ]; then \ + continue; \ + fi; \ + ${RM} -f tmp; \ + ${SED} -e 's/^\(#[ ]*include[ ][ ]*\)"/\1"calc\//' $$i > tmp; \ + if ${CMP} -s tmp ${T}${CALC_INCDIR}/$$i; then \ + ${TRUE}; \ + else \ + ${RM} -f ${T}${CALC_INCDIR}/$$i.new; \ + ${CP} -f tmp ${T}${CALC_INCDIR}/$$i.new; \ + ${CHMOD} 0444 ${T}${CALC_INCDIR}/$$i.new; \ + ${MV} -f ${T}${CALC_INCDIR}/$$i.new ${T}${CALC_INCDIR}/$$i; \ + echo "installed ${T}${CALC_INCDIR}/$$i"; \ + fi; \ + if [ -f "${T}${CALC_INCDIR}/std_arg.h" ]; then \ + ${RM} -f ${T}${CALC_INCDIR}/std_arg.h; \ + echo "removed old ${T}${CALC_INCDIR}/std_arg.h"; \ + fi; \ + if [ -f "${T}${CALC_INCDIR}/win32dll.h" ]; then \ + ${RM} -f ${T}${CALC_INCDIR}/win32dll.h; \ + echo "removed old ${T}${CALC_INCDIR}/win32dll.h"; \ + fi; \ + if [ -f "${T}${CALC_INCDIR}/have_malloc.h" ]; then \ + ${RM} -f ${T}${CALC_INCDIR}/have_malloc.h; \ + echo "removed old ${T}${CALC_INCDIR}/have_malloc.h"; \ + fi; \ + if [ -f "${T}${CALC_INCDIR}/math_error.h" ]; then \ + ${RM} -f ${T}${CALC_INCDIR}/math_error.h; \ + echo "removed old ${T}${CALC_INCDIR}/math_error.h"; \ + fi; \ + if [ -f "${T}${CALC_INCDIR}/string.h" ]; then \ + ${RM} -f ${T}${CALC_INCDIR}/string.h; \ + echo "removed old ${T}${CALC_INCDIR}/string.h"; \ + fi; \ + done + -${Q} if [ -z "${MANDIR}" ]; then \ + ${TRUE}; \ + else \ + if ${CMP} -s calc.1 ${T}${MANDIR}/calc.${MANEXT}; then \ + ${TRUE}; \ + else \ + ${RM} -f ${T}${MANDIR}/calc.${MANEXT}.new; \ + ${CP} -f calc.1 ${T}${MANDIR}/calc.${MANEXT}.new; \ + ${CHMOD} 0444 ${T}${MANDIR}/calc.${MANEXT}.new; \ + ${MV} -f ${T}${MANDIR}/calc.${MANEXT}.new \ + ${T}${MANDIR}/calc.${MANEXT}; \ + echo "installed ${T}${MANDIR}/calc.${MANEXT}"; \ + fi; \ + fi + -${Q} if [ -z "${CATDIR}" ]; then \ + ${TRUE}; \ + else \ + if ${CMP} -s calc.1 ${T}${MANDIR}/calc.${MANEXT}; then \ + ${TRUE}; \ + else \ + if [ -z "${NROFF}" ]; then \ + echo "${MANMAKE} calc.1 ${T}${CATDIR}"; \ + ${MANMAKE} calc.1 ${T}${CATDIR}; \ + else \ + ${RM} -f ${T}${CATDIR}/calc.${CATEXT}.new; \ + ${NROFF} ${NROFF_ARG} calc.1 > \ + ${T}${CATDIR}/calc.${CATEXT}.new; \ + ${CHMOD} ${MANMODE} ${T}${MANDIR}/calc.${CATEXT}.new; \ + ${MV} -f ${T}${CATDIR}/calc.${CATEXT}.new \ + ${T}${CATDIR}/calc.${CATEXT}; \ + echo "installed ${T}${CATDIR}/calc.${CATEXT}"; \ + fi; \ + fi; \ + fi + ${V} # NOTE: remove ${T}${CALC_INCDIR}/custom if it is empty + -${Q} ${RMDIR} ${T}${CALC_INCDIR}/custom 2>/dev/null + ${V} # NOTE: misc install cleanup + ${Q} ${RM} -f tmp + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +# Try to remove everything that was installed +# +# NOTE: Keep the uninstall rule in reverse order to the install rule +# +uninstall: custom/Makefile + ${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-=' + -${Q} if [ -z "${CATDIR}" ]; then \ + ${TRUE}; \ + else \ + if [ -f "${T}${CATDIR}/calc.${CATEXT}" ]; then \ + ${RM} -f "${T}${CATDIR}/calc.${CATEXT}"; \ + if [ -f "${T}${CATDIR}/calc.${CATEXT}" ]; then \ + echo "cannot uninstall ${T}${CATDIR}/calc.${CATEXT}"; \ + else \ + echo "uninstalled ${T}${CATDIR}/calc.${CATEXT}"; \ + fi; \ + fi; \ + fi + -${Q} if [ -z "${MANDIR}" ]; then \ + ${TRUE}; \ + else \ + if [ -f "${T}${MANDIR}/calc.${MANEXT}" ]; then \ + ${RM} -f "${T}${MANDIR}/calc.${MANEXT}"; \ + if [ -f "${T}${MANDIR}/calc.${MANEXT}" ]; then \ + echo "cannot uninstall ${T}${MANDIR}/calc.${MANEXT}"; \ + else \ + echo "uninstalled ${T}${MANDIR}/calc.${MANEXT}"; \ + fi; \ + fi; \ + fi + -${Q} for i in ${BUILD_H_SRC} ${LIB_H_SRC} /dev/null; do \ + if [ "$$i" = "/dev/null" ]; then \ + continue; \ + fi; \ + if [ -f "${T}${CALC_INCDIR}/$$i" ]; then \ + ${RM} -f "${T}${CALC_INCDIR}/$$i"; \ + if [ -f "${T}${CALC_INCDIR}/$$i" ]; then \ + echo "cannot uninstall ${T}${CALC_INCDIR}/$$i"; \ + else \ + echo "uninstalled ${T}${CALC_INCDIR}/$$i"; \ + fi; \ + fi; \ + done + -${Q} if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcustcalc${LIB_EXT}"; \ + if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcustcalc${LIB_EXT}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcustcalc${LIB_EXT}"; \ + fi; \ + fi + -${Q} if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VE}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VE}"; \ + if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VE}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcustcalc${LIB_EXT_VE}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcustcalc${LIB_EXT_VE}"; \ + fi; \ + fi + -${Q} if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VER}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VER}"; \ + if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VER}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcustcalc${LIB_EXT_VER}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcustcalc${LIB_EXT_VER}"; \ + fi; \ + fi + -${Q} if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}"; \ + if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}"; \ + fi; \ + fi + -${Q} if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}"; \ + if [ -f "${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERS}"; \ + fi; \ + fi + -${Q} if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcalc${LIB_EXT}"; \ + if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcalc${LIB_EXT}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcalc${LIB_EXT}"; \ + fi; \ + fi + -${Q} if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VE}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcalc${LIB_EXT_VE}"; \ + if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VE}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcalc${LIB_EXT_VE}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcalc${LIB_EXT_VE}"; \ + fi; \ + fi + -${Q} if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VER}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcalc${LIB_EXT_VER}"; \ + if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VER}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcalc${LIB_EXT_VER}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcalc${LIB_EXT_VER}"; \ + fi; \ + fi + -${Q} if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERS}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERS}"; \ + if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERS}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcalc${LIB_EXT_VERS}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcalc${LIB_EXT_VERS}"; \ + fi; \ + fi + -${Q} if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERS}" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERS}"; \ + if [ -f "${T}${LIBDIR}/libcalc${LIB_EXT_VERS}" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcalc${LIB_EXT_VERS}"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcalc${LIB_EXT_VERS}"; \ + fi; \ + fi + -${Q} if [ -z "${T}" -o "/" = "${T}" ]; then \ + echo "running ${LDCONFIG}"; \ + ${LDCONFIG}; \ + echo "finished ${LDCONFIG}"; \ + fi + -${Q} if [ -f "${T}${LIBDIR}/libcalc.a" ]; then \ + ${RM} -f "${T}${LIBDIR}/libcalc.a"; \ + if [ -f "${T}${LIBDIR}/libcalc.a" ]; then \ + echo "cannot uninstall ${T}${LIBDIR}/libcalc.a"; \ + else \ + echo "uninstalled ${T}${LIBDIR}/libcalc.a"; \ + fi; \ + fi + ${V} echo '=-=-=-=-= Invoking $@ rule for cscript =-=-=-=-=' + ${Q} cd cscript; ${MAKE} -f Makefile ${CSCRIPT_PASSDOWN} uninstall + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= Invoking $@ rule for custom =-=-=-=-=' + ${Q} cd custom; ${MAKE} -f Makefile.simple ${CUSTOM_PASSDOWN} uninstall + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= Invoking $@ rule for cal =-=-=-=-=' + ${Q} cd cal; ${MAKE} -f Makefile ${CAL_PASSDOWN} uninstall + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + ${V} echo '=-=-=-=-= Invoking $@ rule for help =-=-=-=-=' + ${Q} cd help; ${MAKE} -f Makefile ${HELP_PASSDOWN} uninstall + ${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-=' + -${Q} if [ -f "${T}${BINDIR}/calc-static${EXT}" ]; then \ + ${RM} -f "${T}${BINDIR}/calc-static${EXT}"; \ + if [ -f "${T}${BINDIR}/calc-static${EXT}" ]; then \ + echo "cannot uninstall ${T}${BINDIR}/calc-static${EXT}"; \ + else \ + echo "uninstalled ${T}${BINDIR}/calc-static${EXT}"; \ + fi; \ + fi + -${Q} if [ -f "${T}${BINDIR}/calc${EXT}" ]; then \ + ${RM} -f "${T}${BINDIR}/calc${EXT}"; \ + if [ -f "${T}${BINDIR}/calc${EXT}" ]; then \ + echo "cannot uninstall ${T}${BINDIR}/calc${EXT}"; \ + else \ + echo "uninstalled ${T}${BINDIR}/calc${EXT}"; \ + fi; \ + fi + -${Q} for i in ${CATDIR} ${MANDIR} ${SCRIPTDIR} \ + ${CUSTOMINCDIR} ${CUSTOMHELPDIR} ${CUSTOMCALDIR} \ + ${CALC_INCDIR} ${LIBDIR} ${INCDIR} ${BINDIR}; do \ + if [ -d "${T}$$i" ]; then \ + ${RMDIR} "${T}$$i" 2>/dev/null; \ + echo "cleaned up ${T}$$i"; \ + fi; \ + done + -${Q} if [ ! -z "${T}" ]; then \ + if [ -d "${T}" ]; then \ + ${RMDIR} "${T}" 2>/dev/null; \ + echo "cleaned up ${T}"; \ + fi; \ + fi + ${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-=' + +# splint - A tool for statically checking C programs +# +splint: #hsrc + ${SPLINT} ${SPLINT_OPTS} -DCALC_SRC -I. \ + ${CALCSRC} ${LIBSRC} ${BUILD_C_SRC} ${UTIL_C_SRC} + +### +# +# make depend stuff +# +### + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +addop.o: addop.c +addop.o: alloc.h +addop.o: block.h +addop.o: byteswap.h +addop.o: calc.h +addop.o: calcerr.h +addop.o: cmath.h +addop.o: config.h +addop.o: decl.h +addop.o: endian_calc.h +addop.o: func.h +addop.o: hash.h +addop.o: have_const.h +addop.o: have_memmv.h +addop.o: have_newstr.h +addop.o: have_stdlib.h +addop.o: have_string.h +addop.o: label.h +addop.o: longbits.h +addop.o: nametype.h +addop.o: opcodes.h +addop.o: qmath.h +addop.o: sha1.h +addop.o: str.h +addop.o: symbol.h +addop.o: token.h +addop.o: value.h +addop.o: zmath.h +align32.o: align32.c +align32.o: have_unistd.h +align32.o: longbits.h +assocfunc.o: alloc.h +assocfunc.o: assocfunc.c +assocfunc.o: block.h +assocfunc.o: byteswap.h +assocfunc.o: calcerr.h +assocfunc.o: cmath.h +assocfunc.o: config.h +assocfunc.o: decl.h +assocfunc.o: endian_calc.h +assocfunc.o: hash.h +assocfunc.o: have_const.h +assocfunc.o: have_memmv.h +assocfunc.o: have_newstr.h +assocfunc.o: have_stdlib.h +assocfunc.o: have_string.h +assocfunc.o: longbits.h +assocfunc.o: nametype.h +assocfunc.o: qmath.h +assocfunc.o: sha1.h +assocfunc.o: str.h +assocfunc.o: value.h +assocfunc.o: zmath.h +blkcpy.o: alloc.h +blkcpy.o: blkcpy.c +blkcpy.o: blkcpy.h +blkcpy.o: block.h +blkcpy.o: byteswap.h +blkcpy.o: calc.h +blkcpy.o: calcerr.h +blkcpy.o: cmath.h +blkcpy.o: config.h +blkcpy.o: decl.h +blkcpy.o: endian_calc.h +blkcpy.o: file.h +blkcpy.o: hash.h +blkcpy.o: have_const.h +blkcpy.o: have_fpos.h +blkcpy.o: have_memmv.h +blkcpy.o: have_newstr.h +blkcpy.o: have_stdlib.h +blkcpy.o: have_string.h +blkcpy.o: longbits.h +blkcpy.o: nametype.h +blkcpy.o: qmath.h +blkcpy.o: sha1.h +blkcpy.o: str.h +blkcpy.o: value.h +blkcpy.o: zmath.h +block.o: alloc.h +block.o: block.c +block.o: block.h +block.o: byteswap.h +block.o: calcerr.h +block.o: cmath.h +block.o: config.h +block.o: decl.h +block.o: endian_calc.h +block.o: hash.h +block.o: have_const.h +block.o: have_memmv.h +block.o: have_newstr.h +block.o: have_stdlib.h +block.o: have_string.h +block.o: longbits.h +block.o: nametype.h +block.o: qmath.h +block.o: sha1.h +block.o: str.h +block.o: value.h +block.o: zmath.h +byteswap.o: alloc.h +byteswap.o: byteswap.c +byteswap.o: byteswap.h +byteswap.o: cmath.h +byteswap.o: decl.h +byteswap.o: endian_calc.h +byteswap.o: have_const.h +byteswap.o: have_memmv.h +byteswap.o: have_newstr.h +byteswap.o: have_stdlib.h +byteswap.o: have_string.h +byteswap.o: longbits.h +byteswap.o: qmath.h +byteswap.o: zmath.h +calc.o: alloc.h +calc.o: args.h +calc.o: block.h +calc.o: byteswap.h +calc.o: calc.c +calc.o: calc.h +calc.o: calcerr.h +calc.o: cmath.h +calc.o: conf.h +calc.o: config.h +calc.o: custom.h +calc.o: decl.h +calc.o: endian_calc.h +calc.o: func.h +calc.o: hash.h +calc.o: have_const.h +calc.o: have_memmv.h +calc.o: have_newstr.h +calc.o: have_stdlib.h +calc.o: have_strdup.h +calc.o: have_string.h +calc.o: have_uid_t.h +calc.o: have_unistd.h +calc.o: have_unused.h +calc.o: hist.h +calc.o: label.h +calc.o: lib_calc.h +calc.o: longbits.h +calc.o: nametype.h +calc.o: opcodes.h +calc.o: qmath.h +calc.o: sha1.h +calc.o: str.h +calc.o: symbol.h +calc.o: token.h +calc.o: value.h +calc.o: zmath.h +calcerr.o: calcerr.c +calcerr.o: calcerr.h +calcerr.o: have_const.h +codegen.o: alloc.h +codegen.o: block.h +codegen.o: byteswap.h +codegen.o: calc.h +codegen.o: calcerr.h +codegen.o: cmath.h +codegen.o: codegen.c +codegen.o: conf.h +codegen.o: config.h +codegen.o: decl.h +codegen.o: endian_calc.h +codegen.o: func.h +codegen.o: hash.h +codegen.o: have_const.h +codegen.o: have_memmv.h +codegen.o: have_newstr.h +codegen.o: have_stdlib.h +codegen.o: have_string.h +codegen.o: have_unistd.h +codegen.o: label.h +codegen.o: lib_calc.h +codegen.o: longbits.h +codegen.o: nametype.h +codegen.o: opcodes.h +codegen.o: qmath.h +codegen.o: sha1.h +codegen.o: str.h +codegen.o: symbol.h +codegen.o: token.h +codegen.o: value.h +codegen.o: zmath.h +comfunc.o: alloc.h +comfunc.o: byteswap.h +comfunc.o: cmath.h +comfunc.o: comfunc.c +comfunc.o: config.h +comfunc.o: decl.h +comfunc.o: endian_calc.h +comfunc.o: have_const.h +comfunc.o: have_memmv.h +comfunc.o: have_newstr.h +comfunc.o: have_stdlib.h +comfunc.o: have_string.h +comfunc.o: longbits.h +comfunc.o: nametype.h +comfunc.o: qmath.h +comfunc.o: zmath.h +commath.o: alloc.h +commath.o: byteswap.h +commath.o: cmath.h +commath.o: commath.c +commath.o: decl.h +commath.o: endian_calc.h +commath.o: have_const.h +commath.o: have_memmv.h +commath.o: have_newstr.h +commath.o: have_stdlib.h +commath.o: have_string.h +commath.o: longbits.h +commath.o: qmath.h +commath.o: zmath.h +config.o: alloc.h +config.o: block.h +config.o: byteswap.h +config.o: calc.h +config.o: calcerr.h +config.o: cmath.h +config.o: config.c +config.o: config.h +config.o: custom.h +config.o: decl.h +config.o: endian_calc.h +config.o: hash.h +config.o: have_const.h +config.o: have_memmv.h +config.o: have_newstr.h +config.o: have_stdlib.h +config.o: have_strdup.h +config.o: have_string.h +config.o: have_times.h +config.o: longbits.h +config.o: nametype.h +config.o: qmath.h +config.o: sha1.h +config.o: str.h +config.o: token.h +config.o: value.h +config.o: zmath.h +config.o: zrand.h +const.o: alloc.h +const.o: block.h +const.o: byteswap.h +const.o: calc.h +const.o: calcerr.h +const.o: cmath.h +const.o: config.h +const.o: const.c +const.o: decl.h +const.o: endian_calc.h +const.o: hash.h +const.o: have_const.h +const.o: have_memmv.h +const.o: have_newstr.h +const.o: have_stdlib.h +const.o: have_string.h +const.o: longbits.h +const.o: nametype.h +const.o: qmath.h +const.o: sha1.h +const.o: str.h +const.o: value.h +const.o: zmath.h +custom.o: alloc.h +custom.o: block.h +custom.o: byteswap.h +custom.o: calc.h +custom.o: calcerr.h +custom.o: cmath.h +custom.o: config.h +custom.o: custom.c +custom.o: custom.h +custom.o: decl.h +custom.o: endian_calc.h +custom.o: hash.h +custom.o: have_const.h +custom.o: have_memmv.h +custom.o: have_newstr.h +custom.o: have_stdlib.h +custom.o: have_string.h +custom.o: longbits.h +custom.o: nametype.h +custom.o: qmath.h +custom.o: sha1.h +custom.o: str.h +custom.o: value.h +custom.o: zmath.h +endian.o: endian.c +endian.o: have_stdlib.h +endian.o: have_unistd.h +file.o: alloc.h +file.o: block.h +file.o: byteswap.h +file.o: calc.h +file.o: calcerr.h +file.o: cmath.h +file.o: config.h +file.o: decl.h +file.o: endian_calc.h +file.o: file.c +file.o: file.h +file.o: fposval.h +file.o: hash.h +file.o: have_const.h +file.o: have_fpos.h +file.o: have_fpos_pos.h +file.o: have_memmv.h +file.o: have_newstr.h +file.o: have_stdlib.h +file.o: have_string.h +file.o: have_unistd.h +file.o: longbits.h +file.o: nametype.h +file.o: qmath.h +file.o: sha1.h +file.o: str.h +file.o: value.h +file.o: zmath.h +fposval.o: endian_calc.h +fposval.o: fposval.c +fposval.o: have_fpos.h +fposval.o: have_fpos_pos.h +fposval.o: have_offscl.h +fposval.o: have_posscl.h +func.o: alloc.h +func.o: block.h +func.o: byteswap.h +func.o: calc.h +func.o: calcerr.h +func.o: cmath.h +func.o: config.h +func.o: custom.h +func.o: decl.h +func.o: endian_calc.h +func.o: file.h +func.o: func.c +func.o: func.h +func.o: hash.h +func.o: have_const.h +func.o: have_fpos.h +func.o: have_memmv.h +func.o: have_newstr.h +func.o: have_rusage.h +func.o: have_stdlib.h +func.o: have_strdup.h +func.o: have_string.h +func.o: have_times.h +func.o: have_unistd.h +func.o: have_unused.h +func.o: label.h +func.o: longbits.h +func.o: nametype.h +func.o: opcodes.h +func.o: prime.h +func.o: qmath.h +func.o: sha1.h +func.o: str.h +func.o: symbol.h +func.o: token.h +func.o: value.h +func.o: zmath.h +func.o: zrand.h +func.o: zrandom.h +hash.o: alloc.h +hash.o: block.h +hash.o: byteswap.h +hash.o: calc.h +hash.o: calcerr.h +hash.o: cmath.h +hash.o: config.h +hash.o: decl.h +hash.o: endian_calc.h +hash.o: hash.c +hash.o: hash.h +hash.o: have_const.h +hash.o: have_memmv.h +hash.o: have_newstr.h +hash.o: have_stdlib.h +hash.o: have_string.h +hash.o: longbits.h +hash.o: nametype.h +hash.o: qmath.h +hash.o: sha1.h +hash.o: str.h +hash.o: value.h +hash.o: zmath.h +hash.o: zrand.h +hash.o: zrandom.h +have_const.o: have_const.c +have_fpos.o: have_fpos.c +have_fpos_pos.o: have_fpos.h +have_fpos_pos.o: have_fpos_pos.c +have_fpos_pos.o: have_posscl.h +have_getpgid.o: have_getpgid.c +have_getprid.o: have_getprid.c +have_getsid.o: have_getsid.c +have_gettime.o: have_gettime.c +have_memmv.o: have_memmv.c +have_newstr.o: have_newstr.c +have_offscl.o: have_offscl.c +have_posscl.o: have_fpos.h +have_posscl.o: have_posscl.c +have_rusage.o: have_rusage.c +have_stdvs.o: have_stdvs.c +have_stdvs.o: have_string.h +have_stdvs.o: have_unistd.h +have_strdup.o: have_strdup.c +have_uid_t.o: have_uid_t.c +have_uid_t.o: have_unistd.h +have_unused.o: have_unused.c +have_ustat.o: have_ustat.c +have_varvs.o: have_string.h +have_varvs.o: have_unistd.h +have_varvs.o: have_varvs.c +help.o: alloc.h +help.o: block.h +help.o: byteswap.h +help.o: calc.h +help.o: calcerr.h +help.o: cmath.h +help.o: conf.h +help.o: config.h +help.o: decl.h +help.o: endian_calc.h +help.o: hash.h +help.o: have_const.h +help.o: have_memmv.h +help.o: have_newstr.h +help.o: have_stdlib.h +help.o: have_string.h +help.o: have_unistd.h +help.o: help.c +help.o: longbits.h +help.o: nametype.h +help.o: qmath.h +help.o: sha1.h +help.o: str.h +help.o: value.h +help.o: zmath.h +hist.o: alloc.h +hist.o: block.h +hist.o: byteswap.h +hist.o: calc.h +hist.o: calcerr.h +hist.o: cmath.h +hist.o: config.h +hist.o: decl.h +hist.o: endian_calc.h +hist.o: hash.h +hist.o: have_const.h +hist.o: have_memmv.h +hist.o: have_newstr.h +hist.o: have_stdlib.h +hist.o: have_strdup.h +hist.o: have_string.h +hist.o: have_unistd.h +hist.o: have_unused.h +hist.o: hist.c +hist.o: hist.h +hist.o: longbits.h +hist.o: nametype.h +hist.o: qmath.h +hist.o: sha1.h +hist.o: str.h +hist.o: value.h +hist.o: zmath.h +input.o: alloc.h +input.o: block.h +input.o: byteswap.h +input.o: calc.h +input.o: calcerr.h +input.o: cmath.h +input.o: conf.h +input.o: config.h +input.o: decl.h +input.o: endian_calc.h +input.o: hash.h +input.o: have_const.h +input.o: have_memmv.h +input.o: have_newstr.h +input.o: have_stdlib.h +input.o: have_string.h +input.o: have_unistd.h +input.o: hist.h +input.o: input.c +input.o: longbits.h +input.o: nametype.h +input.o: qmath.h +input.o: sha1.h +input.o: str.h +input.o: value.h +input.o: zmath.h +jump.o: decl.h +jump.o: have_const.h +jump.o: jump.c +jump.o: jump.h +label.o: alloc.h +label.o: block.h +label.o: byteswap.h +label.o: calc.h +label.o: calcerr.h +label.o: cmath.h +label.o: config.h +label.o: decl.h +label.o: endian_calc.h +label.o: func.h +label.o: hash.h +label.o: have_const.h +label.o: have_memmv.h +label.o: have_newstr.h +label.o: have_stdlib.h +label.o: have_string.h +label.o: label.c +label.o: label.h +label.o: longbits.h +label.o: nametype.h +label.o: opcodes.h +label.o: qmath.h +label.o: sha1.h +label.o: str.h +label.o: token.h +label.o: value.h +label.o: zmath.h +lib_calc.o: alloc.h +lib_calc.o: block.h +lib_calc.o: byteswap.h +lib_calc.o: calc.h +lib_calc.o: calcerr.h +lib_calc.o: cmath.h +lib_calc.o: conf.h +lib_calc.o: config.h +lib_calc.o: custom.h +lib_calc.o: decl.h +lib_calc.o: endian_calc.h +lib_calc.o: func.h +lib_calc.o: hash.h +lib_calc.o: have_const.h +lib_calc.o: have_memmv.h +lib_calc.o: have_newstr.h +lib_calc.o: have_stdlib.h +lib_calc.o: have_strdup.h +lib_calc.o: have_string.h +lib_calc.o: have_unistd.h +lib_calc.o: label.h +lib_calc.o: lib_calc.c +lib_calc.o: lib_calc.h +lib_calc.o: longbits.h +lib_calc.o: nametype.h +lib_calc.o: qmath.h +lib_calc.o: sha1.h +lib_calc.o: str.h +lib_calc.o: symbol.h +lib_calc.o: terminal.h +lib_calc.o: token.h +lib_calc.o: value.h +lib_calc.o: zmath.h +lib_calc.o: zrandom.h +lib_util.o: alloc.h +lib_util.o: byteswap.h +lib_util.o: decl.h +lib_util.o: endian_calc.h +lib_util.o: have_const.h +lib_util.o: have_memmv.h +lib_util.o: have_newstr.h +lib_util.o: have_stdlib.h +lib_util.o: have_string.h +lib_util.o: lib_util.c +lib_util.o: lib_util.h +lib_util.o: longbits.h +lib_util.o: zmath.h +listfunc.o: alloc.h +listfunc.o: block.h +listfunc.o: byteswap.h +listfunc.o: calcerr.h +listfunc.o: cmath.h +listfunc.o: config.h +listfunc.o: decl.h +listfunc.o: endian_calc.h +listfunc.o: hash.h +listfunc.o: have_const.h +listfunc.o: have_memmv.h +listfunc.o: have_newstr.h +listfunc.o: have_stdlib.h +listfunc.o: have_string.h +listfunc.o: listfunc.c +listfunc.o: longbits.h +listfunc.o: nametype.h +listfunc.o: qmath.h +listfunc.o: sha1.h +listfunc.o: str.h +listfunc.o: value.h +listfunc.o: zmath.h +listfunc.o: zrand.h +longbits.o: have_stdlib.h +longbits.o: have_unistd.h +longbits.o: longbits.c +matfunc.o: alloc.h +matfunc.o: block.h +matfunc.o: byteswap.h +matfunc.o: calcerr.h +matfunc.o: cmath.h +matfunc.o: config.h +matfunc.o: decl.h +matfunc.o: endian_calc.h +matfunc.o: hash.h +matfunc.o: have_const.h +matfunc.o: have_memmv.h +matfunc.o: have_newstr.h +matfunc.o: have_stdlib.h +matfunc.o: have_string.h +matfunc.o: have_unused.h +matfunc.o: longbits.h +matfunc.o: matfunc.c +matfunc.o: nametype.h +matfunc.o: qmath.h +matfunc.o: sha1.h +matfunc.o: str.h +matfunc.o: value.h +matfunc.o: zmath.h +matfunc.o: zrand.h +math_error.o: alloc.h +math_error.o: args.h +math_error.o: block.h +math_error.o: byteswap.h +math_error.o: calc.h +math_error.o: calcerr.h +math_error.o: cmath.h +math_error.o: config.h +math_error.o: decl.h +math_error.o: endian_calc.h +math_error.o: hash.h +math_error.o: have_const.h +math_error.o: have_memmv.h +math_error.o: have_newstr.h +math_error.o: have_stdlib.h +math_error.o: have_string.h +math_error.o: lib_calc.h +math_error.o: longbits.h +math_error.o: math_error.c +math_error.o: nametype.h +math_error.o: qmath.h +math_error.o: sha1.h +math_error.o: str.h +math_error.o: value.h +math_error.o: zmath.h +no_implicit.o: no_implicit.c +obj.o: alloc.h +obj.o: block.h +obj.o: byteswap.h +obj.o: calc.h +obj.o: calcerr.h +obj.o: cmath.h +obj.o: config.h +obj.o: decl.h +obj.o: endian_calc.h +obj.o: func.h +obj.o: hash.h +obj.o: have_const.h +obj.o: have_memmv.h +obj.o: have_newstr.h +obj.o: have_stdlib.h +obj.o: have_string.h +obj.o: label.h +obj.o: longbits.h +obj.o: nametype.h +obj.o: obj.c +obj.o: opcodes.h +obj.o: qmath.h +obj.o: sha1.h +obj.o: str.h +obj.o: symbol.h +obj.o: value.h +obj.o: zmath.h +opcodes.o: alloc.h +opcodes.o: block.h +opcodes.o: byteswap.h +opcodes.o: calc.h +opcodes.o: calcerr.h +opcodes.o: cmath.h +opcodes.o: config.h +opcodes.o: custom.h +opcodes.o: decl.h +opcodes.o: endian_calc.h +opcodes.o: file.h +opcodes.o: func.h +opcodes.o: hash.h +opcodes.o: have_const.h +opcodes.o: have_fpos.h +opcodes.o: have_memmv.h +opcodes.o: have_newstr.h +opcodes.o: have_stdlib.h +opcodes.o: have_string.h +opcodes.o: have_unused.h +opcodes.o: hist.h +opcodes.o: label.h +opcodes.o: lib_calc.h +opcodes.o: longbits.h +opcodes.o: nametype.h +opcodes.o: opcodes.c +opcodes.o: opcodes.h +opcodes.o: qmath.h +opcodes.o: sha1.h +opcodes.o: str.h +opcodes.o: symbol.h +opcodes.o: value.h +opcodes.o: zmath.h +opcodes.o: zrand.h +opcodes.o: zrandom.h +pix.o: alloc.h +pix.o: byteswap.h +pix.o: decl.h +pix.o: endian_calc.h +pix.o: have_const.h +pix.o: have_memmv.h +pix.o: have_newstr.h +pix.o: have_stdlib.h +pix.o: have_string.h +pix.o: longbits.h +pix.o: pix.c +pix.o: prime.h +pix.o: qmath.h +pix.o: zmath.h +poly.o: alloc.h +poly.o: block.h +poly.o: byteswap.h +poly.o: calcerr.h +poly.o: cmath.h +poly.o: config.h +poly.o: decl.h +poly.o: endian_calc.h +poly.o: hash.h +poly.o: have_const.h +poly.o: have_memmv.h +poly.o: have_newstr.h +poly.o: have_stdlib.h +poly.o: have_string.h +poly.o: longbits.h +poly.o: nametype.h +poly.o: poly.c +poly.o: qmath.h +poly.o: sha1.h +poly.o: str.h +poly.o: value.h +poly.o: zmath.h +prime.o: alloc.h +prime.o: byteswap.h +prime.o: decl.h +prime.o: endian_calc.h +prime.o: have_const.h +prime.o: have_memmv.h +prime.o: have_newstr.h +prime.o: have_stdlib.h +prime.o: have_string.h +prime.o: jump.h +prime.o: longbits.h +prime.o: prime.c +prime.o: prime.h +prime.o: qmath.h +prime.o: zmath.h +qfunc.o: alloc.h +qfunc.o: byteswap.h +qfunc.o: config.h +qfunc.o: decl.h +qfunc.o: endian_calc.h +qfunc.o: have_const.h +qfunc.o: have_memmv.h +qfunc.o: have_newstr.h +qfunc.o: have_stdlib.h +qfunc.o: have_string.h +qfunc.o: longbits.h +qfunc.o: nametype.h +qfunc.o: prime.h +qfunc.o: qfunc.c +qfunc.o: qmath.h +qfunc.o: zmath.h +qio.o: alloc.h +qio.o: args.h +qio.o: byteswap.h +qio.o: config.h +qio.o: decl.h +qio.o: endian_calc.h +qio.o: have_const.h +qio.o: have_memmv.h +qio.o: have_newstr.h +qio.o: have_stdlib.h +qio.o: have_string.h +qio.o: have_unused.h +qio.o: longbits.h +qio.o: nametype.h +qio.o: qio.c +qio.o: qmath.h +qio.o: zmath.h +qmath.o: alloc.h +qmath.o: byteswap.h +qmath.o: config.h +qmath.o: decl.h +qmath.o: endian_calc.h +qmath.o: have_const.h +qmath.o: have_memmv.h +qmath.o: have_newstr.h +qmath.o: have_stdlib.h +qmath.o: have_string.h +qmath.o: longbits.h +qmath.o: nametype.h +qmath.o: qmath.c +qmath.o: qmath.h +qmath.o: zmath.h +qmod.o: alloc.h +qmod.o: byteswap.h +qmod.o: config.h +qmod.o: decl.h +qmod.o: endian_calc.h +qmod.o: have_const.h +qmod.o: have_memmv.h +qmod.o: have_newstr.h +qmod.o: have_stdlib.h +qmod.o: have_string.h +qmod.o: longbits.h +qmod.o: nametype.h +qmod.o: qmath.h +qmod.o: qmod.c +qmod.o: zmath.h +qtrans.o: alloc.h +qtrans.o: byteswap.h +qtrans.o: decl.h +qtrans.o: endian_calc.h +qtrans.o: have_const.h +qtrans.o: have_memmv.h +qtrans.o: have_newstr.h +qtrans.o: have_stdlib.h +qtrans.o: have_string.h +qtrans.o: longbits.h +qtrans.o: qmath.h +qtrans.o: qtrans.c +qtrans.o: zmath.h +quickhash.o: alloc.h +quickhash.o: block.h +quickhash.o: byteswap.h +quickhash.o: calcerr.h +quickhash.o: cmath.h +quickhash.o: config.h +quickhash.o: decl.h +quickhash.o: endian_calc.h +quickhash.o: hash.h +quickhash.o: have_const.h +quickhash.o: have_memmv.h +quickhash.o: have_newstr.h +quickhash.o: have_stdlib.h +quickhash.o: have_string.h +quickhash.o: longbits.h +quickhash.o: nametype.h +quickhash.o: qmath.h +quickhash.o: quickhash.c +quickhash.o: sha1.h +quickhash.o: str.h +quickhash.o: value.h +quickhash.o: zmath.h +quickhash.o: zrand.h +quickhash.o: zrandom.h +sample_many.o: alloc.h +sample_many.o: block.h +sample_many.o: byteswap.h +sample_many.o: calc.h +sample_many.o: calcerr.h +sample_many.o: cmath.h +sample_many.o: config.h +sample_many.o: decl.h +sample_many.o: endian_calc.h +sample_many.o: hash.h +sample_many.o: have_const.h +sample_many.o: have_memmv.h +sample_many.o: have_newstr.h +sample_many.o: have_stdlib.h +sample_many.o: have_string.h +sample_many.o: lib_util.h +sample_many.o: longbits.h +sample_many.o: nametype.h +sample_many.o: qmath.h +sample_many.o: sample_many.c +sample_many.o: sha1.h +sample_many.o: str.h +sample_many.o: value.h +sample_many.o: zmath.h +sample_many.o: zrandom.h +sample_rand.o: alloc.h +sample_rand.o: block.h +sample_rand.o: byteswap.h +sample_rand.o: calc.h +sample_rand.o: calcerr.h +sample_rand.o: cmath.h +sample_rand.o: config.h +sample_rand.o: decl.h +sample_rand.o: endian_calc.h +sample_rand.o: hash.h +sample_rand.o: have_const.h +sample_rand.o: have_memmv.h +sample_rand.o: have_newstr.h +sample_rand.o: have_stdlib.h +sample_rand.o: have_string.h +sample_rand.o: lib_util.h +sample_rand.o: longbits.h +sample_rand.o: nametype.h +sample_rand.o: qmath.h +sample_rand.o: sample_rand.c +sample_rand.o: sha1.h +sample_rand.o: str.h +sample_rand.o: value.h +sample_rand.o: zmath.h +sample_rand.o: zrandom.h +seed.o: alloc.h +seed.o: byteswap.h +seed.o: decl.h +seed.o: endian_calc.h +seed.o: have_const.h +seed.o: have_getpgid.h +seed.o: have_getprid.h +seed.o: have_getsid.h +seed.o: have_gettime.h +seed.o: have_memmv.h +seed.o: have_newstr.h +seed.o: have_rusage.h +seed.o: have_stdlib.h +seed.o: have_string.h +seed.o: have_times.h +seed.o: have_uid_t.h +seed.o: have_unistd.h +seed.o: have_urandom.h +seed.o: have_ustat.h +seed.o: longbits.h +seed.o: qmath.h +seed.o: seed.c +seed.o: zmath.h +sha1.o: align32.h +sha1.o: alloc.h +sha1.o: block.h +sha1.o: byteswap.h +sha1.o: calcerr.h +sha1.o: cmath.h +sha1.o: config.h +sha1.o: decl.h +sha1.o: endian_calc.h +sha1.o: hash.h +sha1.o: have_const.h +sha1.o: have_memmv.h +sha1.o: have_newstr.h +sha1.o: have_stdlib.h +sha1.o: have_string.h +sha1.o: longbits.h +sha1.o: nametype.h +sha1.o: qmath.h +sha1.o: sha1.c +sha1.o: sha1.h +sha1.o: str.h +sha1.o: value.h +sha1.o: zmath.h +size.o: alloc.h +size.o: block.h +size.o: byteswap.h +size.o: calcerr.h +size.o: cmath.h +size.o: config.h +size.o: decl.h +size.o: endian_calc.h +size.o: hash.h +size.o: have_const.h +size.o: have_memmv.h +size.o: have_newstr.h +size.o: have_stdlib.h +size.o: have_string.h +size.o: longbits.h +size.o: nametype.h +size.o: qmath.h +size.o: sha1.h +size.o: size.c +size.o: str.h +size.o: value.h +size.o: zmath.h +size.o: zrand.h +size.o: zrandom.h +str.o: alloc.h +str.o: block.h +str.o: byteswap.h +str.o: calc.h +str.o: calcerr.h +str.o: cmath.h +str.o: config.h +str.o: decl.h +str.o: endian_calc.h +str.o: hash.h +str.o: have_const.h +str.o: have_memmv.h +str.o: have_newstr.h +str.o: have_stdlib.h +str.o: have_string.h +str.o: longbits.h +str.o: nametype.h +str.o: qmath.h +str.o: sha1.h +str.o: str.c +str.o: str.h +str.o: value.h +str.o: zmath.h +symbol.o: alloc.h +symbol.o: block.h +symbol.o: byteswap.h +symbol.o: calc.h +symbol.o: calcerr.h +symbol.o: cmath.h +symbol.o: config.h +symbol.o: decl.h +symbol.o: endian_calc.h +symbol.o: func.h +symbol.o: hash.h +symbol.o: have_const.h +symbol.o: have_memmv.h +symbol.o: have_newstr.h +symbol.o: have_stdlib.h +symbol.o: have_string.h +symbol.o: label.h +symbol.o: longbits.h +symbol.o: nametype.h +symbol.o: opcodes.h +symbol.o: qmath.h +symbol.o: sha1.h +symbol.o: str.h +symbol.o: symbol.c +symbol.o: symbol.h +symbol.o: token.h +symbol.o: value.h +symbol.o: zmath.h +token.o: alloc.h +token.o: args.h +token.o: block.h +token.o: byteswap.h +token.o: calc.h +token.o: calcerr.h +token.o: cmath.h +token.o: config.h +token.o: decl.h +token.o: endian_calc.h +token.o: hash.h +token.o: have_const.h +token.o: have_memmv.h +token.o: have_newstr.h +token.o: have_stdlib.h +token.o: have_string.h +token.o: lib_calc.h +token.o: longbits.h +token.o: nametype.h +token.o: qmath.h +token.o: sha1.h +token.o: str.h +token.o: token.c +token.o: token.h +token.o: value.h +token.o: zmath.h +value.o: alloc.h +value.o: block.h +value.o: byteswap.h +value.o: calc.h +value.o: calcerr.h +value.o: cmath.h +value.o: config.h +value.o: decl.h +value.o: endian_calc.h +value.o: file.h +value.o: func.h +value.o: hash.h +value.o: have_const.h +value.o: have_fpos.h +value.o: have_memmv.h +value.o: have_newstr.h +value.o: have_stdlib.h +value.o: have_string.h +value.o: label.h +value.o: longbits.h +value.o: nametype.h +value.o: opcodes.h +value.o: qmath.h +value.o: sha1.h +value.o: str.h +value.o: symbol.h +value.o: value.c +value.o: value.h +value.o: zmath.h +value.o: zrand.h +value.o: zrandom.h +version.o: alloc.h +version.o: block.h +version.o: byteswap.h +version.o: calc.h +version.o: calcerr.h +version.o: cmath.h +version.o: config.h +version.o: decl.h +version.o: endian_calc.h +version.o: hash.h +version.o: have_const.h +version.o: have_memmv.h +version.o: have_newstr.h +version.o: have_stdlib.h +version.o: have_string.h +version.o: have_unused.h +version.o: longbits.h +version.o: nametype.h +version.o: qmath.h +version.o: sha1.h +version.o: str.h +version.o: value.h +version.o: version.c +version.o: zmath.h +zfunc.o: alloc.h +zfunc.o: byteswap.h +zfunc.o: decl.h +zfunc.o: endian_calc.h +zfunc.o: have_const.h +zfunc.o: have_memmv.h +zfunc.o: have_newstr.h +zfunc.o: have_stdlib.h +zfunc.o: have_string.h +zfunc.o: longbits.h +zfunc.o: zfunc.c +zfunc.o: zmath.h +zio.o: alloc.h +zio.o: args.h +zio.o: byteswap.h +zio.o: config.h +zio.o: decl.h +zio.o: endian_calc.h +zio.o: have_const.h +zio.o: have_memmv.h +zio.o: have_newstr.h +zio.o: have_stdlib.h +zio.o: have_string.h +zio.o: longbits.h +zio.o: nametype.h +zio.o: qmath.h +zio.o: zio.c +zio.o: zmath.h +zmath.o: alloc.h +zmath.o: byteswap.h +zmath.o: decl.h +zmath.o: endian_calc.h +zmath.o: have_const.h +zmath.o: have_memmv.h +zmath.o: have_newstr.h +zmath.o: have_stdlib.h +zmath.o: have_string.h +zmath.o: longbits.h +zmath.o: zmath.c +zmath.o: zmath.h +zmod.o: alloc.h +zmod.o: byteswap.h +zmod.o: config.h +zmod.o: decl.h +zmod.o: endian_calc.h +zmod.o: have_const.h +zmod.o: have_memmv.h +zmod.o: have_newstr.h +zmod.o: have_stdlib.h +zmod.o: have_string.h +zmod.o: longbits.h +zmod.o: nametype.h +zmod.o: qmath.h +zmod.o: zmath.h +zmod.o: zmod.c +zmul.o: alloc.h +zmul.o: byteswap.h +zmul.o: config.h +zmul.o: decl.h +zmul.o: endian_calc.h +zmul.o: have_const.h +zmul.o: have_memmv.h +zmul.o: have_newstr.h +zmul.o: have_stdlib.h +zmul.o: have_string.h +zmul.o: longbits.h +zmul.o: nametype.h +zmul.o: qmath.h +zmul.o: zmath.h +zmul.o: zmul.c +zprime.o: alloc.h +zprime.o: block.h +zprime.o: byteswap.h +zprime.o: calcerr.h +zprime.o: cmath.h +zprime.o: config.h +zprime.o: decl.h +zprime.o: endian_calc.h +zprime.o: hash.h +zprime.o: have_const.h +zprime.o: have_memmv.h +zprime.o: have_newstr.h +zprime.o: have_stdlib.h +zprime.o: have_string.h +zprime.o: jump.h +zprime.o: longbits.h +zprime.o: nametype.h +zprime.o: prime.h +zprime.o: qmath.h +zprime.o: sha1.h +zprime.o: str.h +zprime.o: value.h +zprime.o: zmath.h +zprime.o: zprime.c +zprime.o: zrand.h +zrand.o: alloc.h +zrand.o: block.h +zrand.o: byteswap.h +zrand.o: calcerr.h +zrand.o: cmath.h +zrand.o: config.h +zrand.o: decl.h +zrand.o: endian_calc.h +zrand.o: hash.h +zrand.o: have_const.h +zrand.o: have_memmv.h +zrand.o: have_newstr.h +zrand.o: have_stdlib.h +zrand.o: have_string.h +zrand.o: have_unused.h +zrand.o: longbits.h +zrand.o: nametype.h +zrand.o: qmath.h +zrand.o: sha1.h +zrand.o: str.h +zrand.o: value.h +zrand.o: zmath.h +zrand.o: zrand.c +zrand.o: zrand.h +zrandom.o: alloc.h +zrandom.o: block.h +zrandom.o: byteswap.h +zrandom.o: calcerr.h +zrandom.o: cmath.h +zrandom.o: config.h +zrandom.o: decl.h +zrandom.o: endian_calc.h +zrandom.o: hash.h +zrandom.o: have_const.h +zrandom.o: have_memmv.h +zrandom.o: have_newstr.h +zrandom.o: have_stdlib.h +zrandom.o: have_string.h +zrandom.o: have_unused.h +zrandom.o: longbits.h +zrandom.o: nametype.h +zrandom.o: qmath.h +zrandom.o: sha1.h +zrandom.o: str.h +zrandom.o: value.h +zrandom.o: zmath.h +zrandom.o: zrandom.c +zrandom.o: zrandom.h + +Makefile.simple: + ${Q} if [ ! -f Makefile.simple ]; then \ + ${CP} -f ${MAKE_FILE} $@; fi diff --git a/README b/README index 92e2809..1e21cf0 100644 --- a/README +++ b/README @@ -132,10 +132,10 @@ The calc web site is located at: ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: README,v 29.3 2001/06/01 11:26:53 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: README,v 30.1 2007/03/16 11:09:46 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/RCS/README,v $ ## ## Under source code control: 1995/10/25 05:27:59 diff --git a/README.WINDOWS b/README.WINDOWS index b48e90c..b9ed8bb 100644 --- a/README.WINDOWS +++ b/README.WINDOWS @@ -127,10 +127,10 @@ In particular: ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.13 $ -## @(#) $Id: README.WINDOWS,v 29.13 2007/02/11 10:23:28 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: README.WINDOWS,v 30.1 2007/03/16 11:09:46 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/RCS/README.WINDOWS,v $ ## ## Under source code control: 2001/02/25 14:00:05 diff --git a/addop.c b/addop.c index 4125b12..5a01456 100644 --- a/addop.c +++ b/addop.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.15 $ - * @(#) $Id: addop.c,v 29.15 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: addop.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/addop.c,v $ * * Under source code control: 1990/02/15 01:48:10 diff --git a/align32.c b/align32.c index 3ab64a2..c8174f0 100644 --- a/align32.c +++ b/align32.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: align32.c,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: align32.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/align32.c,v $ * * Under source code control: 1995/11/23 05:18:06 diff --git a/alloc.h b/alloc.h index 6ee4f4a..be36f07 100644 --- a/alloc.h +++ b/alloc.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.7 $ - * @(#) $Id: alloc.h,v 29.7 2007/02/12 03:57:00 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: alloc.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/alloc.h,v $ * * Under source code control: 1990/02/15 01:48:29 diff --git a/assocfunc.c b/assocfunc.c index 0b96006..5892831 100644 --- a/assocfunc.c +++ b/assocfunc.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: assocfunc.c,v 29.3 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: assocfunc.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/assocfunc.c,v $ * * Under source code control: 1993/07/20 23:04:27 diff --git a/blkcpy.c b/blkcpy.c index 3a2112f..17d0337 100644 --- a/blkcpy.c +++ b/blkcpy.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.12 $ - * @(#) $Id: blkcpy.c,v 29.12 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: blkcpy.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/blkcpy.c,v $ * * Under source code control: 1997/04/18 20:41:26 diff --git a/blkcpy.h b/blkcpy.h index 596fde6..7d3774f 100644 --- a/blkcpy.h +++ b/blkcpy.h @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: blkcpy.h,v 29.3 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: blkcpy.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/blkcpy.h,v $ * * Under source code control: 1997/04/18 20:41:25 diff --git a/block.c b/block.c index 56ceca7..5ff4bd3 100644 --- a/block.c +++ b/block.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: block.c,v 29.5 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: block.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/block.c,v $ * * Under source code control: 1997/02/27 00:29:40 diff --git a/block.h b/block.h index 107adca..1634eb0 100644 --- a/block.h +++ b/block.h @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: block.h,v 29.3 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: block.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/block.h,v $ * * Under source code control: 1997/02/21 05:03:39 diff --git a/byteswap.c b/byteswap.c index 4ea300b..e522cb9 100644 --- a/byteswap.c +++ b/byteswap.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: byteswap.c,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: byteswap.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/byteswap.c,v $ * * Under source code control: 1995/10/11 04:44:01 diff --git a/byteswap.h b/byteswap.h index b9dbc35..b740784 100644 --- a/byteswap.h +++ b/byteswap.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: byteswap.h,v 29.4 2001/06/08 21:00:58 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: byteswap.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/byteswap.h,v $ * * Under source code control: 1995/10/11 04:44:01 diff --git a/cal/Makefile b/cal/Makefile index 6b02530..ad1d472 100644 --- a/cal/Makefile +++ b/cal/Makefile @@ -16,10 +16,10 @@ # A copy of version 2.1 of the GNU Lesser General Public License is # distributed with calc under the filename COPYING-LGPL. You should have # received a copy with calc; if not, write to Free Software Foundation, Inc. -# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# @(#) $Revision: 29.24 $ -# @(#) $Id: Makefile,v 29.24 2006/09/18 13:13:25 chongo Exp $ +# @(#) $Revision: 30.2 $ +# @(#) $Id: Makefile,v 30.2 2007/03/22 07:34:47 chongo Exp $ # @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/Makefile,v $ # # Under source code control: 1991/07/21 05:00:54 @@ -34,13 +34,30 @@ # required vars # SHELL= /bin/sh -MAKE_FILE= Makefile #### # Normally, the upper level makefile will set these values. We provide # a default here just in case you want to build from this directory. #### +# Normally certain files depend on the Makefile. If the Makefile is +# changed, then certain steps should be redone. If MAKE_FILE is +# set to Makefile, then these files will depend on Makefile. If +# MAKE_FILE is empty, then they wont. +# +# If in doubt, set MAKE_FILE to Makefile +# +MAKE_FILE= Makefile + +# Controlling file makefile basename (without the path) +# +# This is the basename same of the makefile that may/does/will drive +# this makefile. +# +# If in doubt, set TOP_MAKE_FILE to Makefile +# +TOP_MAKE_FILE= Makefile + # Where the system include (.h) files are kept # # For DJGPP, select: @@ -254,7 +271,7 @@ echo_inst_files: clean: -clobber: +clobber: clean ${RM} -f .all # install everything diff --git a/cal/README b/cal/README index 4e776db..98126dd 100644 --- a/cal/README +++ b/cal/README @@ -1012,10 +1012,10 @@ xx_print.cal ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.16 $ -## @(#) $Id: README,v 29.16 2006/12/16 11:18:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: README,v 30.1 2007/03/16 11:09:54 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/README,v $ ## ## Under source code control: 1990/02/15 01:50:32 diff --git a/cal/alg_config.cal b/cal/alg_config.cal index ab2eeda..5bf002a 100644 --- a/cal/alg_config.cal +++ b/cal/alg_config.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.15 $ - * @(#) $Id: alg_config.cal,v 29.15 2006/12/16 11:18:46 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: alg_config.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/alg_config.cal,v $ * * Under source code control: 2006/06/07 14:10:11 diff --git a/cal/beer.cal b/cal/beer.cal index 43dded7..226cda5 100644 --- a/cal/beer.cal +++ b/cal/beer.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: beer.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: beer.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/beer.cal,v $ * * Under source code control: 1996/11/13 13:21:05 diff --git a/cal/bernoulli.cal b/cal/bernoulli.cal index 9f8d5b7..9bcd14b 100644 --- a/cal/bernoulli.cal +++ b/cal/bernoulli.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: bernoulli.cal,v 29.3 2000/12/17 12:26:04 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: bernoulli.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/bernoulli.cal,v $ * * Under source code control: 1991/09/30 11:18:41 diff --git a/cal/bigprime.cal b/cal/bigprime.cal index 678effd..3de4332 100644 --- a/cal/bigprime.cal +++ b/cal/bigprime.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: bigprime.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: bigprime.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/bigprime.cal,v $ * * Under source code control: 1991/05/22 21:56:32 diff --git a/cal/bindings b/cal/bindings index 62ab37e..ce09e0b 100644 --- a/cal/bindings +++ b/cal/bindings @@ -14,10 +14,10 @@ # A copy of version 2.1 of the GNU Lesser General Public License is # distributed with calc under the filename COPYING-LGPL. You should have # received a copy with calc; if not, write to Free Software Foundation, Inc. -# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# @(#) $Revision: 29.2 $ -# @(#) $Id: bindings,v 29.2 2000/06/07 14:02:25 chongo Exp $ +# @(#) $Revision: 30.1 $ +# @(#) $Id: bindings,v 30.1 2007/03/16 11:09:54 chongo Exp $ # @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/bindings,v $ # # Under source code control: 1993/05/02 20:09:19 diff --git a/cal/chi.cal b/cal/chi.cal index e105d61..974b6b5 100644 --- a/cal/chi.cal +++ b/cal/chi.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: chi.cal,v 29.2 2001/04/08 10:21:23 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: chi.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/chi.cal,v $ * * Under source code control: 2001/03/27 14:10:11 diff --git a/cal/chrem.cal b/cal/chrem.cal index a077b1f..fe0b8db 100644 --- a/cal/chrem.cal +++ b/cal/chrem.cal @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: chrem.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: chrem.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/chrem.cal,v $ * * Under source code control: 1992/09/26 01:00:47 diff --git a/cal/deg.cal b/cal/deg.cal index d129913..97af5ac 100644 --- a/cal/deg.cal +++ b/cal/deg.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: deg.cal,v 29.4 2003/01/26 19:32:41 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: deg.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/deg.cal,v $ * * Under source code control: 1990/02/15 01:50:33 diff --git a/cal/dotest.cal b/cal/dotest.cal index 1ce426f..4cc225d 100644 --- a/cal/dotest.cal +++ b/cal/dotest.cal @@ -16,8 +16,8 @@ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: dotest.cal,v 29.2 2006/05/21 00:55:27 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: dotest.cal,v 30.2 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/dotest.cal,v $ * * This file is not covered under version 2.1 of the GNU LGPL. diff --git a/cal/ellip.cal b/cal/ellip.cal index 55b9407..37dc41d 100644 --- a/cal/ellip.cal +++ b/cal/ellip.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: ellip.cal,v 29.4 2006/06/20 09:29:16 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: ellip.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/ellip.cal,v $ * * Under source code control: 1990/02/15 01:50:33 diff --git a/cal/hello.cal b/cal/hello.cal index 76d8366..9c862ce 100644 --- a/cal/hello.cal +++ b/cal/hello.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: hello.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: hello.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/hello.cal,v $ * * Under source code control: 1996/11/13 13:25:43 diff --git a/cal/intfile.cal b/cal/intfile.cal index ecc12af..a58c942 100644 --- a/cal/intfile.cal +++ b/cal/intfile.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: intfile.cal,v 29.5 2001/04/10 22:09:34 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: intfile.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/intfile.cal,v $ * * Under source code control: 2001/03/31 08:13:11 diff --git a/cal/linear.cal b/cal/linear.cal index 1e8501f..f1628ba 100644 --- a/cal/linear.cal +++ b/cal/linear.cal @@ -1,3 +1,33 @@ +/* + * linear - perform a simple two point 2D linear interpolation + * + * Copyright (C) 2005-2007 Landon Curt Noll + * + * Calc is open software; you can redistribute it and/or modify it under + * the terms of the version 2.1 of the GNU Lesser General Public License + * as published by the Free Software Foundation. + * + * Calc is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General + * Public License for more details. + * + * A copy of version 2.1 of the GNU Lesser General Public License is + * distributed with calc under the filename COPYING-LGPL. You should have + * received a copy with calc; if not, write to Free Software Foundation, Inc. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * @(#) $Revision: 30.2 $ + * @(#) $Id: linear.cal,v 30.2 2007/03/17 05:57:42 chongo Exp $ + * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/linear.cal,v $ + * + * Under source code control: 2005/12/12 06:41:50 + * File existed as early as: 2005 + * + * chongo /\oo/\ http://www.isthe.com/chongo/ + * Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ + */ + /* * linear - perform a simple two point 2D linear interpolation * diff --git a/cal/lucas.cal b/cal/lucas.cal index 07a6ec3..9b560f3 100644 --- a/cal/lucas.cal +++ b/cal/lucas.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.6 $ - * @(#) $Id: lucas.cal,v 29.6 2002/07/10 09:43:46 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: lucas.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/lucas.cal,v $ * * Under source code control: 1990/05/03 16:49:51 diff --git a/cal/lucas_chk.cal b/cal/lucas_chk.cal index fae015e..30f0a4d 100644 --- a/cal/lucas_chk.cal +++ b/cal/lucas_chk.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: lucas_chk.cal,v 29.3 2001/03/31 13:31:34 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: lucas_chk.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/lucas_chk.cal,v $ * * Under source code control: 1991/01/11 05:41:43 diff --git a/cal/lucas_tbl.cal b/cal/lucas_tbl.cal index d984168..1b74519 100644 --- a/cal/lucas_tbl.cal +++ b/cal/lucas_tbl.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: lucas_tbl.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: lucas_tbl.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/lucas_tbl.cal,v $ * * Under source code control: 1991/01/26 02:43:43 diff --git a/cal/mersenne.cal b/cal/mersenne.cal index 01be307..9fe23cc 100644 --- a/cal/mersenne.cal +++ b/cal/mersenne.cal @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: mersenne.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: mersenne.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/mersenne.cal,v $ * * Under source code control: 1991/05/22 21:56:36 diff --git a/cal/mfactor.cal b/cal/mfactor.cal index b89bc59..f90bd5c 100644 --- a/cal/mfactor.cal +++ b/cal/mfactor.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: mfactor.cal,v 29.3 2006/12/16 11:18:46 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: mfactor.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/mfactor.cal,v $ * * Under source code control: 1996/07/06 06:09:40 diff --git a/cal/mod.cal b/cal/mod.cal index 73f905e..baa6b5b 100644 --- a/cal/mod.cal +++ b/cal/mod.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: mod.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: mod.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/mod.cal,v $ * * Under source code control: 1990/02/15 01:50:34 diff --git a/cal/natnumset.cal b/cal/natnumset.cal index b275e2d..32231b2 100644 --- a/cal/natnumset.cal +++ b/cal/natnumset.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: natnumset.cal,v 29.3 2006/05/01 19:19:46 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: natnumset.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/natnumset.cal,v $ * * Under source code control: 1997/09/07 23:53:51 diff --git a/cal/pell.cal b/cal/pell.cal index 88df348..cf28698 100644 --- a/cal/pell.cal +++ b/cal/pell.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: pell.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: pell.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/pell.cal,v $ * * Under source code control: 1990/02/15 01:50:34 diff --git a/cal/pi.cal b/cal/pi.cal index 2aee7b4..e542120 100644 --- a/cal/pi.cal +++ b/cal/pi.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: pi.cal,v 29.5 2004/02/23 14:04:01 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: pi.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/pi.cal,v $ * * Under source code control: 1991/05/22 21:56:37 diff --git a/cal/pix.cal b/cal/pix.cal index 982dd18..2fdae45 100644 --- a/cal/pix.cal +++ b/cal/pix.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: pix.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: pix.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/pix.cal,v $ * * Under source code control: 1996/07/09 03:14:14 diff --git a/cal/pollard.cal b/cal/pollard.cal index 5a26d72..1978a88 100644 --- a/cal/pollard.cal +++ b/cal/pollard.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: pollard.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: pollard.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/pollard.cal,v $ * * Under source code control: 1991/05/22 21:56:37 diff --git a/cal/poly.cal b/cal/poly.cal index 4c83ab3..0e5a9f4 100644 --- a/cal/poly.cal +++ b/cal/poly.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: poly.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: poly.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/poly.cal,v $ * * Under source code control: 1990/02/15 01:50:35 diff --git a/cal/prompt.cal b/cal/prompt.cal index 3535dd0..b47a554 100644 --- a/cal/prompt.cal +++ b/cal/prompt.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: prompt.cal,v 29.3 2006/06/20 09:29:16 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: prompt.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/prompt.cal,v $ * * Under source code control: 1995/12/18 04:43:25 diff --git a/cal/psqrt.cal b/cal/psqrt.cal index 55454c2..420af7a 100644 --- a/cal/psqrt.cal +++ b/cal/psqrt.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: psqrt.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: psqrt.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/psqrt.cal,v $ * * Under source code control: 1990/02/15 01:50:35 diff --git a/cal/qtime.cal b/cal/qtime.cal index 7ea2546..a88a566 100644 --- a/cal/qtime.cal +++ b/cal/qtime.cal @@ -18,10 +18,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: qtime.cal,v 29.4 2000/12/18 10:18:40 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: qtime.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/qtime.cal,v $ * * Under source code control: 1999/10/13 04:10:33 diff --git a/cal/quat.cal b/cal/quat.cal index bfc8c21..95dc371 100644 --- a/cal/quat.cal +++ b/cal/quat.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: quat.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: quat.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/quat.cal,v $ * * Under source code control: 1990/02/15 01:50:35 diff --git a/cal/randbitrun.cal b/cal/randbitrun.cal index 3452a2e..1bbd2c6 100644 --- a/cal/randbitrun.cal +++ b/cal/randbitrun.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: randbitrun.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: randbitrun.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/randbitrun.cal,v $ * * Under source code control: 1995/02/13 03:43:11 diff --git a/cal/randmprime.cal b/cal/randmprime.cal index c094f37..2607962 100644 --- a/cal/randmprime.cal +++ b/cal/randmprime.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: randmprime.cal,v 29.3 2006/12/16 11:18:46 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: randmprime.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/randmprime.cal,v $ * * Under source code control: 1994/03/14 23:11:21 diff --git a/cal/randombitrun.cal b/cal/randombitrun.cal index d745b8a..079b29a 100644 --- a/cal/randombitrun.cal +++ b/cal/randombitrun.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: randombitrun.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: randombitrun.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/randombitrun.cal,v $ * * Under source code control: 1995/02/13 03:43:11 diff --git a/cal/randomrun.cal b/cal/randomrun.cal index f070107..8c2b2c3 100644 --- a/cal/randomrun.cal +++ b/cal/randomrun.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: randomrun.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: randomrun.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/randomrun.cal,v $ * * Under source code control: 1997/02/19 03:35:59 diff --git a/cal/randrun.cal b/cal/randrun.cal index 04a3903..76e88f0 100644 --- a/cal/randrun.cal +++ b/cal/randrun.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: randrun.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: randrun.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/randrun.cal,v $ * * Under source code control: 1995/02/12 20:00:06 diff --git a/cal/regress.cal b/cal/regress.cal index 52c2ee4..01c6fac 100644 --- a/cal/regress.cal +++ b/cal/regress.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.36 $ - * @(#) $Id: regress.cal,v 29.36 2006/12/16 11:18:46 chongo Exp $ + * @(#) $Revision: 30.3 $ + * @(#) $Id: regress.cal,v 30.3 2007/07/11 22:58:26 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/regress.cal,v $ * * Under source code control: 1990/02/15 01:50:36 @@ -596,12 +596,18 @@ print '012: parsed squarecheck(a, b, str)'; define powercheck(a, p1, p2, str) { local a1, a2, a3; + local b1, b2, b3; a1 = (a^p1)^p2; a2 = (a^p2)^p1; a3 = a^(p1*p2); + b1 = (a**p1)**p2; + b2 = (a**p2)**p1; + b3 = a**(p1*p2); if (a1 != a2) {print '**** (a^p1)^p2 != (a^p2)^p1:', str; ++prob;} if (a1 != a3) {print '**** (a^p1)^p2 != a^(p1*p2):', str; ++prob;} + if (b1 != b2) {print '**** (b^p1)^p2 != (b^p2)^p1:', str; ++prob;} + if (b1 != b3) {print '**** (b^p1)^p2 != b^(p1*p2):', str; ++prob;} print str; } print '013: parsed powercheck(a, p1, p2, str)'; @@ -3259,7 +3265,7 @@ define test_error() '3654: scale(3,2^31) == error(10034)'); vrfy("x" ^ 3 == error(10035), '3655: "x" ^ 3 == error(10035)'); vrfy(2 ^ "x" == error(10036), '3656: 2 ^ "x" == error(10036)'); - vrfy(2 ^ 2.5 == error(10036), '3657: 2 ^ 2.5 == error(10036)'); + vrfy(2 ^ "2" == error(10036), '3657: 2 ^ "2" == error(10036)'); vrfy(power("x",2.1) == error(10037), '3658: power("x",2.1) == error(10037)'); vrfy(power(2,"x") == error(10038), @@ -5320,7 +5326,7 @@ define test_is() local nerr; /* new error value */ local odd; /* odd integer */ local even; /* even integer that is 10 times odd */ - local hash; /* sha hash value */ + local hash; /* sha1 hash value */ local id; /* identity matrix */ local list; /* list value */ local matrix; /* non-identity matrix */ @@ -5375,8 +5381,8 @@ define test_is() print '5911: odd = 23209'; even = odd*10; print '5912: even = odd*10'; - hash = sha(); - print '5913: hash = sha()'; + hash = sha1(); + print '5913: hash = sha1()'; mat id[3,3] = {1,0,0,0,1,0,0,0,1}; print '5914: id[3,3] = {1,0,0,0,1,0,0,0,1}'; list = list(2,3,4); @@ -5699,7 +5705,7 @@ define test_is() vrfy(ishash(nerr) == 0, '6178: ishash(nerr) == 0'); vrfy(ishash(odd) == 0, '6179: ishash(odd) == 0'); vrfy(ishash(even) == 0, '6180: ishash(even) == 0'); - vrfy(ishash(hash) == 1, '6181: ishash(hash) == 1'); + vrfy(ishash(hash) == 2, '6181: ishash(hash) == 2'); vrfy(ishash(id) == 0, '6182: ishash(id) == 0'); vrfy(ishash(list) == 0, '6183: ishash(list) == 0'); vrfy(ishash(matrix) == 0, '6184: ishash(matrix) == 0'); @@ -6792,108 +6798,6 @@ define test_blkprintf() print '172: parsed test_blkprintf()'; -/* - * test_sha - test the sha hash - */ -define test_sha() -{ - local a, b, c, d, e, f, x, y, z, L, M, B1, B2, B; - - print '7100: Beginning test_sha'; - y = sha(); - print '7101: y = sha();'; - z = sha(); - print '7102: z = sha();'; - vrfy(y == z, '7103: y == z'); - vrfy(sha("") == y, '7104: sha("") == y'); - y = sha(y,1); - print '7105: y = sha(y,1);'; - vrfy(y == sha(1), '7106: y == sha(1)'); - vrfy(sha(y,2) == sha(1,2), '7107: sha(y,2) == sha(1,2)'); - - vrfy(sha(sha()) == 0xf96cea198ad1dd5617ac084a3d92c6107708c0ef, - '7108: sha(sha()) == 0xf96cea198ad1dd5617ac084a3d92c6107708c0ef'); - - vrfy(sha(sha("a"))==0x37f297772fae4cb1ba39b6cf9cf0381180bd62f2, - '7109: sha(sha("a"))==0x37f297772fae4cb1ba39b6cf9cf0381180bd62f2'); - - vrfy(sha(sha("ab"))==0x488373d362684af3d3f7a6a408b59dfe85419e09, - '7110: sha(sha("ab"))==0x488373d362684af3d3f7a6a408b59dfe85419e09'); - vrfy(sha(sha("abc"))==0x0164b8a914cd2a5e74c4f7ff082c4d97f1edf880, - '7111: sha(sha("abc"))==0x0164b8a914cd2a5e74c4f7ff082c4d97f1edf880'); - vrfy(sha(sha("abcd"))==0x082c73b06f71185d840fb4b28eb3abade67714bc, - '7112: sha(sha("abcd"))==0x082c73b06f71185d840fb4b28eb3abade67714bc'); - vrfy(sha(sha("abcde"))==0xd624e34951bb800f0acae773001df8cffe781ba8, - '7113: sha(sha("abcde"))==0xd624e34951bb800f0acae773001df8cffe781ba8'); - vrfy(sha(sha("abcdef"))==0x2a589f7750598dc0ea0a608719e04327f609279a, - '7114: sha(sha("abcdef"))==0x2a589f7750598dc0ea0a608719e04327f609279a'); - vrfy(sha(sha("abcdefg"))==0x5bdf01f9298e9d19d3f8d15520fd74eed600b497, - '7115: sha(sha("abcdefg"))==0x5bdf01f9298e9d19d3f8d15520fd74eed600b497'); - vrfy(sha(sha("abcdefgh"))==0x734ba8b31975d0dbae4d6e249f4e8da270796c94, - '7116: sha(sha("abcdefgh"))==0x734ba8b31975d0dbae4d6e249f4e8da270796c94'); - - vrfy(sha(sha(1)) == 0x864c8d09e828c7c31d62693736a5a9302c282777, - '7117: sha(sha(1)) == 0x864c8d09e828c7c31d62693736a5a9302c282777'); - - vrfy(sha(sha(2)) == 0x2c0b59c512cb20fad6bb0883b69c9f5a46545808, - '7118: sha(sha(2)) == 0x2c0b59c512cb20fad6bb0883b69c9f5a46545808'); - - vrfy(sha(sha(22/7))==0x7ddb7f8a7e9d70757f157744fddea7a6c6a6bcc6, - '7119: sha(sha(22/7)==0x7ddb7f8a7e9d70757f157744fddea7a6c6a6bcc6'); - vrfy(sha(sha(isqrt(2e1000))) == - 0x6db8d9cf0b018b8f9cbbf5aa1edb8066d19e1bb0, - '7120: sha(sha(isqrt(2e1000)==0x6db8d9cf0b018b8f9cbbf5aa1edb8066d19e1bb0'); - vrfy(sha("x", "y", "z") == sha("xyz"), - '7121: sha("x", "y", "z") == sha("xyz")'); - - vrfy(sha(sha("this is", 7^19-8, "a composit", 3i+4.5, "hash")) == - 0x21e42319a26787046c2b28b7ae70f1b54bf0ba2a, - '7122: sha(sha("this is", 7^19-8, ..., "hash")) == 0x21e4...'); - - z = sha(list(1,2,3), "curds and whey", 2^21701-1, pi(1e-100)); - print '7123: z = sha(list(1,2,3), "curds and whey", 2^21701-1, pi(1e-100));'; - vrfy(sha(z) == 257075527903934749824451356785709876382198951165, - '7124: sha(z) == 257075527903934749824451356785709876382198951165'); - - y = sha(); - print '7125: y = sha()'; - y = sha(y, list(1,2,3), "curds and whey"); - print '7126: y = sha(y, list(1,2,3), "curds and whey")'; - y = sha(y, 2^21701-1); - print '7127: y = sha(y, 2^21701-1)'; - y = sha(y, pi(1e-100)); - print '7128: y = sha(y, pi(1e-100))'; - vrfy(y == z, '7129: y == z'); - - B = blk() = {"a", "b", "c"}; - print '7130: B = blk() = {"a", "b", "c"};'; - vrfy(sha(B) == sha("abc"), '7131: sha(B) == sha("abc")'); - - B1 = blk() = {1,2,3,4}; - print '7132: B1 = blk() = {1,2,3,4};'; - B2 = blk() = {5,6,7,8}; - print '7133: B2 = blk() = {5,6,7,8};'; - B = blk() = {1,2,3,4,5,6,7,8}; - print '7134: B = blk() = {1,2,3,4,5,6,7,8};'; - - vrfy(sha(B1, B2) == sha(B), '7135: sha(B1, B2) == sha(B)'); - vrfy(sha(B[1], B[3], B[5]) == sha("\02\04\06"), - '7136: sha(B[1], B[3], B[5]) == sha("\02\04\06")'); - - L = list(1,2,3); - print '7137: L = list(1,2,3)'; - mat M[3] = {4,5,6}; - print '7138: mat M[3] = {4,5,6}'; - vrfy(sha(sha(L), M, B) == sha(L, M, B), - '7139: sha(sha(L), M, B) == sha(L, M, B)'); - vrfy(sha(sha(L,M), B) == sha(L, M, B), - '7140: sha(sha(L, M), B) == sha(L, M, B)'); - - print '7141: Ending test_sha'; -} -print '173: parsed test_sha()'; - - /* * test_sha1 - test the sha1 hash */ @@ -6979,88 +6883,6 @@ define test_sha1() print '174: parsed test_sha1()'; -/* - * test_md5 - test the md5 hash - */ -define test_md5() -{ - local a, b, c, d, e, f, x, y, z, L, M, B; - - print '7300: Beginning test_md5'; - y = md5(); - print '7301: y = md5();'; - z = md5(); - print '7302: z = md5();'; - vrfy(y == z, '7303: y == z'); - y = md5(y,1); - print '7304: y = md5(y,1);'; - z = md5(1); - print '7305: z = md5(1);'; - vrfy(y == z, '7306: y == z'); - vrfy(md5(z,2) == md5(1,2), '7307: md5(z,2) == md5(1,2)'); - - vrfy(md5(md5()) == 0xd41d8cd98f00b204e9800998ecf8427e, - '7308: md5(md5()) == 0xd41d8cd98f00b204e9800998ecf8427e'); - vrfy(md5("x", "y", "z") == md5("xyz"), - '7309: md5("x", "y", "z") == md5("xyz")'); - - vrfy(md5(md5("this is", 7^19-8, "a composit", 3i+4.5, "hash")) == - 0x39a5a8e24a2eb65a51af462c8bdd5e3, - '7310: md5(md5("this is", 7^19-8, "a composit", 3i+4.5, "hash")) == ...'); - - - z = md5(list(1,2,3), "curds and whey", 2^21701-1, pi(1e-100)); - print '7311: z = md5(list(1,2,3), "curds and whey", 2^21701-1, pi(1e-100));'; - vrfy(md5(z) == 0x487462e577eabef0302dd13af6632546, - '7312: md5(z) == 0x487462e577eabef0302dd13af6632546'); - y = md5(); - print '7313: y = md5();'; - y = md5(y, list(1,2,3), "curds and whey"); - print '7314: y = md5(y, list(1,2,3), "curds and whey")'; - y = md5(y, 2^21701-1); - print '7315: y = md5(y, 2^21701-1);'; - y = md5(y, pi(1e-100)); - print '7316: y = md5(y, pi(1e-100));'; - vrfy(y == z, '7317: y == z'); - - vrfy(md5(md5("a")) == 0x0cc175b9c0f1b6a831c399e269772661, - '7318: md5(md5("a")) == 0x0cc175b9c0f1b6a831c399e269772661'); - vrfy(md5(md5("ab")) == 0x187ef4436122d1cc2f40dc2b92f0eba0, - '7319: md5(md5("ab")) == 0x187ef4436122d1cc2f40dc2b92f0eba0'); - vrfy(md5(md5("abc")) == 0x900150983cd24fb0d6963f7d28e17f72, - '7320: md5(md5("abc")) == 0x900150983cd24fb0d6963f7d28e17f72'); - vrfy(md5(md5("abcd")) == 0xe2fc714c4727ee9395f324cd2e7f331f, - '7321: md5(md5("abcd")) == 0xe2fc714c4727ee9395f324cd2e7f331f'); - vrfy(md5(md5("abcde")) == 0xab56b4d92b40713acc5af89985d4b786, - '7322: md5(md5("abcde")) == 0xab56b4d92b40713acc5af89985d4b786'); - vrfy(md5(md5("abcdef")) == 0xe80b5017098950fc58aad83c8c14978e, - '7323: md5(md5("abcdef")) == 0xe80b5017098950fc58aad83c8c14978e'); - vrfy(md5(md5("abcdefg")) == 0x7ac66c0f148de9519b8bd264312c4d64, - '7324: md5(md5("abcdefg")) == 0x7ac66c0f148de9519b8bd264312c4d64'); - vrfy(md5(md5("abcdefgh")) == 0xe8dc4081b13434b45189a720b77b6818, - '7325: md5(md5("abcdefgh")) == 0xe8dc4081b13434b45189a720b77b6818'); - vrfy(md5(md5(1)) == 0x44fe7987067ac45311c88772038f60d1, - '7326: md5(md5(1)) == 0x44fe7987067ac45311c88772038f60d1'); - vrfy(md5(md5(22/7)) == 0x9274b951e1dfb9cba22af1c127daa8e7, - '7327: md5(md5(22/7) == 0x9274b951e1dfb9cba22af1c127daa8e7'); - vrfy(md5(md5(isqrt(2e1000))) == 0xe56ac4b8cad869e738a04fedc97058f3, - '7328: md5(md5(isqrt(2e1000))) == 0xe56ac4b8cad869e738a04fedc97058f3'); - L = list(1,2,3); - print '7329: L = list(1,2,3)'; - mat M[3] = {4,5,6}; - print '7330: mat M[3] = {4,5,6}'; - B = blk() = {7,8,9}; - print '7331: B = blk() = {7,8,9}'; - vrfy(md5(md5(L), M, B) == md5(L, M, B), - '7332: md5(md5(L), M, B) == md5(L, M, B)'); - vrfy(md5(md5(L,M), B) == md5(L, M, B), - '7333: md5(md5(L, M), B) == md5(L, M, B)'); - - print '7334: Ending test_md5'; -} -print '175: parsed test_md5()'; - - /* * The 7400's contain tests for saveval and dot. These tests are * done inline near the bottom. @@ -7593,6 +7415,85 @@ define test_somenew() print '190: parsed test_somenew()'; +/* + * test_exponentiation - test new exponentiation functionaltiy + */ +define test_exponentiation() +{ + local a; + + print '8800: Starting test_somenew'; + + /* unexpected help file cases */ + vrfy(2^3 == 8, '8801: 2^3 == 8'); + vrfy(2.5 ^ 3.5 == power(2.5, 3.5), + '8802: 2.5 ^ 3.5 == power(2.5, 3.5)'); + vrfy(2.5 ^ 2.718i == power(2.5, 2.718i), + '8803: 2.5 ^ 2.718i == power(2.5, 2.718i)'); + vrfy(3i^4 == 81, '8804: 3i^4 == 81'); + vrfy(0.5i ^ 0.25 == power(0.5i, 0.25), + '8804: 0.5i ^ 0.25 == power(0.5i, 0.25)'); + vrfy(3.13145i^0.30103i == power(3.13145i, 0.30103i), + '8806: 3.13145i^0.30103i == power(3.13145i, 0.30103i)'); + + /* deal with some corner error cases */ + ecnt += 12; + print '8807: ecnt += 2'; + vrfy((1/0) ^ -1 == 0, '8808: (1/0) ^ -1 == 0'); + vrfy((1/0) ^ -2 == 0, '8809: (1/0) ^ -2 == 0'); + vrfy((1/0) ^ 0 == error(10001), '8810: (1/0) ^ 0 == error(10001)'); + vrfy((1/0) ^ 3 == error(10001), '8811: (1/0) ^ 3 == error(10001)'); + vrfy(0 ^ -2 == error(10001), '8812: 0 ^ -2 == error(10001)'); + vrfy((1/0) ^ 1i == error(10001),'8813: (1/0) ^ 1i == error(10001)'); + vrfy((1/0) ^ 0i == error(10001),'8814: (1/0) ^ 0i == error(10001)'); + + /* real ^ real */ + vrfy(5^6 == 15625, '8815: 5^6 == 15625'); + vrfy(10^31 == 1e31, '8816: 10^31 == 1e31'); + vrfy(10 ^ (127/31) == power(10, 127/31), + '8817: 10 ^ (127/31) == power(10, 127/31)'); + vrfy((10^31) ^ 10 == 1e310, '8818: (10^31) ^ 10 == 1e310'); + + /* complex ^ real */ + vrfy(10i ^ 10 == -1e10, '8819: 10i ^ 10 == -1e10'); + vrfy((-10i) ^ 10 == -1e10, '8820: (-10i) ^ 10 == -1e10'); + vrfy((1+1i) ^ 4 == -4, '8821: (1+1i) ^ 4 == -4'); + vrfy((1+1i) ^ 65536 == 2^32768, '8822: (1+1i) ^ 65536 == 2^32768'); + vrfy((1+1i) ^ (2^20) == 2^(2^19), + '8823: (1+1i) ^ (2^20) == 2^(2^19)'); + vrfy((31+17i) ^ pi() == power(31+17i, pi()), + '8824: (31+17i) ^ pi() == power(31+17i, pi()'); + vrfy((5+7i) ^ exp(5) == power(5+7i, exp(5)), + '8825: (5+7i) ^ exp(5) == power(5+7i, exp(5))'); + + /* real ^ complex */ + vrfy(10 ^ 1i == power(10, 1i), '8826: 10 ^ 1i == power(10, 1i)'); + vrfy(10 ^ (2+3i) == power(10, 2+3i), + '8827: 10 ^ (2+3i) == power(10, 2+3i)'); + vrfy(pi() ^ (2+3i) == power(pi(), 2+3i), + '8828: pi() ^ (2+3i) == power(pi(), 2+3i)'); + vrfy(exp(64) ^ (2+3i) == power(exp(64), 2+3i), + '8828: exp(64) ^ (2+3i) == power(exp(64), 2+3i)'); + vrfy(pi() ^ (257+127i) == power(pi(), 257+127i), + '8829: pi() ^ (257+127i) == power(pi(), 257+127i)'); + vrfy(pi() ^ asin(-2) == power(pi(), asin(-2)), + '8830: pi() ^ asin(-2) == power(pi(), asin(-2)'); + + /* complex ^ complex */ + vrfy((3+4i) ^ (2+3i) == power(3+4i, 2+3i), + '8831: (3+4i) ^ (2+3i) == power(3+4i, 2+3i)'); + vrfy(ln(-10) ^ (2+3i) == power(ln(-10), 2+3i), + '8832: ln(-10) ^ (2+3i) == power(ln(-10), 2+3i)'); + vrfy((pi()*1i) ^ asin(-2) == power(pi()*1i, asin(-2)), + '8833: (pi()*1i) ^ asin(-2) == power(pi()*1i, asin(-2))'); + vrfy((exp(1)+pi()*1i) ^ asin(-2) == power(exp(1)+pi()*1i, asin(-2)), + '8834: (exp(1)+pi()*1i) ^ asin(-2) == power(exp(1)+pi()*1i, asin(-2))'); + + print '8835: Ending test_somenew'; +} +print '191: parsed test_exponentiation()'; + + /* * test_quit - test the QUIT functionality */ @@ -7820,12 +7721,8 @@ return test_name(); print; return test_blkprintf(); print; -return test_sha(); -print; return test_sha1(); print; -return test_md5(); -print; print '7400: Beginning test_savedot'; print '7401: saveval(1);'; @@ -7964,6 +7861,14 @@ vrfy(dotest("set8700.line", 8703) == 0, /* 87xx: Ending dotest runs is printed by set8700.test */ +/* + * new exponentiation functionaltiy + */ +print; +return test_exponentiation(); +/* 88xx: test exponentiation */ + + /* * read various calc resource files * diff --git a/cal/repeat.cal b/cal/repeat.cal index ec91f31..257c716 100644 --- a/cal/repeat.cal +++ b/cal/repeat.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: repeat.cal,v 29.4 2003/01/26 19:42:03 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: repeat.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/repeat.cal,v $ * * Under source code control: 2003/01/05 00:00:01 diff --git a/cal/screen.cal b/cal/screen.cal index c0d3af9..133045a 100644 --- a/cal/screen.cal +++ b/cal/screen.cal @@ -15,8 +15,8 @@ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: screen.cal,v 29.2 2006/05/01 19:21:18 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: screen.cal,v 30.2 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/screen.cal,v $ * * This file is not covered under version 2.1 of the GNU LGPL. diff --git a/cal/seedrandom.cal b/cal/seedrandom.cal index df8f590..eccf98a 100644 --- a/cal/seedrandom.cal +++ b/cal/seedrandom.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: seedrandom.cal,v 29.3 2001/03/31 13:31:34 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: seedrandom.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/seedrandom.cal,v $ * * Under source code control: 1996/01/01 08:21:00 diff --git a/cal/set8700.cal b/cal/set8700.cal index 7aef2ca..00ce92e 100644 --- a/cal/set8700.cal +++ b/cal/set8700.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: set8700.cal,v 29.2 2006/08/20 16:16:11 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: set8700.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/set8700.cal,v $ * * Under source code control: 2006/05/20 14:10:11 diff --git a/cal/set8700.line b/cal/set8700.line index eebbe31..69afd34 100644 --- a/cal/set8700.line +++ b/cal/set8700.line @@ -15,10 +15,10 @@ ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: set8700.line,v 29.4 2006/08/20 16:16:11 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: set8700.line,v 30.1 2007/03/16 11:09:54 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/set8700.line,v $ ## ## Under source code control: 2006/05/20 14:10:11 diff --git a/cal/solve.cal b/cal/solve.cal index ff51db4..1abc1c5 100644 --- a/cal/solve.cal +++ b/cal/solve.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: solve.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: solve.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/solve.cal,v $ * * Under source code control: 1990/02/15 01:50:37 diff --git a/cal/sumsq.cal b/cal/sumsq.cal index f811c2f..9329b5e 100644 --- a/cal/sumsq.cal +++ b/cal/sumsq.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: sumsq.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: sumsq.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/sumsq.cal,v $ * * Under source code control: 1990/02/15 01:50:37 diff --git a/cal/sumtimes.cal b/cal/sumtimes.cal index 512a992..25c57f7 100644 --- a/cal/sumtimes.cal +++ b/cal/sumtimes.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: sumtimes.cal,v 29.2 2006/12/16 11:18:46 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: sumtimes.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/sumtimes.cal,v $ * * Under source code control: 2006/06/22 17:29 diff --git a/cal/surd.cal b/cal/surd.cal index 2444a19..8e2c28b 100644 --- a/cal/surd.cal +++ b/cal/surd.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: surd.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: surd.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/surd.cal,v $ * * Under source code control: 1990/02/15 01:50:38 diff --git a/cal/test1700.cal b/cal/test1700.cal index 039f58f..4af27b4 100644 --- a/cal/test1700.cal +++ b/cal/test1700.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: test1700.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: test1700.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test1700.cal,v $ * * Under source code control: 1994/03/14 23:12:51 diff --git a/cal/test2300.cal b/cal/test2300.cal index a0e7ed4..81a169b 100644 --- a/cal/test2300.cal +++ b/cal/test2300.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: test2300.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: test2300.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test2300.cal,v $ * * Under source code control: 1995/07/09 06:12:13 diff --git a/cal/test2600.cal b/cal/test2600.cal index e4b3e62..43ee496 100644 --- a/cal/test2600.cal +++ b/cal/test2600.cal @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: test2600.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: test2600.cal,v 30.2 2007/07/11 22:57:23 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test2600.cal,v $ * * Under source code control: 1995/10/13 00:13:14 @@ -313,6 +313,102 @@ define testpower(str, n, b, eps, verbose) } +define testpower2(str, n, eps, verbose) +{ + local i, a, c, m, min, max; + local b; + local num; + local c2; + local oldeps; + + if (isnull(verbose)) verbose = 2; + if (verbose > 0) { + print str:":",:; + } + if (isnull(eps)) + eps = epsilon(); + oldeps = epsilon(eps); + epsilon(eps),; + if (!isnum(b)) + quit "Second argument (exponent) to be a number"; + min = 1000; + max = -1000; + for (i = 1; i <= n; i++) { + if (verbose > 2) print i,:; + + /* real ^ real */ + a = rand(1,1e20); + a = a / (int(a/2)+rand(1,1e20)); + b = rand(1,1e20); + b = b / (int(b/2)+rand(1,1e20)); + c = a ^ b; + c2 = power(a, b); + if (c != c2) { + m++; + if (verbose > 1) { + printf("*** real^real failure for a = %d\n", a); + } + } + + /* complex ^ real */ + a = rand(1,1e20); + a = a / (int(a/2)+rand(1,1e20)); + b = rand(1,1e20); + b = b / (int(b/2)+rand(1,1e20)); + c = (a*1i) ^ b; + c2 = power(a*1i, b); + if (c != c2) { + m++; + if (verbose > 1) { + printf("*** comp^real failure for a = %d\n", a); + } + } + + /* real ^ complex */ + a = rand(1,1e20); + a = a / (int(a/2)+rand(1,1e20)); + b = rand(1,1e20); + b = b / (int(b/2)+rand(1,1e20)); + c = a ^ (b*1i); + c2 = power(a, b*1i); + if (c != c2) { + m++; + if (verbose > 1) { + printf("*** real^comp failure for a = %d\n", a); + } + } + + /* complex ^ complex */ + a = rand(1,1e20); + a = a / (int(a/2)+rand(1,1e20)); + b = rand(1,1e20); + b = b / (int(b/2)+rand(1,1e20)); + c = (a*1i) ^ (b*1i); + c2 = power(a*1i, b*1i); + if (c != c2) { + m++; + if (verbose > 1) { + printf("*** comp^comp failure for a = %d\n", a); + } + } + } + epsilon(oldeps),; + if (verbose > 0) { + if (m) { + printf("*** %d error(s)\n", m); + printf(" %s: rem/eps min=%d, max=%d\n", + str, min, max); + } else { + printf("no errors\n"); + } + } + if (verbose > 1) { + printf(" %s: rem/eps min=%0.4d, max=%0.4d\n", str, min, max); + } + return m; +} + + define cpow(a, b, eps) /* Find rem/eps for power(a,b,eps) */ { local v, v1, c, n, d, h; @@ -504,6 +600,7 @@ define test2600(verbose, tnum) err += testsqrt(strcat(str(tnum++),": sqrt",str(i)), n*10, ep, verbose); } + err += testpower2(strcat(str(tnum++),": power"), n*4, ep, verbose); if (verbose > 1) { if (err) { print "***", err, "error(s) found in test2600"; diff --git a/cal/test2700.cal b/cal/test2700.cal index 8684030..93598f6 100644 --- a/cal/test2700.cal +++ b/cal/test2700.cal @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: test2700.cal,v 29.4 2006/06/25 22:06:23 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: test2700.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test2700.cal,v $ * * Under source code control: 1995/11/01 22:52:25 diff --git a/cal/test3100.cal b/cal/test3100.cal index f2e3bc7..4a2d7fc 100644 --- a/cal/test3100.cal +++ b/cal/test3100.cal @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: test3100.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: test3100.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test3100.cal,v $ * * Under source code control: 1995/11/28 11:56:57 diff --git a/cal/test3300.cal b/cal/test3300.cal index 1b0dd82..b1c506d 100644 --- a/cal/test3300.cal +++ b/cal/test3300.cal @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: test3300.cal,v 29.5 2006/12/16 11:19:45 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: test3300.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test3300.cal,v $ * * Under source code control: 1995/12/02 04:27:41 diff --git a/cal/test3400.cal b/cal/test3400.cal index a1c6207..c501261 100644 --- a/cal/test3400.cal +++ b/cal/test3400.cal @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: test3400.cal,v 29.3 2006/06/20 09:29:16 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: test3400.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test3400.cal,v $ * * Under source code control: 1995/12/02 05:20:11 diff --git a/cal/test3500.cal b/cal/test3500.cal index 337e1e6..c57c22f 100644 --- a/cal/test3500.cal +++ b/cal/test3500.cal @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: test3500.cal,v 29.3 2006/06/20 09:29:16 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: test3500.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test3500.cal,v $ * * Under source code control: 1995/12/18 22:50:46 diff --git a/cal/test4000.cal b/cal/test4000.cal index 5c15e53..6522143 100644 --- a/cal/test4000.cal +++ b/cal/test4000.cal @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: test4000.cal,v 29.4 2006/12/16 11:18:46 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: test4000.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test4000.cal,v $ * * Under source code control: 1996/03/13 02:38:45 diff --git a/cal/test4100.cal b/cal/test4100.cal index 41246a6..c8736e9 100644 --- a/cal/test4100.cal +++ b/cal/test4100.cal @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: test4100.cal,v 29.5 2006/12/16 11:18:46 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: test4100.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test4100.cal,v $ * * Under source code control: 1996/03/13 03:53:22 diff --git a/cal/test4600.cal b/cal/test4600.cal index 032e94e..316f7f0 100644 --- a/cal/test4600.cal +++ b/cal/test4600.cal @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: test4600.cal,v 29.5 2006/06/20 09:29:16 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: test4600.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test4600.cal,v $ * * Under source code control: 1996/07/02 20:04:40 diff --git a/cal/test5100.cal b/cal/test5100.cal index d3790ad..4d6d6f4 100644 --- a/cal/test5100.cal +++ b/cal/test5100.cal @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: test5100.cal,v 29.3 2006/06/20 09:29:16 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: test5100.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test5100.cal,v $ * * Under source code control: 1996/12/02 23:57:10 diff --git a/cal/test5200.cal b/cal/test5200.cal index f3aaa96..06eaf96 100644 --- a/cal/test5200.cal +++ b/cal/test5200.cal @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: test5200.cal,v 29.3 2006/06/20 09:29:16 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: test5200.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test5200.cal,v $ * * Under source code control: 1997/02/07 02:48:10 diff --git a/cal/test8400.cal b/cal/test8400.cal index 369d3b5..d73ca82 100644 --- a/cal/test8400.cal +++ b/cal/test8400.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: test8400.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: test8400.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test8400.cal,v $ * * Under source code control: 1999/10/31 01:00:03 diff --git a/cal/test8500.cal b/cal/test8500.cal index 20ae4c4..2e01e5e 100644 --- a/cal/test8500.cal +++ b/cal/test8500.cal @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: test8500.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: test8500.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test8500.cal,v $ * * Under source code control: 1999/11/12 20:59:59 diff --git a/cal/test8600.cal b/cal/test8600.cal index 3f6197f..d35de6b 100644 --- a/cal/test8600.cal +++ b/cal/test8600.cal @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.1 $ - * @(#) $Id: test8600.cal,v 29.1 2000/12/04 19:57:02 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: test8600.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test8600.cal,v $ * * Under source code control: 2000/12/04 19:57:02 diff --git a/cal/unitfrac.cal b/cal/unitfrac.cal index 68064f1..081c4f8 100644 --- a/cal/unitfrac.cal +++ b/cal/unitfrac.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: unitfrac.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: unitfrac.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/unitfrac.cal,v $ * * Under source code control: 1990/02/15 01:50:38 diff --git a/cal/varargs.cal b/cal/varargs.cal index ceeb43e..dee31cb 100644 --- a/cal/varargs.cal +++ b/cal/varargs.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: varargs.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: varargs.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/varargs.cal,v $ * * Under source code control: 1991/05/22 21:56:34 diff --git a/cal/xx_print.cal b/cal/xx_print.cal index 566ca18..2d689b7 100644 --- a/cal/xx_print.cal +++ b/cal/xx_print.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: xx_print.cal,v 29.2 2000/06/07 14:02:25 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: xx_print.cal,v 30.1 2007/03/16 11:09:54 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/xx_print.cal,v $ * * Under source code control: 1997/04/17 00:08:50 diff --git a/calc.c b/calc.c index 424869b..5bf9699 100644 --- a/calc.c +++ b/calc.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.16 $ - * @(#) $Id: calc.c,v 29.16 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.3 $ + * @(#) $Id: calc.c,v 30.3 2007/07/15 02:03:42 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/calc.c,v $ * * Under source code control: 1990/02/15 01:48:11 @@ -90,6 +90,7 @@ * S_FUNC definitions and functions */ S_FUNC void intint(int arg); /* interrupt routine */ +S_FUNC void calc_interrupt(char *fmt, ...); S_FUNC int nextcp(char **cpp, int *ip, int argc, char **argv, BOOL haveendstr); S_FUNC void set_run_state(run state); @@ -245,8 +246,13 @@ main(int argc, char **argv) * call libcalc_call_me_last() - * nothing to cleanup */ - printf("%s (version %s)\n", - CALC_TITLE, version()); + fputs(CALC_TITLE, stdout); +#if defined(CUSTOM) + fputs(" w/custom functions", stdout); +#else + fputs(" w/o custom functions", stdout); +#endif /* CUSTOM */ + printf(" (version %s)\n", version()); exit(0); case 'D': /* @@ -717,7 +723,7 @@ intint(int UNUSED arg) { (void) signal(SIGINT, intint); if (inputwait || (++abortlevel >= ABORT_NOW)) { - math_error("\nABORT"); + calc_interrupt("\nABORT"); /*NOTREACHED*/ } if (abortlevel >= ABORT_MATH) @@ -727,11 +733,10 @@ intint(int UNUSED arg) /* - * Routine called on any runtime error, to complain about it (with possible - * arguments), and then longjump back to the top level command scanner. + * report an interrupt */ -void -math_error(char *fmt, ...) +static void +calc_interrupt(char *fmt, ...) { va_list ap; diff --git a/calc.h b/calc.h index 0ac6339..a4f60dd 100644 --- a/calc.h +++ b/calc.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.22 $ - * @(#) $Id: calc.h,v 29.22 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: calc.h,v 30.2 2007/07/10 17:44:52 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/calc.h,v $ * * Under source code control: 1990/02/15 01:48:31 @@ -90,6 +90,7 @@ #define ABORT_NOW 4 /* abort right away */ #define ERRMAX 20 /* default errmax value */ +#define E_OK 0 /* no error */ /* * File ids corresponding to standard in, out, error, and when not in use. diff --git a/calc.man b/calc.man index 7b0a498..421b851 100644 --- a/calc.man +++ b/calc.man @@ -13,10 +13,10 @@ .\" A copy of version 2.1 of the GNU Lesser General Public License is .\" distributed with calc under the filename COPYING-LGPL. You should have .\" received a copy with calc; if not, write to Free Software Foundation, Inc. -.\" 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. .\" -.\" @(#) $Revision: 29.21 $ -.\" @(#) $Id: calc.man,v 29.21 2007/02/07 00:38:43 chongo Exp $ +.\" @(#) $Revision: 30.2 $ +.\" @(#) $Id: calc.man,v 30.2 2007/08/18 17:28:29 chongo Exp $ .\" @(#) $Source: /usr/local/src/cmd/calc/RCS/calc.man,v $ .\" .\" Under source code control: 1991/07/23 05:48:26 @@ -63,7 +63,7 @@ CALC OPTIONS .TP .B \-c -Continue reading command lines even after an scan/parse +Continue reading command lines even after a scan/parse error has caused the abandonment of a line. Note that this option only deals with scanning and parsing of the calc language. @@ -225,7 +225,7 @@ filename .sp 1 On systems that treat an executable that begins with .B #! -as a script, the path of the execurable is appended by the kernel +as a script, the path of the executable is appended by the kernel as the final argument to the exec() system call. This is why the .B \-f @@ -706,7 +706,7 @@ the rest of the file will be processed in .BR "shell script mode" . Note that .B \-f -must at the end of the intiial ``#!'' line. +must at the end of the initial ``#!'' line. Any other optional .B "other_flags" must come before @@ -1078,9 +1078,9 @@ If you do not have these files, write to: .in +0.5i .nf Free Software Foundation, Inc. -59 Temple Place -Suite 330 -Boston, MA 02111-1307 +51 Franklin Street +Fifth Floor +Boston, MA 02110-1301 USA .fi .in -0.5i diff --git a/calc.spec.in b/calc.spec.in index 67dfdfd..54fe128 100644 --- a/calc.spec.in +++ b/calc.spec.in @@ -2,7 +2,7 @@ # # calc.spec.in - template specfile for calc # -# Copyright (C) 2003-2005 Petteri Kettunen and Landon Curt Noll +# Copyright (C) 2003-2007 Petteri Kettunen and Landon Curt Noll # # Calc is open software; you can redistribute it and/or modify it under # the terms of the version 2.1 of the GNU Lesser General Public License @@ -16,10 +16,10 @@ # A copy of version 2.1 of the GNU Lesser General Public License is # distributed with calc under the filename COPYING-LGPL. You should have # received a copy with calc; if not, write to Free Software Foundation, Inc. -# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# @(#) $Revision: 29.16 $ -# @(#) $Id: calc.spec.in,v 29.16 2006/06/26 05:50:44 chongo Exp $ +# @(#) $Revision: 30.4 $ +# @(#) $Id: calc.spec.in,v 30.4 2007/09/02 05:38:34 chongo Exp $ # @(#) $Source: /usr/local/src/cmd/calc/RCS/calc.spec.in,v $ # # Under source code control: 2003/02/16 20:21:39 @@ -37,7 +37,7 @@ Summary: Arbitrary precision calculator. Name: calc Version: <<>> -Release: 0 +Release: 1.0 License: LGPL Group: Applications/Engineering Source: %{name}-%{version}.tar.gz @@ -73,12 +73,40 @@ For the latest calc release, see the project home page: %setup -q %build -make %{?_smp_mflags} T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 all chk +echo '-=- calc.spec beginning make clobber -=-' +make %{?_smp_mflags} T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ clobber +echo '-=- calc.spec ending make clobber -=-' +echo '-=- calc.spec beginning make calc-static-only -=-' +make %{?_smp_mflags} T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ calc-static-only BLD_TYPE=calc-static-only +echo '-=- calc.spec ending make calc-static-only -=-' +echo '-=- calc.spec beginning make rpm-hide-static -=-' +make %{?_smp_mflags} T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ rpm-hide-static +echo '-=- calc.spec ending make rpm-hide-static -=-' +echo '-=- calc.spec beginning make clobber (again) -=-' +make %{?_smp_mflags} T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ clobber +echo '-=- calc.spec ending make clobber (again) -=-' +echo '-=- calc.spec beginning make calc-dynamic-only -=-' +make %{?_smp_mflags} T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ calc-dynamic-only BLD_TYPE=calc-dynamic-only +echo '-=- calc.spec ending make calc-dynamic-only -=-' +echo '-=- calc.spec beginning make chk -=-' +make %{?_smp_mflags} T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ chk +echo '-=- calc.spec ending make chk -=-' +echo '-=- calc.spec beginning make rpm-unhide-static -=-' +make %{?_smp_mflags} T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ rpm-unhide-static +echo '-=- calc.spec ending make rpm-unhide-static -=-' +echo '-=- calc.spec beginning make rpm-clean-static -=-' +make %{?_smp_mflags} T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ rpm-clean-static +echo '-=- calc.spec ending make rpm-clean-static -=-' +echo '-=- calc.spec beginning make rpm-chk-static -=-' +make %{?_smp_mflags} T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ rpm-chk-static +echo '-=- calc.spec ending make rpm-chk-static -=-' %install rm -rf %{buildroot} mkdir -p %{buildroot} -make T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 install +echo '-=- calc.spec beginning make install -=-' +make T=%{buildroot} BINDIR=%{_bindir} LIBDIR=%{_libdir} CALC_SHAREDIR=%{_datadir}/%{name} CALC_INCDIR=%{_includedir}/calc MANDIR=%{_mandir}/man1 EXT= V=@ install +echo '-=- calc.spec ending make install -=-' %clean rm -rf %{buildroot} @@ -86,21 +114,31 @@ rm -rf %{buildroot} %files %defattr(-, root, root) %doc BUGS CHANGES COPYING COPYING-LGPL -%{_bindir}/* -%{_mandir}/man1/* -%{_datadir}/%{name}/*/* -%{_datadir}/%{name}/bindings -%{_datadir}/%{name}/README -%{_datadir}/%{name}/*.cal -%{_datadir}/%{name}/*.line +%attr(755, root, root) %{_bindir}/calc +%attr(755, root, root) %{_bindir}/cscript/* +%attr(644, root, root) %{_mandir}/man1/calc.1.gz +%attr(644, root, root) %{_datadir}/%{name}/README +%attr(644, root, root) %{_datadir}/%{name}/bindings +%attr(644, root, root) %{_datadir}/%{name}/custhelp/* +%attr(644, root, root) %{_datadir}/%{name}/custom/*.cal +%attr(644, root, root) %{_datadir}/%{name}/help/* +%attr(644, root, root) %{_datadir}/%{name}/*.cal +%attr(644, root, root) %{_datadir}/%{name}/*.line +%attr(644, root, root) %{_libdir}/libcalc.so.%{version} +%attr(644, root, root) %{_libdir}/libcustcalc.so.%{version} %files devel %defattr(-, root, root) %doc BUGS COPYING COPYING-LGPL LIBRARY +%attr(755, root, root) %{_bindir}/calc-static %attr(644, root, root) %{_includedir}/calc/* -%attr(644, root, root) %{_libdir}/*.a +%attr(644, root, root) %{_libdir}/libcalc.a +%attr(644, root, root) %{_libdir}/libcustcalc.a %changelog +* Sun Sep 01 2007 Landon Curt Noll http://www.isthe.com/chongo +- Release of calc-2.12.2 +- Calc builds with shared libraries * Sun Jun 25 2006 Landon Curt Noll http://www.isthe.com/chongo - Changed Copyright to License as per new rpm v4.4 syntax * Sun May 20 2006 Landon Curt Noll http://www.isthe.com/chongo diff --git a/calcerr.tbl b/calcerr.tbl index cc04654..81827fd 100644 --- a/calcerr.tbl +++ b/calcerr.tbl @@ -15,10 +15,10 @@ # A copy of version 2.1 of the GNU Lesser General Public License is # distributed with calc under the filename COPYING-LGPL. You should have # received a copy with calc; if not, write to Free Software Foundation, Inc. -# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# @(#) $Revision: 29.10 $ -# @(#) $Id: calcerr.tbl,v 29.10 2006/08/20 15:01:30 chongo Exp $ +# @(#) $Revision: 30.1 $ +# @(#) $Id: calcerr.tbl,v 30.1 2007/03/16 11:09:46 chongo Exp $ # @(#) $Source: /usr/local/src/cmd/calc/RCS/calcerr.tbl,v $ # # Under source code control: 1996/05/23 17:38:44 diff --git a/calcerr_c.awk b/calcerr_c.awk index 9dbe750..f0d416d 100644 --- a/calcerr_c.awk +++ b/calcerr_c.awk @@ -16,10 +16,10 @@ # A copy of version 2.1 of the GNU Lesser General Public License is # distributed with calc under the filename COPYING-LGPL. You should have # received a copy with calc; if not, write to Free Software Foundation, Inc. -# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# @(#) $Revision: 29.2 $ -# @(#) $Id: calcerr_c.awk,v 29.2 2000/06/07 14:02:13 chongo Exp $ +# @(#) $Revision: 30.1 $ +# @(#) $Id: calcerr_c.awk,v 30.1 2007/03/16 11:09:46 chongo Exp $ # @(#) $Source: /usr/local/src/cmd/calc/RCS/calcerr_c.awk,v $ # # Under source code control: 1996/05/24 03:15:35 diff --git a/calcerr_c.sed b/calcerr_c.sed index 13444ef..5f1c165 100644 --- a/calcerr_c.sed +++ b/calcerr_c.sed @@ -16,10 +16,10 @@ # A copy of version 2.1 of the GNU Lesser General Public License is # distributed with calc under the filename COPYING-LGPL. You should have # received a copy with calc; if not, write to Free Software Foundation, Inc. -# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# @(#) $Revision: 29.2 $ -# @(#) $Id: calcerr_c.sed,v 29.2 2000/06/07 14:02:13 chongo Exp $ +# @(#) $Revision: 30.1 $ +# @(#) $Id: calcerr_c.sed,v 30.1 2007/03/16 11:09:46 chongo Exp $ # @(#) $Source: /usr/local/src/cmd/calc/RCS/calcerr_c.sed,v $ # # Under source code control: 1996/05/24 03:15:35 diff --git a/calcerr_h.awk b/calcerr_h.awk index d88979c..1958a84 100644 --- a/calcerr_h.awk +++ b/calcerr_h.awk @@ -16,10 +16,10 @@ # A copy of version 2.1 of the GNU Lesser General Public License is # distributed with calc under the filename COPYING-LGPL. You should have # received a copy with calc; if not, write to Free Software Foundation, Inc. -# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# @(#) $Revision: 29.2 $ -# @(#) $Id: calcerr_h.awk,v 29.2 2000/06/07 14:02:13 chongo Exp $ +# @(#) $Revision: 30.1 $ +# @(#) $Id: calcerr_h.awk,v 30.1 2007/03/16 11:09:46 chongo Exp $ # @(#) $Source: /usr/local/src/cmd/calc/RCS/calcerr_h.awk,v $ # # Under source code control: 1996/05/23 17:38:44 diff --git a/calcerr_h.sed b/calcerr_h.sed index 9b32485..2f43925 100644 --- a/calcerr_h.sed +++ b/calcerr_h.sed @@ -16,10 +16,10 @@ # A copy of version 2.1 of the GNU Lesser General Public License is # distributed with calc under the filename COPYING-LGPL. You should have # received a copy with calc; if not, write to Free Software Foundation, Inc. -# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# @(#) $Revision: 29.2 $ -# @(#) $Id: calcerr_h.sed,v 29.2 2000/06/07 14:02:13 chongo Exp $ +# @(#) $Revision: 30.1 $ +# @(#) $Id: calcerr_h.sed,v 30.1 2007/03/16 11:09:46 chongo Exp $ # @(#) $Source: /usr/local/src/cmd/calc/RCS/calcerr_h.sed,v $ # # Under source code control: 1996/05/23 17:38:44 diff --git a/check.awk b/check.awk index f036dfe..ee98e03 100644 --- a/check.awk +++ b/check.awk @@ -16,10 +16,10 @@ # A copy of version 2.1 of the GNU Lesser General Public License is # distributed with calc under the filename COPYING-LGPL. You should have # received a copy with calc; if not, write to Free Software Foundation, Inc. -# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# @(#) $Revision: 29.5 $ -# @(#) $Id: check.awk,v 29.5 2006/09/18 08:01:13 chongo Exp $ +# @(#) $Revision: 30.1 $ +# @(#) $Id: check.awk,v 30.1 2007/03/16 11:09:46 chongo Exp $ # @(#) $Source: /usr/local/src/cmd/calc/RCS/check.awk,v $ # # Under source code control: 1996/05/25 22:07:58 diff --git a/cmath.h b/cmath.h index 1ca0303..3981ec8 100644 --- a/cmath.h +++ b/cmath.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.7 $ - * @(#) $Id: cmath.h,v 29.7 2005/10/18 10:43:49 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: cmath.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/cmath.h,v $ * * Under source code control: 1993/07/30 19:42:45 diff --git a/codegen.c b/codegen.c index e76e41b..46f3c0c 100644 --- a/codegen.c +++ b/codegen.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.24 $ - * @(#) $Id: codegen.c,v 29.24 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: codegen.c,v 30.2 2007/07/05 13:30:38 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/codegen.c,v $ * * Under source code control: 1990/02/15 01:48:13 @@ -1370,7 +1370,7 @@ creatematrix(void) rescantoken(); if (++dim > MAXDIM) { scanerror(T_SEMICOLON, - "Only %ld dimensions allowed", MAXDIM); + "Only %d dimensions allowed", MAXDIM); return; } (void) getopassignment(); diff --git a/comfunc.c b/comfunc.c index be78ad3..d14e21d 100644 --- a/comfunc.c +++ b/comfunc.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.7 $ - * @(#) $Id: comfunc.c,v 29.7 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: comfunc.c,v 30.2 2007/07/11 23:05:49 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/comfunc.c,v $ * * Under source code control: 1990/02/15 01:48:13 @@ -1117,8 +1117,8 @@ c_power(COMPLEX *c1, COMPLEX *c2, NUMBER *epsilon) /*NOTREACHED*/ } if (ciszero(c1)) { - if (qisneg(c2->real) || qiszero(c2->real)) { - math_error ("Non-positive exponent of zero"); + if (cisreal(c2) && qisneg(c2->real)) { + math_error ("Non-positive real exponent of zero"); /*NOTREACHED*/ } return clink(&_czero_); diff --git a/commath.c b/commath.c index e8958b2..e73da2b 100644 --- a/commath.c +++ b/commath.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: commath.c,v 29.5 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: commath.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/commath.c,v $ * * Under source code control: 1990/02/15 01:48:10 diff --git a/config.c b/config.c index b371f20..8ea552b 100644 --- a/config.c +++ b/config.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.25 $ - * @(#) $Id: config.c,v 29.25 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: config.c,v 30.2 2007/07/05 13:30:38 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/config.c,v $ * * Under source code control: 1991/07/20 00:21:56 @@ -529,7 +529,7 @@ setconfig(int type, VALUE *vp) } temp = lookup_long(modes, vp->v_str->s_str); if (temp < 0) { - math_error("Unknown mode \"%s\"", vp->v_str); + math_error("Unknown mode \"%s\"", vp->v_str->s_str); /*NOTREACHED*/ } math_setmode((int) temp); @@ -542,7 +542,7 @@ setconfig(int type, VALUE *vp) } temp = lookup_long(modes, vp->v_str->s_str); if (temp < 0) { - math_error("Unknown mode \"%s\"", vp->v_str); + math_error("Unknown mode \"%s\"", vp->v_str->s_str); /*NOTREACHED*/ } math_setmode2((int) temp); diff --git a/config.h b/config.h index 503212a..28c414e 100644 --- a/config.h +++ b/config.h @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.22 $ - * @(#) $Id: config.h,v 29.22 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: config.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/config.h,v $ * * Under source code control: 1995/11/01 22:20:17 diff --git a/const.c b/const.c index 357ed47..de6c257 100644 --- a/const.c +++ b/const.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: const.c,v 29.5 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: const.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/const.c,v $ * * Under source code control: 1990/02/15 01:48:14 diff --git a/cscript/4dsphere.calc b/cscript/4dsphere.calc index 86d607e..3a56a19 100644 --- a/cscript/4dsphere.calc +++ b/cscript/4dsphere.calc @@ -24,10 +24,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 1.5 $ - * @(#) $Id: 4dsphere.calc,v 1.5 2007/02/11 10:05:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: 4dsphere.calc,v 30.1 2007/03/16 11:12:11 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/4dsphere.calc,v $ * * Under source code control: 2001/05/03 19:02:03 diff --git a/cscript/Makefile b/cscript/Makefile index 70a4496..b4f24a7 100644 --- a/cscript/Makefile +++ b/cscript/Makefile @@ -15,10 +15,10 @@ # A copy of version 2.1 of the GNU Lesser General Public License is # distributed with calc under the filename COPYING-LGPL. You should have # received a copy with calc; if not, write to Free Software Foundation, Inc. -# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# @(#) $Revision: 29.32 $ -# @(#) $Id: Makefile,v 29.32 2007/02/08 21:21:25 chongo Exp $ +# @(#) $Revision: 30.2 $ +# @(#) $Id: Makefile,v 30.2 2007/03/22 07:34:47 chongo Exp $ # @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/Makefile,v $ # # Under source code control: 1999/11/29 11:10:26 @@ -34,13 +34,30 @@ # required vars # SHELL= /bin/sh -MAKE_FILE= Makefile #### # Normally, the upper level makefile will set these values. We provide # a default here just in case you want to build from this directory. #### +# Normally certain files depend on the Makefile. If the Makefile is +# changed, then certain steps should be redone. If MAKE_FILE is +# set to Makefile, then these files will depend on Makefile. If +# MAKE_FILE is empty, then they wont. +# +# If in doubt, set MAKE_FILE to Makefile +# +MAKE_FILE= Makefile + +# Controlling file makefile basename (without the path) +# +# This is the basename same of the makefile that may/does/will drive +# this makefile. +# +# If in doubt, set TOP_MAKE_FILE to Makefile +# +TOP_MAKE_FILE= Makefile + # Where the system include (.h) files are kept # # For DJGPP, select: @@ -295,17 +312,14 @@ detaillist: ## depend: - ${Q} if [ -f Makefile.bak ]; then \ - echo "Makefile.bak exists, remove or move it out of the way"; \ + ${Q} if [ -f ${MAKE_FILE}.bak ]; then \ + echo "${MAKE_FILE}.bak exists, remove or move it"; \ exit 1; \ else \ ${TRUE}; \ fi - -${Q} ${RM} -f makedep.out + ${Q} ${RM} -f makedep.out ${Q} echo forming cscript dependency list - ${Q} echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > \ - makedep.out - ${Q} echo "" >> makedep.out ${Q} for i in ${SCRIPT} /dev/null; do \ if [ X"$$i" != X"/dev/null" ]; then \ echo "$$i: $$i.calc"; \ @@ -315,25 +329,27 @@ depend: fi; \ done >> makedep.out ${Q} echo sample dependency list formed - ${Q} echo forming new cscript/Makefile - -${Q} ${RM} -f Makefile.bak - ${Q} ${MV} Makefile Makefile.bak - ${Q} ${SED} -n '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak > Makefile - ${Q} echo "" >> Makefile - ${Q} ${SED} -n '3,$$p' makedep.out >> Makefile - -${Q} ${RM} -f makedep.out - -${Q} if ${CMP} -s Makefile.bak Makefile; then \ - echo 'sample Makefile was already up to date'; \ - ${MV} -f Makefile.bak Makefile; \ + ${Q} echo forming new cscript/${MAKE_FILE} + ${Q} ${RM} -f ${MAKE_FILE}.bak + ${Q} ${MV} ${MAKE_FILE} ${MAKE_FILE}.bak + ${Q} ${SED} -n '1,/^# DO NOT DELETE THIS LINE/p' ${MAKE_FILE}.bak > ${MAKE_FILE} + ${Q} echo "" >> ${MAKE_FILE} + ${Q} ${CAT} makedep.out >> ${MAKE_FILE} + ${Q} ${RM} -f makedep.out + -${Q} if ${CMP} -s ${MAKE_FILE}.bak ${MAKE_FILE}; then \ + echo 'sample ${MAKE_FILE} was already up to date'; \ + ${MV} -f ${MAKE_FILE}.bak ${MAKE_FILE}; \ else \ - ${RM} -f Makefile.tmp; \ - ${MV} Makefile Makefile.tmp; \ - if [ -d RCS ]; then \ - ${CO} -l Makefile; \ + ${RM} -f ${MAKE_FILE}.tmp; \ + ${MV} ${MAKE_FILE} ${MAKE_FILE}.tmp; \ + if [ -d RCS -a ! -w "${MAKE_FILE}" ]; then \ + ${CO} -l ${MAKE_FILE}; \ fi; \ - ${MV} Makefile.tmp Makefile; \ + ${MV} ${MAKE_FILE}.tmp ${MAKE_FILE}; \ if [ -d RCS ]; then \ - echo new sample Makefile formed, you need to check it in; \ + echo '*****************************************************'; \ + echo 'new sample ${MAKE_FILE} formed -- need to check it in'; \ + echo '*****************************************************'; \ fi; \ fi @@ -357,10 +373,11 @@ echo_inst_files: ## clean: - -${RM} -f makedep.out + ${RM} -f makedep.out -clobber: - -${RM} -f ${TARGETS} +clobber: clean + ${RM} -f .all + ${RM} -f ${TARGETS} # install everything # diff --git a/cscript/README.src b/cscript/README.src index 5532426..4d4acb7 100644 --- a/cscript/README.src +++ b/cscript/README.src @@ -115,10 +115,10 @@ simple ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.11 $ -## @(#) $Id: README.src,v 29.11 2007/02/07 00:33:10 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: README.src,v 30.1 2007/03/16 11:12:11 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/README.src,v $ ## ## Under source code control: 1999/12/17 10:23:40 diff --git a/cscript/fproduct.calc b/cscript/fproduct.calc index a115101..a44b0d0 100644 --- a/cscript/fproduct.calc +++ b/cscript/fproduct.calc @@ -22,10 +22,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: fproduct.calc,v 29.4 2007/02/11 10:05:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: fproduct.calc,v 30.1 2007/03/16 11:12:11 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/fproduct.calc,v $ * * Under source code control: 2001/04/07 20:13:11 diff --git a/cscript/mersenne.calc b/cscript/mersenne.calc index 3eab128..74490fb 100644 --- a/cscript/mersenne.calc +++ b/cscript/mersenne.calc @@ -16,10 +16,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: mersenne.calc,v 29.5 2007/02/11 10:05:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: mersenne.calc,v 30.1 2007/03/16 11:12:11 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/mersenne.calc,v $ * * Under source code control: 1999/11/30 00:09:01; diff --git a/cscript/piforever.calc b/cscript/piforever.calc index 937aaee..9d467ed 100644 --- a/cscript/piforever.calc +++ b/cscript/piforever.calc @@ -16,10 +16,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: piforever.calc,v 29.4 2007/02/07 00:34:04 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: piforever.calc,v 30.1 2007/03/16 11:12:11 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/piforever.calc,v $ * * Under source code control: 1999/11/30 00:11:36 diff --git a/cscript/plus.calc b/cscript/plus.calc index 435c825..e189b05 100644 --- a/cscript/plus.calc +++ b/cscript/plus.calc @@ -16,10 +16,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: plus.calc,v 29.4 2007/02/07 00:34:04 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: plus.calc,v 30.1 2007/03/16 11:12:11 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/plus.calc,v $ * * Under source code control: 1999/11/29 10:22:37 diff --git a/cscript/powerterm.calc b/cscript/powerterm.calc index 87ad587..13b6920 100644 --- a/cscript/powerterm.calc +++ b/cscript/powerterm.calc @@ -22,10 +22,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.8 $ - * @(#) $Id: powerterm.calc,v 29.8 2007/02/11 10:05:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: powerterm.calc,v 30.1 2007/03/16 11:12:11 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/powerterm.calc,v $ * * Under source code control: 2001/04/24 23:49:11 diff --git a/cscript/simple.calc b/cscript/simple.calc index 6f977ab..557e53e 100644 --- a/cscript/simple.calc +++ b/cscript/simple.calc @@ -16,10 +16,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: simple.calc,v 29.4 2007/02/07 00:34:04 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: simple.calc,v 30.1 2007/03/16 11:12:11 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/simple.calc,v $ * * Under source code control: 1999/11/29 10:22:37 diff --git a/cscript/square.calc b/cscript/square.calc index 010967a..ea28639 100644 --- a/cscript/square.calc +++ b/cscript/square.calc @@ -16,10 +16,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: square.calc,v 29.4 2007/02/07 00:34:04 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: square.calc,v 30.1 2007/03/16 11:12:11 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/cscript/RCS/square.calc,v $ * * Under source code control: 2000/12/15 06:52:01 diff --git a/custom.c b/custom.c index ad28821..4184433 100644 --- a/custom.c +++ b/custom.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.6 $ - * @(#) $Id: custom.c,v 29.6 2006/05/19 15:26:10 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: custom.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/custom.c,v $ * * Under source code control: 1997/03/03 04:53:08 diff --git a/custom.h b/custom.h index 65c3da6..411330c 100644 --- a/custom.h +++ b/custom.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: custom.h,v 29.4 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.3 $ + * @(#) $Id: custom.h,v 30.3 2007/07/10 17:54:03 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/custom.h,v $ * * Under source code control: 1997/03/03 04:53:08 @@ -54,6 +54,12 @@ #define MAX_CUSTOM_ARGS 100 /* maximum number of custom arguments */ +/* + * register count + */ +#define CUSTOM_REG_MAX 31 /* maximum custom register number */ + + /* * custom function interface */ @@ -76,5 +82,6 @@ EXTERN BOOL allow_custom; /* TRUE => custom builtins allowed */ E_FUNC void showcustom(void); /* print custom functions */ E_FUNC void customhelp(char *); /* direct custom help */ EXTERN CONST struct custom cust[]; /* custom interface table */ +E_FUNC void init_custreg(void); /* initialize custom registers */ #endif /* !CUSTOM_H */ diff --git a/custom/CUSTOM_CAL b/custom/CUSTOM_CAL index 886b7c7..8544afe 100644 --- a/custom/CUSTOM_CAL +++ b/custom/CUSTOM_CAL @@ -55,10 +55,10 @@ pzasusb8.cal ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: CUSTOM_CAL,v 29.2 2000/06/07 14:03:03 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: CUSTOM_CAL,v 30.1 2007/03/16 11:10:04 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/CUSTOM_CAL,v $ ## ## Under source code control: 1997/03/08 20:51:32 diff --git a/custom/HOW_TO_ADD b/custom/HOW_TO_ADD index 5abc969..268ec6a 100644 --- a/custom/HOW_TO_ADD +++ b/custom/HOW_TO_ADD @@ -130,13 +130,7 @@ Step 4: Write your test code change the comment from 'halflen - determine the length ...' to 'curds - brief description about ...' - change the print statement near the very bottom from: - - print "halflen(num) defined"; - - to: - - print "curds( ... args description here ...) defined"; + change other code as needed. Step 5: Write your custom function @@ -494,24 +488,25 @@ Step 6: Register the function in the custom interface table E_FUNC VALUE u_curds(char*, int, VALUE**); -Step 7: Add the required information to the custom/Makefile +Step 7: Add the required information to the custom/Makefile.head The calc test script, curds.cal, should be added to the - CUSTOM_CALC_FILES Makefile variable found in custom/Makefile: + CUSTOM_CALC_FILES Makefile variable found in custom/Makefile.head: CUSTOM_CALC_FILES= argv.cal halflen.cal curds.cal The help file, curds, should be added to the CUSTOM_HELP - Makefile variable: + custom/Makefile.head variable: CUSTOM_HELP= argv devnull help sysinfo curds If you needed to create any .h files to support u_curds.c, these - files should be added to the CUSTOM_H_SRC Makefile variable: + files should be added to the CUSTOM_H_SRC custom/Makefile.head variable: CUSTOM_H_SRC= u_curds.h otherfile.h - Your u_curds.c file MUST be added to the CUSTOM_SRC Makefile variable: + Your u_curds.c file MUST be added to the CUSTOM_SRC custom/Makefile.head + variable: CUSTOM_SRC= c_argv.c c_devnull.c c_help.c c_sysinfo.c u_curds.c @@ -645,10 +640,10 @@ Step 12: Contribute ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.6 $ -## @(#) $Id: HOW_TO_ADD,v 29.6 2007/02/11 10:22:46 chongo Exp $ +## @(#) $Revision: 30.3 $ +## @(#) $Id: HOW_TO_ADD,v 30.3 2007/07/13 23:45:54 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/HOW_TO_ADD,v $ ## ## Under source code control: 1997/03/10 03:03:21 diff --git a/custom/Makefile b/custom/Makefile index 5d08aaa..c4c0baf 100644 --- a/custom/Makefile +++ b/custom/Makefile @@ -16,11 +16,11 @@ # A copy of version 2.1 of the GNU Lesser General Public License is # distributed with calc under the filename COPYING-LGPL. You should have # received a copy with calc; if not, write to Free Software Foundation, Inc. -# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# @(#) $Revision: 29.32 $ -# @(#) $Id: Makefile,v 29.32 2007/02/18 14:24:56 chongo Exp $ -# @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/Makefile,v $ +# @(#) $Revision: 30.12 $ +# @(#) $Id: Makefile.head,v 30.12 2007/09/01 19:54:03 chongo Exp $ +# @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/Makefile.head,v $ # # Under source code control: 1997/03/09 02:28:54 # File existed as early as: 1997 @@ -31,6 +31,21 @@ # calculator by David I. Bell with help/mods from others # Makefile by Landon Curt Noll +#if 0 /* start of skip for non-Gnu makefiles */ +############################################################################## +#-=-=-=-=-=-=-=-=- Identify the target machine, if possible -=-=-=-=-=-=-=-=-# +############################################################################## + +# NOTE: You can force a target value by defining target as in: +# +# make ...__optional_arguments_... target=value + +# Try uname -s if the target was not alreadhy set on the make command line +# +ifeq ($(target),) +target=$(shell uname -s 2>/dev/null) +endif +#endif /* end of skip for non-Gnu makefiles */ ############################################################################## #-=-=-=-=-=-=-=-=- You may want to change some values below -=-=-=-=-=-=-=-=-# @@ -40,38 +55,40 @@ # # Put your custom calc resource files here. # -CUSTOM_CALC_FILES= argv.cal halflen.cal pzasusb8.cal pmodm127.cal +CUSTOM_CALC_FILES= argv.cal halflen.cal pzasusb8.cal pmodm127.cal register.cal # The custom help files to install # # Put your custom help files here. # -CUSTOM_HELP= argv devnull help sysinfo pzasusb8 pmodm127 +CUSTOM_HELP= argv devnull help sysinfo pzasusb8 pmodm127 register -# Any .h files that are needed by programs that use libcustcalc.a +# Any .h files that are needed by programs that use libcustcalc${LIB_EXT_VERS} # # Put any .h files that you add which might be useful to other # programs here. # CUSTOM_H_SRC= -# Any .c files that are needed to build libcustcalc.a. +# Any .c files that are needed to build libcustcalc${LIB_EXT_VERS}. # Don't put ${REQUIRED_SRC} files in this list. # # There MUST be a .c in CUSTOM_SRC for every .o in CUSTOM_OBJ. # # Put your custom .c files here. # -CUSTOM_SRC= c_argv.c c_devnull.c c_help.c c_sysinfo.c c_pzasusb8.c c_pmodm127.c +CUSTOM_SRC= c_argv.c c_devnull.c c_help.c c_sysinfo.c c_pzasusb8.c \ + c_pmodm127.c c_register.c -# Any .o files that are needed by program that use libcustcalc.a. +# Any .o files that are needed by program that use libcustcalc${LIB_EXT_VERS}. # Don't put ${REQUIRED_OBJ} files in this list. # # There MUST be a .c in CUSTOM_SRC for every .o in CUSTOM_OBJ. # # Put your custom .o files here. # -CUSTOM_OBJ= c_argv.o c_devnull.o c_help.o c_sysinfo.o c_pzasusb8.o c_pmodm127.o +CUSTOM_OBJ= c_argv.o c_devnull.o c_help.o c_sysinfo.o c_pzasusb8.o \ + c_pmodm127.o c_register.o ############################################################################## #-=-=-=-=-=-=- Defaults in case you want to build from this dir -=-=-=-=-=-=-# @@ -229,8 +246,6 @@ DEBUG= -O3 -g3 #DEBUG= -O3 -ipa #DEBUG= -O3 -g3 -ipa # -#DEBUG= -std0 -fast -O4 -static -# #DEBUG= -g #DEBUG= -g3 #DEBUG= -gx @@ -238,71 +253,6 @@ DEBUG= -O3 -g3 # #DEBUG= -O2 -gstabs+ -DWINDOZ -# How to compile .c files so that we can form a shared library. -# -# CC_SHARE= -fPIC -# Building for shared library using the gcc position independent code -# (PIC) model. -# CC_SHARE= -# Do not build for shared libraries. -# -# NOTE: If CC_SHARE= is empty, then you very likely want to set -# CC_SHLIB= and LD_SHARE= to empty. -# -# If in doubt, try: -# CC_SHARE= -fPIC -# If that fails try: -# CC_SHARE= -# -# NOTE: Shared libraries are not yet supported. For now, use CC_SHARE= -# -#CC_SHARE= -fPIC -CC_SHARE= - -# How build a shared librtary -# NOTE: This is not yet supported -# -# CC_SHLIB= -shared "-Wl,-soname,libcalc.so.`./ver_calc${EXE} -V`" -# Building for shared library using the gcc position independent code -# (PIC) model. -# CC_SHLIB= -# Do not build for shared libraries. -# -# NOTE: If CC_SHARE= is empty, then you very likely want to set -# CC_SHLIB= and LD_SHARE= to empty. -# -# If in doubt, try: -# CC_SHLIB= -shared "-Wl,-soname,libcalc.so.`./ver_calc${EXE} -V`" -# If that fails, try: -# CC_SHLIB= -# -# NOTE: Shared libraries are not yet supported. For now, use CC_SHLIB= -# -#CC_SHLIB= -shared "-Wl,-soname,libcalc.so.`./ver_calc${EXE} -V`" -CC_SHLIB= - -# How to link with a shared library -# NOTE: This is not yet supported -# -# LD_SHARE= -L. -# Building for shared library using the gcc position independent code -# (PIC) model. -# LD_SHARE= -# -# NOTE: If CC_SHARE= is empty, then you very likely want to set -# CC_SHLIB= and LD_SHARE= to empty. -# Do not build for shared libraries. -# -# If in doubt, try: -# LD_SHARE= -L. -# If that fails, try: -# LD_SHARE= -# -# NOTE: Shared libraries are not yet supported. For now, use LD_SHARE= -# -#LD_SHARE= -L. -LD_SHARE= - # Some systems require one to use ranlib to add a symbol table to # a *.a link library. Set RANLIB to the utility that performs this # action. Set RANLIB to : if your system does not need such a utility. @@ -320,6 +270,15 @@ RANLIB=ranlib MAKE_FILE= Makefile #MAKE_FILE= +# Controlling file makefile basename (without the path) +# +# This is the basename same of the makefile that may/does/will drive +# this makefile. +# +# If in doubt, set TOP_MAKE_FILE to Makefile +# +TOP_MAKE_FILE= Makefile + # If you do not wish to use purify, set PURIFY to an empty string. # # If in doubt, use PURIFY= @@ -401,205 +360,384 @@ MKDIR_ARG= -p EXT= #EXT=.exe -################ -# compiler set # -################ +# The default calc versions # -# Select your compiler type by commenting out one of the cc sets below: +VERSION= 2.12.2 +VERS= 2.12.2 +VER= 2.12 +VE= 2 + +# Names of shared libraries with versions +# +LIB_EXT= .so +LIB_EXT_VERS= ${LIB_EXT}.${VERS} +LIB_EXT_VER= ${LIB_EXT}.${VER} +LIB_EXT_VE= ${LIB_EXT}.${VE} + +# standard tools +# +SHELL= /bin/sh +SED= sed +MAKEDEPEND= makedepend +GREP= egrep +CHMOD= chmod +FMT= fmt +SORT= sort +CMP= cmp +AR= ar +RM= rm +TOUCH= touch +MKDIR= mkdir +RMDIR= rmdir +MV= mv +CP= cp +CO= co +TRUE= true +MAKE= make +LN= ln +AWK= awk + +# EXTRA_CFLAGS are flags given to ${CC} when compiling C files +# EXTRA_LDFLAGS are flags given to ${CC} when linking progs +# +# Both CFLAGS and LDFLAGS are left blank in this Makefile by +# default so that users may use them on the make command line +# to always the way that C is compiled and files are linked +# respectively. For example: +# +# make all EXTRA_CFLAGS="-DMAGIC" EXTRA_LDFLAGS="-lmagic" +# +# NOTE: These should be left blank in this Makefile to make it +# easier to add stuff on the command line. If you want to +# to change the way calc is compiled by this Makefile, change +# the appropirate host target section below or a flag above. +# +EXTRA_CFLAGS= +EXTRA_LDFLAGS= + +# COMMON_CFLAGS are the common ${CC} flags used for all progs, both +# intermediate and final calc and calc related progs +# +COMMON_CFLAGS= -DCALC_SRC ${ALLOW_CUSTOM} ${CCWARN} ${CCMISC} ${EXTRA_CFLAGS} + +# COMMON_LDFLAGS are the common flags used for linking all progs, both +# intermediate and final calc and calc related progs +# +COMMON_LDFLAGS= ${EXTRA_LDFLAGS} + +########################################### +# Set the default compile flags for ${CC} # +########################################### + +#if 0 /* start of skip for non-Gnu makefiles */ + +# Required flags to compile C files for calc +# +# ICFLAGS are given to ${CC} for intermediate progs used to help compile calc +# CFLAGS are given to ${CC} for calc progs other than intermediate progs +# +# NOTE: This does not work for: make-XYZ-only and BLD_TYPE != make-XYZ-only +# +ifeq ($(BLD_TYPE),calc-static-only) +ICFLAGS= ${COMMON_CFLAGS} ${CC_STATIC} +else +ICFLAGS= ${COMMON_CFLAGS} ${CC_SHARE} +endif +CFLAGS= ${ICFLAGS} ${CCOPT} + +# Required flags to link files for calc +# +# ILDFLAGS for ${CC} in linking intermediate progs used to help compile calc +# LDFLAGS for ${CC} in linking calc progs other than intermediate progs +# +ILDFLAGS= ${COMMON_LDFLAGS} +LDFLAGS= ${LD_DEBUG} ${ILDFLAGS} + +#endif /* end of skip for non-Gnu makefiles */ +# start of host target cut - Do not remove this line +############################################################################## +#-=-=-=-=-=- host target section - targets that override defaults -=-=-=-=-=-# +############################################################################## + +# Common values set in targets +# +# BLD_TYPE determines if calc is built with static and/or dynamic libs. +# Set this value to one of: +# +# BLD_TYPE= calc-dynamic-only +# BLD_TYPE= calc-static-only +# +# CC_SHARE are flags given to ${CC} to build .o files suitable for shared libs +# DEFAULT_LIB_INSTALL_PATH is where calc progs look for calc shared libs +# LD_SHARE are common flags given to ${CC} to link with shared libraries +# LIBCALC_SHLIB are flags given to ${CC} to build libcalc shared lib +# LIBCUSTCALC_SHLIB are flags given to ${CC} to build libcustcalc shared lib +# +# NOTE: The above 4 values are unused if BLD_TYPE= calc-static-only +# +# CC_STATIC are flags given to ${CC} to build .o files suitable for static libs +# LD_STATIC are common flags given to ${CC} to link with static libraries +# LIBCALC_STATIC are flags given to ${CC} to build libcalc static lib +# LIBCUSTCALC_STATIC are flags given to ${CC} to build libcustcalc static lib +# +# NOTE: The above 4 values are unused if BLD_TYPE= calc-dynamic-only # # CCOPT are flags given to ${CC} for optimization # CCWARN are flags given to ${CC} for warning message control # CCWERR are flags given to ${CC} to make warnings fatal errors -# NOTE: CCWERR is only set in development Makefiles and must -# only be used with ${CC}, not ${LCC}. +# NOTE: CCWERR is only set in development Makefiles and must only be +# used with ${CC}, not ${LCC}. If you do not want the compiler +# to abort on warnings, then leave CCWERR blank. # CCMISC are misc flags given to ${CC} # -# CFLAGS are all flags given to ${CC} [[often includes CCOPT, CCWARN, CCMISC]] -# ICFLAGS are given to ${CC} for intermediate progs -# -# LDFLAGS are flags given to ${CC} for linking .o files -# ILDFLAGS are flags given to ${CC} for linking .o files for intermediate progs -# # LCC how the the C compiler is invoked on locally executed intermediate progs # CC is how the the C compiler is invoked (with an optional Purify) # -### +# Specific target overrides or modifications to default values + +########################################################################## +# NOTE: If your target is not supported below and the default target # +# is not suitable for your needs, please send to the: # +# # +# calc-contrib at asthe dot com # +# # +# EMail address an "ifeq ($(target),YOUR_TARGET_NAME)" ... "endif" # +# set of lines so that we can consider them for the next release. # +########################################################################## + +#if 0 /* start of skip for non-Gnu makefiles */ +################ +# Linux target # +################ + +ifeq ($(target),Linux) # -# Linux set +BLD_TYPE= calc-dynamic-only +# +CC_SHARE= -fPIC +DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib +LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \ + "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}" +LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERS}" +LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERS}" +# +CC_STATIC= +LD_STATIC= +LIBCALC_STATIC= +LIBCUSTCALC_STATIC= # CCWARN= -Wall -W -Wno-comment -CCWERR= -Werror -CCOPT= ${DEBUG} ${CC_SHARE} +CCWERR= +CCOPT= ${DEBUG} CCMISC= # -CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC} -I/usr/include -I.. -ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC} -I/usr/include -I.. -# -LDFLAGS= ${LD_SHARE} -ILDFLAGS= -# LCC= gcc CC= ${PURIFY} ${LCC} ${CCWERR} # -### -# -# Apple Mac OS X -# -#CCWARN= -Wall -W -Wno-comment -#CCWERR= -#CCOPT= ${DEBUG} ${CC_SHARE} -#CCMISC= -arch i386 -arch ppc -# -#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC} -I/usr/include -I.. -#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC} -I/usr/include -I.. -# -#LDFLAGS= ${LD_SHARE} -arch i386 -arch ppc -#ILDFLAGS= -# -#LCC= gcc -#CC= ${PURIFY} ${LCC} ${CCWERR} -# -### -# -# gcc set -# -#CCWARN= -Wall -W -Wno-comment -#CCWERR= -#CCOPT= ${DEBUG} ${CC_SHARE} -#CCMISC= -# -#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC} -I/usr/include -I.. -#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC} -I/usr/include -I.. -# -#LDFLAGS= ${LD_SHARE} -#ILDFLAGS= -# -#LCC= gcc -#CC= ${PURIFY} ${LCC} ${CCWERR} -# -### -# -# common cc set -# -# If -O3 -g3 is not supported try: DEBUG= -O2 -g -# If -O2 -g is not supported try: DEBUG= -O -g -# -#CCWARN= -#CCWERR= -#CCOPT= ${DEBUG} ${CC_SHARE} -#CCMISC= -# -#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC} -I/usr/include -I.. -#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC} -I/usr/include -I.. -# -#LDFLAGS= ${LD_SHARE} -#ILDFLAGS= -# -#LCC= cc -#CC= ${PURIFY} ${LCC} ${CCWERR} -# -### -# -# HP-UX set -# -# If -O3 -g3 is not supported try: DEBUG= -O2 -g -# If -O2 -g is not supported try: DEBUG= -O -g -# -# Warning: Some HP-UX optimizers are brain-damaged. -# If 'make check' fails use: DEBUG= -g -# -#CCWARN= -#CCWERR= -#CCOPT= ${DEBUG} ${CC_SHARE} -#CCMISC= +e -# -#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC} -I/usr/include -I.. -#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC} -I/usr/include -I.. -# -#LDFLAGS= ${LD_SHARE} -#ILDFLAGS= -# -#LCC= cc -#CC= ${PURIFY} ${LCC} ${CCWERR} -# -### -# -# AIX RS/6000 set -# -# If -O3 -g3 is not supported try: DEBUG= -O2 -g -# If -O2 -g is not supported try: DEBUG= -O -g -# -#CCWARN= -#CCWERR= -#CCOPT= ${DEBUG} ${CC_SHARE} -#CCMISC= -qlanglvl=ansi -# -#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC} -I/usr/include -I.. -#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC} -I/usr/include -I.. -# -#LDFLAGS= ${LD_SHARE} -#ILDFLAGS= -# -#LCC= cc -#CC= ${PURIFY} ${LCC} ${CCWERR} -# -### -# -# Solaris Sun cc compiler set -# -# If -O3 -g3 is not supported try: DEBUG= -O2 -g -# If -O2 -g is not supported try: DEBUG= -O -g -# -# We need -DFORCE_STDC to make use of ANSI-C like features and -# to avoid the use of -Xc (which as a lose performance wise). -# -#CCWARN= -#CCWERR= -#CCOPT= ${DEBUG} ${CC_SHARE} -#CCMISC= -DFORCE_STDC -# -#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC} -I/usr/include -I.. -#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC} -I/usr/include -I.. -# -#LDFLAGS= ${LD_SHARE} -#ILDFLAGS= -# -#LCC= cc -#CC= ${PURIFY} ${LCC} ${CCWERR} -# -### -# -# Dec Alpha / Compaq Tru64 cc (non-gnu) compiler set -# -# For better performance, set the following: DEBUG= -std0 -fast -O4 -static -# -#CCWARN= -#CCWERR= -#CCOPT= ${DEBUG} ${CC_SHARE} -#CCMISC= -# -#CFLAGS= -DCALC_SRC ${CCWARN} ${CCOPT} ${CCMISC} -I/usr/include -I.. -#ICFLAGS= -DCALC_SRC ${CCWARN} ${CCMISC} -Wno-unused -I/usr/include -I.. -# -#LDFLAGS= ${LD_SHARE} -#ILDFLAGS= -# -#LCC= cc -#CC= ${PURIFY} ${LCC} ${CCWERR} +endif +################################# +# Apple MacOS X / Darwin target # +################################# +ifeq ($(target),Darwin) +# +BLD_TYPE= calc-dynamic-only +# +CC_SHARE= -fPIC +DEFAULT_LIB_INSTALL_PATH= ${PWD}:/sw/lib:/usr/lib:${LIBDIR}:/usr/local/lib +LD_SHARE= ${DARWIN_ARCH} +LIBCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib +LIBCUSTCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib +# +CC_STATIC= +LD_STATIC= ${DARWIN_ARCH} +LIBCALC_STATIC= +LIBCUSTCALC_STATIC= +# +CCWARN= -Wall -W -Wno-comment +CCWERR= +CCOPT= ${DEBUG} +CCMISC= ${DARWIN_ARCH} +# +LCC= MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} gcc +CC= ${PURIFY} ${LCC} ${CCWERR} +# +# Darmin dynamic shared lib filenames +LIB_EXT:= .dylib +LIB_EXT_VERS:= .${VERS}${LIB_EXT} +LIB_EXT_VER:= .${VER}${LIB_EXT} +LIB_EXT_VE:= .${VE}${LIB_EXT} +# compile Universal by default +DARWIN_ARCH= -arch i386 -arch ppc +MACOSX_DEPLOYMENT_TARGET=10.4 +# +endif + +################## +# FreeBSD target # +################## + +######################################################################## +# NOTE: You MUST either use gmake (GNU Make) or you must try your luck # +# with Makefile.simple and custom/Makefile.simple versions. # +# See HOWTO.INSTALL for more information. # +######################################################################## + +ifeq ($(target),FreeBSD) +# +BLD_TYPE= calc-dynamic-only +# +CC_SHARE= -fPIC +DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib +LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \ + "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}" +LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERS}" +LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERS}" +# +CC_STATIC= +LD_STATIC= +LIBCALC_STATIC= +LIBCUSTCALC_STATIC= +# +CCWARN= -Wall -W -Wno-comment +CCWERR= +CCOPT= ${DEBUG} +CCMISC= +# +LCC= gcc +CC= ${PURIFY} ${LCC} ${CCWERR} +# +MAKE= gmake +# +endif + +####################################################### +# simple target - values used to form Makefile.simple # +####################################################### + +# NOTE: This is not a real host target. The simple target +# exists only to form the Makefile.simple file. + +ifeq ($(target),simple) +#endif /* end of skip for non-Gnu makefiles */ +# +BLD_TYPE= calc-static-only +# +CC_SHARE= -fPIC +DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib +LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \ + "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}" +LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERS}" +LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERS}" +# +CC_STATIC= +LD_STATIC= +LIBCALC_STATIC= +LIBCUSTCALC_STATIC= +# +CCWARN= -Wall -W -Wno-comment +CCWERR= +CCOPT= ${DEBUG} +CCMISC= +# +LCC= cc +CC= ${PURIFY} ${LCC} ${CCWERR} +# +# The simple makefile forces the use of static ${CC} flags +# +# ICFLAGS are given to ${CC} for intermediate progs used to help compile calc +# CFLAGS are given to ${CC} for calc progs other than intermediate progs +# ILDFLAGS for ${CC} in linking intermediate progs used to help compile calc +# LDFLAGS for ${CC} in linking calc progs other than intermediate progs +# +ICFLAGS= ${COMMON_CFLAGS} ${CC_STATIC} +CFLAGS= ${ICFLAGS} ${CCOPT} +# +ILDFLAGS= ${COMMON_LDFLAGS} ${LD_STATIC} +LDFLAGS= ${LD_DEBUG} ${ILDFLAGS} ${LIBCALC_STATIC} ${LIBCUSTCALC_STATIC} +# +#if 0 /* start of skip for non-Gnu makefiles */ +endif + +################################################### +# default target - when no specific target exists # +################################################### + +# NOTE: This is the default generic host target. Used when no other +# host target matches. + +ifeq ($(target),) +# +BLD_TYPE= calc-static-only +# +CC_SHARE= -fPIC +DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib +LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \ + "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}" +LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERS}" +LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERS}" +# +CC_STATIC= +LIBCALC_STATIC= +LIBCUSTCALC_STATIC= +LD_STATIC= +# +CCWARN= -Wall -W -Wno-comment +CCWERR= +CCOPT= ${DEBUG} +CCMISC= +# +LCC= gcc +CC= ${PURIFY} ${LCC} ${CCWERR} +# +endif + +########################################### +# Set the default compile flags for ${CC} # +########################################### + +# Required flags to compile C files for calc +# +# ICFLAGS are given to ${CC} for intermediate progs used to help compile calc +# CFLAGS are given to ${CC} for calc progs other than intermediate progs +# +# NOTE: This does not work for: make-XYZ-only and BLD_TYPE != make-XYZ-only +# +ifeq ($(BLD_TYPE),calc-static-only) +ICFLAGS= ${COMMON_CFLAGS} ${CC_STATIC} +else +ICFLAGS= ${COMMON_CFLAGS} ${CC_SHARE} +endif +CFLAGS= ${ICFLAGS} ${CCOPT} + +# Required flags to link files for calc +# +# ILDFLAGS for ${CC} in linking intermediate progs used to help compile calc +# LDFLAGS for ${CC} in linking calc progs other than intermediate progs +# +ILDFLAGS= ${COMMON_LDFLAGS} +LDFLAGS= ${LD_DEBUG} ${ILDFLAGS} + +#endif /* end of skip for non-Gnu makefiles */ + +####################################################################### +#-=-=-=-=-=- end of target section - only make rules below -=-=-=-=-=-# +####################################################################### +# end of host target cut - Do not remove this line ############################################################################## #-=-=-=-=-=-=-=-=- Be careful if you change something below -=-=-=-=-=-=-=-=-# ############################################################################## # These .c files are required for the main custom interface and -# for the custom support functions. +# for the custom support functions for libcustcalc${LIB_EXT_VERS}. # # There MUST be a .c for every .o in REQUIRED_OBJ. # REQUIRED_SRC= custtbl.c # These .o files correspond to the .c files in REQUIRED_SRC +# for libcustcalc${LIB_EXT_VERS}. # # There MUST be a .o for every .c in REQUIRED_SRC. # @@ -609,11 +747,11 @@ REQUIRED_OBJ= custtbl.o # INSTALL_H_SRC= ${CUSTOM_H_SRC} -# These .c files are used to form libcustcalc.a. +# These .c files are used to form libcustcalc${LIB_EXT_VERS}. # CUSTCALC_SRC= ${REQUIRED_SRC} ${CUSTOM_SRC} -# These .o files are used to form libcustcalc.a. +# These .o files are used to form libcustcalc${LIB_EXT_VERS}. # CUSTCALC_OBJ= ${REQUIRED_OBJ} ${CUSTOM_OBJ} @@ -631,56 +769,43 @@ H_SRC= ${CUSTOM_H_SRC} # directory but are installed as help files from the help/Makefile. # DISTLIST= ${CUSTCALC_SRC} ${CUSTOM_CALC_FILES} ${CUSTOM_HELP} \ - ${INSTALL_H_SRC} CUSTOM_CAL HOW_TO_ADD ${MAKE_FILE} + ${INSTALL_H_SRC} CUSTOM_CAL HOW_TO_ADD ${MAKE_FILE}.head \ + ${MAKE_FILE}.tail # These files are used to make (but not built) a calc .a link library # CALCLIBLIST= ${CUSTCALC_SRC} ${INSTALL_H_SRC} ${MAKE_FILE} HOW_TO_ADD -# This is the custom .a link library that is build +# This is the custom dynbamic shared library that is build # -CALC_LIBCUSTOM= libcustcalc.a +CALC_DYNAMIC_LIBCUSTCALC= libcustcalc${LIB_EXT_VERS} + +# This is the custom static library that is build +# +CALC_STATIC_LIBCUSTCALC= libcustcalc.a # complete list of targets # -TARGETS= ${CALC_LIBCUSTOM} ${CUSTCALC_OBJ} +TARGETS= ${BLD_TYPE} Makefile.simple -# required vars +### # -SHELL= /bin/sh -MAKE_FILE= Makefile - -# standard tools +# The reason for this Makefile :-) # -SED= sed -MAKEDEPEND= makedepend -CHMOD= chmod -SORT= sort -CMP= cmp -AR= ar -RM= rm -TOUCH= touch -MKDIR= mkdir -RMDIR= rmdir -MV= mv -CP= cp -CO= co -TRUE= true -MAKE= make - -## -# -# Standard rules and targets -# -## +### all: ${TARGETS} ${INSTALL_H_SRC} ${CUSTOM_CALC_FILES} \ ${CUSTOM_HELP} ${MAKE_FILE} .all -libcustcalc.a: ${CUSTCALC_OBJ} ${MAKE_FILE} ../${MAKE_FILE} - -${RM} -f libcustcalc.a - ${AR} qc libcustcalc.a ${CUSTCALC_OBJ} - ${RANLIB} libcustcalc.a +calc-dynamic-only: ${CUSTCALC_OBJ} ${CALC_DYNAMIC_LIBCUSTCALC} + +calc-static-only: ${CUSTCALC_OBJ} ${CALC_STATIC_LIBCUSTCALC} + +custom/libcustcalc${LIB_EXT_VERS}: libcustcalc${LIB_EXT_VERS} \ + ${CALC_STATIC_LIBCUSTCALC} + +libcustcalc${LIB_EXT_VERS}: ${CUSTCALC_OBJ} ${MAKE_FILE} + ${CC} ${LIBCUSTCALC_SHLIB} ${CUSTCALC_OBJ} -o $@ ## # @@ -703,6 +828,18 @@ c_sysinfo.o: c_sysinfo.c ${MAKE_FILE} ${RM} -f .all ${TOUCH} .all +### +# +# building calc-static and static lib*.a libraires +# +### + +libcustcalc.a: ${CUSTCALC_OBJ} ${MAKE_FILE} + ${RM} -f libcustcalc.a + ${AR} qc libcustcalc.a ${CUSTCALC_OBJ} + ${RANLIB} libcustcalc.a + ${CHMOD} 0644 libcustcalc.a + ## # # File list generation. You can ignore this section. @@ -733,6 +870,19 @@ calcliblist: ${CALCLIBLIST} fi; \ done +#if 0 /* start of skip for non-Gnu makefiles */ +Makefile.simple: ${MAKE_FILE} + ${V} echo '=-=-=-=-= custom/${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${Q} ${RM} -f $@ + ${Q} ${AWK} '/^#if 0/{skp=1} {if(!skp){print $$0}} /^#endif/{skp=0}' \ + ${MAKE_FILE} > $@ + ${Q} echo >> $@ + ${Q} echo 'Makefile.simple:' >> $@ + ${Q} echo ' $${Q} if [ ! -f Makefile.simple ]; then '"\\" >> $@ + ${Q} echo ' $${CP} -f $${MAKE_FILE} $$@; fi' >> $@ + ${V} echo '=-=-=-=-= custom/${MAKE_FILE} end of $@ rule =-=-=-=-=' +#endif /* end of skip for non-Gnu makefiles */ + ## # # Home grown make dependency rules. Your system make not support @@ -746,14 +896,14 @@ calcliblist: ${CALCLIBLIST} ## depend: - ${Q} if [ -f Makefile.bak ]; then \ - echo "Makefile.bak exists, remove or move it out of the way"; \ + ${Q} if [ -f ${MAKE_FILE}.bak ]; then \ + echo "${MAKE_FILE}.bak exists, remove or move it"; \ exit 1; \ else \ ${TRUE}; \ fi ${Q} echo forming custom/skel - -${Q} ${RM} -rf skel + ${Q} ${RM} -rf skel ${Q} ${MKDIR} skel ${Q} ${MKDIR} skel/custom -${Q} for i in ${C_SRC} /dev/null; do \ @@ -773,8 +923,8 @@ depend: >> "skel/custom/$$i"; \ echo '#endif /* '"$$tag"' */' >> "skel/custom/$$i"; \ done - ${Q} (cd ..; $(MAKE) hsrc) - ${Q} for i in `cd ..; $(MAKE) h_list 2>&1 | \ + ${Q} (cd ..; ${MAKE} -f ${TOP_MAKE_FILE} hsrc) + ${Q} for i in `cd ..; ${MAKE} -f ${TOP_MAKE_FILE} h_list 2>&1 | \ ${SED} -e '/Entering directory/d' \ -e '/Nothing to be done/d' \ -e '/Leaving directory/d'` /dev/null; do \ @@ -788,38 +938,39 @@ depend: >> "skel/$$i"; \ echo '#endif /* '"$$tag"' */' >> "skel/$$i"; \ done - -${Q} ${RM} -f skel/custom/makedep.out + ${Q} ${RM} -f skel/custom/makedep.out ${Q} echo custom/skel formed ${Q} echo forming custom dependency list - ${Q} echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > \ - skel/custom/makedep.out + ${Q} :> skel/custom/makedep.out ${Q} cd skel/custom; ${MAKEDEPEND} -I.. -w 1 -f makedep.out ${C_SRC} -${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/'; \ fi; \ done >> skel/custom/makedep.out + ${Q} LANG=C ${SORT} -u skel/custom/makedep.out \ + -o skel/custom/makedep.out ${Q} echo custom dependency list formed - ${Q} echo forming new custom/Makefile - -${Q} ${RM} -f Makefile.bak - ${Q} ${MV} Makefile Makefile.bak - ${Q} ${SED} -n '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak > Makefile - ${Q} echo "" >> Makefile - ${Q} ${SED} -n '3,$$p' skel/custom/makedep.out | \ - LANG=C ${SORT} -u >> Makefile - -${Q} ${RM} -rf skel - -${Q} if ${CMP} -s Makefile.bak Makefile; then \ - echo 'custom Makefile was already up to date'; \ - ${MV} -f Makefile.bak Makefile; \ + ${Q} echo forming new custom/${MAKE_FILE} + ${Q} ${RM} -f ${MAKE_FILE}.bak + ${Q} ${MV} ${MAKE_FILE} ${MAKE_FILE}.bak + ${Q} ${SED} -n '1,/^# DO NOT DELETE THIS LINE/p' ${MAKE_FILE}.bak > ${MAKE_FILE} + ${Q} ${GREP} -v '^#' skel/custom/makedep.out >> ${MAKE_FILE} + ${Q} ${RM} -rf skel + -${Q} if ${CMP} -s ${MAKE_FILE}.bak ${MAKE_FILE}; then \ + echo 'custom ${MAKE_FILE} was already up to date'; \ + ${MV} -f ${MAKE_FILE}.bak ${MAKE_FILE}; \ else \ - ${RM} -f Makefile.tmp; \ - ${MV} Makefile Makefile.tmp; \ - if [ -d RCS ]; then \ - ${CO} -l Makefile; \ + ${RM} -f ${MAKE_FILE}.tmp; \ + ${MV} ${MAKE_FILE} ${MAKE_FILE}.tmp; \ + if [ -d RCS -a ! -w "${MAKE_FILE}" ]; then \ + ${CO} -l ${MAKE_FILE}; \ fi ;\ - ${MV} Makefile.tmp Makefile; \ + ${MV} ${MAKE_FILE}.tmp ${MAKE_FILE}; \ if [ -d RCS ]; then \ - echo 'new custom Makefile formed -- you need to check it in'; \ + echo '****************************************************'; \ + echo 'new custom ${MAKE_FILE} formed -- you to check it in'; \ + echo '****************************************************'; \ fi; \ fi @@ -845,7 +996,7 @@ echo_inst_files: echo __file__ ${CUSTOMCALDIR}/$$i; \ fi; \ done - ${Q} for i in ${CALC_LIBCUSTOM} /dev/null; do \ + ${Q} for i in ${CALC_DYNAMIC_LIBCUSTCALC} /dev/null; do \ if [ X"$$i" != X"/dev/null" ]; then \ echo __file__ ${CUSTOMCALDIR}/$$i; \ fi; \ @@ -858,11 +1009,19 @@ echo_inst_files: ## clean: - -${RM} -f ${CUSTCALC_OBJ} + ${RM} -f ${CUSTCALC_OBJ} -clobber: - -${RM} -f ${TARGETS} - ${RM} -f .all Makefile.tmp Makefile.bak +clobber: clean + ${RM} -f ${BLD_TYPE} + ${RM} -f .all ${MAKE_FILE}.tmp ${MAKE_FILE}.bak + ${RM} -f libcustcalc${LIB_EXT_VERS} + ${RM} -f libcustcalc${LIB_EXT_VER} + ${RM} -f libcustcalc${LIB_EXT_VE} + ${RM} -f libcustcalc${LIB_EXT} + ${RM} -f libcustcalc.a +#if 0 /* start of skip for non-Gnu makefiles */ + ${RM} -f Makefile.simple +#endif /* end of skip for non-Gnu makefiles */ # install everything # @@ -995,19 +1154,28 @@ install: all echo "installed ${T}${CUSTOMHELPDIR}/$$i"; \ fi; \ done + -${Q} if [ -f "${T}${CUSTOMCALDIR}/libcustcalc.a" ]; then \ + ${RM} -f ${T}${CUSTOMCALDIR}/libcustcalc.a; \ + echo "removed old ${T}${CUSTOMCALDIR}/libcustcalc.a"; \ + fi -${Q} if [ ! -z ${ALLOW_CUSTOM} ]; then \ - if ${CMP} -s libcustcalc.a ${T}${CUSTOMCALDIR}/libcustcalc.a; then \ + if [ -f libcustcalc.a ]; then \ + if ${CMP} -s libcustcalc.a ${T}${LIBDIR}/libcustcalc.a; then \ ${TRUE}; \ else \ - ${RM} -f ${T}${CUSTOMCALDIR}/libcustcalc.a.new; \ - ${CP} -f libcustcalc.a ${T}${CUSTOMCALDIR}/libcustcalc.a.new; \ - ${CHMOD} 0644 ${T}${CUSTOMCALDIR}/libcustcalc.a.new; \ - ${MV} -f ${T}${CUSTOMCALDIR}/libcustcalc.a.new \ - ${T}${CUSTOMCALDIR}/libcustcalc.a; \ - ${RANLIB} ${T}${CUSTOMCALDIR}/libcustcalc.a; \ - echo "installed ${T}${CUSTOMCALDIR}/libcustcalc.a"; \ + ${RM} -f ${T}${LIBDIR}/libcustcalc.a.new; \ + ${CP} -f libcustcalc.a ${T}${LIBDIR}/libcustcalc.a.new; \ + ${CHMOD} 0644 ${T}${LIBDIR}/libcustcalc.a.new; \ + ${MV} -f ${T}${LIBDIR}/libcustcalc.a.new \ + ${T}${LIBDIR}/libcustcalc.a; \ + ${RANLIB} ${T}${LIBDIR}/libcustcalc.a; \ + echo "installed ${T}${LIBDIR}/libcustcalc.a"; \ fi; \ + fi; \ fi + ${Q}# NOTE: The upper level makefile installs libcustcalc${LIB_EXT_VERS} + ${Q}# because we only want to perform one ${LDCONFIG} for both + ${Q}# libcalc${LIB_EXT_VERS} and libcustcalc${LIB_EXT_VERS}. # Try to remove everything that was installed # @@ -1075,7 +1243,7 @@ uninstall: # ## -# DO NOT DELETE THIS LINE +# DO NOT DELETE THIS LINE -- make depend depends on it. c_argv.o: ../alloc.h c_argv.o: ../block.h @@ -1095,11 +1263,9 @@ c_argv.o: ../have_stdlib.h c_argv.o: ../have_string.h c_argv.o: ../have_unused.h c_argv.o: ../longbits.h -c_argv.o: ../md5.h c_argv.o: ../nametype.h c_argv.o: ../qmath.h -c_argv.o: ../shs.h -c_argv.o: ../shs1.h +c_argv.o: ../sha1.h c_argv.o: ../str.h c_argv.o: ../value.h c_argv.o: ../zmath.h @@ -1122,11 +1288,9 @@ c_devnull.o: ../have_string.h c_devnull.o: ../have_unistd.h c_devnull.o: ../have_unused.h c_devnull.o: ../longbits.h -c_devnull.o: ../md5.h c_devnull.o: ../nametype.h c_devnull.o: ../qmath.h -c_devnull.o: ../shs.h -c_devnull.o: ../shs1.h +c_devnull.o: ../sha1.h c_devnull.o: ../str.h c_devnull.o: ../value.h c_devnull.o: ../zmath.h @@ -1149,11 +1313,9 @@ c_help.o: ../have_string.h c_help.o: ../have_unistd.h c_help.o: ../have_unused.h c_help.o: ../longbits.h -c_help.o: ../md5.h c_help.o: ../nametype.h c_help.o: ../qmath.h -c_help.o: ../shs.h -c_help.o: ../shs1.h +c_help.o: ../sha1.h c_help.o: ../str.h c_help.o: ../value.h c_help.o: ../zmath.h @@ -1175,11 +1337,9 @@ c_pmodm127.o: ../have_stdlib.h c_pmodm127.o: ../have_string.h c_pmodm127.o: ../have_unused.h c_pmodm127.o: ../longbits.h -c_pmodm127.o: ../md5.h c_pmodm127.o: ../nametype.h c_pmodm127.o: ../qmath.h -c_pmodm127.o: ../shs.h -c_pmodm127.o: ../shs1.h +c_pmodm127.o: ../sha1.h c_pmodm127.o: ../str.h c_pmodm127.o: ../value.h c_pmodm127.o: ../zmath.h @@ -1201,15 +1361,38 @@ c_pzasusb8.o: ../have_stdlib.h c_pzasusb8.o: ../have_string.h c_pzasusb8.o: ../have_unused.h c_pzasusb8.o: ../longbits.h -c_pzasusb8.o: ../md5.h c_pzasusb8.o: ../nametype.h c_pzasusb8.o: ../qmath.h -c_pzasusb8.o: ../shs.h -c_pzasusb8.o: ../shs1.h +c_pzasusb8.o: ../sha1.h c_pzasusb8.o: ../str.h c_pzasusb8.o: ../value.h c_pzasusb8.o: ../zmath.h c_pzasusb8.o: c_pzasusb8.c +c_register.o: ../alloc.h +c_register.o: ../block.h +c_register.o: ../byteswap.h +c_register.o: ../calc.h +c_register.o: ../calcerr.h +c_register.o: ../cmath.h +c_register.o: ../config.h +c_register.o: ../custom.h +c_register.o: ../decl.h +c_register.o: ../endian_calc.h +c_register.o: ../hash.h +c_register.o: ../have_const.h +c_register.o: ../have_memmv.h +c_register.o: ../have_newstr.h +c_register.o: ../have_stdlib.h +c_register.o: ../have_string.h +c_register.o: ../have_unused.h +c_register.o: ../longbits.h +c_register.o: ../nametype.h +c_register.o: ../qmath.h +c_register.o: ../sha1.h +c_register.o: ../str.h +c_register.o: ../value.h +c_register.o: ../zmath.h +c_register.o: c_register.c c_sysinfo.o: ../alloc.h c_sysinfo.o: ../block.h c_sysinfo.o: ../byteswap.h @@ -1232,12 +1415,10 @@ c_sysinfo.o: ../have_unused.h c_sysinfo.o: ../hist.h c_sysinfo.o: ../lib_calc.h c_sysinfo.o: ../longbits.h -c_sysinfo.o: ../md5.h c_sysinfo.o: ../nametype.h c_sysinfo.o: ../prime.h c_sysinfo.o: ../qmath.h -c_sysinfo.o: ../shs.h -c_sysinfo.o: ../shs1.h +c_sysinfo.o: ../sha1.h c_sysinfo.o: ../str.h c_sysinfo.o: ../value.h c_sysinfo.o: ../zmath.h @@ -1260,11 +1441,9 @@ custtbl.o: ../have_newstr.h custtbl.o: ../have_stdlib.h custtbl.o: ../have_string.h custtbl.o: ../longbits.h -custtbl.o: ../md5.h custtbl.o: ../nametype.h custtbl.o: ../qmath.h -custtbl.o: ../shs.h -custtbl.o: ../shs1.h +custtbl.o: ../sha1.h custtbl.o: ../str.h custtbl.o: ../value.h custtbl.o: ../zmath.h diff --git a/custom/Makefile.head b/custom/Makefile.head new file mode 100644 index 0000000..3bec454 --- /dev/null +++ b/custom/Makefile.head @@ -0,0 +1,456 @@ +#!/bin/make +# +# custom - makefile for calc custom routines +# +# Copyright (C) 1999-2006 Landon Curt Noll +# +# Calc is open software; you can redistribute it and/or modify it under +# the terms of the version 2.1 of the GNU Lesser General Public License +# as published by the Free Software Foundation. +# +# Calc is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General +# Public License for more details. +# +# A copy of version 2.1 of the GNU Lesser General Public License is +# distributed with calc under the filename COPYING-LGPL. You should have +# received a copy with calc; if not, write to Free Software Foundation, Inc. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# @(#) $Revision: 30.12 $ +# @(#) $Id: Makefile.head,v 30.12 2007/09/01 19:54:03 chongo Exp $ +# @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/Makefile.head,v $ +# +# Under source code control: 1997/03/09 02:28:54 +# File existed as early as: 1997 +# +# chongo /\oo/\ http://www.isthe.com/chongo/ +# Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ +# +# calculator by David I. Bell with help/mods from others +# Makefile by Landon Curt Noll + +#if 0 /* start of skip for non-Gnu makefiles */ +############################################################################## +#-=-=-=-=-=-=-=-=- Identify the target machine, if possible -=-=-=-=-=-=-=-=-# +############################################################################## + +# NOTE: You can force a target value by defining target as in: +# +# make ...__optional_arguments_... target=value + +# Try uname -s if the target was not alreadhy set on the make command line +# +ifeq ($(target),) +target=$(shell uname -s 2>/dev/null) +endif +#endif /* end of skip for non-Gnu makefiles */ + +############################################################################## +#-=-=-=-=-=-=-=-=- You may want to change some values below -=-=-=-=-=-=-=-=-# +############################################################################## + +# The custom calc resource files to install +# +# Put your custom calc resource files here. +# +CUSTOM_CALC_FILES= argv.cal halflen.cal pzasusb8.cal pmodm127.cal register.cal + +# The custom help files to install +# +# Put your custom help files here. +# +CUSTOM_HELP= argv devnull help sysinfo pzasusb8 pmodm127 register + +# Any .h files that are needed by programs that use libcustcalc${LIB_EXT_VERS} +# +# Put any .h files that you add which might be useful to other +# programs here. +# +CUSTOM_H_SRC= + +# Any .c files that are needed to build libcustcalc${LIB_EXT_VERS}. +# Don't put ${REQUIRED_SRC} files in this list. +# +# There MUST be a .c in CUSTOM_SRC for every .o in CUSTOM_OBJ. +# +# Put your custom .c files here. +# +CUSTOM_SRC= c_argv.c c_devnull.c c_help.c c_sysinfo.c c_pzasusb8.c \ + c_pmodm127.c c_register.c + +# Any .o files that are needed by program that use libcustcalc${LIB_EXT_VERS}. +# Don't put ${REQUIRED_OBJ} files in this list. +# +# There MUST be a .c in CUSTOM_SRC for every .o in CUSTOM_OBJ. +# +# Put your custom .o files here. +# +CUSTOM_OBJ= c_argv.o c_devnull.o c_help.o c_sysinfo.o c_pzasusb8.o \ + c_pmodm127.o c_register.o + +############################################################################## +#-=-=-=-=-=-=- Defaults in case you want to build from this dir -=-=-=-=-=-=-# +############################################################################## + +# Normally, the upper level makefile will set these values. We provide +# a default here just in case you want to build from this directory. +# +# Makefile debug +# +# Q=@ do not echo internal makefile actions (quiet mode) +# Q= echo internal makefile actions (debug / verbose mode) +# +#Q= +Q=@ + +#### +# Normally, the upper level makefile will set these values. We provide +# a default here just in case you want to build from this directory. +#### + +# Where the system include (.h) files are kept +# +# For DJGPP, select: +# +# INCDIR= /dev/env/DJDIR/include +# +# If in doubt, set: +# +# INCDIR= /usr/include +# + +#INCDIR= /usr/local/include +#INCDIR= /dev/env/DJDIR/include +INCDIR= /usr/include + +# where to install calc realted things +# +# ${BINDIR} where to install calc binary files +# ${LIBDIR} where calc link library (*.a) files are installed +# ${CALC_SHAREDIR} where to install calc help, .cal, startup, config files +# +# NOTE: The install rule prepends installation paths with ${T}, which +# by default is empty. If ${T} is non-empty, then installation +# locations will be relative to the ${T} directory. +# +# For DJGPP, select: +# +# BINDIR= /dev/env/DJDIR/bin +# LIBDIR= /dev/env/DJDIR/lib +# CALC_SHAREDIR= /dev/env/DJDIR/share/calc +# +# If in doubt, set: +# +# BINDIR= /usr/bin +# LIBDIR= /usr/lib +# CALC_SHAREDIR= /usr/share/calc +# +#BINDIR= /usr/local/bin +#BINDIR= /dev/env/DJDIR/bin +BINDIR= /usr/bin + +#LIBDIR= /usr/local/lib +#LIBDIR= /dev/env/DJDIR/lib +LIBDIR= /usr/lib + +#CALC_SHAREDIR= /usr/local/lib/calc +#CALC_SHAREDIR= /dev/env/DJDIR/share/calc +CALC_SHAREDIR= /usr/share/calc + +# By default, these values are based CALC_SHAREDIR, INCDIR, BINDIR +# --------------------------------------------------------------- +# ${HELPDIR} where the help directory is installed +# ${CALC_INCDIR} where the calc include files are installed +# ${CUSTOMCALDIR} where custom *.cal files are installed +# ${CUSTOMHELPDIR} where custom help files are installed +# ${CUSTOMINCDIR} where custom .h files are installed +# ${SCRIPTDIR} where calc shell scripts are installed +# +# NOTE: The install rule prepends installation paths with ${T}, which +# by default is empty. If ${T} is non-empty, then installation +# locations will be relative to the ${T} directory. +# +# If in doubt, set: +# +# HELPDIR= ${CALC_SHAREDIR}/help +# CALC_INCDIR= ${INCDIR}/calc +# CUSTOMCALDIR= ${CALC_SHAREDIR}/custom +# CUSTOMHELPDIR= ${CALC_SHAREDIR}/custhelp +# CUSTOMINCDIR= ${CALC_INCDIR}/custom +# SCRIPTDIR= ${BINDIR}/cscript +# +HELPDIR= ${CALC_SHAREDIR}/help +CALC_INCDIR= ${INCDIR}/calc +CUSTOMCALDIR= ${CALC_SHAREDIR}/custom +CUSTOMHELPDIR= ${CALC_SHAREDIR}/custhelp +CUSTOMINCDIR= ${CALC_INCDIR}/custom +SCRIPTDIR= ${BINDIR}/cscript + +# T - top level directory under which calc will be installed +# +# The calc install is performed under ${T}, the calc build is +# performed under /. The purpose for ${T} is to allow someone +# to install calc somewhere other than into the system area. +# +# For example, if: +# +# BINDIR= /usr/bin +# LIBDIR= /usr/lib +# CALC_SHAREDIR= /usr/share/calc +# +# and if: +# +# T= /var/tmp/testing +# +# Then the installation locations will be: +# +# calc binary files: /var/tmp/testing/usr/bin +# calc link library: /var/tmp/testing/usr/lib +# calc help, .cal ...: /var/tmp/testing/usr/share/calc +# ... etc ... /var/tmp/testing/... +# +# If ${T} is empty, calc is installed under /, which is the same +# top of tree for which it was built. If ${T} is non-empty, then +# calc is installed under ${T}, as if one had to chroot under +# ${T} for calc to operate. +# +# If in doubt, use T= +# +T= + +# Debug/Optimize options for ${CC} and ${LCC} +# +# Select DEBUG= -O2 -gstabs+ -DWINDOZ for DJGPP. +# +#DEBUG= +# +#DEBUG= -O +#DEBUG= -O -g +#DEBUG= -O -g3 +# +#DEBUG= -O1 +#DEBUG= -O1 -g +#DEBUG= -O1 -g3 +# +#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 +# +#DEBUG= -g +#DEBUG= -g3 +#DEBUG= -gx +#DEBUG= -WM,-g +# +#DEBUG= -O2 -gstabs+ -DWINDOZ + +# Some systems require one to use ranlib to add a symbol table to +# a *.a link library. Set RANLIB to the utility that performs this +# action. Set RANLIB to : if your system does not need such a utility. +# +RANLIB=ranlib +#RANLIB=: + +# Normally certain files depend on the Makefile. If the Makefile is +# changed, then certain steps should be redone. If MAKE_FILE is +# set to Makefile, then these files will depend on Makefile. If +# MAKE_FILE is empty, then they wont. +# +# If in doubt, set MAKE_FILE to Makefile +# +MAKE_FILE= Makefile +#MAKE_FILE= + +# Controlling file makefile basename (without the path) +# +# This is the basename same of the makefile that may/does/will drive +# this makefile. +# +# If in doubt, set TOP_MAKE_FILE to Makefile +# +TOP_MAKE_FILE= Makefile + +# If you do not wish to use purify, set PURIFY to an empty string. +# +# If in doubt, use PURIFY= +# +#PURIFY= purify +#PURIFY= purify -m71-engine +#PURIFY= purify -logfile=pure.out +#PURIFY= purify -m71-engine -logfile=pure.out +PURIFY= + +# If you want to use a debugging link library such as a malloc debug link +# library, or need to add special ld flags after the calc link libraries +# are included, set ${LD_DEBUG} below. +# +# If in doubt, set LD_DEBUG to empty. +# +#LD_DEBUG= -lmalloc_cv +LD_DEBUG= + +# When doing a: +# +# make check +# make chk +# make debug +# +# the ${CALC_ENV} is used to supply the proper environment variables +# to calc. Most people will simply need 'CALCPATH=./cal' to ensure +# that these debug rules will only use calc resource files under the +# local source directory. The longer lines (with MALLOC_VERBOSE=1 ...) +# are useful for SGI IRIX people who have 'WorkShop Performance Tools' +# and who also set 'LD_DEBUG= -lmalloc_cv' above. +# +# If in doubt, use CALC_ENV= CALCPATH=./cal. +# +CALC_ENV= CALCPATH=./cal +#CALC_ENV= CALCPATH=./cal MALLOC_VERBOSE=1 MALLOC_TRACING=1 \ +# MALLOC_FASTCHK=1 MALLOC_FULLWARN=1 +#CALC_ENV= CALCPATH=./cal MALLOC_VERBOSE=1 MALLOC_TRACING=1 \ +# MALLOC_FASTCHK=1 MALLOC_FULLWARN=1 MALLOC_CLEAR_FREE=1 \ +# MALLOC_CLEAR_MALLOC=1 + +# By default, custom builtin functions may only be executed if calc +# is given the -C option. This is because custom builtin functions +# may invoke non-standard or non-portable code. One may completely +# disable custom builtin functions by not compiling any of code +# +# ALLOW_CUSTOM= -DCUSTOM # allow custom only if -C is given +# ALLOW_CUSTOM= # disable custom even if -C is given +# +# If in doubt, use ALLOW_CUSTOM= -DCUSTOM +# +ALLOW_CUSTOM= -DCUSTOM +#ALLOW_CUSTOM= + +# The install rule uses: +# +# ${MKDIR} ${MKDIR_ARG} +# +# to create directorties. Normall this amounts to usins mkdir -p dir ... +# Some older systems may not have mkdir -p. If you system does not +# make mkdir -p, then set MKDIR_ARG to empty. +# +# MKDIR_ARG= -p # use mkdir -p when creating paths +# MKDIR_ARG= # use if system does not understand mkdir -p +# +MKDIR_ARG= -p +#MKDIR_ARG= + +# Some out of date operating systems require / want an executable to +# end with a certain file extension. Some compile systems such as +# Cygwin build calc as calc.exe. The EXT variable is used to denote +# the extension required by such. +# +# EXT= # normal Un*x / Linux / GNU/Linux systems +# EXT=.exe # windoz / Cygwin +# +# If in doubt, use EXT= +# +EXT= +#EXT=.exe + +# The default calc versions +# +VERSION= 2.12.2 +VERS= 2.12.2 +VER= 2.12 +VE= 2 + +# Names of shared libraries with versions +# +LIB_EXT= .so +LIB_EXT_VERS= ${LIB_EXT}.${VERS} +LIB_EXT_VER= ${LIB_EXT}.${VER} +LIB_EXT_VE= ${LIB_EXT}.${VE} + +# standard tools +# +SHELL= /bin/sh +SED= sed +MAKEDEPEND= makedepend +GREP= egrep +CHMOD= chmod +FMT= fmt +SORT= sort +CMP= cmp +AR= ar +RM= rm +TOUCH= touch +MKDIR= mkdir +RMDIR= rmdir +MV= mv +CP= cp +CO= co +TRUE= true +MAKE= make +LN= ln +AWK= awk + +# EXTRA_CFLAGS are flags given to ${CC} when compiling C files +# EXTRA_LDFLAGS are flags given to ${CC} when linking progs +# +# Both CFLAGS and LDFLAGS are left blank in this Makefile by +# default so that users may use them on the make command line +# to always the way that C is compiled and files are linked +# respectively. For example: +# +# make all EXTRA_CFLAGS="-DMAGIC" EXTRA_LDFLAGS="-lmagic" +# +# NOTE: These should be left blank in this Makefile to make it +# easier to add stuff on the command line. If you want to +# to change the way calc is compiled by this Makefile, change +# the appropirate host target section below or a flag above. +# +EXTRA_CFLAGS= +EXTRA_LDFLAGS= + +# COMMON_CFLAGS are the common ${CC} flags used for all progs, both +# intermediate and final calc and calc related progs +# +COMMON_CFLAGS= -DCALC_SRC ${ALLOW_CUSTOM} ${CCWARN} ${CCMISC} ${EXTRA_CFLAGS} + +# COMMON_LDFLAGS are the common flags used for linking all progs, both +# intermediate and final calc and calc related progs +# +COMMON_LDFLAGS= ${EXTRA_LDFLAGS} + +########################################### +# Set the default compile flags for ${CC} # +########################################### + +#if 0 /* start of skip for non-Gnu makefiles */ + +# Required flags to compile C files for calc +# +# ICFLAGS are given to ${CC} for intermediate progs used to help compile calc +# CFLAGS are given to ${CC} for calc progs other than intermediate progs +# +# NOTE: This does not work for: make-XYZ-only and BLD_TYPE != make-XYZ-only +# +ifeq ($(BLD_TYPE),calc-static-only) +ICFLAGS= ${COMMON_CFLAGS} ${CC_STATIC} +else +ICFLAGS= ${COMMON_CFLAGS} ${CC_SHARE} +endif +CFLAGS= ${ICFLAGS} ${CCOPT} + +# Required flags to link files for calc +# +# ILDFLAGS for ${CC} in linking intermediate progs used to help compile calc +# LDFLAGS for ${CC} in linking calc progs other than intermediate progs +# +ILDFLAGS= ${COMMON_LDFLAGS} +LDFLAGS= ${LD_DEBUG} ${ILDFLAGS} + +#endif /* end of skip for non-Gnu makefiles */ diff --git a/custom/Makefile.simple b/custom/Makefile.simple new file mode 100644 index 0000000..ff0b904 --- /dev/null +++ b/custom/Makefile.simple @@ -0,0 +1,1220 @@ +#!/bin/make +# +# custom - makefile for calc custom routines +# +# Copyright (C) 1999-2006 Landon Curt Noll +# +# Calc is open software; you can redistribute it and/or modify it under +# the terms of the version 2.1 of the GNU Lesser General Public License +# as published by the Free Software Foundation. +# +# Calc is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General +# Public License for more details. +# +# A copy of version 2.1 of the GNU Lesser General Public License is +# distributed with calc under the filename COPYING-LGPL. You should have +# received a copy with calc; if not, write to Free Software Foundation, Inc. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# @(#) $Revision: 30.12 $ +# @(#) $Id: Makefile.head,v 30.12 2007/09/01 19:54:03 chongo Exp $ +# @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/Makefile.head,v $ +# +# Under source code control: 1997/03/09 02:28:54 +# File existed as early as: 1997 +# +# chongo /\oo/\ http://www.isthe.com/chongo/ +# Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ +# +# calculator by David I. Bell with help/mods from others +# Makefile by Landon Curt Noll + + +############################################################################## +#-=-=-=-=-=-=-=-=- You may want to change some values below -=-=-=-=-=-=-=-=-# +############################################################################## + +# The custom calc resource files to install +# +# Put your custom calc resource files here. +# +CUSTOM_CALC_FILES= argv.cal halflen.cal pzasusb8.cal pmodm127.cal register.cal + +# The custom help files to install +# +# Put your custom help files here. +# +CUSTOM_HELP= argv devnull help sysinfo pzasusb8 pmodm127 register + +# Any .h files that are needed by programs that use libcustcalc${LIB_EXT_VERS} +# +# Put any .h files that you add which might be useful to other +# programs here. +# +CUSTOM_H_SRC= + +# Any .c files that are needed to build libcustcalc${LIB_EXT_VERS}. +# Don't put ${REQUIRED_SRC} files in this list. +# +# There MUST be a .c in CUSTOM_SRC for every .o in CUSTOM_OBJ. +# +# Put your custom .c files here. +# +CUSTOM_SRC= c_argv.c c_devnull.c c_help.c c_sysinfo.c c_pzasusb8.c \ + c_pmodm127.c c_register.c + +# Any .o files that are needed by program that use libcustcalc${LIB_EXT_VERS}. +# Don't put ${REQUIRED_OBJ} files in this list. +# +# There MUST be a .c in CUSTOM_SRC for every .o in CUSTOM_OBJ. +# +# Put your custom .o files here. +# +CUSTOM_OBJ= c_argv.o c_devnull.o c_help.o c_sysinfo.o c_pzasusb8.o \ + c_pmodm127.o c_register.o + +############################################################################## +#-=-=-=-=-=-=- Defaults in case you want to build from this dir -=-=-=-=-=-=-# +############################################################################## + +# Normally, the upper level makefile will set these values. We provide +# a default here just in case you want to build from this directory. +# +# Makefile debug +# +# Q=@ do not echo internal makefile actions (quiet mode) +# Q= echo internal makefile actions (debug / verbose mode) +# +#Q= +Q=@ + +#### +# Normally, the upper level makefile will set these values. We provide +# a default here just in case you want to build from this directory. +#### + +# Where the system include (.h) files are kept +# +# For DJGPP, select: +# +# INCDIR= /dev/env/DJDIR/include +# +# If in doubt, set: +# +# INCDIR= /usr/include +# + +#INCDIR= /usr/local/include +#INCDIR= /dev/env/DJDIR/include +INCDIR= /usr/include + +# where to install calc realted things +# +# ${BINDIR} where to install calc binary files +# ${LIBDIR} where calc link library (*.a) files are installed +# ${CALC_SHAREDIR} where to install calc help, .cal, startup, config files +# +# NOTE: The install rule prepends installation paths with ${T}, which +# by default is empty. If ${T} is non-empty, then installation +# locations will be relative to the ${T} directory. +# +# For DJGPP, select: +# +# BINDIR= /dev/env/DJDIR/bin +# LIBDIR= /dev/env/DJDIR/lib +# CALC_SHAREDIR= /dev/env/DJDIR/share/calc +# +# If in doubt, set: +# +# BINDIR= /usr/bin +# LIBDIR= /usr/lib +# CALC_SHAREDIR= /usr/share/calc +# +#BINDIR= /usr/local/bin +#BINDIR= /dev/env/DJDIR/bin +BINDIR= /usr/bin + +#LIBDIR= /usr/local/lib +#LIBDIR= /dev/env/DJDIR/lib +LIBDIR= /usr/lib + +#CALC_SHAREDIR= /usr/local/lib/calc +#CALC_SHAREDIR= /dev/env/DJDIR/share/calc +CALC_SHAREDIR= /usr/share/calc + +# By default, these values are based CALC_SHAREDIR, INCDIR, BINDIR +# --------------------------------------------------------------- +# ${HELPDIR} where the help directory is installed +# ${CALC_INCDIR} where the calc include files are installed +# ${CUSTOMCALDIR} where custom *.cal files are installed +# ${CUSTOMHELPDIR} where custom help files are installed +# ${CUSTOMINCDIR} where custom .h files are installed +# ${SCRIPTDIR} where calc shell scripts are installed +# +# NOTE: The install rule prepends installation paths with ${T}, which +# by default is empty. If ${T} is non-empty, then installation +# locations will be relative to the ${T} directory. +# +# If in doubt, set: +# +# HELPDIR= ${CALC_SHAREDIR}/help +# CALC_INCDIR= ${INCDIR}/calc +# CUSTOMCALDIR= ${CALC_SHAREDIR}/custom +# CUSTOMHELPDIR= ${CALC_SHAREDIR}/custhelp +# CUSTOMINCDIR= ${CALC_INCDIR}/custom +# SCRIPTDIR= ${BINDIR}/cscript +# +HELPDIR= ${CALC_SHAREDIR}/help +CALC_INCDIR= ${INCDIR}/calc +CUSTOMCALDIR= ${CALC_SHAREDIR}/custom +CUSTOMHELPDIR= ${CALC_SHAREDIR}/custhelp +CUSTOMINCDIR= ${CALC_INCDIR}/custom +SCRIPTDIR= ${BINDIR}/cscript + +# T - top level directory under which calc will be installed +# +# The calc install is performed under ${T}, the calc build is +# performed under /. The purpose for ${T} is to allow someone +# to install calc somewhere other than into the system area. +# +# For example, if: +# +# BINDIR= /usr/bin +# LIBDIR= /usr/lib +# CALC_SHAREDIR= /usr/share/calc +# +# and if: +# +# T= /var/tmp/testing +# +# Then the installation locations will be: +# +# calc binary files: /var/tmp/testing/usr/bin +# calc link library: /var/tmp/testing/usr/lib +# calc help, .cal ...: /var/tmp/testing/usr/share/calc +# ... etc ... /var/tmp/testing/... +# +# If ${T} is empty, calc is installed under /, which is the same +# top of tree for which it was built. If ${T} is non-empty, then +# calc is installed under ${T}, as if one had to chroot under +# ${T} for calc to operate. +# +# If in doubt, use T= +# +T= + +# Debug/Optimize options for ${CC} and ${LCC} +# +# Select DEBUG= -O2 -gstabs+ -DWINDOZ for DJGPP. +# +#DEBUG= +# +#DEBUG= -O +#DEBUG= -O -g +#DEBUG= -O -g3 +# +#DEBUG= -O1 +#DEBUG= -O1 -g +#DEBUG= -O1 -g3 +# +#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 +# +#DEBUG= -g +#DEBUG= -g3 +#DEBUG= -gx +#DEBUG= -WM,-g +# +#DEBUG= -O2 -gstabs+ -DWINDOZ + +# Some systems require one to use ranlib to add a symbol table to +# a *.a link library. Set RANLIB to the utility that performs this +# action. Set RANLIB to : if your system does not need such a utility. +# +RANLIB=ranlib +#RANLIB=: + +# Normally certain files depend on the Makefile. If the Makefile is +# changed, then certain steps should be redone. If MAKE_FILE is +# set to Makefile, then these files will depend on Makefile. If +# MAKE_FILE is empty, then they wont. +# +# If in doubt, set MAKE_FILE to Makefile +# +MAKE_FILE= Makefile +#MAKE_FILE= + +# Controlling file makefile basename (without the path) +# +# This is the basename same of the makefile that may/does/will drive +# this makefile. +# +# If in doubt, set TOP_MAKE_FILE to Makefile +# +TOP_MAKE_FILE= Makefile + +# If you do not wish to use purify, set PURIFY to an empty string. +# +# If in doubt, use PURIFY= +# +#PURIFY= purify +#PURIFY= purify -m71-engine +#PURIFY= purify -logfile=pure.out +#PURIFY= purify -m71-engine -logfile=pure.out +PURIFY= + +# If you want to use a debugging link library such as a malloc debug link +# library, or need to add special ld flags after the calc link libraries +# are included, set ${LD_DEBUG} below. +# +# If in doubt, set LD_DEBUG to empty. +# +#LD_DEBUG= -lmalloc_cv +LD_DEBUG= + +# When doing a: +# +# make check +# make chk +# make debug +# +# the ${CALC_ENV} is used to supply the proper environment variables +# to calc. Most people will simply need 'CALCPATH=./cal' to ensure +# that these debug rules will only use calc resource files under the +# local source directory. The longer lines (with MALLOC_VERBOSE=1 ...) +# are useful for SGI IRIX people who have 'WorkShop Performance Tools' +# and who also set 'LD_DEBUG= -lmalloc_cv' above. +# +# If in doubt, use CALC_ENV= CALCPATH=./cal. +# +CALC_ENV= CALCPATH=./cal +#CALC_ENV= CALCPATH=./cal MALLOC_VERBOSE=1 MALLOC_TRACING=1 \ +# MALLOC_FASTCHK=1 MALLOC_FULLWARN=1 +#CALC_ENV= CALCPATH=./cal MALLOC_VERBOSE=1 MALLOC_TRACING=1 \ +# MALLOC_FASTCHK=1 MALLOC_FULLWARN=1 MALLOC_CLEAR_FREE=1 \ +# MALLOC_CLEAR_MALLOC=1 + +# By default, custom builtin functions may only be executed if calc +# is given the -C option. This is because custom builtin functions +# may invoke non-standard or non-portable code. One may completely +# disable custom builtin functions by not compiling any of code +# +# ALLOW_CUSTOM= -DCUSTOM # allow custom only if -C is given +# ALLOW_CUSTOM= # disable custom even if -C is given +# +# If in doubt, use ALLOW_CUSTOM= -DCUSTOM +# +ALLOW_CUSTOM= -DCUSTOM +#ALLOW_CUSTOM= + +# The install rule uses: +# +# ${MKDIR} ${MKDIR_ARG} +# +# to create directorties. Normall this amounts to usins mkdir -p dir ... +# Some older systems may not have mkdir -p. If you system does not +# make mkdir -p, then set MKDIR_ARG to empty. +# +# MKDIR_ARG= -p # use mkdir -p when creating paths +# MKDIR_ARG= # use if system does not understand mkdir -p +# +MKDIR_ARG= -p +#MKDIR_ARG= + +# Some out of date operating systems require / want an executable to +# end with a certain file extension. Some compile systems such as +# Cygwin build calc as calc.exe. The EXT variable is used to denote +# the extension required by such. +# +# EXT= # normal Un*x / Linux / GNU/Linux systems +# EXT=.exe # windoz / Cygwin +# +# If in doubt, use EXT= +# +EXT= +#EXT=.exe + +# The default calc versions +# +VERSION= 2.12.2 +VERS= 2.12.2 +VER= 2.12 +VE= 2 + +# Names of shared libraries with versions +# +LIB_EXT= .so +LIB_EXT_VERS= ${LIB_EXT}.${VERS} +LIB_EXT_VER= ${LIB_EXT}.${VER} +LIB_EXT_VE= ${LIB_EXT}.${VE} + +# standard tools +# +SHELL= /bin/sh +SED= sed +MAKEDEPEND= makedepend +GREP= egrep +CHMOD= chmod +FMT= fmt +SORT= sort +CMP= cmp +AR= ar +RM= rm +TOUCH= touch +MKDIR= mkdir +RMDIR= rmdir +MV= mv +CP= cp +CO= co +TRUE= true +MAKE= make +LN= ln +AWK= awk + +# EXTRA_CFLAGS are flags given to ${CC} when compiling C files +# EXTRA_LDFLAGS are flags given to ${CC} when linking progs +# +# Both CFLAGS and LDFLAGS are left blank in this Makefile by +# default so that users may use them on the make command line +# to always the way that C is compiled and files are linked +# respectively. For example: +# +# make all EXTRA_CFLAGS="-DMAGIC" EXTRA_LDFLAGS="-lmagic" +# +# NOTE: These should be left blank in this Makefile to make it +# easier to add stuff on the command line. If you want to +# to change the way calc is compiled by this Makefile, change +# the appropirate host target section below or a flag above. +# +EXTRA_CFLAGS= +EXTRA_LDFLAGS= + +# COMMON_CFLAGS are the common ${CC} flags used for all progs, both +# intermediate and final calc and calc related progs +# +COMMON_CFLAGS= -DCALC_SRC ${ALLOW_CUSTOM} ${CCWARN} ${CCMISC} ${EXTRA_CFLAGS} + +# COMMON_LDFLAGS are the common flags used for linking all progs, both +# intermediate and final calc and calc related progs +# +COMMON_LDFLAGS= ${EXTRA_LDFLAGS} + +########################################### +# Set the default compile flags for ${CC} # +########################################### + +# start of host target cut - Do not remove this line +############################################################################## +#-=-=-=-=-=- host target section - targets that override defaults -=-=-=-=-=-# +############################################################################## + +# Common values set in targets +# +# BLD_TYPE determines if calc is built with static and/or dynamic libs. +# Set this value to one of: +# +# BLD_TYPE= calc-dynamic-only +# BLD_TYPE= calc-static-only +# +# CC_SHARE are flags given to ${CC} to build .o files suitable for shared libs +# DEFAULT_LIB_INSTALL_PATH is where calc progs look for calc shared libs +# LD_SHARE are common flags given to ${CC} to link with shared libraries +# LIBCALC_SHLIB are flags given to ${CC} to build libcalc shared lib +# LIBCUSTCALC_SHLIB are flags given to ${CC} to build libcustcalc shared lib +# +# NOTE: The above 4 values are unused if BLD_TYPE= calc-static-only +# +# CC_STATIC are flags given to ${CC} to build .o files suitable for static libs +# LD_STATIC are common flags given to ${CC} to link with static libraries +# LIBCALC_STATIC are flags given to ${CC} to build libcalc static lib +# LIBCUSTCALC_STATIC are flags given to ${CC} to build libcustcalc static lib +# +# NOTE: The above 4 values are unused if BLD_TYPE= calc-dynamic-only +# +# CCOPT are flags given to ${CC} for optimization +# CCWARN are flags given to ${CC} for warning message control +# CCWERR are flags given to ${CC} to make warnings fatal errors +# NOTE: CCWERR is only set in development Makefiles and must only be +# used with ${CC}, not ${LCC}. If you do not want the compiler +# to abort on warnings, then leave CCWERR blank. +# CCMISC are misc flags given to ${CC} +# +# LCC how the the C compiler is invoked on locally executed intermediate progs +# CC is how the the C compiler is invoked (with an optional Purify) +# +# Specific target overrides or modifications to default values + +########################################################################## +# NOTE: If your target is not supported below and the default target # +# is not suitable for your needs, please send to the: # +# # +# calc-contrib at asthe dot com # +# # +# EMail address an "ifeq ($(target),YOUR_TARGET_NAME)" ... "endif" # +# set of lines so that we can consider them for the next release. # +########################################################################## + +# +BLD_TYPE= calc-static-only +# +CC_SHARE= -fPIC +DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib +LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \ + "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}" +LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERS}" +LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERS}" +# +CC_STATIC= +LD_STATIC= +LIBCALC_STATIC= +LIBCUSTCALC_STATIC= +# +CCWARN= -Wall -W -Wno-comment +CCWERR= +CCOPT= ${DEBUG} +CCMISC= +# +LCC= cc +CC= ${PURIFY} ${LCC} ${CCWERR} +# +# The simple makefile forces the use of static ${CC} flags +# +# ICFLAGS are given to ${CC} for intermediate progs used to help compile calc +# CFLAGS are given to ${CC} for calc progs other than intermediate progs +# ILDFLAGS for ${CC} in linking intermediate progs used to help compile calc +# LDFLAGS for ${CC} in linking calc progs other than intermediate progs +# +ICFLAGS= ${COMMON_CFLAGS} ${CC_STATIC} +CFLAGS= ${ICFLAGS} ${CCOPT} +# +ILDFLAGS= ${COMMON_LDFLAGS} ${LD_STATIC} +LDFLAGS= ${LD_DEBUG} ${ILDFLAGS} ${LIBCALC_STATIC} ${LIBCUSTCALC_STATIC} +# + +####################################################################### +#-=-=-=-=-=- end of target section - only make rules below -=-=-=-=-=-# +####################################################################### +# end of host target cut - Do not remove this line +############################################################################## +#-=-=-=-=-=-=-=-=- Be careful if you change something below -=-=-=-=-=-=-=-=-# +############################################################################## + +# These .c files are required for the main custom interface and +# for the custom support functions for libcustcalc${LIB_EXT_VERS}. +# +# There MUST be a .c for every .o in REQUIRED_OBJ. +# +REQUIRED_SRC= custtbl.c + +# These .o files correspond to the .c files in REQUIRED_SRC +# for libcustcalc${LIB_EXT_VERS}. +# +# There MUST be a .o for every .c in REQUIRED_SRC. +# +REQUIRED_OBJ= custtbl.o + +# These .h files are installed under ${CUSTOMCALDIR} by the install rule. +# +INSTALL_H_SRC= ${CUSTOM_H_SRC} + +# These .c files are used to form libcustcalc${LIB_EXT_VERS}. +# +CUSTCALC_SRC= ${REQUIRED_SRC} ${CUSTOM_SRC} + +# These .o files are used to form libcustcalc${LIB_EXT_VERS}. +# +CUSTCALC_OBJ= ${REQUIRED_OBJ} ${CUSTOM_OBJ} + +# These .c files are used to build the dependency list +# +C_SRC= ${REQUIRED_SRC} ${CUSTOM_SRC} + +# These .h files are used to build the dependecy list +# +H_SRC= ${CUSTOM_H_SRC} + +# These files are found (but not built) in the distribution +# +# The CUSTOM_CAL and HOW_TO_ADD are files distributed from this +# directory but are installed as help files from the help/Makefile. +# +DISTLIST= ${CUSTCALC_SRC} ${CUSTOM_CALC_FILES} ${CUSTOM_HELP} \ + ${INSTALL_H_SRC} CUSTOM_CAL HOW_TO_ADD ${MAKE_FILE}.head \ + ${MAKE_FILE}.tail + +# These files are used to make (but not built) a calc .a link library +# +CALCLIBLIST= ${CUSTCALC_SRC} ${INSTALL_H_SRC} ${MAKE_FILE} HOW_TO_ADD + +# This is the custom dynbamic shared library that is build +# +CALC_DYNAMIC_LIBCUSTCALC= libcustcalc${LIB_EXT_VERS} + +# This is the custom static library that is build +# +CALC_STATIC_LIBCUSTCALC= libcustcalc.a + +# complete list of targets +# +TARGETS= ${BLD_TYPE} Makefile.simple + +### +# +# The reason for this Makefile :-) +# +### + +all: ${TARGETS} ${INSTALL_H_SRC} ${CUSTOM_CALC_FILES} \ + ${CUSTOM_HELP} ${MAKE_FILE} .all + +calc-dynamic-only: ${CUSTCALC_OBJ} ${CALC_DYNAMIC_LIBCUSTCALC} + +calc-static-only: ${CUSTCALC_OBJ} ${CALC_STATIC_LIBCUSTCALC} + +custom/libcustcalc${LIB_EXT_VERS}: libcustcalc${LIB_EXT_VERS} \ + ${CALC_STATIC_LIBCUSTCALC} + +libcustcalc${LIB_EXT_VERS}: ${CUSTCALC_OBJ} ${MAKE_FILE} + ${CC} ${LIBCUSTCALC_SHLIB} ${CUSTCALC_OBJ} -o $@ + +## +# +# Special .o files +# +## + +c_sysinfo.o: c_sysinfo.c ${MAKE_FILE} + ${CC} ${CFLAGS} c_sysinfo.c -c + +## +# +# used by the upper level Makefile +# +## + +# to determine of we have done all +# +.all: + ${RM} -f .all + ${TOUCH} .all + +### +# +# building calc-static and static lib*.a libraires +# +### + +libcustcalc.a: ${CUSTCALC_OBJ} ${MAKE_FILE} + ${RM} -f libcustcalc.a + ${AR} qc libcustcalc.a ${CUSTCALC_OBJ} + ${RANLIB} libcustcalc.a + ${CHMOD} 0644 libcustcalc.a + +## +# +# File list generation. You can ignore this section. +# +# +# We will form the names of source files as if they were in a +# sub-directory called calc/lib. +# +# NOTE: Due to bogus shells found on one common system we must have +# an non-emoty else clause for every if condition. *sigh* +# +## + +distlist: ${DISTLIST} + ${Q} for i in ${DISTLIST} /dev/null; do \ + if [ X"$$i" != X"/dev/null" ]; then \ + echo custom/$$i; \ + fi; \ + done + +distdir: + ${Q} echo custom + +calcliblist: ${CALCLIBLIST} + ${Q} for i in ${CALCLIBLIST} /dev/null; do \ + if [ X"$$i" != X"/dev/null" ]; then \ + echo custom/$$i; \ + fi; \ + done + + +## +# +# Home grown make dependency rules. Your system make not support +# or have the needed tools. You can ignore this section. +# +# We will form a skelaton tree of *.c files containing only #include "foo.h" +# lines and .h files containing the same lines surrounded by multiple include +# prevention lines. This allows us to build a static depend list that will +# satisfy all possible cpp symbol definition combinations. +# +## + +depend: + ${Q} if [ -f ${MAKE_FILE}.bak ]; then \ + echo "${MAKE_FILE}.bak exists, remove or move it"; \ + exit 1; \ + else \ + ${TRUE}; \ + fi + ${Q} echo forming custom/skel + ${Q} ${RM} -rf skel + ${Q} ${MKDIR} skel + ${Q} ${MKDIR} skel/custom + -${Q} for i in ${C_SRC} /dev/null; do \ + if [ X"$$i" != X"/dev/null" ]; then \ + ${SED} -n '/^#[ ]*include[ ]*"/p' \ + "$$i" > "skel/custom/$$i"; \ + fi; \ + done + -${Q} for i in ${H_SRC} /dev/null; do \ + if [ "$$i" = "/dev/null" ]; then \ + continue; \ + fi; \ + tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \ + echo "#if !defined($$tag)" > "skel/custom/$$i"; \ + echo "#define $$tag" >> "skel/custom/$$i"; \ + ${SED} -n '/^#[ ]*include[ ]*"/p' "$$i" \ + >> "skel/custom/$$i"; \ + echo '#endif /* '"$$tag"' */' >> "skel/custom/$$i"; \ + done + ${Q} (cd ..; ${MAKE} -f ${TOP_MAKE_FILE} hsrc) + ${Q} for i in `cd ..; ${MAKE} -f ${TOP_MAKE_FILE} h_list 2>&1 | \ + ${SED} -e '/Entering directory/d' \ + -e '/Nothing to be done/d' \ + -e '/Leaving directory/d'` /dev/null; do \ + if [ "$$i" = "/dev/null" ]; then \ + continue; \ + fi; \ + tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \ + echo "#if !defined($$tag)" > "skel/$$i"; \ + echo "#define $$tag" >> "skel/$$i"; \ + ${SED} -n '/^#[ ]*include[ ]*"/p' "../$$i" \ + >> "skel/$$i"; \ + echo '#endif /* '"$$tag"' */' >> "skel/$$i"; \ + done + ${Q} ${RM} -f skel/custom/makedep.out + ${Q} echo custom/skel formed + ${Q} echo forming custom dependency list + ${Q} :> skel/custom/makedep.out + ${Q} cd skel/custom; ${MAKEDEPEND} -I.. -w 1 -f makedep.out ${C_SRC} + -${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/'; \ + fi; \ + done >> skel/custom/makedep.out + ${Q} LANG=C ${SORT} -u skel/custom/makedep.out \ + -o skel/custom/makedep.out + ${Q} echo custom dependency list formed + ${Q} echo forming new custom/${MAKE_FILE} + ${Q} ${RM} -f ${MAKE_FILE}.bak + ${Q} ${MV} ${MAKE_FILE} ${MAKE_FILE}.bak + ${Q} ${SED} -n '1,/^# DO NOT DELETE THIS LINE/p' ${MAKE_FILE}.bak > ${MAKE_FILE} + ${Q} ${GREP} -v '^#' skel/custom/makedep.out >> ${MAKE_FILE} + ${Q} ${RM} -rf skel + -${Q} if ${CMP} -s ${MAKE_FILE}.bak ${MAKE_FILE}; then \ + echo 'custom ${MAKE_FILE} was already up to date'; \ + ${MV} -f ${MAKE_FILE}.bak ${MAKE_FILE}; \ + else \ + ${RM} -f ${MAKE_FILE}.tmp; \ + ${MV} ${MAKE_FILE} ${MAKE_FILE}.tmp; \ + if [ -d RCS -a ! -w "${MAKE_FILE}" ]; then \ + ${CO} -l ${MAKE_FILE}; \ + fi ;\ + ${MV} ${MAKE_FILE}.tmp ${MAKE_FILE}; \ + if [ -d RCS ]; then \ + echo '****************************************************'; \ + echo 'new custom ${MAKE_FILE} formed -- you to check it in'; \ + echo '****************************************************'; \ + fi; \ + fi + +## +# +# rpm rules +# +## + +echo_inst_files: + ${Q} for i in ${INSTALL_H_SRC} /dev/null; do \ + if [ X"$$i" != X"/dev/null" ]; then \ + echo __file__ ${CUSTOMINCDIR}/$$i; \ + fi; \ + done + ${Q} for i in ${CUSTOM_HELP} /dev/null; do \ + if [ X"$$i" != X"/dev/null" ]; then \ + echo __file__ ${CUSTOMHELPDIR}/$$i; \ + fi; \ + done + ${Q} for i in ${CUSTOM_CALC_FILES} /dev/null; do \ + if [ X"$$i" != X"/dev/null" ]; then \ + echo __file__ ${CUSTOMCALDIR}/$$i; \ + fi; \ + done + ${Q} for i in ${CALC_DYNAMIC_LIBCUSTCALC} /dev/null; do \ + if [ X"$$i" != X"/dev/null" ]; then \ + echo __file__ ${CUSTOMCALDIR}/$$i; \ + fi; \ + done + +## +# +# Utility rules +# +## + +clean: + ${RM} -f ${CUSTCALC_OBJ} + +clobber: clean + ${RM} -f ${BLD_TYPE} + ${RM} -f .all ${MAKE_FILE}.tmp ${MAKE_FILE}.bak + ${RM} -f libcustcalc${LIB_EXT_VERS} + ${RM} -f libcustcalc${LIB_EXT_VER} + ${RM} -f libcustcalc${LIB_EXT_VE} + ${RM} -f libcustcalc${LIB_EXT} + ${RM} -f libcustcalc.a + +# install everything +# +# NOTE: Keep the uninstall rule in reverse order to the install rule +# +install: all + -${Q} if [ ! -d ${T}${INCDIR} ]; then \ + echo ${MKDIR} ${T}${INCDIR}; \ + ${MKDIR} ${T}${INCDIR}; \ + if [ ! -d "${T}${INCDIR}" ]; then \ + echo ${MKDIR} -p "${T}${INCDIR}"; \ + ${MKDIR} -p "${T}${INCDIR}"; \ + fi; \ + echo ${CHMOD} 0755 ${T}${INCDIR}; \ + ${CHMOD} 0755 ${T}${INCDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${CALC_SHAREDIR} ]; then \ + echo ${MKDIR} ${T}${CALC_SHAREDIR}; \ + ${MKDIR} ${T}${CALC_SHAREDIR}; \ + if [ ! -d "${T}${CALC_SHAREDIR}" ]; then \ + echo ${MKDIR} -p "${T}${CALC_SHAREDIR}"; \ + ${MKDIR} -p "${T}${CALC_SHAREDIR}"; \ + fi; \ + echo ${CHMOD} 0755 ${T}${CALC_SHAREDIR}; \ + ${CHMOD} 0755 ${T}${CALC_SHAREDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${CALC_INCDIR} ]; then \ + echo ${MKDIR} ${T}${CALC_INCDIR}; \ + ${MKDIR} ${T}${CALC_INCDIR}; \ + if [ ! -d "${T}${CALC_INCDIR}" ]; then \ + echo ${MKDIR} -p "${T}${CALC_INCDIR}"; \ + ${MKDIR} -p "${T}${CALC_INCDIR}"; \ + fi; \ + echo ${CHMOD} 0755 ${T}${CALC_INCDIR}; \ + ${CHMOD} 0755 ${T}${CALC_INCDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${HELPDIR} ]; then \ + echo ${MKDIR} ${T}${HELPDIR}; \ + ${MKDIR} ${T}${HELPDIR}; \ + if [ ! -d "${T}${HELPDIR}" ]; then \ + echo ${MKDIR} -p "${T}${HELPDIR}"; \ + ${MKDIR} -p "${T}${HELPDIR}"; \ + fi; \ + echo ${CHMOD} 0755 ${T}${HELPDIR}; \ + ${CHMOD} 0755 ${T}${HELPDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${CUSTOMCALDIR} ]; then \ + echo ${MKDIR} ${T}${CUSTOMCALDIR}; \ + ${MKDIR} ${T}${CUSTOMCALDIR}; \ + if [ ! -d "${T}${CUSTOMCALDIR}" ]; then \ + echo ${MKDIR} -p "${T}${CUSTOMCALDIR}"; \ + ${MKDIR} -p "${T}${CUSTOMCALDIR}"; \ + fi; \ + echo ${CHMOD} 0755 ${T}${CUSTOMCALDIR}; \ + ${CHMOD} 0755 ${T}${CUSTOMCALDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${CUSTOMHELPDIR} ]; then \ + echo ${MKDIR} ${T}${CUSTOMHELPDIR}; \ + ${MKDIR} ${T}${CUSTOMHELPDIR}; \ + if [ ! -d "${T}${CUSTOMHELPDIR}" ]; then \ + echo ${MKDIR} -p "${T}${CUSTOMHELPDIR}"; \ + ${MKDIR} -p "${T}${CUSTOMHELPDIR}"; \ + fi; \ + echo ${CHMOD} 0755 ${T}${CUSTOMHELPDIR}; \ + ${CHMOD} 0755 ${T}${CUSTOMHELPDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${CUSTOMINCDIR} ]; then \ + echo ${MKDIR} ${T}${CUSTOMINCDIR}; \ + ${MKDIR} ${T}${CUSTOMINCDIR}; \ + if [ ! -d "${T}${CUSTOMINCDIR}" ]; then \ + echo ${MKDIR} -p "${T}${CUSTOMINCDIR}"; \ + ${MKDIR} -p "${T}${CUSTOMINCDIR}"; \ + fi; \ + echo ${CHMOD} 0755 ${T}${CUSTOMINCDIR}; \ + ${CHMOD} 0755 ${T}${CUSTOMINCDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} for i in ${INSTALL_H_SRC} /dev/null; do \ + if [ "$$i" = "/dev/null" ]; then \ + continue; \ + fi; \ + if ${CMP} -s "$$i" ${T}${CUSTOMINCDIR}/$$i; then \ + ${TRUE}; \ + else \ + ${RM} -f ${T}${CUSTOMINCDIR}/$$i.new; \ + ${CP} -f $$i ${T}${CUSTOMINCDIR}/$$i.new; \ + ${CHMOD} 0444 ${T}${CUSTOMINCDIR}/$$i.new; \ + ${MV} -f ${T}${CUSTOMINCDIR}/$$i.new ${T}${CUSTOMINCDIR}/$$i; \ + echo "installed ${T}${CUSTOMINCDIR}/$$i"; \ + fi; \ + done + -${Q} for i in ${CUSTOM_CALC_FILES} /dev/null; do \ + if [ "$$i" = "/dev/null" ]; then \ + continue; \ + fi; \ + if ${CMP} -s $$i ${T}${CUSTOMCALDIR}/$$i; then \ + ${TRUE}; \ + else \ + ${RM} -f ${T}${CUSTOMCALDIR}/$$i.new; \ + ${CP} -f $$i ${T}${CUSTOMCALDIR}/$$i.new; \ + ${CHMOD} 0444 ${T}${CUSTOMCALDIR}/$$i.new; \ + ${MV} -f ${T}${CUSTOMCALDIR}/$$i.new ${T}${CUSTOMCALDIR}/$$i; \ + echo "installed ${T}${CUSTOMCALDIR}/$$i"; \ + fi; \ + done + -${Q} for i in ${CUSTOM_HELP} /dev/null; do \ + if [ "$$i" = "/dev/null" ]; then \ + continue; \ + fi; \ + if ${CMP} -s $$i ${T}${CUSTOMHELPDIR}/$$i; then \ + ${TRUE}; \ + else \ + ${RM} -f ${T}${CUSTOMHELPDIR}/$$i.new; \ + ${CP} -f $$i ${T}${CUSTOMHELPDIR}/$$i.new; \ + ${CHMOD} 0444 ${T}${CUSTOMHELPDIR}/$$i.new; \ + ${MV} -f ${T}${CUSTOMHELPDIR}/$$i.new ${T}${CUSTOMHELPDIR}/$$i; \ + echo "installed ${T}${CUSTOMHELPDIR}/$$i"; \ + fi; \ + done + -${Q} if [ -f "${T}${CUSTOMCALDIR}/libcustcalc.a" ]; then \ + ${RM} -f ${T}${CUSTOMCALDIR}/libcustcalc.a; \ + echo "removed old ${T}${CUSTOMCALDIR}/libcustcalc.a"; \ + fi + -${Q} if [ ! -z ${ALLOW_CUSTOM} ]; then \ + if [ -f libcustcalc.a ]; then \ + if ${CMP} -s libcustcalc.a ${T}${LIBDIR}/libcustcalc.a; then \ + ${TRUE}; \ + else \ + ${RM} -f ${T}${LIBDIR}/libcustcalc.a.new; \ + ${CP} -f libcustcalc.a ${T}${LIBDIR}/libcustcalc.a.new; \ + ${CHMOD} 0644 ${T}${LIBDIR}/libcustcalc.a.new; \ + ${MV} -f ${T}${LIBDIR}/libcustcalc.a.new \ + ${T}${LIBDIR}/libcustcalc.a; \ + ${RANLIB} ${T}${LIBDIR}/libcustcalc.a; \ + echo "installed ${T}${LIBDIR}/libcustcalc.a"; \ + fi; \ + fi; \ + fi + ${Q}# NOTE: The upper level makefile installs libcustcalc${LIB_EXT_VERS} + ${Q}# because we only want to perform one ${LDCONFIG} for both + ${Q}# libcalc${LIB_EXT_VERS} and libcustcalc${LIB_EXT_VERS}. + +# Try to remove everything that was installed +# +# NOTE: Keep the uninstall rule in reverse order to the install rule +# +uninstall: + -${Q} if [ -f "${T}${CUSTOMCALDIR}/libcustcalc.a" ]; then \ + ${RM} -f "${T}${CUSTOMCALDIR}/libcustcalc.a"; \ + if [ -f "${T}${CUSTOMCALDIR}/libcustcalc.a" ]; then \ + echo "cannot uninstall ${T}${CUSTOMCALDIR}/libcustcalc.a"; \ + else \ + echo "uninstalled ${T}${CUSTOMCALDIR}/libcustcalc.a"; \ + fi; \ + fi + -${Q} for i in ${CUSTOM_HELP} /dev/null; do \ + if [ "$$i" = "/dev/null" ]; then \ + continue; \ + fi; \ + if [ -f "${T}${CUSTOMHELPDIR}/$$i" ]; then \ + ${RM} -f "${T}${CUSTOMHELPDIR}/$$i"; \ + if [ -f "${T}${CUSTOMHELPDIR}/$$i" ]; then \ + echo "cannot uninstall ${T}${CUSTOMHELPDIR}/$$i"; \ + else \ + echo "uninstalled ${T}${CUSTOMHELPDIR}/$$i"; \ + fi; \ + fi; \ + done + -${Q} for i in ${CUSTOM_CALC_FILES} /dev/null; do \ + if [ "$$i" = "/dev/null" ]; then \ + continue; \ + fi; \ + if [ -f "${T}${CUSTOMCALDIR}/$$i" ]; then \ + ${RM} -f "${T}${CUSTOMCALDIR}/$$i"; \ + if [ -f "${T}${CUSTOMCALDIR}/$$i" ]; then \ + echo "cannot uninstall ${T}${CUSTOMCALDIR}/$$i"; \ + else \ + echo "uninstalled ${T}${CUSTOMCALDIR}/$$i"; \ + fi; \ + fi; \ + done + -${Q} for i in ${INSTALL_H_SRC} /dev/null; do \ + if [ "$$i" = "/dev/null" ]; then \ + continue; \ + fi; \ + if [ -f "${T}${CUSTOMINCDIR}/$$i" ]; then \ + ${RM} -f "${T}${CUSTOMINCDIR}/$$i"; \ + if [ -f "${T}${CUSTOMINCDIR}/$$i" ]; then \ + echo "cannot uninstall ${T}${CUSTOMINCDIR}/$$i"; \ + else \ + echo "uninstalled ${T}${CUSTOMINCDIR}/$$i"; \ + fi; \ + fi; \ + done + -${Q} for i in ${CUSTOMINCDIR} ${CUSTOMHELPDIR} ${CUSTOMCALDIR} \ + ${HELPDIR} ${CALC_INCDIR} ${CALC_SHAREDIR} ${INCDIR}; do \ + if [ -d "${T}$$i" ]; then \ + ${RMDIR} "${T}$$i" 2>/dev/null; \ + echo "cleaned up ${T}$$i"; \ + fi; \ + done + +## +# +# make depend stuff +# +## + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +c_argv.o: ../alloc.h +c_argv.o: ../block.h +c_argv.o: ../byteswap.h +c_argv.o: ../calc.h +c_argv.o: ../calcerr.h +c_argv.o: ../cmath.h +c_argv.o: ../config.h +c_argv.o: ../custom.h +c_argv.o: ../decl.h +c_argv.o: ../endian_calc.h +c_argv.o: ../hash.h +c_argv.o: ../have_const.h +c_argv.o: ../have_memmv.h +c_argv.o: ../have_newstr.h +c_argv.o: ../have_stdlib.h +c_argv.o: ../have_string.h +c_argv.o: ../have_unused.h +c_argv.o: ../longbits.h +c_argv.o: ../nametype.h +c_argv.o: ../qmath.h +c_argv.o: ../sha1.h +c_argv.o: ../str.h +c_argv.o: ../value.h +c_argv.o: ../zmath.h +c_argv.o: c_argv.c +c_devnull.o: ../alloc.h +c_devnull.o: ../block.h +c_devnull.o: ../byteswap.h +c_devnull.o: ../calcerr.h +c_devnull.o: ../cmath.h +c_devnull.o: ../config.h +c_devnull.o: ../custom.h +c_devnull.o: ../decl.h +c_devnull.o: ../endian_calc.h +c_devnull.o: ../hash.h +c_devnull.o: ../have_const.h +c_devnull.o: ../have_memmv.h +c_devnull.o: ../have_newstr.h +c_devnull.o: ../have_stdlib.h +c_devnull.o: ../have_string.h +c_devnull.o: ../have_unistd.h +c_devnull.o: ../have_unused.h +c_devnull.o: ../longbits.h +c_devnull.o: ../nametype.h +c_devnull.o: ../qmath.h +c_devnull.o: ../sha1.h +c_devnull.o: ../str.h +c_devnull.o: ../value.h +c_devnull.o: ../zmath.h +c_devnull.o: c_devnull.c +c_help.o: ../alloc.h +c_help.o: ../block.h +c_help.o: ../byteswap.h +c_help.o: ../calcerr.h +c_help.o: ../cmath.h +c_help.o: ../config.h +c_help.o: ../custom.h +c_help.o: ../decl.h +c_help.o: ../endian_calc.h +c_help.o: ../hash.h +c_help.o: ../have_const.h +c_help.o: ../have_memmv.h +c_help.o: ../have_newstr.h +c_help.o: ../have_stdlib.h +c_help.o: ../have_string.h +c_help.o: ../have_unistd.h +c_help.o: ../have_unused.h +c_help.o: ../longbits.h +c_help.o: ../nametype.h +c_help.o: ../qmath.h +c_help.o: ../sha1.h +c_help.o: ../str.h +c_help.o: ../value.h +c_help.o: ../zmath.h +c_help.o: c_help.c +c_pmodm127.o: ../alloc.h +c_pmodm127.o: ../block.h +c_pmodm127.o: ../byteswap.h +c_pmodm127.o: ../calcerr.h +c_pmodm127.o: ../cmath.h +c_pmodm127.o: ../config.h +c_pmodm127.o: ../custom.h +c_pmodm127.o: ../decl.h +c_pmodm127.o: ../endian_calc.h +c_pmodm127.o: ../hash.h +c_pmodm127.o: ../have_const.h +c_pmodm127.o: ../have_memmv.h +c_pmodm127.o: ../have_newstr.h +c_pmodm127.o: ../have_stdlib.h +c_pmodm127.o: ../have_string.h +c_pmodm127.o: ../have_unused.h +c_pmodm127.o: ../longbits.h +c_pmodm127.o: ../nametype.h +c_pmodm127.o: ../qmath.h +c_pmodm127.o: ../sha1.h +c_pmodm127.o: ../str.h +c_pmodm127.o: ../value.h +c_pmodm127.o: ../zmath.h +c_pmodm127.o: c_pmodm127.c +c_pzasusb8.o: ../alloc.h +c_pzasusb8.o: ../block.h +c_pzasusb8.o: ../byteswap.h +c_pzasusb8.o: ../calcerr.h +c_pzasusb8.o: ../cmath.h +c_pzasusb8.o: ../config.h +c_pzasusb8.o: ../custom.h +c_pzasusb8.o: ../decl.h +c_pzasusb8.o: ../endian_calc.h +c_pzasusb8.o: ../hash.h +c_pzasusb8.o: ../have_const.h +c_pzasusb8.o: ../have_memmv.h +c_pzasusb8.o: ../have_newstr.h +c_pzasusb8.o: ../have_stdlib.h +c_pzasusb8.o: ../have_string.h +c_pzasusb8.o: ../have_unused.h +c_pzasusb8.o: ../longbits.h +c_pzasusb8.o: ../nametype.h +c_pzasusb8.o: ../qmath.h +c_pzasusb8.o: ../sha1.h +c_pzasusb8.o: ../str.h +c_pzasusb8.o: ../value.h +c_pzasusb8.o: ../zmath.h +c_pzasusb8.o: c_pzasusb8.c +c_register.o: ../alloc.h +c_register.o: ../block.h +c_register.o: ../byteswap.h +c_register.o: ../calc.h +c_register.o: ../calcerr.h +c_register.o: ../cmath.h +c_register.o: ../config.h +c_register.o: ../custom.h +c_register.o: ../decl.h +c_register.o: ../endian_calc.h +c_register.o: ../hash.h +c_register.o: ../have_const.h +c_register.o: ../have_memmv.h +c_register.o: ../have_newstr.h +c_register.o: ../have_stdlib.h +c_register.o: ../have_string.h +c_register.o: ../have_unused.h +c_register.o: ../longbits.h +c_register.o: ../nametype.h +c_register.o: ../qmath.h +c_register.o: ../sha1.h +c_register.o: ../str.h +c_register.o: ../value.h +c_register.o: ../zmath.h +c_register.o: c_register.c +c_sysinfo.o: ../alloc.h +c_sysinfo.o: ../block.h +c_sysinfo.o: ../byteswap.h +c_sysinfo.o: ../calc.h +c_sysinfo.o: ../calcerr.h +c_sysinfo.o: ../cmath.h +c_sysinfo.o: ../conf.h +c_sysinfo.o: ../config.h +c_sysinfo.o: ../custom.h +c_sysinfo.o: ../decl.h +c_sysinfo.o: ../endian_calc.h +c_sysinfo.o: ../fposval.h +c_sysinfo.o: ../hash.h +c_sysinfo.o: ../have_const.h +c_sysinfo.o: ../have_memmv.h +c_sysinfo.o: ../have_newstr.h +c_sysinfo.o: ../have_stdlib.h +c_sysinfo.o: ../have_string.h +c_sysinfo.o: ../have_unused.h +c_sysinfo.o: ../hist.h +c_sysinfo.o: ../lib_calc.h +c_sysinfo.o: ../longbits.h +c_sysinfo.o: ../nametype.h +c_sysinfo.o: ../prime.h +c_sysinfo.o: ../qmath.h +c_sysinfo.o: ../sha1.h +c_sysinfo.o: ../str.h +c_sysinfo.o: ../value.h +c_sysinfo.o: ../zmath.h +c_sysinfo.o: ../zrand.h +c_sysinfo.o: ../zrandom.h +c_sysinfo.o: c_sysinfo.c +custtbl.o: ../alloc.h +custtbl.o: ../block.h +custtbl.o: ../byteswap.h +custtbl.o: ../calcerr.h +custtbl.o: ../cmath.h +custtbl.o: ../config.h +custtbl.o: ../custom.h +custtbl.o: ../decl.h +custtbl.o: ../endian_calc.h +custtbl.o: ../hash.h +custtbl.o: ../have_const.h +custtbl.o: ../have_memmv.h +custtbl.o: ../have_newstr.h +custtbl.o: ../have_stdlib.h +custtbl.o: ../have_string.h +custtbl.o: ../longbits.h +custtbl.o: ../nametype.h +custtbl.o: ../qmath.h +custtbl.o: ../sha1.h +custtbl.o: ../str.h +custtbl.o: ../value.h +custtbl.o: ../zmath.h +custtbl.o: custtbl.c + +Makefile.simple: + ${Q} if [ ! -f Makefile.simple ]; then \ + ${CP} -f ${MAKE_FILE} $@; fi diff --git a/custom/Makefile.tail b/custom/Makefile.tail new file mode 100644 index 0000000..2dcf3ce --- /dev/null +++ b/custom/Makefile.tail @@ -0,0 +1,723 @@ +############################################################################## +#-=-=-=-=-=-=-=-=- Be careful if you change something below -=-=-=-=-=-=-=-=-# +############################################################################## + +# These .c files are required for the main custom interface and +# for the custom support functions for libcustcalc${LIB_EXT_VERS}. +# +# There MUST be a .c for every .o in REQUIRED_OBJ. +# +REQUIRED_SRC= custtbl.c + +# These .o files correspond to the .c files in REQUIRED_SRC +# for libcustcalc${LIB_EXT_VERS}. +# +# There MUST be a .o for every .c in REQUIRED_SRC. +# +REQUIRED_OBJ= custtbl.o + +# These .h files are installed under ${CUSTOMCALDIR} by the install rule. +# +INSTALL_H_SRC= ${CUSTOM_H_SRC} + +# These .c files are used to form libcustcalc${LIB_EXT_VERS}. +# +CUSTCALC_SRC= ${REQUIRED_SRC} ${CUSTOM_SRC} + +# These .o files are used to form libcustcalc${LIB_EXT_VERS}. +# +CUSTCALC_OBJ= ${REQUIRED_OBJ} ${CUSTOM_OBJ} + +# These .c files are used to build the dependency list +# +C_SRC= ${REQUIRED_SRC} ${CUSTOM_SRC} + +# These .h files are used to build the dependecy list +# +H_SRC= ${CUSTOM_H_SRC} + +# These files are found (but not built) in the distribution +# +# The CUSTOM_CAL and HOW_TO_ADD are files distributed from this +# directory but are installed as help files from the help/Makefile. +# +DISTLIST= ${CUSTCALC_SRC} ${CUSTOM_CALC_FILES} ${CUSTOM_HELP} \ + ${INSTALL_H_SRC} CUSTOM_CAL HOW_TO_ADD ${MAKE_FILE}.head \ + ${MAKE_FILE}.tail + +# These files are used to make (but not built) a calc .a link library +# +CALCLIBLIST= ${CUSTCALC_SRC} ${INSTALL_H_SRC} ${MAKE_FILE} HOW_TO_ADD + +# This is the custom dynbamic shared library that is build +# +CALC_DYNAMIC_LIBCUSTCALC= libcustcalc${LIB_EXT_VERS} + +# This is the custom static library that is build +# +CALC_STATIC_LIBCUSTCALC= libcustcalc.a + +# complete list of targets +# +TARGETS= ${BLD_TYPE} Makefile.simple + +### +# +# The reason for this Makefile :-) +# +### + +all: ${TARGETS} ${INSTALL_H_SRC} ${CUSTOM_CALC_FILES} \ + ${CUSTOM_HELP} ${MAKE_FILE} .all + +calc-dynamic-only: ${CUSTCALC_OBJ} ${CALC_DYNAMIC_LIBCUSTCALC} + +calc-static-only: ${CUSTCALC_OBJ} ${CALC_STATIC_LIBCUSTCALC} + +custom/libcustcalc${LIB_EXT_VERS}: libcustcalc${LIB_EXT_VERS} \ + ${CALC_STATIC_LIBCUSTCALC} + +libcustcalc${LIB_EXT_VERS}: ${CUSTCALC_OBJ} ${MAKE_FILE} + ${CC} ${LIBCUSTCALC_SHLIB} ${CUSTCALC_OBJ} -o $@ + +## +# +# Special .o files +# +## + +c_sysinfo.o: c_sysinfo.c ${MAKE_FILE} + ${CC} ${CFLAGS} c_sysinfo.c -c + +## +# +# used by the upper level Makefile +# +## + +# to determine of we have done all +# +.all: + ${RM} -f .all + ${TOUCH} .all + +### +# +# building calc-static and static lib*.a libraires +# +### + +libcustcalc.a: ${CUSTCALC_OBJ} ${MAKE_FILE} + ${RM} -f libcustcalc.a + ${AR} qc libcustcalc.a ${CUSTCALC_OBJ} + ${RANLIB} libcustcalc.a + ${CHMOD} 0644 libcustcalc.a + +## +# +# File list generation. You can ignore this section. +# +# +# We will form the names of source files as if they were in a +# sub-directory called calc/lib. +# +# NOTE: Due to bogus shells found on one common system we must have +# an non-emoty else clause for every if condition. *sigh* +# +## + +distlist: ${DISTLIST} + ${Q} for i in ${DISTLIST} /dev/null; do \ + if [ X"$$i" != X"/dev/null" ]; then \ + echo custom/$$i; \ + fi; \ + done + +distdir: + ${Q} echo custom + +calcliblist: ${CALCLIBLIST} + ${Q} for i in ${CALCLIBLIST} /dev/null; do \ + if [ X"$$i" != X"/dev/null" ]; then \ + echo custom/$$i; \ + fi; \ + done + +#if 0 /* start of skip for non-Gnu makefiles */ +Makefile.simple: ${MAKE_FILE} + ${V} echo '=-=-=-=-= custom/${MAKE_FILE} start of $@ rule =-=-=-=-=' + ${Q} ${RM} -f $@ + ${Q} ${AWK} '/^#if 0/{skp=1} {if(!skp){print $$0}} /^#endif/{skp=0}' \ + ${MAKE_FILE} > $@ + ${Q} echo >> $@ + ${Q} echo 'Makefile.simple:' >> $@ + ${Q} echo ' $${Q} if [ ! -f Makefile.simple ]; then '"\\" >> $@ + ${Q} echo ' $${CP} -f $${MAKE_FILE} $$@; fi' >> $@ + ${V} echo '=-=-=-=-= custom/${MAKE_FILE} end of $@ rule =-=-=-=-=' +#endif /* end of skip for non-Gnu makefiles */ + +## +# +# Home grown make dependency rules. Your system make not support +# or have the needed tools. You can ignore this section. +# +# We will form a skelaton tree of *.c files containing only #include "foo.h" +# lines and .h files containing the same lines surrounded by multiple include +# prevention lines. This allows us to build a static depend list that will +# satisfy all possible cpp symbol definition combinations. +# +## + +depend: + ${Q} if [ -f ${MAKE_FILE}.bak ]; then \ + echo "${MAKE_FILE}.bak exists, remove or move it"; \ + exit 1; \ + else \ + ${TRUE}; \ + fi + ${Q} echo forming custom/skel + ${Q} ${RM} -rf skel + ${Q} ${MKDIR} skel + ${Q} ${MKDIR} skel/custom + -${Q} for i in ${C_SRC} /dev/null; do \ + if [ X"$$i" != X"/dev/null" ]; then \ + ${SED} -n '/^#[ ]*include[ ]*"/p' \ + "$$i" > "skel/custom/$$i"; \ + fi; \ + done + -${Q} for i in ${H_SRC} /dev/null; do \ + if [ "$$i" = "/dev/null" ]; then \ + continue; \ + fi; \ + tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \ + echo "#if !defined($$tag)" > "skel/custom/$$i"; \ + echo "#define $$tag" >> "skel/custom/$$i"; \ + ${SED} -n '/^#[ ]*include[ ]*"/p' "$$i" \ + >> "skel/custom/$$i"; \ + echo '#endif /* '"$$tag"' */' >> "skel/custom/$$i"; \ + done + ${Q} (cd ..; ${MAKE} -f ${TOP_MAKE_FILE} hsrc) + ${Q} for i in `cd ..; ${MAKE} -f ${TOP_MAKE_FILE} h_list 2>&1 | \ + ${SED} -e '/Entering directory/d' \ + -e '/Nothing to be done/d' \ + -e '/Leaving directory/d'` /dev/null; do \ + if [ "$$i" = "/dev/null" ]; then \ + continue; \ + fi; \ + tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \ + echo "#if !defined($$tag)" > "skel/$$i"; \ + echo "#define $$tag" >> "skel/$$i"; \ + ${SED} -n '/^#[ ]*include[ ]*"/p' "../$$i" \ + >> "skel/$$i"; \ + echo '#endif /* '"$$tag"' */' >> "skel/$$i"; \ + done + ${Q} ${RM} -f skel/custom/makedep.out + ${Q} echo custom/skel formed + ${Q} echo forming custom dependency list + ${Q} :> skel/custom/makedep.out + ${Q} cd skel/custom; ${MAKEDEPEND} -I.. -w 1 -f makedep.out ${C_SRC} + -${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/'; \ + fi; \ + done >> skel/custom/makedep.out + ${Q} LANG=C ${SORT} -u skel/custom/makedep.out \ + -o skel/custom/makedep.out + ${Q} echo custom dependency list formed + ${Q} echo forming new custom/${MAKE_FILE} + ${Q} ${RM} -f ${MAKE_FILE}.bak + ${Q} ${MV} ${MAKE_FILE} ${MAKE_FILE}.bak + ${Q} ${SED} -n '1,/^# DO NOT DELETE THIS LINE/p' ${MAKE_FILE}.bak > ${MAKE_FILE} + ${Q} ${GREP} -v '^#' skel/custom/makedep.out >> ${MAKE_FILE} + ${Q} ${RM} -rf skel + -${Q} if ${CMP} -s ${MAKE_FILE}.bak ${MAKE_FILE}; then \ + echo 'custom ${MAKE_FILE} was already up to date'; \ + ${MV} -f ${MAKE_FILE}.bak ${MAKE_FILE}; \ + else \ + ${RM} -f ${MAKE_FILE}.tmp; \ + ${MV} ${MAKE_FILE} ${MAKE_FILE}.tmp; \ + if [ -d RCS -a ! -w "${MAKE_FILE}" ]; then \ + ${CO} -l ${MAKE_FILE}; \ + fi ;\ + ${MV} ${MAKE_FILE}.tmp ${MAKE_FILE}; \ + if [ -d RCS ]; then \ + echo '****************************************************'; \ + echo 'new custom ${MAKE_FILE} formed -- you to check it in'; \ + echo '****************************************************'; \ + fi; \ + fi + +## +# +# rpm rules +# +## + +echo_inst_files: + ${Q} for i in ${INSTALL_H_SRC} /dev/null; do \ + if [ X"$$i" != X"/dev/null" ]; then \ + echo __file__ ${CUSTOMINCDIR}/$$i; \ + fi; \ + done + ${Q} for i in ${CUSTOM_HELP} /dev/null; do \ + if [ X"$$i" != X"/dev/null" ]; then \ + echo __file__ ${CUSTOMHELPDIR}/$$i; \ + fi; \ + done + ${Q} for i in ${CUSTOM_CALC_FILES} /dev/null; do \ + if [ X"$$i" != X"/dev/null" ]; then \ + echo __file__ ${CUSTOMCALDIR}/$$i; \ + fi; \ + done + ${Q} for i in ${CALC_DYNAMIC_LIBCUSTCALC} /dev/null; do \ + if [ X"$$i" != X"/dev/null" ]; then \ + echo __file__ ${CUSTOMCALDIR}/$$i; \ + fi; \ + done + +## +# +# Utility rules +# +## + +clean: + ${RM} -f ${CUSTCALC_OBJ} + +clobber: clean + ${RM} -f ${BLD_TYPE} + ${RM} -f .all ${MAKE_FILE}.tmp ${MAKE_FILE}.bak + ${RM} -f libcustcalc${LIB_EXT_VERS} + ${RM} -f libcustcalc${LIB_EXT_VER} + ${RM} -f libcustcalc${LIB_EXT_VE} + ${RM} -f libcustcalc${LIB_EXT} + ${RM} -f libcustcalc.a +#if 0 /* start of skip for non-Gnu makefiles */ + ${RM} -f Makefile.simple +#endif /* end of skip for non-Gnu makefiles */ + +# install everything +# +# NOTE: Keep the uninstall rule in reverse order to the install rule +# +install: all + -${Q} if [ ! -d ${T}${INCDIR} ]; then \ + echo ${MKDIR} ${T}${INCDIR}; \ + ${MKDIR} ${T}${INCDIR}; \ + if [ ! -d "${T}${INCDIR}" ]; then \ + echo ${MKDIR} -p "${T}${INCDIR}"; \ + ${MKDIR} -p "${T}${INCDIR}"; \ + fi; \ + echo ${CHMOD} 0755 ${T}${INCDIR}; \ + ${CHMOD} 0755 ${T}${INCDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${CALC_SHAREDIR} ]; then \ + echo ${MKDIR} ${T}${CALC_SHAREDIR}; \ + ${MKDIR} ${T}${CALC_SHAREDIR}; \ + if [ ! -d "${T}${CALC_SHAREDIR}" ]; then \ + echo ${MKDIR} -p "${T}${CALC_SHAREDIR}"; \ + ${MKDIR} -p "${T}${CALC_SHAREDIR}"; \ + fi; \ + echo ${CHMOD} 0755 ${T}${CALC_SHAREDIR}; \ + ${CHMOD} 0755 ${T}${CALC_SHAREDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${CALC_INCDIR} ]; then \ + echo ${MKDIR} ${T}${CALC_INCDIR}; \ + ${MKDIR} ${T}${CALC_INCDIR}; \ + if [ ! -d "${T}${CALC_INCDIR}" ]; then \ + echo ${MKDIR} -p "${T}${CALC_INCDIR}"; \ + ${MKDIR} -p "${T}${CALC_INCDIR}"; \ + fi; \ + echo ${CHMOD} 0755 ${T}${CALC_INCDIR}; \ + ${CHMOD} 0755 ${T}${CALC_INCDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${HELPDIR} ]; then \ + echo ${MKDIR} ${T}${HELPDIR}; \ + ${MKDIR} ${T}${HELPDIR}; \ + if [ ! -d "${T}${HELPDIR}" ]; then \ + echo ${MKDIR} -p "${T}${HELPDIR}"; \ + ${MKDIR} -p "${T}${HELPDIR}"; \ + fi; \ + echo ${CHMOD} 0755 ${T}${HELPDIR}; \ + ${CHMOD} 0755 ${T}${HELPDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${CUSTOMCALDIR} ]; then \ + echo ${MKDIR} ${T}${CUSTOMCALDIR}; \ + ${MKDIR} ${T}${CUSTOMCALDIR}; \ + if [ ! -d "${T}${CUSTOMCALDIR}" ]; then \ + echo ${MKDIR} -p "${T}${CUSTOMCALDIR}"; \ + ${MKDIR} -p "${T}${CUSTOMCALDIR}"; \ + fi; \ + echo ${CHMOD} 0755 ${T}${CUSTOMCALDIR}; \ + ${CHMOD} 0755 ${T}${CUSTOMCALDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${CUSTOMHELPDIR} ]; then \ + echo ${MKDIR} ${T}${CUSTOMHELPDIR}; \ + ${MKDIR} ${T}${CUSTOMHELPDIR}; \ + if [ ! -d "${T}${CUSTOMHELPDIR}" ]; then \ + echo ${MKDIR} -p "${T}${CUSTOMHELPDIR}"; \ + ${MKDIR} -p "${T}${CUSTOMHELPDIR}"; \ + fi; \ + echo ${CHMOD} 0755 ${T}${CUSTOMHELPDIR}; \ + ${CHMOD} 0755 ${T}${CUSTOMHELPDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} if [ ! -d ${T}${CUSTOMINCDIR} ]; then \ + echo ${MKDIR} ${T}${CUSTOMINCDIR}; \ + ${MKDIR} ${T}${CUSTOMINCDIR}; \ + if [ ! -d "${T}${CUSTOMINCDIR}" ]; then \ + echo ${MKDIR} -p "${T}${CUSTOMINCDIR}"; \ + ${MKDIR} -p "${T}${CUSTOMINCDIR}"; \ + fi; \ + echo ${CHMOD} 0755 ${T}${CUSTOMINCDIR}; \ + ${CHMOD} 0755 ${T}${CUSTOMINCDIR}; \ + else \ + ${TRUE}; \ + fi + -${Q} for i in ${INSTALL_H_SRC} /dev/null; do \ + if [ "$$i" = "/dev/null" ]; then \ + continue; \ + fi; \ + if ${CMP} -s "$$i" ${T}${CUSTOMINCDIR}/$$i; then \ + ${TRUE}; \ + else \ + ${RM} -f ${T}${CUSTOMINCDIR}/$$i.new; \ + ${CP} -f $$i ${T}${CUSTOMINCDIR}/$$i.new; \ + ${CHMOD} 0444 ${T}${CUSTOMINCDIR}/$$i.new; \ + ${MV} -f ${T}${CUSTOMINCDIR}/$$i.new ${T}${CUSTOMINCDIR}/$$i; \ + echo "installed ${T}${CUSTOMINCDIR}/$$i"; \ + fi; \ + done + -${Q} for i in ${CUSTOM_CALC_FILES} /dev/null; do \ + if [ "$$i" = "/dev/null" ]; then \ + continue; \ + fi; \ + if ${CMP} -s $$i ${T}${CUSTOMCALDIR}/$$i; then \ + ${TRUE}; \ + else \ + ${RM} -f ${T}${CUSTOMCALDIR}/$$i.new; \ + ${CP} -f $$i ${T}${CUSTOMCALDIR}/$$i.new; \ + ${CHMOD} 0444 ${T}${CUSTOMCALDIR}/$$i.new; \ + ${MV} -f ${T}${CUSTOMCALDIR}/$$i.new ${T}${CUSTOMCALDIR}/$$i; \ + echo "installed ${T}${CUSTOMCALDIR}/$$i"; \ + fi; \ + done + -${Q} for i in ${CUSTOM_HELP} /dev/null; do \ + if [ "$$i" = "/dev/null" ]; then \ + continue; \ + fi; \ + if ${CMP} -s $$i ${T}${CUSTOMHELPDIR}/$$i; then \ + ${TRUE}; \ + else \ + ${RM} -f ${T}${CUSTOMHELPDIR}/$$i.new; \ + ${CP} -f $$i ${T}${CUSTOMHELPDIR}/$$i.new; \ + ${CHMOD} 0444 ${T}${CUSTOMHELPDIR}/$$i.new; \ + ${MV} -f ${T}${CUSTOMHELPDIR}/$$i.new ${T}${CUSTOMHELPDIR}/$$i; \ + echo "installed ${T}${CUSTOMHELPDIR}/$$i"; \ + fi; \ + done + -${Q} if [ -f "${T}${CUSTOMCALDIR}/libcustcalc.a" ]; then \ + ${RM} -f ${T}${CUSTOMCALDIR}/libcustcalc.a; \ + echo "removed old ${T}${CUSTOMCALDIR}/libcustcalc.a"; \ + fi + -${Q} if [ ! -z ${ALLOW_CUSTOM} ]; then \ + if [ -f libcustcalc.a ]; then \ + if ${CMP} -s libcustcalc.a ${T}${LIBDIR}/libcustcalc.a; then \ + ${TRUE}; \ + else \ + ${RM} -f ${T}${LIBDIR}/libcustcalc.a.new; \ + ${CP} -f libcustcalc.a ${T}${LIBDIR}/libcustcalc.a.new; \ + ${CHMOD} 0644 ${T}${LIBDIR}/libcustcalc.a.new; \ + ${MV} -f ${T}${LIBDIR}/libcustcalc.a.new \ + ${T}${LIBDIR}/libcustcalc.a; \ + ${RANLIB} ${T}${LIBDIR}/libcustcalc.a; \ + echo "installed ${T}${LIBDIR}/libcustcalc.a"; \ + fi; \ + fi; \ + fi + ${Q}# NOTE: The upper level makefile installs libcustcalc${LIB_EXT_VERS} + ${Q}# because we only want to perform one ${LDCONFIG} for both + ${Q}# libcalc${LIB_EXT_VERS} and libcustcalc${LIB_EXT_VERS}. + +# Try to remove everything that was installed +# +# NOTE: Keep the uninstall rule in reverse order to the install rule +# +uninstall: + -${Q} if [ -f "${T}${CUSTOMCALDIR}/libcustcalc.a" ]; then \ + ${RM} -f "${T}${CUSTOMCALDIR}/libcustcalc.a"; \ + if [ -f "${T}${CUSTOMCALDIR}/libcustcalc.a" ]; then \ + echo "cannot uninstall ${T}${CUSTOMCALDIR}/libcustcalc.a"; \ + else \ + echo "uninstalled ${T}${CUSTOMCALDIR}/libcustcalc.a"; \ + fi; \ + fi + -${Q} for i in ${CUSTOM_HELP} /dev/null; do \ + if [ "$$i" = "/dev/null" ]; then \ + continue; \ + fi; \ + if [ -f "${T}${CUSTOMHELPDIR}/$$i" ]; then \ + ${RM} -f "${T}${CUSTOMHELPDIR}/$$i"; \ + if [ -f "${T}${CUSTOMHELPDIR}/$$i" ]; then \ + echo "cannot uninstall ${T}${CUSTOMHELPDIR}/$$i"; \ + else \ + echo "uninstalled ${T}${CUSTOMHELPDIR}/$$i"; \ + fi; \ + fi; \ + done + -${Q} for i in ${CUSTOM_CALC_FILES} /dev/null; do \ + if [ "$$i" = "/dev/null" ]; then \ + continue; \ + fi; \ + if [ -f "${T}${CUSTOMCALDIR}/$$i" ]; then \ + ${RM} -f "${T}${CUSTOMCALDIR}/$$i"; \ + if [ -f "${T}${CUSTOMCALDIR}/$$i" ]; then \ + echo "cannot uninstall ${T}${CUSTOMCALDIR}/$$i"; \ + else \ + echo "uninstalled ${T}${CUSTOMCALDIR}/$$i"; \ + fi; \ + fi; \ + done + -${Q} for i in ${INSTALL_H_SRC} /dev/null; do \ + if [ "$$i" = "/dev/null" ]; then \ + continue; \ + fi; \ + if [ -f "${T}${CUSTOMINCDIR}/$$i" ]; then \ + ${RM} -f "${T}${CUSTOMINCDIR}/$$i"; \ + if [ -f "${T}${CUSTOMINCDIR}/$$i" ]; then \ + echo "cannot uninstall ${T}${CUSTOMINCDIR}/$$i"; \ + else \ + echo "uninstalled ${T}${CUSTOMINCDIR}/$$i"; \ + fi; \ + fi; \ + done + -${Q} for i in ${CUSTOMINCDIR} ${CUSTOMHELPDIR} ${CUSTOMCALDIR} \ + ${HELPDIR} ${CALC_INCDIR} ${CALC_SHAREDIR} ${INCDIR}; do \ + if [ -d "${T}$$i" ]; then \ + ${RMDIR} "${T}$$i" 2>/dev/null; \ + echo "cleaned up ${T}$$i"; \ + fi; \ + done + +## +# +# make depend stuff +# +## + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +c_argv.o: ../alloc.h +c_argv.o: ../block.h +c_argv.o: ../byteswap.h +c_argv.o: ../calc.h +c_argv.o: ../calcerr.h +c_argv.o: ../cmath.h +c_argv.o: ../config.h +c_argv.o: ../custom.h +c_argv.o: ../decl.h +c_argv.o: ../endian_calc.h +c_argv.o: ../hash.h +c_argv.o: ../have_const.h +c_argv.o: ../have_memmv.h +c_argv.o: ../have_newstr.h +c_argv.o: ../have_stdlib.h +c_argv.o: ../have_string.h +c_argv.o: ../have_unused.h +c_argv.o: ../longbits.h +c_argv.o: ../nametype.h +c_argv.o: ../qmath.h +c_argv.o: ../sha1.h +c_argv.o: ../str.h +c_argv.o: ../value.h +c_argv.o: ../zmath.h +c_argv.o: c_argv.c +c_devnull.o: ../alloc.h +c_devnull.o: ../block.h +c_devnull.o: ../byteswap.h +c_devnull.o: ../calcerr.h +c_devnull.o: ../cmath.h +c_devnull.o: ../config.h +c_devnull.o: ../custom.h +c_devnull.o: ../decl.h +c_devnull.o: ../endian_calc.h +c_devnull.o: ../hash.h +c_devnull.o: ../have_const.h +c_devnull.o: ../have_memmv.h +c_devnull.o: ../have_newstr.h +c_devnull.o: ../have_stdlib.h +c_devnull.o: ../have_string.h +c_devnull.o: ../have_unistd.h +c_devnull.o: ../have_unused.h +c_devnull.o: ../longbits.h +c_devnull.o: ../nametype.h +c_devnull.o: ../qmath.h +c_devnull.o: ../sha1.h +c_devnull.o: ../str.h +c_devnull.o: ../value.h +c_devnull.o: ../zmath.h +c_devnull.o: c_devnull.c +c_help.o: ../alloc.h +c_help.o: ../block.h +c_help.o: ../byteswap.h +c_help.o: ../calcerr.h +c_help.o: ../cmath.h +c_help.o: ../config.h +c_help.o: ../custom.h +c_help.o: ../decl.h +c_help.o: ../endian_calc.h +c_help.o: ../hash.h +c_help.o: ../have_const.h +c_help.o: ../have_memmv.h +c_help.o: ../have_newstr.h +c_help.o: ../have_stdlib.h +c_help.o: ../have_string.h +c_help.o: ../have_unistd.h +c_help.o: ../have_unused.h +c_help.o: ../longbits.h +c_help.o: ../nametype.h +c_help.o: ../qmath.h +c_help.o: ../sha1.h +c_help.o: ../str.h +c_help.o: ../value.h +c_help.o: ../zmath.h +c_help.o: c_help.c +c_pmodm127.o: ../alloc.h +c_pmodm127.o: ../block.h +c_pmodm127.o: ../byteswap.h +c_pmodm127.o: ../calcerr.h +c_pmodm127.o: ../cmath.h +c_pmodm127.o: ../config.h +c_pmodm127.o: ../custom.h +c_pmodm127.o: ../decl.h +c_pmodm127.o: ../endian_calc.h +c_pmodm127.o: ../hash.h +c_pmodm127.o: ../have_const.h +c_pmodm127.o: ../have_memmv.h +c_pmodm127.o: ../have_newstr.h +c_pmodm127.o: ../have_stdlib.h +c_pmodm127.o: ../have_string.h +c_pmodm127.o: ../have_unused.h +c_pmodm127.o: ../longbits.h +c_pmodm127.o: ../nametype.h +c_pmodm127.o: ../qmath.h +c_pmodm127.o: ../sha1.h +c_pmodm127.o: ../str.h +c_pmodm127.o: ../value.h +c_pmodm127.o: ../zmath.h +c_pmodm127.o: c_pmodm127.c +c_pzasusb8.o: ../alloc.h +c_pzasusb8.o: ../block.h +c_pzasusb8.o: ../byteswap.h +c_pzasusb8.o: ../calcerr.h +c_pzasusb8.o: ../cmath.h +c_pzasusb8.o: ../config.h +c_pzasusb8.o: ../custom.h +c_pzasusb8.o: ../decl.h +c_pzasusb8.o: ../endian_calc.h +c_pzasusb8.o: ../hash.h +c_pzasusb8.o: ../have_const.h +c_pzasusb8.o: ../have_memmv.h +c_pzasusb8.o: ../have_newstr.h +c_pzasusb8.o: ../have_stdlib.h +c_pzasusb8.o: ../have_string.h +c_pzasusb8.o: ../have_unused.h +c_pzasusb8.o: ../longbits.h +c_pzasusb8.o: ../nametype.h +c_pzasusb8.o: ../qmath.h +c_pzasusb8.o: ../sha1.h +c_pzasusb8.o: ../str.h +c_pzasusb8.o: ../value.h +c_pzasusb8.o: ../zmath.h +c_pzasusb8.o: c_pzasusb8.c +c_register.o: ../alloc.h +c_register.o: ../block.h +c_register.o: ../byteswap.h +c_register.o: ../calc.h +c_register.o: ../calcerr.h +c_register.o: ../cmath.h +c_register.o: ../config.h +c_register.o: ../custom.h +c_register.o: ../decl.h +c_register.o: ../endian_calc.h +c_register.o: ../hash.h +c_register.o: ../have_const.h +c_register.o: ../have_memmv.h +c_register.o: ../have_newstr.h +c_register.o: ../have_stdlib.h +c_register.o: ../have_string.h +c_register.o: ../have_unused.h +c_register.o: ../longbits.h +c_register.o: ../nametype.h +c_register.o: ../qmath.h +c_register.o: ../sha1.h +c_register.o: ../str.h +c_register.o: ../value.h +c_register.o: ../zmath.h +c_register.o: c_register.c +c_sysinfo.o: ../alloc.h +c_sysinfo.o: ../block.h +c_sysinfo.o: ../byteswap.h +c_sysinfo.o: ../calc.h +c_sysinfo.o: ../calcerr.h +c_sysinfo.o: ../cmath.h +c_sysinfo.o: ../conf.h +c_sysinfo.o: ../config.h +c_sysinfo.o: ../custom.h +c_sysinfo.o: ../decl.h +c_sysinfo.o: ../endian_calc.h +c_sysinfo.o: ../fposval.h +c_sysinfo.o: ../hash.h +c_sysinfo.o: ../have_const.h +c_sysinfo.o: ../have_memmv.h +c_sysinfo.o: ../have_newstr.h +c_sysinfo.o: ../have_stdlib.h +c_sysinfo.o: ../have_string.h +c_sysinfo.o: ../have_unused.h +c_sysinfo.o: ../hist.h +c_sysinfo.o: ../lib_calc.h +c_sysinfo.o: ../longbits.h +c_sysinfo.o: ../nametype.h +c_sysinfo.o: ../prime.h +c_sysinfo.o: ../qmath.h +c_sysinfo.o: ../sha1.h +c_sysinfo.o: ../str.h +c_sysinfo.o: ../value.h +c_sysinfo.o: ../zmath.h +c_sysinfo.o: ../zrand.h +c_sysinfo.o: ../zrandom.h +c_sysinfo.o: c_sysinfo.c +custtbl.o: ../alloc.h +custtbl.o: ../block.h +custtbl.o: ../byteswap.h +custtbl.o: ../calcerr.h +custtbl.o: ../cmath.h +custtbl.o: ../config.h +custtbl.o: ../custom.h +custtbl.o: ../decl.h +custtbl.o: ../endian_calc.h +custtbl.o: ../hash.h +custtbl.o: ../have_const.h +custtbl.o: ../have_memmv.h +custtbl.o: ../have_newstr.h +custtbl.o: ../have_stdlib.h +custtbl.o: ../have_string.h +custtbl.o: ../longbits.h +custtbl.o: ../nametype.h +custtbl.o: ../qmath.h +custtbl.o: ../sha1.h +custtbl.o: ../str.h +custtbl.o: ../value.h +custtbl.o: ../zmath.h +custtbl.o: custtbl.c diff --git a/custom/argv b/custom/argv index 05d63cb..8ba1a5a 100644 --- a/custom/argv +++ b/custom/argv @@ -54,10 +54,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: argv,v 29.2 2000/06/07 14:03:03 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: argv,v 30.1 2007/03/16 11:10:04 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/argv,v $ ## ## Under source code control: 1997/03/09 20:28:01 diff --git a/custom/argv.cal b/custom/argv.cal index ac07b46..6c526bc 100644 --- a/custom/argv.cal +++ b/custom/argv.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: argv.cal,v 29.3 2004/03/31 05:03:02 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: argv.cal,v 30.1 2007/03/16 11:10:04 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/argv.cal,v $ * * Under source code control: 1997/03/10 00:27:17 diff --git a/custom/c_argv.c b/custom/c_argv.c index 84a6b83..2d1b6c4 100644 --- a/custom/c_argv.c +++ b/custom/c_argv.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.9 $ - * @(#) $Id: c_argv.c,v 29.9 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: c_argv.c,v 30.1 2007/03/16 11:10:04 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/c_argv.c,v $ * * Under source code control: 1997/03/09 20:27:37 diff --git a/custom/c_devnull.c b/custom/c_devnull.c index 8afae6e..53a5209 100644 --- a/custom/c_devnull.c +++ b/custom/c_devnull.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: c_devnull.c,v 29.5 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: c_devnull.c,v 30.1 2007/03/16 11:10:04 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/c_devnull.c,v $ * * Under source code control: 1997/03/09 17:49:12 diff --git a/custom/c_help.c b/custom/c_help.c index c9e9f12..72a4259 100644 --- a/custom/c_help.c +++ b/custom/c_help.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: c_help.c,v 29.5 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: c_help.c,v 30.1 2007/03/16 11:10:04 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/c_help.c,v $ * * Under source code control: 1997/03/09 05:25:41 diff --git a/custom/c_pmodm127.c b/custom/c_pmodm127.c index 82cd982..0946e4f 100644 --- a/custom/c_pmodm127.c +++ b/custom/c_pmodm127.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.7 $ - * @(#) $Id: c_pmodm127.c,v 29.7 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: c_pmodm127.c,v 30.1 2007/03/16 11:10:04 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/c_pmodm127.c,v $ * * Under source code control: 2004/07/28 22:12:25 diff --git a/custom/c_pzasusb8.c b/custom/c_pzasusb8.c index 0e4195b..4ddd405 100644 --- a/custom/c_pzasusb8.c +++ b/custom/c_pzasusb8.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: c_pzasusb8.c,v 29.5 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: c_pzasusb8.c,v 30.1 2007/03/16 11:10:04 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/c_pzasusb8.c,v $ * * Under source code control: 1999/10/06 03:12:25 diff --git a/custom/c_register.c b/custom/c_register.c new file mode 100644 index 0000000..c9b3a17 --- /dev/null +++ b/custom/c_register.c @@ -0,0 +1,130 @@ +/* + * c_register - set or print a custom register value + * + * Copyright (C) 2007 Landon Curt Noll + * + * Calc is open software; you can redistribute it and/or modify it under + * the terms of the version 2.1 of the GNU Lesser General Public License + * as published by the Free Software Foundation. + * + * Calc is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General + * Public License for more details. + * + * A copy of version 2.1 of the GNU Lesser General Public License is + * distributed with calc under the filename COPYING-LGPL. You should have + * received a copy with calc; if not, write to Free Software Foundation, Inc. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * @(#) $Revision: 30.1 $ + * @(#) $Id: c_register.c,v 30.1 2007/07/15 02:24:34 chongo Exp $ + * @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/c_register.c,v $ + * + * Under source code control: 2007/07/14 20:23:46 + * File existed as early as: 2007 + * + * chongo /\oo/\ http://www.isthe.com/chongo/ + * Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ + */ + + +#if defined(CUSTOM) + +#include + +#include "have_const.h" +#include "value.h" +#include "custom.h" + +#include "config.h" +#include "calc.h" + +#include "have_unused.h" + + +/* + * registers + */ +STATIC VALUE custom_reg[CUSTOM_REG_MAX+1]; + + +/* + * init_custreg - initialize custom registers + */ +void +init_custreg(void) +{ + int i; + + /* + * set the registers to zero + */ + for (i=0; i < CUSTOM_REG_MAX+1; ++i) { + custom_reg[i].v_type = V_NUM; + custom_reg[i].v_subtype = V_NOSUBTYPE; + custom_reg[i].v_num = itoq(0); + } + return; +} + + +/* + * c_register - set or print a custom register value + * + * given: + * vals[i] and arg to display information about + * + * returns: + * count + */ +/*ARGSUSED*/ +VALUE +c_register(char UNUSED *name, int count, VALUE **vals) +{ + VALUE result; /* what we will return */ + long reg; /* register number */ + + /* + * arg check + */ + result.v_type = V_NULL; + if (vals[0]->v_type != V_NUM) { + math_error("Non-numeric register number"); + /*NOTREACHED*/ + } + if (qisfrac(vals[0]->v_num)) { + math_error("Non-integer register number"); + /*NOTREACHED*/ + } + if (qisneg(vals[0]->v_num)) { + math_error("register number < 0"); + /*NOTREACHED*/ + } + if (! qistiny(vals[0]->v_num)) { + math_error("register is huge"); + /*NOTREACHED*/ + } + reg = qtoi(vals[0]->v_num); + if (reg > CUSTOM_REG_MAX) { + math_error("register is larger than CUSTOM_REG_MAX"); + /*NOTREACHED*/ + } + + /* + * print info on each arg + */ + /* save previous value */ + copyvalue(&custom_reg[reg], &result); + /* set the new value if a 2nd arg was given */ + if (count == 2) { + copyvalue(vals[1], &custom_reg[reg]); + } + + /* + * return result + */ + return result; +} + +#endif /* CUSTOM */ diff --git a/custom/c_sysinfo.c b/custom/c_sysinfo.c index f5911a1..1a3b793 100644 --- a/custom/c_sysinfo.c +++ b/custom/c_sysinfo.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.14 $ - * @(#) $Id: c_sysinfo.c,v 29.14 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: c_sysinfo.c,v 30.2 2007/07/05 19:35:20 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/c_sysinfo.c,v $ * * Under source code control: 1997/03/09 23:14:40 @@ -157,6 +157,7 @@ STATIC struct infoname sys_info[] = { {"TOPLONG", "top long bit", NULL, (FULL)TOPLONG}, {"TRUE", "boolean true", NULL, (FULL)TRUE}, {"USUAL_ELEMENTS", "usual number of elements for objects", NULL, (FULL)USUAL_ELEMENTS}, + {"REGNUM_MAX", "highest custom register number", NULL, (FULL)CUSTOM_REG_MAX}, /* must be last */ {NULL, NULL, NULL, (FULL)0} diff --git a/custom/custtbl.c b/custom/custtbl.c index fa406fe..1a16a5e 100644 --- a/custom/custtbl.c +++ b/custom/custtbl.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.6 $ - * @(#) $Id: custtbl.c,v 29.6 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: custtbl.c,v 30.2 2007/07/05 19:35:20 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/custtbl.c,v $ * * Under source code control: 1997/03/09 02:28:54 @@ -58,6 +58,7 @@ E_FUNC VALUE c_help(char*, int, VALUE**); E_FUNC VALUE c_sysinfo(char*, int, VALUE**); E_FUNC VALUE c_pzasusb8(char*, int, VALUE**); E_FUNC VALUE c_pmodm127(char*, int, VALUE**); +E_FUNC VALUE c_register(char*, int, VALUE**); #endif /* CUSTOM */ @@ -113,6 +114,9 @@ CONST struct custom cust[] = { { "pmodm127", "calculate q mod 2^(2^127-1)", 1, 1, c_pmodm127 }, + { "register", "get or set customer registers", + 1, 2, c_register }, + #endif /* CUSTOM */ diff --git a/custom/devnull b/custom/devnull index 0b52cf1..9799775 100644 --- a/custom/devnull +++ b/custom/devnull @@ -40,10 +40,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: devnull,v 29.2 2000/06/07 14:03:03 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: devnull,v 30.1 2007/03/16 11:10:04 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/devnull,v $ ## ## Under source code control: 1997/03/09 17:49:12 diff --git a/custom/halflen.cal b/custom/halflen.cal index 71e23d5..192a8c1 100644 --- a/custom/halflen.cal +++ b/custom/halflen.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: halflen.cal,v 29.3 2004/03/31 05:03:02 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: halflen.cal,v 30.1 2007/03/16 11:10:04 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/halflen.cal,v $ * * Under source code control: 1997/03/08 20:51:32 diff --git a/custom/help b/custom/help index bef7df3..b2da22a 100644 --- a/custom/help +++ b/custom/help @@ -41,10 +41,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: help,v 29.2 2000/06/07 14:03:03 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: help,v 30.1 2007/03/16 11:10:04 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/help,v $ ## ## Under source code control: 1997/03/09 06:03:58 diff --git a/custom/pmodm127 b/custom/pmodm127 index b810546..2b6d947 100644 --- a/custom/pmodm127 +++ b/custom/pmodm127 @@ -65,10 +65,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: pmodm127,v 29.2 2004/07/29 09:28:58 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: pmodm127,v 30.1 2007/03/16 11:10:04 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/pmodm127,v $ ## ## Under source code control: 2004/02/25 07:13:15 diff --git a/custom/pmodm127.cal b/custom/pmodm127.cal index dcf326d..512c579 100644 --- a/custom/pmodm127.cal +++ b/custom/pmodm127.cal @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: pmodm127.cal,v 29.2 2004/07/29 08:35:36 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: pmodm127.cal,v 30.1 2007/03/16 11:10:04 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/pmodm127.cal,v $ * * Under source code control: 2004/02/25 14:25:32 diff --git a/custom/pzasusb8 b/custom/pzasusb8 index 684caf1..917f1d7 100644 --- a/custom/pzasusb8 +++ b/custom/pzasusb8 @@ -63,10 +63,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: pzasusb8,v 29.3 2005/10/18 11:18:34 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: pzasusb8,v 30.1 2007/03/16 11:10:04 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/pzasusb8,v $ ## ## Under source code control: 1999/10/06 04:05:43 diff --git a/custom/pzasusb8.cal b/custom/pzasusb8.cal index 3b1bbcc..7e52319 100644 --- a/custom/pzasusb8.cal +++ b/custom/pzasusb8.cal @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: pzasusb8.cal,v 29.3 2004/03/31 05:03:02 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: pzasusb8.cal,v 30.1 2007/03/16 11:10:04 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/pzasusb8.cal,v $ * * Under source code control: 1999/10/06 03:11:12 diff --git a/custom/register b/custom/register new file mode 100644 index 0000000..e74e91e --- /dev/null +++ b/custom/register @@ -0,0 +1,82 @@ +NAME + register - set or print a custom register value + +SYNOPSIS + custom("register", regnum[, value]) + +TYPES + regnum int + value any, &any + + return any + +DESCRIPTION + This custom function reads or sets a value of a custom register. + A custom register can hold any calc value. + + Without a value arg, the register value is return. With a value + arg, the register is set with that value and the previous value + is returned. + + The number of custom registers is defined at compile time. + There will be at least 32 registers although there could be more + added in the future. It may be deterimed by: + + custom("sysinfo", "REGNUM_MAX") + + The custom registers are initialized to 0 by the internal + function libcalc_call_me_first() during calc startup. + + This custom interface is intented to make it easier to interface + with special purpose hardware. + +EXAMPLE + > custom("register", 3) + 0 + > custom("register", 3, 45) + 0 + > custom("register", 3) + 45 + + > custom("register", 7, 2i), + > custom("register", 8, 3i), + > custom("register", 7) * custom("register", 8) + -6 + +LIMITS + calc must be built with ALLOW_CUSTOM= -DCUSTOM + calc must be executed with a -C arg. + The regnum numbe bee an integer >= 0 and < REGNUM_MAX where + REGNUM_MAX is a compile time constant that is >= 32. + +LIBRARY + none + +SEE ALSO + custom + +## Copyright (C) 2007 Landon Curt Noll +## +## Calc is open software; you can redistribute it and/or modify it under +## the terms of the version 2.1 of the GNU Lesser General Public License +## as published by the Free Software Foundation. +## +## Calc is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General +## Public License for more details. +## +## A copy of version 2.1 of the GNU Lesser General Public License is +## distributed with calc under the filename COPYING-LGPL. You should have +## received a copy with calc; if not, write to Free Software Foundation, Inc. +## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## +## @(#) $Revision: 29.2 $ +## @(#) $Id: register,v 29.2 2007/07/05 19:35:20 chongo Exp $ +## @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/register,v $ +## +## Under source code control: 2005/02/04 22:39:50 +## File existed as early as: 2005 +## +## chongo /\oo/\ http://www.isthe.com/chongo/ +## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ diff --git a/custom/register.cal b/custom/register.cal new file mode 100644 index 0000000..b806d0d --- /dev/null +++ b/custom/register.cal @@ -0,0 +1,70 @@ +/* + * register - set or print a custom register value + * + * Copyright (C) 2007 Landon Curt Noll + * + * Calc is open software; you can redistribute it and/or modify it under + * the terms of the version 2.1 of the GNU Lesser General Public License + * as published by the Free Software Foundation. + * + * Calc is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General + * Public License for more details. + * + * A copy of version 2.1 of the GNU Lesser General Public License is + * distributed with calc under the filename COPYING-LGPL. You should have + * received a copy with calc; if not, write to Free Software Foundation, Inc. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * @(#) $Revision: 30.1 $ + * @(#) $Id: register.cal,v 30.1 2007/07/05 19:35:54 chongo Exp $ + * @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/register.cal,v $ + * + * Under source code control: 2007/07/05 11:11:11 + * File existed as early as: 2007 + * + * chongo /\oo/\ http://www.isthe.com/chongo/ + * Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ + */ + +/* + * This file is part of the custom sample calc files. + * + * NOTE: You must use a calc that was compiled with ALLOW_CUSTOM= -DCUSTOM + * and run with a -C arg. + */ +if (config("compile_custom") == 0) { + quit "calc compiled without -DCUSTOM"; +} else if (config("allow_custom") == 0) { + quit "calc was run without the -D command line option"; +} + + +define register(num) +{ + local reg_max; /* number of registers */ + + /* + * firewall + */ + if (!isnum(num)) { + return newerror("register only works on numeric values"); + } + + /* + * determine register count + */ + reg_max = custom("sysinfo", "REGNUM_MAX"); + + /* + * determine the HALF length of a numeric value + */ + if (num < 0) { + return newerror("register number must be >= 0"); + } else if (num > reg_max) { + return newerror("register number must be < REGNUM_MAX"); + } else { + return custom("register", num); + } +} diff --git a/custom/sysinfo b/custom/sysinfo index b1853e1..4b4d23e 100644 --- a/custom/sysinfo +++ b/custom/sysinfo @@ -67,10 +67,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: sysinfo,v 29.2 2000/06/07 14:03:03 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: sysinfo,v 30.1 2007/03/16 11:10:04 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/sysinfo,v $ ## ## Under source code control: 1997/03/09 23:14:40 diff --git a/decl.h b/decl.h index 60619f6..c912787 100644 --- a/decl.h +++ b/decl.h @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: decl.h,v 29.5 2007/02/15 09:50:28 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: decl.h,v 30.2 2007/07/05 13:30:38 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/decl.h,v $ * * Under source code control: 2007/02/09 05:24:25 @@ -94,4 +94,11 @@ #endif +/* Perform printf-style argument type checking for known compilers */ +#ifdef __GNUC__ +# define PRINTF_FORMAT(fmt_idx, arg_idx) __attribute__ ((format (printf, fmt_idx, arg_idx))) +#else +# define PRINTF_FORMAT(fmt_idx, arg_idx) +#endif + #endif /* !__DECL_H__ */ diff --git a/endian.c b/endian.c index 0f3448f..2cffb66 100644 --- a/endian.c +++ b/endian.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: endian.c,v 29.4 2003/01/14 01:50:01 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: endian.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/endian.c,v $ * * Under source code control: 1993/11/15 04:32:58 diff --git a/file.c b/file.c index 922eba9..f2c3499 100644 --- a/file.c +++ b/file.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.18 $ - * @(#) $Id: file.c,v 29.18 2007/02/12 08:20:24 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: file.c,v 30.2 2007/07/05 13:30:38 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/file.c,v $ * * Under source code control: 1991/07/20 00:21:56 @@ -884,7 +884,7 @@ printid(FILEID id, int flags) fiop = findid(id, -1); if (fiop == NULL) { if (flags & PRINT_UNAMBIG) - math_fmt("FILE %d closed", id); + math_fmt("FILE %ld closed", id); else math_str("\"\""); return 1; @@ -899,7 +899,7 @@ printid(FILEID id, int flags) math_chr('"'); return 0; } - math_fmt("FILE %d \"%s\" (%s", id, fiop->name, fiop->mode); + math_fmt("FILE %ld \"%s\" (%s", id, fiop->name, fiop->mode); /* * print file position diff --git a/file.h b/file.h index 3f301f9..22392c3 100644 --- a/file.h +++ b/file.h @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.9 $ - * @(#) $Id: file.h,v 29.9 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: file.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/file.h,v $ * * Under source code control: 1996/05/24 05:55:58 diff --git a/fposval.c b/fposval.c index 1c2fc87..eb45987 100644 --- a/fposval.c +++ b/fposval.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.6 $ - * @(#) $Id: fposval.c,v 29.6 2001/03/18 03:01:41 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: fposval.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/fposval.c,v $ * * Under source code control: 1994/11/05 03:19:52 @@ -41,12 +41,16 @@ * We will #define of 8 symbols: * * FILEPOS_BITS length in bits of the type FILEPOS + * FILEPOS_LEN length in octets of the type FILEPOS * SWAP_HALF_IN_FILEPOS will copy/swap FILEPOS into an HALF array * OFF_T_BITS length in bits of the st_size stat element + * OFF_T_LEN length in octets of the st_size stat element * SWAP_HALF_IN_OFF_T will copy/swap st_size into an HALF array * DEV_BITS length in bits of the st_dev stat element + * DEV_LEN length in bits of the st_dev stat element * SWAP_HALF_IN_DEV will copy/swap st_dev into an HALF array * INODE_BITS length in bits of the st_ino stat element + * INODE_LEN length in octets of the st_ino stat element * SWAP_HALF_IN_INODE will copy/swap st_ino into an HALF array * * With regards to 'will copy/swap ... into an HALF array'. Such macros @@ -95,6 +99,8 @@ main(int argc, char **argv) #endif /* ! HAVE_FPOS_POS */ printf("#undef FILEPOS_BITS\n"); printf("#define FILEPOS_BITS %d\n", fileposlen); + printf("#undef FILEPOS_LEN\n"); + printf("#define FILEPOS_LEN %d\n", fileposlen/8); #if CALC_BYTE_ORDER == BIG_ENDIAN /* * Big Endian @@ -138,6 +144,8 @@ main(int argc, char **argv) #endif printf("#undef OFF_T_BITS\n"); printf("#define OFF_T_BITS %d\n", stsizelen); + printf("#undef OFF_T_LEN\n"); + printf("#define OFF_T_LEN %d\n", stsizelen/8); #if CALC_BYTE_ORDER == BIG_ENDIAN /* * Big Endian @@ -184,6 +192,8 @@ main(int argc, char **argv) #endif printf("#undef DEV_BITS\n"); printf("#define DEV_BITS %d\n", devlen); + printf("#undef DEV_LEN\n"); + printf("#define DEV_LEN %d\n", devlen/8); #if CALC_BYTE_ORDER == BIG_ENDIAN /* * Big Endian @@ -224,6 +234,8 @@ main(int argc, char **argv) #endif printf("#undef INODE_BITS\n"); printf("#define INODE_BITS %d\n", inodelen); + printf("#undef INODE_LEN\n"); + printf("#define INODE_LEN %d\n", inodelen/8); #if CALC_BYTE_ORDER == BIG_ENDIAN /* * Big Endian diff --git a/func.c b/func.c index 31a59f7..f81359f 100644 --- a/func.c +++ b/func.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.34 $ - * @(#) $Id: func.c,v 29.34 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: func.c,v 30.2 2007/07/05 17:37:41 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/func.c,v $ * * Under source code control: 1990/02/15 01:48:15 @@ -7889,75 +7889,6 @@ f_blkcpy(int count, VALUE **vals) } -S_FUNC VALUE -f_sha(int count, VALUE **vals) -{ - VALUE result; - HASH *state; /* pointer to hash state to use */ - int i; /* vals[i] to hash */ - - /* initialize VALUE */ - result.v_subtype = V_NOSUBTYPE; - - state = NULL; - - /* - * arg check - */ - if (count == 0) { - - /* return an initial hash state */ - result.v_type = V_HASH; - result.v_hash = hash_init(SHS_HASH_TYPE, NULL); - - } else if (count == 1 && vals[0]->v_type == V_HASH && - vals[0]->v_hash->hashtype == SHS_HASH_TYPE) { - - /* if just a hash value, finalize it */ - state = hash_copy(vals[0]->v_hash); - result.v_type = V_NUM; - result.v_num = qalloc(); - result.v_num->num = hash_final(state); - hash_free(state); - - } else { - - /* - * If the first value is a hash, use that as - * the initial hash state - */ - if (vals[0]->v_type == V_HASH && - vals[0]->v_hash->hashtype == SHS_HASH_TYPE) { - state = hash_copy(vals[0]->v_hash); - i = 1; - - /* - * otherwise use the default initial state - */ - } else { - state = hash_init(SHS_HASH_TYPE, NULL); - i = 0; - } - - /* - * hash the remaining values - */ - do { - state = hash_value(SHS_HASH_TYPE, vals[i], state); - } while (++i < count); - - /* - * return the current hash state - */ - result.v_type = V_HASH; - result.v_hash = state; - } - - /* return the result */ - return result; -} - - S_FUNC VALUE f_sha1(int count, VALUE **vals) { @@ -7975,10 +7906,10 @@ f_sha1(int count, VALUE **vals) /* return an initial hash state */ result.v_type = V_HASH; - result.v_hash = hash_init(SHS1_HASH_TYPE, NULL); + result.v_hash = hash_init(SHA1_HASH_TYPE, NULL); } else if (count == 1 && vals[0]->v_type == V_HASH && - vals[0]->v_hash->hashtype == SHS1_HASH_TYPE) { + vals[0]->v_hash->hashtype == SHA1_HASH_TYPE) { /* if just a hash value, finalize it */ state = hash_copy(vals[0]->v_hash); @@ -7994,7 +7925,7 @@ f_sha1(int count, VALUE **vals) * the initial hash state */ if (vals[0]->v_type == V_HASH && - vals[0]->v_hash->hashtype == SHS1_HASH_TYPE) { + vals[0]->v_hash->hashtype == SHA1_HASH_TYPE) { state = hash_copy(vals[0]->v_hash); i = 1; @@ -8002,7 +7933,7 @@ f_sha1(int count, VALUE **vals) * otherwise use the default initial state */ } else { - state = hash_init(SHS1_HASH_TYPE, NULL); + state = hash_init(SHA1_HASH_TYPE, NULL); i = 0; } @@ -8010,76 +7941,7 @@ f_sha1(int count, VALUE **vals) * hash the remaining values */ do { - state = hash_value(SHS1_HASH_TYPE, vals[i], state); - } while (++i < count); - - /* - * return the current hash state - */ - result.v_type = V_HASH; - result.v_hash = state; - } - - /* return the result */ - return result; -} - - -S_FUNC VALUE -f_md5(int count, VALUE **vals) -{ - VALUE result; - HASH *state; /* pointer to hash state to use */ - int i; /* vals[i] to hash */ - - /* initialize VALUE */ - result.v_subtype = V_NOSUBTYPE; - - state = NULL; - - /* - * arg check - */ - if (count == 0) { - - /* return an initial hash state */ - result.v_type = V_HASH; - result.v_hash = hash_init(MD5_HASH_TYPE, NULL); - - } else if (count == 1 && vals[0]->v_type == V_HASH && - vals[0]->v_hash->hashtype == MD5_HASH_TYPE) { - - /* if just a hash value, finalize it */ - state = hash_copy(vals[0]->v_hash); - result.v_type = V_NUM; - result.v_num = qalloc(); - result.v_num->num = hash_final(state); - hash_free(state); - - } else { - - /* - * If the first value is a hash, use that as - * the initial hash state - */ - if (vals[0]->v_type == V_HASH && - vals[0]->v_hash->hashtype == MD5_HASH_TYPE) { - state = hash_copy(vals[0]->v_hash); - i = 1; - - /* - * otherwise use the default initial state - */ - } else { - state = hash_init(MD5_HASH_TYPE, NULL); - i = 0; - } - - /* - * hash the remaining values - */ - do { - state = hash_value(MD5_HASH_TYPE, vals[i], state); + state = hash_value(SHA1_HASH_TYPE, vals[i], state); } while (++i < count); /* @@ -8551,8 +8413,6 @@ STATIC CONST struct builtin builtins[] = { "transpose of matrix"}, {"max", 0, IN, 0, OP_NOP, 0, f_max, "maximum value"}, - {"md5", 0, IN, 0, OP_NOP, 0, f_md5, - "MD5 Hash Algorithm"}, {"memsize", 1, 1, 0, OP_NOP, 0, f_memsize, "number of octets used by the value, including overhead"}, {"meq", 3, 3, 0, OP_NOP, f_meq, 0, @@ -8693,8 +8553,6 @@ STATIC CONST struct builtin builtins[] = { "set specified bit in string"}, {"sgn", 1, 1, 0, OP_SGN, qsign, 0, "sign of value (-1, 0, 1)"}, - {"sha", 0, IN, 0, OP_NOP, 0, f_sha, - "old Secure Hash Algorithm (SHS FIPS Pub 180)"}, {"sha1", 0, IN, 0, OP_NOP, 0, f_sha1, "Secure Hash Algorithm (SHS-1 FIPS Pub 180-1)"}, {"sin", 1, 2, 0, OP_NOP, 0, f_sin, diff --git a/func.h b/func.h index c3b6576..e57ea35 100644 --- a/func.h +++ b/func.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.6 $ - * @(#) $Id: func.h,v 29.6 2007/02/12 03:40:06 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: func.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/func.h,v $ * * Under source code control: 1990/02/15 01:48:33 diff --git a/hash.c b/hash.c index a32e9ee..a155a9c 100644 --- a/hash.c +++ b/hash.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.11 $ - * @(#) $Id: hash.c,v 29.11 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: hash.c,v 30.2 2007/07/05 17:37:41 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/hash.c,v $ * * Under source code control: 1995/11/23 05:13:11 @@ -44,7 +44,7 @@ * external hash_setup functions */ E_FUNC void shs_init_state(HASH*); -E_FUNC void shs1_init_state(HASH*); +E_FUNC void sha1_init_state(HASH*); E_FUNC void MD5_init_state(HASH*); @@ -64,9 +64,7 @@ STATIC struct hash_setup { int type; /* hash type (see XYZ_HASH_TYPE below) */ void (*init_state)(HASH*); /* initialize a hash state */ } htbl[] = { - { SHS_HASH_TYPE, shs_init_state }, /* old SHS / SHA */ - { SHS1_HASH_TYPE, shs1_init_state }, /* SHS-1 / SHA-1 */ - { MD5_HASH_TYPE, MD5_init_state }, /* MD5 */ + { SHA1_HASH_TYPE, sha1_init_state }, /* SHA-1 / SHA-1 */ { -1, NULL } /* must be last */ }; diff --git a/hash.h b/hash.h index 05a20e4..175179b 100644 --- a/hash.h +++ b/hash.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: hash.h,v 29.5 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: hash.h,v 30.2 2007/07/05 17:37:41 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/hash.h,v $ * * Under source code control: 1995/11/14 23:57:45 @@ -34,20 +34,16 @@ #if defined(CALC_SRC) /* if we are building from the calc source tree */ -# include "shs.h" -# include "shs1.h" -# include "md5.h" +# include "sha1.h" # include "zmath.h" #else -# include -# include -# include +# include # include #endif /* MAX_CHUNKSIZE is the largest chunksize of any hash */ -#define MAX_CHUNKSIZE (SHS1_CHUNKSIZE) +#define MAX_CHUNKSIZE (SHA1_CHUNKSIZE) /* max size of debugging strings in xyz_print() functions */ #define DEBUG_SIZE 127 @@ -81,9 +77,7 @@ struct hashstate { int unionsize; /* h_union element size */ union { /* hash dependent states */ USB8 data[1]; /* used by hash_value to hash below */ - SHS_INFO h_shs; /* old SHS/SHA internal state */ - SHS1_INFO h_shs1; /* new SHS-1/SHA-1 internal state */ - MD5_CTX h_md5; /* MD5 internal state */ + SHA1_INFO h_sha1; /* new SHA-1 internal state */ } h_union; }; @@ -95,9 +89,9 @@ struct hashstate { * XYZ_BASE values should be unique random hex values * that end in 00 (i.e., 0 mod 256). */ -#define SHS_BASE 0x12face00 /* old SHS / SHA */ -#define SHS1_BASE 0x23cafe00 /* new SHS-1 / SHA-1 */ -#define MD5_BASE 0x34feed00 /* MD5 */ +#define SHA_BASE 0x12face00 /* old SHA / SHA - no longer used */ +#define SHA1_BASE 0x23cafe00 /* new SHA-1 / SHA-1 */ +#define MD5_BASE 0x34feed00 /* MD5 - no longer used */ /* @@ -105,9 +99,9 @@ struct hashstate { * * we support these hash types */ -#define SHS_HASH_TYPE 1 -#define SHS1_HASH_TYPE 2 -#define MD5_HASH_TYPE 3 +#define SHA_HASH_TYPE 1 /* no longer used */ +#define SHA1_HASH_TYPE 2 +#define MD5_HASH_TYPE 3 /* no longer used */ /* diff --git a/have_const.c b/have_const.c index 21ff727..3ff60a5 100644 --- a/have_const.c +++ b/have_const.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: have_const.c,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: have_const.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/have_const.c,v $ * * Under source code control: 1995/04/22 13:18:44 diff --git a/have_fpos.c b/have_fpos.c index 5753b57..77da011 100644 --- a/have_fpos.c +++ b/have_fpos.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: have_fpos.c,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: have_fpos.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/have_fpos.c,v $ * * Under source code control: 1994/11/05 03:19:52 diff --git a/have_fpos_pos.c b/have_fpos_pos.c index ac85553..ab4de72 100644 --- a/have_fpos_pos.c +++ b/have_fpos_pos.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: have_fpos_pos.c,v 29.2 2001/03/18 03:00:11 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: have_fpos_pos.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/have_fpos_pos.c,v $ * * Under source code control: 2000/12/17 01:23 @@ -30,7 +30,7 @@ /* * If the symbol HAVE_NO_FPOS is defined, we will output nothing. - * If the HAVE_FILEPOS_SCALAR is defuned, we will output nothing. + * If the HAVE_FILEPOS_SCALAR is defined, we will output nothing. * If we are able to compile this program, then we must have the * __pos element in a non-scalar FILEPOS. */ diff --git a/have_getpgid.c b/have_getpgid.c index b9bcc53..db4354e 100644 --- a/have_getpgid.c +++ b/have_getpgid.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: have_getpgid.c,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: have_getpgid.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/have_getpgid.c,v $ * * Under source code control: 1999/10/20 22:51:13 diff --git a/have_getprid.c b/have_getprid.c index 91d5173..83725b3 100644 --- a/have_getprid.c +++ b/have_getprid.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: have_getprid.c,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: have_getprid.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/have_getprid.c,v $ * * Under source code control: 1999/10/20 23:43:42 diff --git a/have_getsid.c b/have_getsid.c index 6827f60..2b067d0 100644 --- a/have_getsid.c +++ b/have_getsid.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: have_getsid.c,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: have_getsid.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/have_getsid.c,v $ * * Under source code control: 1999/10/20 22:51:13 diff --git a/have_gettime.c b/have_gettime.c index cfce572..225ca8f 100644 --- a/have_gettime.c +++ b/have_gettime.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: have_gettime.c,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: have_gettime.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/have_gettime.c,v $ * * Under source code control: 1999/10/20 23:43:42 diff --git a/have_memmv.c b/have_memmv.c index 9927610..5ccfbc4 100644 --- a/have_memmv.c +++ b/have_memmv.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: have_memmv.c,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: have_memmv.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/have_memmv.c,v $ * * Under source code control: 1997/04/16 02:02:34 diff --git a/have_newstr.c b/have_newstr.c index 9e2a57c..c3c6bd7 100644 --- a/have_newstr.c +++ b/have_newstr.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: have_newstr.c,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: have_newstr.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/have_newstr.c,v $ * * Under source code control: 1995/05/02 03:55:08 diff --git a/have_offscl.c b/have_offscl.c index 965df77..0e20995 100644 --- a/have_offscl.c +++ b/have_offscl.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: have_offscl.c,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: have_offscl.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/have_offscl.c,v $ * * Under source code control: 1996/07/13 12:57:22 diff --git a/have_posscl.c b/have_posscl.c index 8e3a0c9..d65e5d2 100644 --- a/have_posscl.c +++ b/have_posscl.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: have_posscl.c,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: have_posscl.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/have_posscl.c,v $ * * Under source code control: 1996/07/13 12:57:22 diff --git a/have_rusage.c b/have_rusage.c index bfe2970..0051c31 100644 --- a/have_rusage.c +++ b/have_rusage.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: have_rusage.c,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: have_rusage.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/have_rusage.c,v $ * * Under source code control: 1999/11/05 11:28:15 diff --git a/have_stdvs.c b/have_stdvs.c index 6c51a2d..dc0803c 100644 --- a/have_stdvs.c +++ b/have_stdvs.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: have_stdvs.c,v 29.3 2007/02/07 20:53:18 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: have_stdvs.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/have_stdvs.c,v $ * * Under source code control: 1995/09/09 22:41:10 diff --git a/have_strdup.c b/have_strdup.c index b5cd313..415d7f3 100644 --- a/have_strdup.c +++ b/have_strdup.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: have_strdup.c,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: have_strdup.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/have_strdup.c,v $ * * Under source code control: 1999/11/09 12:46:54 diff --git a/have_uid_t.c b/have_uid_t.c index 6448df5..8d591e8 100644 --- a/have_uid_t.c +++ b/have_uid_t.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: have_uid_t.c,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: have_uid_t.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/have_uid_t.c,v $ * * Under source code control: 1995/05/02 03:03:24 diff --git a/have_unused.c b/have_unused.c index f929467..51b68ae 100644 --- a/have_unused.c +++ b/have_unused.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: have_unused.c,v 29.2 2004/02/23 08:35:42 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: have_unused.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/have_unused.c,v $ * * Under source code control: 2004/02/22 22:36:10 diff --git a/have_ustat.c b/have_ustat.c index 9fce352..f7d5802 100644 --- a/have_ustat.c +++ b/have_ustat.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: have_ustat.c,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: have_ustat.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/have_ustat.c,v $ * * Under source code control: 1999/10/20 22:51:13 diff --git a/have_varvs.c b/have_varvs.c index f2d7623..389d826 100644 --- a/have_varvs.c +++ b/have_varvs.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: have_varvs.c,v 29.3 2007/02/07 20:53:18 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: have_varvs.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/have_varvs.c,v $ * * Under source code control: 1995/09/09 22:41:10 diff --git a/help.c b/help.c index bb539ab..3aee63e 100644 --- a/help.c +++ b/help.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.10 $ - * @(#) $Id: help.c,v 29.10 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: help.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/help.c,v $ * * Under source code control: 1997/09/14 10:58:30 diff --git a/help/Makefile b/help/Makefile index b8c5c07..ca3a222 100644 --- a/help/Makefile +++ b/help/Makefile @@ -16,10 +16,10 @@ # A copy of version 2.1 of the GNU Lesser General Public License is # distributed with calc under the filename COPYING-LGPL. You should have # received a copy with calc; if not, write to Free Software Foundation, Inc. -# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# @(#) $Revision: 29.36 $ -# @(#) $Id: Makefile,v 29.36 2007/02/07 00:31:06 chongo Exp $ +# @(#) $Revision: 30.4 $ +# @(#) $Id: Makefile,v 30.4 2007/09/02 05:49:56 chongo Exp $ # @(#) $Source: /usr/local/src/cmd/calc/help/RCS/Makefile,v $ # # Under source code control: 1991/07/23 06:47:57 @@ -34,13 +34,30 @@ # required vars # SHELL= /bin/sh -MAKE_FILE= Makefile #### # Normally, the upper level makefile will set these values. We provide # a default here just in case you want to build from this directory. #### +# Normally certain files depend on the Makefile. If the Makefile is +# changed, then certain steps should be redone. If MAKE_FILE is +# set to Makefile, then these files will depend on Makefile. If +# MAKE_FILE is empty, then they wont. +# +# If in doubt, set MAKE_FILE to Makefile +# +MAKE_FILE= Makefile + +# Controlling file makefile basename (without the path) +# +# This is the basename same of the makefile that may/does/will drive +# this makefile. +# +# If in doubt, set TOP_MAKE_FILE to Makefile +# +TOP_MAKE_FILE= Makefile + # Where the system include (.h) files are kept # # For DJGPP, select: @@ -275,29 +292,29 @@ BLT_HELP_FILES= ${BLT_HELP_FILES_3} ${BLT_HELP_FILES_5} \ # DETAIL_HELP= abs access acos acosh acot acoth acsc acsch address agd append \ appr arg argv arrow asec asech asin asinh assign atan atan2 atanh \ - avg base base2 bernoulli bit blk blkcpy blkfree blocks bround \ - btrunc calc_tty calclevel catalan ceil cfappr cfsim char cmdbuf \ - cmp comb conj cos cosh cot coth count csc csch ctime delete den \ + avg base base2 bernoulli bit blk blkcpy blkfree blocks bround btrunc \ + calc_tty calclevel calcpath catalan ceil cfappr cfsim char cmdbuf \ + cmp comb conj cos cosh cot coth count cp csc csch ctime delete den \ dereference det digit digits display dp epsilon errcount errmax \ errno error estr euler eval exp fact factor fclose fcnt feof ferror \ fflush fgetc fgetfield fgetfile fgetline fgets fgetstr fib files \ floor fopen forall fpathopen fprintf fputc fputs fputstr frac free \ freebernoulli freeeuler freeglobals freeredc freestatics frem freopen \ fscan fscanf fseek fsize ftell gcd gcdrem gd getenv hash head highbit \ - hmean hnrmod hypot ilog ilog10 ilog2 im indices inputlevel insert \ - int inverse iroot isassoc isatty isblk isconfig isdefined iserror \ - iseven isfile ishash isident isint islist ismat ismult isnull isnum \ - isobj isobjtype isodd isprime isptr isqrt isrand israndom isreal \ - isrel issimple issq isstr istype jacobi join lcm lcmfact lfactor \ - ln log lowbit ltol makelist matdim matfill matmax matmin matsum \ - mattrace mattrans max md5 memsize meq min minv mmin mne mod modify \ - name near newerror nextcand nextprime norm null num oldvalue ord \ - param perm pfact pi pix places pmod polar poly pop popcnt pound \ - power prevcand prevprime printf prompt protect ptest push putenv \ - quo quomod rand randbit random randombit randperm rcin rcmul rcout \ - rcpow rcsq re remove reverse rewind rm root round rsearch runtime \ - saveval scale scan scanf search sec sech seed segment select sgn \ - sha sha1 sin sinh size sizeof sleep sort sqrt srand srandom ssq \ + hmean hnrmod hypot ilog ilog10 ilog2 im indices inputlevel insert int \ + inverse iroot isassoc isatty isblk isconfig isdefined iserror iseven \ + isfile ishash isident isint islist ismat ismult isnull isnum isobj \ + isobjtype isodd isprime isptr isqrt isrand israndom isreal isrel \ + issimple issq isstr istype jacobi join lcm lcmfact lfactor ln log \ + lowbit ltol makelist matdim matfill matmax matmin matsum mattrace \ + mattrans max memsize meq min minv mmin mne mod modify name near \ + newerror nextcand nextprime norm null num oldvalue ord param perm \ + pfact pi pix places pmod polar poly pop popcnt pound power prevcand \ + prevprime printf prompt protect ptest push putenv quo quomod rand \ + randbit random randombit randperm rcin rcmul rcout rcpow rcsq re \ + remove reverse rewind rm root round rsearch runtime saveval scale \ + scan scanf search sec sech seed segment select sgn sha1 sin \ + sinh size sizeof sleep sort sqrt srand srandom ssq stoponerror \ str strcat strcmp strcpy strerror strlen strncmp strncpy strpos \ strprintf strscan strscanf substr sum swap system systime tail tan \ tanh test time trunc usertime version xor @@ -423,7 +440,7 @@ usage: ../calc.usage fi ../calc.usage: - (cd ..; $(MAKE) calc.usage) + (cd ..; ${MAKE} -f ${TOP_MAKE_FILE} calc.usage) custom_cal: ../custom/CUSTOM_CAL ${RM} -f $@ @@ -499,12 +516,12 @@ cscript: ../cscript/README ../cscript/README: ../cscript/README.src ${Q} echo "forming cscript/README" - -${Q} ${RM} -f $@ - (cd ../cscript; $(MAKE) README) + ${Q} ${RM} -f $@ + (cd ../cscript; ${MAKE} -f Makefile README) full: ${FULL_HELP_FILES} ${MAKE_FILE} ${Q} echo "forming full" - -${Q} ${RM} -f $@ + ${Q} ${RM} -f $@ -${Q} for i in ${FULL_HELP_FILES}; do \ if [ Xintro != X"$$i" ]; then \ echo " "; \ @@ -570,13 +587,13 @@ ${SINGULAR_FILES}: ${PLURAL_FILES} # builtin: builtin.top builtin.end ../func.c funclist.sed ${Q} echo "forming builtin help file" - -${Q} ${RM} -f funclist.c + ${Q} ${RM} -f funclist.c ${Q} ${SED} -n -f funclist.sed ../func.c > funclist.c - -${Q} ${RM} -f funclist.o funclist${EXT} + ${Q} ${RM} -f funclist.o funclist${EXT} ${Q} ${LCC} ${ICFLAGS} -DFUNCLIST -I/usr/include \ -I.. funclist.c -c 2>/dev/null ${Q} ${LCC} ${ILDFLAGS} funclist.o -o funclist${EXT} - -${Q} ${RM} -f builtin + ${Q} ${RM} -f builtin ${Q} ${CAT} builtin.top > builtin ${Q} ./funclist${EXT} | \ ${SED} -e 's/^/ /' -e 's/[ ][ ]*$$//' >> builtin @@ -666,10 +683,8 @@ clean: ${RM} -f obj mkbuiltin funclist.c funclist.o funclist${EXT} ${RM} -f COPYING COPYING-LGPL -clobber: +clobber: clean ${RM} -f ${BLT_HELP_FILES} full .all calc - ${RM} -f obj mkbuiltin funclist.c funclist.o funclist${EXT} - ${RM} -f COPYING COPYING-LGPL ${RM} -f ${SINGULAR_FILES} ${DETAIL_CLONE} # install everything @@ -725,6 +740,14 @@ install: all ${MV} -f ${T}${HELPDIR}/obj.new ${T}${HELPDIR}/obj; \ echo "installed ${T}${HELPDIR}/obj"; \ fi + -${Q} if [ -f "${T}${HELPDIR}/sha" ]; then \ + ${RM} -f ${T}${HELPDIR}/sha; \ + echo "removed old ${T}${HELPDIR}/sha"; \ + fi; + -${Q} if [ -f "${T}${HELPDIR}/md5" ]; then \ + ${RM} -f ${T}${HELPDIR}/md5; \ + echo "removed old ${T}${HELPDIR}/md5"; \ + fi; # Try to remove everything that was installed # diff --git a/help/abs b/help/abs index 1914b38..ee802fc 100644 --- a/help/abs +++ b/help/abs @@ -58,10 +58,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: abs,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: abs,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/abs,v $ ## ## Under source code control: 1994/03/19 01:40:22 diff --git a/help/access b/help/access index 2b99d1d..43945cf 100644 --- a/help/access +++ b/help/access @@ -62,10 +62,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: access,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: access,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/access,v $ ## ## Under source code control: 1996/04/30 03:36:20 diff --git a/help/acos b/help/acos index 620655a..c768a2b 100644 --- a/help/acos +++ b/help/acos @@ -43,10 +43,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: acos,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: acos,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/acos,v $ ## ## Under source code control: 1994/03/19 01:40:23 diff --git a/help/acosh b/help/acosh index 59f4f2a..422d3d3 100644 --- a/help/acosh +++ b/help/acosh @@ -46,10 +46,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: acosh,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: acosh,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/acosh,v $ ## ## Under source code control: 1994/03/19 01:40:24 diff --git a/help/acot b/help/acot index cac4683..fa994d3 100644 --- a/help/acot +++ b/help/acot @@ -43,10 +43,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: acot,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: acot,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/acot,v $ ## ## Under source code control: 1995/11/13 03:49:00 diff --git a/help/acoth b/help/acoth index f8c3085..d4dd783 100644 --- a/help/acoth +++ b/help/acoth @@ -45,10 +45,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: acoth,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: acoth,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/acoth,v $ ## ## Under source code control: 1995/11/13 03:49:01 diff --git a/help/acsc b/help/acsc index 0bc82f8..f3572be 100644 --- a/help/acsc +++ b/help/acsc @@ -43,10 +43,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: acsc,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: acsc,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/acsc,v $ ## ## Under source code control: 1995/11/13 03:49:00 diff --git a/help/acsch b/help/acsch index 4e45af4..0731ed6 100644 --- a/help/acsch +++ b/help/acsch @@ -46,10 +46,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: acsch,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: acsch,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/acsch,v $ ## ## Under source code control: 1995/11/13 03:49:01 diff --git a/help/address b/help/address index 91a64ca..1a1c40b 100644 --- a/help/address +++ b/help/address @@ -174,10 +174,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: address,v 29.5 2006/06/10 12:28:10 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: address,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/address,v $ ## ## Under source code control: 1997/09/06 20:03:34 diff --git a/help/agd b/help/agd index 411ff86..ee16a52 100644 --- a/help/agd +++ b/help/agd @@ -70,10 +70,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: agd,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: agd,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/agd,v $ ## ## Under source code control: 1997/09/06 20:03:34 diff --git a/help/append b/help/append index 3108d23..9c3e4a6 100644 --- a/help/append +++ b/help/append @@ -74,10 +74,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: append,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: append,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/append,v $ ## ## Under source code control: 1994/03/19 03:13:17 diff --git a/help/appr b/help/appr index 9d8acd1..0e98c51 100644 --- a/help/appr +++ b/help/appr @@ -165,10 +165,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: appr,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: appr,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/appr,v $ ## ## Under source code control: 1994/09/25 17:18:21 diff --git a/help/archive b/help/archive index d7cb679..b7ef2cf 100644 --- a/help/archive +++ b/help/archive @@ -29,10 +29,10 @@ chongo /\../\ ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: archive,v 29.2 2000/06/07 14:02:33 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: archive,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/archive,v $ ## ## Under source code control: 1996/06/13 02:51:48 diff --git a/help/arg b/help/arg index 6719a57..60c4255 100644 --- a/help/arg +++ b/help/arg @@ -46,10 +46,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: arg,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: arg,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/arg,v $ ## ## Under source code control: 1994/09/25 20:22:31 diff --git a/help/argv b/help/argv index 86b7b29..d42bdbc 100644 --- a/help/argv +++ b/help/argv @@ -67,10 +67,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: argv,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: argv,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/argv,v $ ## ## Under source code control: 1999/11/23 19:45:05 diff --git a/help/arrow b/help/arrow index 268c8e9..2895a1b 100644 --- a/help/arrow +++ b/help/arrow @@ -64,10 +64,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: arrow,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: arrow,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/arrow,v $ ## ## Under source code control: 1997/09/06 20:03:34 diff --git a/help/asec b/help/asec index cfd9fcc..8beebae 100644 --- a/help/asec +++ b/help/asec @@ -43,10 +43,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: asec,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: asec,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/asec,v $ ## ## Under source code control: 1995/11/13 03:49:00 diff --git a/help/asech b/help/asech index 6cdcd3d..cff78ce 100644 --- a/help/asech +++ b/help/asech @@ -45,10 +45,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: asech,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: asech,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/asech,v $ ## ## Under source code control: 1995/11/13 03:49:00 diff --git a/help/asin b/help/asin index c2b8371..c50e3be 100644 --- a/help/asin +++ b/help/asin @@ -43,10 +43,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: asin,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: asin,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/asin,v $ ## ## Under source code control: 1994/03/19 01:40:24 diff --git a/help/asinh b/help/asinh index 6dffbae..0f346bd 100644 --- a/help/asinh +++ b/help/asinh @@ -45,10 +45,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: asinh,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: asinh,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/asinh,v $ ## ## Under source code control: 1994/03/19 01:40:25 diff --git a/help/assign b/help/assign index fddbc15..d3b3afc 100644 --- a/help/assign +++ b/help/assign @@ -131,10 +131,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: assign,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: assign,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/assign,v $ ## ## Under source code control: 1995/05/11 21:03:23 diff --git a/help/assoc b/help/assoc index 10ff7eb..e09d0ea 100644 --- a/help/assoc +++ b/help/assoc @@ -96,10 +96,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: assoc,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: assoc,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/assoc,v $ ## ## Under source code control: 1994/09/25 20:22:31 diff --git a/help/atan b/help/atan index d9922a3..b10e63e 100644 --- a/help/atan +++ b/help/atan @@ -43,10 +43,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: atan,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: atan,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/atan,v $ ## ## Under source code control: 1994/03/19 01:40:25 diff --git a/help/atan2 b/help/atan2 index 0bd20a7..0e7e6f9 100644 --- a/help/atan2 +++ b/help/atan2 @@ -50,10 +50,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: atan2,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: atan2,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/atan2,v $ ## ## Under source code control: 1994/03/19 01:40:26 diff --git a/help/atanh b/help/atanh index b51b117..ed40f1b 100644 --- a/help/atanh +++ b/help/atanh @@ -45,10 +45,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: atanh,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: atanh,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/atanh,v $ ## ## Under source code control: 1994/03/19 01:40:27 diff --git a/help/avg b/help/avg index 5eff80b..f97f7ba 100644 --- a/help/avg +++ b/help/avg @@ -63,10 +63,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: avg,v 29.4 2006/06/22 23:49:22 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: avg,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/avg,v $ ## ## Under source code control: 1994/09/25 20:22:31 diff --git a/help/base b/help/base index 52b8e20..f580a49 100644 --- a/help/base +++ b/help/base @@ -95,10 +95,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.6 $ -## @(#) $Id: base,v 29.6 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: base,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/base,v $ ## ## Under source code control: 1994/09/30 00:09:39 diff --git a/help/base2 b/help/base2 index 889fc6b..51de034 100644 --- a/help/base2 +++ b/help/base2 @@ -107,10 +107,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 1.4 $ -## @(#) $Id: base2,v 1.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: base2,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/base2,v $ ## ## Under source code control: 2002/12/29 00:21:07 diff --git a/help/bernoulli b/help/bernoulli index fee40cb..0580e0e 100644 --- a/help/bernoulli +++ b/help/bernoulli @@ -55,10 +55,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.6 $ -## @(#) $Id: bernoulli,v 29.6 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: bernoulli,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/bernoulli,v $ ## ## Under source code control: 2000/07/13 01:33:00 diff --git a/help/bit b/help/bit index 55aa57c..8cd1889 100644 --- a/help/bit +++ b/help/bit @@ -56,10 +56,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: bit,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: bit,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/bit,v $ ## ## Under source code control: 1994/10/21 02:21:30 diff --git a/help/blk b/help/blk index 6a51fec..24316d1 100644 --- a/help/blk +++ b/help/blk @@ -247,10 +247,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: blk,v 29.5 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: blk,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/blk,v $ ## ## Under source code control: 1997/04/05 13:07:13 diff --git a/help/blkcpy b/help/blkcpy index 4e420f4..33b6f46 100644 --- a/help/blkcpy +++ b/help/blkcpy @@ -204,10 +204,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: blkcpy,v 29.4 2006/06/10 12:28:10 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: blkcpy,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/blkcpy,v $ ## ## Under source code control: 1997/04/05 14:08:50 diff --git a/help/blkfree b/help/blkfree index 182671a..a50948a 100644 --- a/help/blkfree +++ b/help/blkfree @@ -71,10 +71,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: blkfree,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: blkfree,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/blkfree,v $ ## ## Under source code control: 1997/04/05 13:07:13 diff --git a/help/blocks b/help/blocks index 0d4a5a8..35c9088 100644 --- a/help/blocks +++ b/help/blocks @@ -56,10 +56,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: blocks,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: blocks,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/blocks,v $ ## ## Under source code control: 1997/04/05 13:07:13 diff --git a/help/bround b/help/bround index 9d510c9..d83ed36 100644 --- a/help/bround +++ b/help/bround @@ -136,10 +136,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: bround,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: bround,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/bround,v $ ## ## Under source code control: 1994/09/30 00:22:35 diff --git a/help/btrunc b/help/btrunc index 74584d6..8de28c2 100644 --- a/help/btrunc +++ b/help/btrunc @@ -57,10 +57,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: btrunc,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: btrunc,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/btrunc,v $ ## ## Under source code control: 1994/09/30 00:44:27 diff --git a/help/builtin.end b/help/builtin.end index ebadff1..d68768c 100644 --- a/help/builtin.end +++ b/help/builtin.end @@ -213,10 +213,10 @@ ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: builtin.end,v 29.3 2007/02/08 06:25:23 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: builtin.end,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/builtin.end,v $ ## ## Under source code control: 1995/07/10 01:17:53 diff --git a/help/builtin.top b/help/builtin.top index 1583015..806542d 100644 --- a/help/builtin.top +++ b/help/builtin.top @@ -21,10 +21,10 @@ Builtin functions ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: builtin.top,v 29.2 2000/06/07 14:02:33 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: builtin.top,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/builtin.top,v $ ## ## Under source code control: 1995/07/10 01:17:53 diff --git a/help/calc_tty b/help/calc_tty index 12389ee..49bd5c1 100644 --- a/help/calc_tty +++ b/help/calc_tty @@ -40,10 +40,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: calc_tty,v 29.3 2006/06/10 12:28:10 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: calc_tty,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/calc_tty,v $ ## ## Under source code control: 2000/12/14 01:33:00 diff --git a/help/calclevel b/help/calclevel index aa14a7b..45f8176 100644 --- a/help/calclevel +++ b/help/calclevel @@ -48,10 +48,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: calclevel,v 29.2 2000/06/07 14:02:33 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: calclevel,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/calclevel,v $ ## ## Under source code control: 1999/10/31 06:01:21 diff --git a/help/calcpath b/help/calcpath new file mode 100644 index 0000000..0eff9b2 --- /dev/null +++ b/help/calcpath @@ -0,0 +1,56 @@ +NAME + calcpath - current CALCPATH search path + +SYNOPSIS + calcpath() + +TYPES + return string + +DESCRIPTION + This function returns the current value of the CALCPATH search path. + A search path is a :-separated list of directories used to search for + a filename. + + The CALCPATH is taken from the $CALCPATH environment variable or + if no such variable exists, a compiled in default search path + is used. See "help environment" and "help calcpath" for more + information on CALCPATH. + +EXAMPLE + n/a + +LIMITS + none + +LINK LIBRARY + char *calcpath; + +SEE ALSO + environment, fpathopen + +## Copyright (C) 2006 Landon Curt Noll +## +## Calc is open software; you can redistribute it and/or modify it under +## the terms of the version 2.1 of the GNU Lesser General Public License +## as published by the Free Software Foundation. +## +## Calc is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General +## Public License for more details. +## +## A copy of version 2.1 of the GNU Lesser General Public License is +## distributed with calc under the filename COPYING-LGPL. You should have +## received a copy with calc; if not, write to Free Software Foundation, Inc. +## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## +## @(#) $Revision: 30.1 $ +## @(#) $Id: calcpath,v 30.1 2007/03/16 11:10:42 chongo Exp $ +## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/calcpath,v $ +## +## Under source code control: 2006/05/07 23:56:04 +## File existed as early as: 2006 +## +## chongo /\oo/\ http://www.isthe.com/chongo/ +## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ diff --git a/help/catalan b/help/catalan index e2b8103..e8087dd 100644 --- a/help/catalan +++ b/help/catalan @@ -51,10 +51,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: catalan,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: catalan,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/catalan,v $ ## ## Under source code control: 2000/12/14 01:33:00 diff --git a/help/ceil b/help/ceil index 223071f..719083e 100644 --- a/help/ceil +++ b/help/ceil @@ -46,10 +46,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: ceil,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: ceil,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ceil,v $ ## ## Under source code control: 1994/09/30 01:12:01 diff --git a/help/cfappr b/help/cfappr index c0d775d..e04489e 100644 --- a/help/cfappr +++ b/help/cfappr @@ -102,10 +102,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: cfappr,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: cfappr,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/cfappr,v $ ## ## Under source code control: 1994/09/30 01:23:59 diff --git a/help/cfsim b/help/cfsim index c5056c4..bd5dc39 100644 --- a/help/cfsim +++ b/help/cfsim @@ -127,10 +127,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: cfsim,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: cfsim,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/cfsim,v $ ## ## Under source code control: 1994/09/30 01:29:45 diff --git a/help/char b/help/char index 9a224f0..c0a85a1 100644 --- a/help/char +++ b/help/char @@ -40,10 +40,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: char,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: char,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/char,v $ ## ## Under source code control: 1994/09/30 01:45:45 diff --git a/help/cmdbuf b/help/cmdbuf index bd85b2a..e266b35 100644 --- a/help/cmdbuf +++ b/help/cmdbuf @@ -42,10 +42,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: cmdbuf,v 29.3 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: cmdbuf,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/cmdbuf,v $ ## ## Under source code control: 1995/07/09 04:05:58 diff --git a/help/cmp b/help/cmp index 5ed2567..bc4b053 100644 --- a/help/cmp +++ b/help/cmp @@ -128,10 +128,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: cmp,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: cmp,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/cmp,v $ ## ## Under source code control: 1994/10/20 02:52:30 diff --git a/help/comb b/help/comb index a6cf05c..c371e35 100644 --- a/help/comb +++ b/help/comb @@ -52,10 +52,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: comb,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: comb,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/comb,v $ ## ## Under source code control: 1994/10/20 04:03:02 diff --git a/help/command b/help/command index 973f08a..435e7e9 100644 --- a/help/command +++ b/help/command @@ -364,10 +364,10 @@ Command sequence ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: command,v 29.5 2006/06/10 12:28:10 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: command,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/command,v $ ## ## Under source code control: 1991/07/21 04:37:17 diff --git a/help/config b/help/config index e75b9e0..7164dc9 100644 --- a/help/config +++ b/help/config @@ -583,8 +583,8 @@ DESCRIPTION 1 outputs currently active functions when a quit instruction is executed - 2 some details of shs, shs1 and md5 hash states are included - in the output when these are printed + 2 some details of hash states are included in the output + when these are printed 3 when a function constructs a block value, tests are made that the result has the properties required for use of @@ -956,7 +956,7 @@ LINK LIBRARY SEE ALSO usage, custom, custom_cal, usage, epsilon, display -## Copyright (C) 1999-2006 Landon Curt Noll +## Copyright (C) 1999-2007 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 @@ -970,10 +970,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.18 $ -## @(#) $Id: config,v 29.18 2006/12/16 11:14:28 chongo Exp $ +## @(#) $Revision: 30.2 $ +## @(#) $Id: config,v 30.2 2007/07/05 17:37:41 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/config,v $ ## ## Under source code control: 1991/07/21 04:37:17 diff --git a/help/conj b/help/conj index fc33e1f..28f5a52 100644 --- a/help/conj +++ b/help/conj @@ -54,10 +54,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: conj,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: conj,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/conj,v $ ## ## Under source code control: 1995/10/03 10:40:01 diff --git a/help/contrib b/help/contrib index ad799fa..c4d5df5 100644 --- a/help/contrib +++ b/help/contrib @@ -97,10 +97,10 @@ chongo (share and enjoy) /\../\ ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: contrib,v 29.4 2001/06/01 11:37:14 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: contrib,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/contrib,v $ ## ## Under source code control: 1997/03/09 16:33:22 diff --git a/help/cos b/help/cos index f147df1..e21e0ce 100644 --- a/help/cos +++ b/help/cos @@ -49,10 +49,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: cos,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: cos,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/cos,v $ ## ## Under source code control: 1994/03/19 01:40:27 diff --git a/help/cosh b/help/cosh index 9394894..7612fcd 100644 --- a/help/cosh +++ b/help/cosh @@ -43,10 +43,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: cosh,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: cosh,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/cosh,v $ ## ## Under source code control: 1994/03/19 01:40:28 diff --git a/help/cot b/help/cot index 8ff6646..babcec9 100644 --- a/help/cot +++ b/help/cot @@ -41,10 +41,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: cot,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: cot,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/cot,v $ ## ## Under source code control: 1995/11/13 03:49:00 diff --git a/help/coth b/help/coth index ea681a0..fa73d5a 100644 --- a/help/coth +++ b/help/coth @@ -43,10 +43,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: coth,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: coth,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/coth,v $ ## ## Under source code control: 1995/11/13 03:49:00 diff --git a/help/count b/help/count index 2224e0c..bb70fe1 100644 --- a/help/count +++ b/help/count @@ -44,10 +44,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: count,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: count,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/count,v $ ## ## Under source code control: 1995/07/10 02:09:31 diff --git a/help/cp b/help/cp new file mode 100644 index 0000000..890fc2e --- /dev/null +++ b/help/cp @@ -0,0 +1,63 @@ +NAME + cp - cross product of two 3 element vectors + +SYNOPSIS + cp(x, y) + +TYPES + x, y 1-dimensional matrices with 3 elements + + return 1-dimensional matrix with 3 elements + +DESCRIPTION + Calculate the product of two 3 1-dimensional matrices. + If x has elements (x0, x1, x2), and y has elements (y0, y1, y2), + cp(x,y) returns the matrix of type [0:2] with elements: + + {x1 * y2 - x2 * y1, x3 * y1 - x1 * y3, x1 * y2 - x2 * y1} + +EXAMPLE + ; mat x[3] = {2,3,4} + ; mat y[3] = {3,4,5} + ; print cp(x,y) + + mat [3] (3 elements, 3 nonzero): + [0] = -1 + [1] = 2 + [2] = -1 + +LIMITS + The components of the matrices are to be of types for which the + required algebraic operations have been defined. + +LINK LIBRARY + MATRIX *matcross(MATRIX *x, MATRIX *y) + +SEE ALSO + dp + +## 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 +## as published by the Free Software Foundation. +## +## Calc is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General +## Public License for more details. +## +## A copy of version 2.1 of the GNU Lesser General Public License is +## distributed with calc under the filename COPYING-LGPL. You should have +## received a copy with calc; if not, write to Free Software Foundation, Inc. +## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## +## @(#) $Revision: 30.1 $ +## @(#) $Id: cp,v 30.1 2007/03/16 11:10:42 chongo Exp $ +## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/cp,v $ +## +## Under source code control: 1995/10/05 04:52:26 +## File existed as early as: 1995 +## +## chongo /\oo/\ http://www.isthe.com/chongo/ +## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ diff --git a/help/credit b/help/credit index f82bbd3..61be0e5 100644 --- a/help/credit +++ b/help/credit @@ -54,9 +54,9 @@ Copying / Calc GNU Lesser General Public License files, write to: Free Software Foundation, Inc. - 59 Temple Place - Suite 330 - Boston, MA 02111-1307 + 51 Franklin Street + Fifth Floor + Boston, MA 02110-1301 USA See also: @@ -79,10 +79,10 @@ See also: ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: credit,v 29.2 2000/06/07 14:02:33 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: credit,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/credit,v $ ## ## Under source code control: 1991/07/23 05:47:24 diff --git a/help/csc b/help/csc index 04764a8..8e9f5f8 100644 --- a/help/csc +++ b/help/csc @@ -41,10 +41,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: csc,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: csc,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/csc,v $ ## ## Under source code control: 1995/11/13 03:49:00 diff --git a/help/csch b/help/csch index 71fb3e1..b957824 100644 --- a/help/csch +++ b/help/csch @@ -43,10 +43,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: csch,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: csch,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/csch,v $ ## ## Under source code control: 1995/11/13 03:49:00 diff --git a/help/ctime b/help/ctime index 812abeb..c5c3f6a 100644 --- a/help/ctime +++ b/help/ctime @@ -42,10 +42,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: ctime,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: ctime,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ctime,v $ ## ## Under source code control: 1996/04/30 03:05:18 diff --git a/help/custom b/help/custom index 0e6e885..918ca6b 100644 --- a/help/custom +++ b/help/custom @@ -108,10 +108,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: custom,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: custom,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/custom,v $ ## ## Under source code control: 1997/03/09 16:33:22 diff --git a/help/define b/help/define index be2fc51..2052d79 100644 --- a/help/define +++ b/help/define @@ -205,10 +205,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.6 $ -## @(#) $Id: define,v 29.6 2006/06/22 23:49:22 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: define,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/define,v $ ## ## diff --git a/help/delete b/help/delete index a9c77b7..0243160 100644 --- a/help/delete +++ b/help/delete @@ -56,10 +56,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: delete,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: delete,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/delete,v $ ## ## Under source code control: 1994/03/19 03:13:18 diff --git a/help/den b/help/den index fbbfc0f..847eea2 100644 --- a/help/den +++ b/help/den @@ -52,10 +52,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: den,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: den,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/den,v $ ## ## Under source code control: 1995/10/05 04:52:26 diff --git a/help/dereference b/help/dereference index 30603af..f7f615f 100644 --- a/help/dereference +++ b/help/dereference @@ -96,10 +96,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: dereference,v 29.4 2006/06/10 12:28:10 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: dereference,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/dereference,v $ ## ## Under source code control: 1997/09/06 20:03:34 diff --git a/help/det b/help/det index ff73ba6..614b43c 100644 --- a/help/det +++ b/help/det @@ -87,10 +87,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: det,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: det,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/det,v $ ## ## Under source code control: 1995/11/28 11:17:47 diff --git a/help/digit b/help/digit index 1edd9de..c6a4b98 100644 --- a/help/digit +++ b/help/digit @@ -106,10 +106,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: digit,v 29.5 2006/06/10 12:28:10 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: digit,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/digit,v $ ## ## Under source code control: 1995/10/03 10:40:01 diff --git a/help/digits b/help/digits index ffded3a..ca6b0ae 100644 --- a/help/digits +++ b/help/digits @@ -64,10 +64,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.6 $ -## @(#) $Id: digits,v 29.6 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: digits,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/digits,v $ ## ## Under source code control: 1995/10/03 10:40:01 diff --git a/help/display b/help/display index f70a6fc..d9167f3 100644 --- a/help/display +++ b/help/display @@ -68,10 +68,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: display,v 29.2 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: display,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/display,v $ ## ## Under source code control: 2004/07/25 23:50:40 diff --git a/help/dp b/help/dp index 1a4194c..6418745 100644 --- a/help/dp +++ b/help/dp @@ -50,10 +50,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: dp,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: dp,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/dp,v $ ## ## Under source code control: 1995/10/05 04:52:26 diff --git a/help/environment b/help/environment index 28a0dec..be5cf16 100644 --- a/help/environment +++ b/help/environment @@ -102,10 +102,10 @@ Environment variables ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: environment,v 29.5 2006/06/10 13:01:09 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: environment,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/environment,v $ ## ## Under source code control: 1991/07/23 05:47:25 diff --git a/help/epsilon b/help/epsilon index 216ba4f..8f12028 100644 --- a/help/epsilon +++ b/help/epsilon @@ -47,10 +47,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: epsilon,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: epsilon,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/epsilon,v $ ## ## Under source code control: 1995/10/05 04:52:26 diff --git a/help/errcount b/help/errcount index 883dfab..2698bb2 100644 --- a/help/errcount +++ b/help/errcount @@ -60,10 +60,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: errcount,v 29.4 2006/05/21 07:31:35 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: errcount,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/errcount,v $ ## ## Under source code control: 1997/03/08 08:51:14 diff --git a/help/errmax b/help/errmax index 35e0d2b..f711264 100644 --- a/help/errmax +++ b/help/errmax @@ -59,10 +59,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.6 $ -## @(#) $Id: errmax,v 29.6 2006/05/21 07:31:35 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: errmax,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/errmax,v $ ## ## Under source code control: 1997/03/08 08:51:14 diff --git a/help/errno b/help/errno index c3d6c27..387ba21 100644 --- a/help/errno +++ b/help/errno @@ -69,10 +69,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: errno,v 29.5 2006/05/23 19:15:48 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: errno,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/errno,v $ ## ## Under source code control: 1994/10/27 03:05:08 diff --git a/help/error b/help/error index a0b18f1..6f45729 100644 --- a/help/error +++ b/help/error @@ -51,10 +51,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: error,v 29.5 2006/05/23 19:15:48 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: error,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/error,v $ ## ## Under source code control: 1995/12/18 03:30:59 diff --git a/help/errorcodes.hdr b/help/errorcodes.hdr index 4b8d522..36ebdfa 100644 --- a/help/errorcodes.hdr +++ b/help/errorcodes.hdr @@ -14,10 +14,10 @@ Calc generated error codes (see the error help file): ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: errorcodes.hdr,v 29.2 2000/06/07 14:02:33 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: errorcodes.hdr,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/errorcodes.hdr,v $ ## ## Under source code control: 1995/12/18 03:19:11 diff --git a/help/errorcodes.sed b/help/errorcodes.sed index 15a5e22..8a60833 100644 --- a/help/errorcodes.sed +++ b/help/errorcodes.sed @@ -14,10 +14,10 @@ ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: errorcodes.sed,v 29.2 2000/06/07 14:02:33 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: errorcodes.sed,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/errorcodes.sed,v $ ## ## Under source code control: 1995/12/18 03:19:11 diff --git a/help/estr b/help/estr index 95ec00b..192604c 100644 --- a/help/estr +++ b/help/estr @@ -1,7 +1,6 @@ NAME estr - represent some types of value by text strings - SYNOPSIS estr(x) @@ -43,3 +42,28 @@ LINK LIBRARY SEE ALSO str, strprintf +## Copyright (C) 2006 Ernest Bowen +## +## Calc is open software; you can redistribute it and/or modify it under +## the terms of the version 2.1 of the GNU Lesser General Public License +## as published by the Free Software Foundation. +## +## Calc is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General +## Public License for more details. +## +## A copy of version 2.1 of the GNU Lesser General Public License is +## distributed with calc under the filename COPYING-LGPL. You should have +## received a copy with calc; if not, write to Free Software Foundation, Inc. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +## +## @(#) $Revision: 30.1 $ +## @(#) $Id: estr,v 30.1 2007/03/16 11:10:42 chongo Exp $ +## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/estr,v $ +## +## Under source code control: 2006/08/20 14:45:13 +## File existed as early as: 2006 +## +## chongo /\oo/\ http://www.isthe.com/chongo/ +## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ diff --git a/help/euler b/help/euler index 05f6a77..52b0324 100644 --- a/help/euler +++ b/help/euler @@ -51,10 +51,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: euler,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: euler,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/euler,v $ ## ## Under source code control: 2000/12/14 01:33:00 diff --git a/help/eval b/help/eval index 81ae7ba..cc72d0c 100644 --- a/help/eval +++ b/help/eval @@ -74,10 +74,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: eval,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: eval,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/eval,v $ ## ## Under source code control: 1995/12/18 03:30:59 diff --git a/help/exp b/help/exp index 8e79429..36fa8ed 100644 --- a/help/exp +++ b/help/exp @@ -54,10 +54,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: exp,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: exp,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/exp,v $ ## ## Under source code control: 1995/10/11 04:41:26 diff --git a/help/expression b/help/expression index f366c00..7040e8d 100644 --- a/help/expression +++ b/help/expression @@ -48,10 +48,10 @@ Expression sequences ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: expression,v 29.2 2000/06/07 14:02:33 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: expression,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/expression,v $ ## ## Under source code control: 1991/07/21 04:37:18 diff --git a/help/fact b/help/fact index 18910e9..1508323 100644 --- a/help/fact +++ b/help/fact @@ -46,10 +46,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: fact,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fact,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fact,v $ ## ## Under source code control: 1994/10/20 04:03:02 diff --git a/help/factor b/help/factor index 6deb3cc..8aae9fa 100644 --- a/help/factor +++ b/help/factor @@ -64,10 +64,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: factor,v 29.5 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: factor,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/factor,v $ ## ## Under source code control: 1995/12/18 12:34:57 diff --git a/help/fclose b/help/fclose index f875885..64b41fb 100644 --- a/help/fclose +++ b/help/fclose @@ -65,10 +65,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: fclose,v 29.4 2006/05/23 19:15:48 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fclose,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fclose,v $ ## ## Under source code control: 1994/10/27 03:04:16 diff --git a/help/fcnt b/help/fcnt index c561cb3..555fef3 100644 --- a/help/fcnt +++ b/help/fcnt @@ -44,10 +44,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: fcnt,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fcnt,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fcnt,v $ ## ## Under source code control: 1995/12/18 12:03:02 diff --git a/help/feof b/help/feof index c53b090..2a34769 100644 --- a/help/feof +++ b/help/feof @@ -57,10 +57,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: feof,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: feof,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/feof,v $ ## ## Under source code control: 1994/10/27 03:04:17 diff --git a/help/ferror b/help/ferror index 753c44d..bdd0117 100644 --- a/help/ferror +++ b/help/ferror @@ -46,10 +46,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: ferror,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: ferror,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ferror,v $ ## ## Under source code control: 1994/10/27 03:04:17 diff --git a/help/fflush b/help/fflush index dcb7448..d545b8e 100644 --- a/help/fflush +++ b/help/fflush @@ -41,10 +41,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: fflush,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fflush,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fflush,v $ ## ## Under source code control: 1994/10/27 03:04:17 diff --git a/help/fgetc b/help/fgetc index ab79d71..730c81e 100644 --- a/help/fgetc +++ b/help/fgetc @@ -48,10 +48,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: fgetc,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fgetc,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fgetc,v $ ## ## Under source code control: 1995/03/04 11:33:19 diff --git a/help/fgetfield b/help/fgetfield index e3cdae9..1e1b8ab 100644 --- a/help/fgetfield +++ b/help/fgetfield @@ -64,10 +64,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.6 $ -## @(#) $Id: fgetfield,v 29.6 2006/08/20 15:01:57 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fgetfield,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fgetfield,v $ ## ## Under source code control: 1996/04/30 03:05:17 diff --git a/help/fgetfile b/help/fgetfile index 0e232e0..ae0e606 100644 --- a/help/fgetfile +++ b/help/fgetfile @@ -59,10 +59,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: fgetfile,v 29.2 2006/08/20 15:01:57 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fgetfile,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fgetfile,v $ ## ## Under source code control: 1996/04/30 03:05:17 diff --git a/help/fgetline b/help/fgetline index a546ab9..8b38369 100644 --- a/help/fgetline +++ b/help/fgetline @@ -64,10 +64,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: fgetline,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fgetline,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fgetline,v $ ## ## Under source code control: 1995/03/04 11:33:19 diff --git a/help/fgets b/help/fgets index df8c4a7..8c73477 100644 --- a/help/fgets +++ b/help/fgets @@ -53,10 +53,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: fgets,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fgets,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fgets,v $ ## ## Under source code control: 1995/03/04 11:33:19 diff --git a/help/fgetstr b/help/fgetstr index 0580b90..a13368d 100644 --- a/help/fgetstr +++ b/help/fgetstr @@ -60,10 +60,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: fgetstr,v 29.5 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fgetstr,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fgetstr,v $ ## ## Under source code control: 1996/04/30 03:05:17 diff --git a/help/fib b/help/fib index 02cee7f..cd818a5 100644 --- a/help/fib +++ b/help/fib @@ -41,10 +41,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: fib,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fib,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fib,v $ ## ## Under source code control: 1995/10/25 04:03:45 diff --git a/help/file b/help/file index a70455a..bf2cf7e 100644 --- a/help/file +++ b/help/file @@ -180,10 +180,10 @@ Using files ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: file,v 29.3 2006/05/23 19:15:48 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: file,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/file,v $ ## ## Under source code control: 1991/07/21 04:37:19 diff --git a/help/files b/help/files index 4346af3..8478fa5 100644 --- a/help/files +++ b/help/files @@ -82,10 +82,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: files,v 29.4 2006/06/10 12:28:10 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: files,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/files,v $ ## ## Under source code control: 1995/03/04 11:33:19 diff --git a/help/floor b/help/floor index aeeb687..bd3071d 100644 --- a/help/floor +++ b/help/floor @@ -46,10 +46,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: floor,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: floor,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/floor,v $ ## ## Under source code control: 1994/09/30 01:12:01 diff --git a/help/fopen b/help/fopen index 2c6c823..25e5793 100644 --- a/help/fopen +++ b/help/fopen @@ -121,10 +121,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.6 $ -## @(#) $Id: fopen,v 29.6 2006/05/23 20:06:16 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fopen,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fopen,v $ ## ## Under source code control: 1994/10/27 03:04:17 diff --git a/help/forall b/help/forall index bc268fd..d4c107e 100644 --- a/help/forall +++ b/help/forall @@ -51,10 +51,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: forall,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: forall,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/forall,v $ ## ## Under source code control: 1995/07/10 02:09:31 diff --git a/help/fpathopen b/help/fpathopen index e0aa929..14dd6ac 100644 --- a/help/fpathopen +++ b/help/fpathopen @@ -193,10 +193,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: fpathopen,v 29.3 2006/05/23 19:15:48 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fpathopen,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fpathopen,v $ ## ## Under source code control: 2006/05/07 23:56:04 diff --git a/help/fprintf b/help/fprintf index b057e40..d587f5f 100644 --- a/help/fprintf +++ b/help/fprintf @@ -68,10 +68,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: fprintf,v 29.4 2006/06/22 23:49:22 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fprintf,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fprintf,v $ ## ## Under source code control: 1996/03/12 22:50:41 diff --git a/help/fputc b/help/fputc index c2a4db4..edd54c4 100644 --- a/help/fputc +++ b/help/fputc @@ -45,10 +45,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: fputc,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fputc,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fputc,v $ ## ## Under source code control: 1995/03/04 11:33:20 diff --git a/help/fputs b/help/fputs index 1d0d1fb..088a3ed 100644 --- a/help/fputs +++ b/help/fputs @@ -45,10 +45,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: fputs,v 29.4 2006/08/20 15:01:57 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fputs,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fputs,v $ ## ## Under source code control: 1995/03/04 11:33:20 diff --git a/help/fputstr b/help/fputstr index fd2da84..dcf06c7 100644 --- a/help/fputstr +++ b/help/fputstr @@ -53,10 +53,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: fputstr,v 29.5 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fputstr,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fputstr,v $ ## ## Under source code control: 1996/04/30 03:05:18 diff --git a/help/frac b/help/frac index e7c5fe2..60ea663 100644 --- a/help/frac +++ b/help/frac @@ -55,10 +55,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: frac,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: frac,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/frac,v $ ## ## Under source code control: 1995/12/18 03:30:59 diff --git a/help/free b/help/free index 0b61e0c..f51e221 100644 --- a/help/free +++ b/help/free @@ -49,10 +49,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: free,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: free,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/free,v $ ## ## Under source code control: 1997/09/06 20:03:35 diff --git a/help/freebernoulli b/help/freebernoulli index 5244095..dc4dc8b 100644 --- a/help/freebernoulli +++ b/help/freebernoulli @@ -37,10 +37,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: freebernoulli,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: freebernoulli,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/freebernoulli,v $ ## ## Under source code control: 2000/07/13 diff --git a/help/freeeuler b/help/freeeuler index 9f09af8..95e094b 100644 --- a/help/freeeuler +++ b/help/freeeuler @@ -37,10 +37,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: freeeuler,v 29.2 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: freeeuler,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/freeeuler,v $ ## ## Under source code control: 2000/12/14 01:33:00 diff --git a/help/freeglobals b/help/freeglobals index 35e00b2..e0f76f4 100644 --- a/help/freeglobals +++ b/help/freeglobals @@ -60,10 +60,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: freeglobals,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: freeglobals,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/freeglobals,v $ ## ## Under source code control: 1997/09/06 20:03:35 diff --git a/help/freeredc b/help/freeredc index 4076d56..526a40e 100644 --- a/help/freeredc +++ b/help/freeredc @@ -43,10 +43,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: freeredc,v 29.4 2006/06/10 12:28:10 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: freeredc,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/freeredc,v $ ## ## Under source code control: 1997/09/06 20:03:35 diff --git a/help/freestatics b/help/freestatics index 43a62fa..099dfc7 100644 --- a/help/freestatics +++ b/help/freestatics @@ -58,10 +58,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: freestatics,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: freestatics,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/freestatics,v $ ## ## Under source code control: 1997/09/06 20:03:35 diff --git a/help/frem b/help/frem index b3bf70a..e853ba6 100644 --- a/help/frem +++ b/help/frem @@ -50,10 +50,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: frem,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: frem,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/frem,v $ ## ## Under source code control: 1995/12/18 12:03:02 diff --git a/help/freopen b/help/freopen index 8fe38a4..396e8b4 100644 --- a/help/freopen +++ b/help/freopen @@ -55,10 +55,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: freopen,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: freopen,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/freopen,v $ ## ## Under source code control: 1996/04/30 03:05:18 diff --git a/help/fscan b/help/fscan index 9e32495..303fe09 100644 --- a/help/fscan +++ b/help/fscan @@ -52,10 +52,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: fscan,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fscan,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fscan,v $ ## ## Under source code control: 1996/04/30 03:05:18 diff --git a/help/fscanf b/help/fscanf index 525c519..42c1545 100644 --- a/help/fscanf +++ b/help/fscanf @@ -143,10 +143,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: fscanf,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fscanf,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fscanf,v $ ## ## Under source code control: 1996/04/30 03:05:18 diff --git a/help/fseek b/help/fseek index 944d6af..f85910b 100644 --- a/help/fseek +++ b/help/fseek @@ -80,10 +80,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: fseek,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fseek,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fseek,v $ ## ## Under source code control: 1995/03/04 11:33:20 diff --git a/help/fsize b/help/fsize index aa6a21c..ba76bf6 100644 --- a/help/fsize +++ b/help/fsize @@ -43,10 +43,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: fsize,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: fsize,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fsize,v $ ## ## Under source code control: 1995/03/04 11:33:20 diff --git a/help/ftell b/help/ftell index d33ebb4..281e1fa 100644 --- a/help/ftell +++ b/help/ftell @@ -60,10 +60,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: ftell,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: ftell,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ftell,v $ ## ## Under source code control: 1995/03/04 11:33:21 diff --git a/help/funclist.sed b/help/funclist.sed index 5cbfe93..b8f6a67 100644 --- a/help/funclist.sed +++ b/help/funclist.sed @@ -20,10 +20,10 @@ p ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: funclist.sed,v 29.2 2000/06/07 14:02:33 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: funclist.sed,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/funclist.sed,v $ ## ## Under source code control: 1995/07/10 01:33:06 diff --git a/help/gcd b/help/gcd index a1aedf6..bfa5c69 100644 --- a/help/gcd +++ b/help/gcd @@ -41,10 +41,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: gcd,v 29.4 2006/06/22 23:49:22 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: gcd,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/gcd,v $ ## ## Under source code control: 1995/10/05 04:52:26 diff --git a/help/gcdrem b/help/gcdrem index 27f917d..0284125 100644 --- a/help/gcdrem +++ b/help/gcdrem @@ -67,10 +67,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: gcdrem,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: gcdrem,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/gcdrem,v $ ## ## Under source code control: 1995/12/18 12:03:02 diff --git a/help/gd b/help/gd index 42db5f6..d3cd38a 100644 --- a/help/gd +++ b/help/gd @@ -64,10 +64,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: gd,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: gd,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/gd,v $ ## ## Under source code control: 1997/09/06 20:03:35 diff --git a/help/getenv b/help/getenv index 522b285..05da87d 100644 --- a/help/getenv +++ b/help/getenv @@ -48,10 +48,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: getenv,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: getenv,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/getenv,v $ ## ## Under source code control: 1995/07/09 03:48:57 diff --git a/help/hash b/help/hash index d05cc5d..c314b92 100644 --- a/help/hash +++ b/help/hash @@ -35,9 +35,9 @@ LINK LIBRARY none SEE ALSO - sha, sha1, md5 + ishash, sha1 -## Copyright (C) 1999-2006 Landon Curt Noll +## Copyright (C) 1999-2007 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 @@ -51,10 +51,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: hash,v 29.5 2006/06/22 23:49:22 chongo Exp $ +## @(#) $Revision: 30.2 $ +## @(#) $Id: hash,v 30.2 2007/07/05 17:37:41 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/hash,v $ ## ## Under source code control: 1996/03/12 23:10:01 diff --git a/help/head b/help/head index 25a1445..55af37e 100644 --- a/help/head +++ b/help/head @@ -62,10 +62,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: head,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: head,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/head,v $ ## ## Under source code control: 1995/07/10 02:09:30 diff --git a/help/help b/help/help index 2ec5db0..ec4f174 100644 --- a/help/help +++ b/help/help @@ -129,10 +129,10 @@ as the same effect as: ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: help,v 29.4 2007/02/07 00:30:04 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: help,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/help,v $ ## ## Under source code control: 1991/07/21 04:37:20 diff --git a/help/highbit b/help/highbit index 305e8c3..05c88b0 100644 --- a/help/highbit +++ b/help/highbit @@ -42,10 +42,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: highbit,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: highbit,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/highbit,v $ ## ## Under source code control: 1995/10/03 10:40:02 diff --git a/help/history b/help/history index 38aa9d3..25a3298 100644 --- a/help/history +++ b/help/history @@ -74,10 +74,10 @@ Command history ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: history,v 29.2 2000/06/07 14:02:33 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: history,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/history,v $ ## ## Under source code control: 1991/07/21 04:37:20 diff --git a/help/hmean b/help/hmean index 00e21bf..39966bf 100644 --- a/help/hmean +++ b/help/hmean @@ -51,10 +51,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: hmean,v 29.4 2006/06/22 23:49:22 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: hmean,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/hmean,v $ ## ## Under source code control: 1995/12/18 03:30:59 diff --git a/help/hnrmod b/help/hnrmod index 4a7a516..7a96883 100644 --- a/help/hnrmod +++ b/help/hnrmod @@ -56,10 +56,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: hnrmod,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: hnrmod,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/hnrmod,v $ ## ## Under source code control: 1997/07/02 07:10:43 diff --git a/help/hypot b/help/hypot index 8e9d9fa..0e5f89c 100644 --- a/help/hypot +++ b/help/hypot @@ -41,10 +41,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: hypot,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: hypot,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/hypot,v $ ## ## Under source code control: 1995/10/05 04:52:26 diff --git a/help/ilog b/help/ilog index e755a55..e5794d1 100644 --- a/help/ilog +++ b/help/ilog @@ -41,10 +41,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: ilog,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: ilog,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ilog,v $ ## ## Under source code control: 1995/10/25 04:03:45 diff --git a/help/ilog10 b/help/ilog10 index af80461..4892173 100644 --- a/help/ilog10 +++ b/help/ilog10 @@ -39,10 +39,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: ilog10,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: ilog10,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ilog10,v $ ## ## Under source code control: 1995/10/03 10:40:02 diff --git a/help/ilog2 b/help/ilog2 index e76dc6f..541e58a 100644 --- a/help/ilog2 +++ b/help/ilog2 @@ -39,10 +39,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: ilog2,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: ilog2,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ilog2,v $ ## ## Under source code control: 1995/10/03 10:40:02 diff --git a/help/im b/help/im index 435eb88..43298b7 100644 --- a/help/im +++ b/help/im @@ -39,10 +39,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: im,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: im,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/im,v $ ## ## Under source code control: 1995/10/05 04:52:26 diff --git a/help/indices b/help/indices index a62a6a2..3ec8250 100644 --- a/help/indices +++ b/help/indices @@ -71,10 +71,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: indices,v 29.3 2006/06/10 12:28:10 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: indices,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/indices,v $ ## ## Under source code control: 1999/11/16 08:02:03 diff --git a/help/inputlevel b/help/inputlevel index 916cbcc..aa05fca 100644 --- a/help/inputlevel +++ b/help/inputlevel @@ -49,10 +49,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: inputlevel,v 29.2 2000/06/07 14:02:33 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: inputlevel,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/inputlevel,v $ ## ## Under source code control: 1999/10/31 06:01:21 diff --git a/help/insert b/help/insert index 38f059e..9fbe284 100644 --- a/help/insert +++ b/help/insert @@ -73,10 +73,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: insert,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: insert,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/insert,v $ ## ## Under source code control: 1994/03/19 03:13:18 diff --git a/help/int b/help/int index ff694ae..6ce60b2 100644 --- a/help/int +++ b/help/int @@ -54,10 +54,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: int,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: int,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/int,v $ ## ## Under source code control: 1994/09/30 00:57:18 diff --git a/help/interrupt b/help/interrupt index 339b35b..93e19ac 100644 --- a/help/interrupt +++ b/help/interrupt @@ -115,10 +115,10 @@ ABORT opcodes ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: interrupt,v 29.5 2006/06/10 12:28:10 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: interrupt,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/interrupt,v $ ## ## Under source code control: 1991/07/21 04:37:21 diff --git a/help/intro b/help/intro index 7e002d1..79be4a5 100644 --- a/help/intro +++ b/help/intro @@ -183,10 +183,10 @@ What is calc? ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: intro,v 29.3 2000/06/07 15:26:20 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: intro,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/intro,v $ ## ## Under source code control: 1991/07/21 04:37:21 diff --git a/help/inverse b/help/inverse index ed196a0..5548d4d 100644 --- a/help/inverse +++ b/help/inverse @@ -61,10 +61,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: inverse,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: inverse,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/inverse,v $ ## ## Under source code control: 1996/03/12 23:10:01 diff --git a/help/iroot b/help/iroot index d0d7d8a..59539ba 100644 --- a/help/iroot +++ b/help/iroot @@ -40,10 +40,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: iroot,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: iroot,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/iroot,v $ ## ## Under source code control: 1995/10/25 04:03:45 diff --git a/help/isassoc b/help/isassoc index bd7ddaf..25aa9f6 100644 --- a/help/isassoc +++ b/help/isassoc @@ -45,10 +45,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: isassoc,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isassoc,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isassoc,v $ ## ## Under source code control: 1994/10/21 02:21:27 diff --git a/help/isatty b/help/isatty index 6ed942e..8705782 100644 --- a/help/isatty +++ b/help/isatty @@ -48,10 +48,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: isatty,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isatty,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isatty,v $ ## ## Under source code control: 1995/07/09 03:49:34 diff --git a/help/isblk b/help/isblk index d1486a0..a966f73 100644 --- a/help/isblk +++ b/help/isblk @@ -57,10 +57,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: isblk,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isblk,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isblk,v $ ## ## Under source code control: 1997/04/06 03:03:23 diff --git a/help/isconfig b/help/isconfig index 18b2a30..2753dba 100644 --- a/help/isconfig +++ b/help/isconfig @@ -45,10 +45,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: isconfig,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isconfig,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isconfig,v $ ## ## Under source code control: 1995/11/11 05:09:41 diff --git a/help/isdefined b/help/isdefined index 587af1b..b59d590 100644 --- a/help/isdefined +++ b/help/isdefined @@ -57,10 +57,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: isdefined,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isdefined,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isdefined,v $ ## ## Under source code control: 1997/04/05 14:10:17 diff --git a/help/iserror b/help/iserror index befc85a..1905d10 100644 --- a/help/iserror +++ b/help/iserror @@ -45,10 +45,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: iserror,v 29.4 2006/05/21 07:31:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: iserror,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/iserror,v $ ## ## Under source code control: 1995/12/18 03:30:59 diff --git a/help/iseven b/help/iseven index 2202b89..b14d7a5 100644 --- a/help/iseven +++ b/help/iseven @@ -46,10 +46,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: iseven,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: iseven,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/iseven,v $ ## ## Under source code control: 1994/10/21 02:21:27 diff --git a/help/isfile b/help/isfile index 68a3bc2..33c7f37 100644 --- a/help/isfile +++ b/help/isfile @@ -44,10 +44,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: isfile,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isfile,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isfile,v $ ## ## Under source code control: 1994/10/21 02:21:27 diff --git a/help/ishash b/help/ishash index 388ce43..43755be 100644 --- a/help/ishash +++ b/help/ishash @@ -13,14 +13,12 @@ DESCRIPTION The value returned by ishash(x) is: 0 if x is not a hash state, - 1 if x is a sha hash state, 2 if x is a sha1 hash state, - 3 if x is a md5 hash state. EXAMPLE - ; a = shs(0), b = shs1(0), c = md5(0) - ; print ishash(0), ishash(a), ishash(b), ishash(c); - 0 1 2 3 + ; a = 1; b = sha1(0); c = sha1(a) + ; print ishash(0), ishash(a), ishash(b), ishash(c), ishash(sha1(a)) + 0 0 2 2 2 LIMITS none @@ -29,13 +27,12 @@ LINK LIBRARY none SEE ALSO - sha, sha1, md5, isassoc, isatty, isblk, isconfig, isdefined, iserror, iseven, isfile, isident, isint, islist, ismat, ismult, isnull, isnum, isobj, isobjtype, isodd, isprime, isrand, israndom, isreal, isrel, - issimple, issq, isstr, istype + issimple, issq, isstr, istype, sha1 -## Copyright (C) 1999 Landon Curt Noll +## Copyright (C) 1999-2007 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 @@ -49,10 +46,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: ishash,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.2 $ +## @(#) $Id: ishash,v 30.2 2007/07/05 17:37:41 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ishash,v $ ## ## Under source code control: 1995/11/11 05:09:41 diff --git a/help/isident b/help/isident index 9ffaa19..ebdf6f7 100644 --- a/help/isident +++ b/help/isident @@ -45,10 +45,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: isident,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isident,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isident,v $ ## ## Under source code control: 1995/07/09 18:25:36 diff --git a/help/isint b/help/isint index 1b5feff..0a188a3 100644 --- a/help/isint +++ b/help/isint @@ -47,10 +47,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: isint,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isint,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isint,v $ ## ## Under source code control: 1994/10/21 02:21:27 diff --git a/help/islist b/help/islist index 980d563..833083a 100644 --- a/help/islist +++ b/help/islist @@ -47,10 +47,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: islist,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: islist,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/islist,v $ ## ## Under source code control: 1994/03/19 03:13:19 diff --git a/help/ismat b/help/ismat index afb14e1..2e893b2 100644 --- a/help/ismat +++ b/help/ismat @@ -45,10 +45,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: ismat,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: ismat,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ismat,v $ ## ## Under source code control: 1994/10/21 02:21:28 diff --git a/help/ismult b/help/ismult index b4130b4..2b0b881 100644 --- a/help/ismult +++ b/help/ismult @@ -52,10 +52,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: ismult,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: ismult,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ismult,v $ ## ## Under source code control: 1994/10/21 02:21:28 diff --git a/help/isnull b/help/isnull index c989e08..99b62d7 100644 --- a/help/isnull +++ b/help/isnull @@ -44,10 +44,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: isnull,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isnull,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isnull,v $ ## ## Under source code control: 1994/10/21 02:21:28 diff --git a/help/isnum b/help/isnum index 4ad8bd7..bd1adb8 100644 --- a/help/isnum +++ b/help/isnum @@ -46,10 +46,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: isnum,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isnum,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isnum,v $ ## ## Under source code control: 1994/10/21 02:21:28 diff --git a/help/isobj b/help/isobj index 0494b55..f8dd94c 100644 --- a/help/isobj +++ b/help/isobj @@ -45,10 +45,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: isobj,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isobj,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isobj,v $ ## ## Under source code control: 1994/10/21 02:21:29 diff --git a/help/isobjtype b/help/isobjtype index c852796..8545fe0 100644 --- a/help/isobjtype +++ b/help/isobjtype @@ -48,10 +48,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: isobjtype,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isobjtype,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isobjtype,v $ ## ## Under source code control: 1997/04/05 14:10:17 diff --git a/help/isodd b/help/isodd index bfa9087..877f52b 100644 --- a/help/isodd +++ b/help/isodd @@ -46,10 +46,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: isodd,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isodd,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isodd,v $ ## ## Under source code control: 1994/10/21 02:21:29 diff --git a/help/isprime b/help/isprime index cff0aee..ef59e15 100644 --- a/help/isprime +++ b/help/isprime @@ -62,10 +62,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: isprime,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isprime,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isprime,v $ ## ## Under source code control: 1994/10/21 02:21:29 diff --git a/help/isptr b/help/isptr index af50f8a..cade803 100644 --- a/help/isptr +++ b/help/isptr @@ -54,10 +54,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: isptr,v 29.3 2006/06/10 12:28:10 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isptr,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isptr,v $ ## ## Under source code control: 1997/09/06 20:03:35 diff --git a/help/isqrt b/help/isqrt index 1ed0a78..fc6399b 100644 --- a/help/isqrt +++ b/help/isqrt @@ -39,10 +39,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: isqrt,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isqrt,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isqrt,v $ ## ## Under source code control: 1995/10/25 04:03:45 diff --git a/help/isrand b/help/isrand index fb357ae..b2e18e4 100644 --- a/help/isrand +++ b/help/isrand @@ -45,10 +45,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: isrand,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isrand,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isrand,v $ ## ## Under source code control: 1995/11/11 05:09:41 diff --git a/help/israndom b/help/israndom index 697e1ad..5e96642 100644 --- a/help/israndom +++ b/help/israndom @@ -45,10 +45,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: israndom,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: israndom,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/israndom,v $ ## ## Under source code control: 1995/11/11 05:09:41 diff --git a/help/isreal b/help/isreal index 39e1b15..98d4da9 100644 --- a/help/isreal +++ b/help/isreal @@ -46,10 +46,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: isreal,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isreal,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isreal,v $ ## ## Under source code control: 1994/10/21 02:21:30 diff --git a/help/isrel b/help/isrel index b7c09fb..be66a63 100644 --- a/help/isrel +++ b/help/isrel @@ -48,10 +48,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: isrel,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isrel,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isrel,v $ ## ## Under source code control: 1994/10/21 02:21:30 diff --git a/help/issimple b/help/issimple index 71697a2..6478c7b 100644 --- a/help/issimple +++ b/help/issimple @@ -54,10 +54,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: issimple,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: issimple,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/issimple,v $ ## ## Under source code control: 1994/10/21 02:21:30 diff --git a/help/issq b/help/issq index 16a97e6..653f1ed 100644 --- a/help/issq +++ b/help/issq @@ -59,10 +59,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: issq,v 29.4 2006/06/04 21:12:23 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: issq,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/issq,v $ ## ## Under source code control: 1994/10/21 02:21:31 diff --git a/help/isstr b/help/isstr index 09ebd23..1f9219a 100644 --- a/help/isstr +++ b/help/isstr @@ -43,10 +43,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: isstr,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: isstr,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isstr,v $ ## ## Under source code control: 1994/10/21 02:21:31 diff --git a/help/istype b/help/istype index bc882bc..413f058 100644 --- a/help/istype +++ b/help/istype @@ -54,10 +54,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: istype,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: istype,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/istype,v $ ## ## Under source code control: 1994/10/21 02:21:31 diff --git a/help/jacobi b/help/jacobi index cbed8ca..57920b6 100644 --- a/help/jacobi +++ b/help/jacobi @@ -75,10 +75,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: jacobi,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: jacobi,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/jacobi,v $ ## ## Under source code control: 1995/12/18 12:34:57 diff --git a/help/join b/help/join index 51b823a..ab7c952 100644 --- a/help/join +++ b/help/join @@ -52,10 +52,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: join,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: join,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/join,v $ ## ## Under source code control: 1995/07/09 19:41:40 diff --git a/help/lcm b/help/lcm index 28ffc53..9b5731f 100644 --- a/help/lcm +++ b/help/lcm @@ -43,10 +43,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: lcm,v 29.4 2006/06/22 23:49:22 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: lcm,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/lcm,v $ ## ## Under source code control: 1995/10/05 04:52:26 diff --git a/help/lcmfact b/help/lcmfact index 23f5ef2..9299c3c 100644 --- a/help/lcmfact +++ b/help/lcmfact @@ -40,10 +40,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: lcmfact,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: lcmfact,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/lcmfact,v $ ## ## Under source code control: 1995/12/18 12:34:57 diff --git a/help/lfactor b/help/lfactor index 499d1cd..bf87d0f 100644 --- a/help/lfactor +++ b/help/lfactor @@ -57,10 +57,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: lfactor,v 29.5 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: lfactor,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/lfactor,v $ ## ## Under source code control: 1995/12/18 12:34:57 diff --git a/help/list b/help/list index 3e846b3..1d71b50 100644 --- a/help/list +++ b/help/list @@ -90,10 +90,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: list,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: list,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/list,v $ ## ## Under source code control: 1994/03/19 03:13:19 diff --git a/help/ln b/help/ln index 4bed91f..4e01b13 100644 --- a/help/ln +++ b/help/ln @@ -48,10 +48,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: ln,v 29.5 2006/05/07 13:05:18 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: ln,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ln,v $ ## ## Under source code control: 1995/10/11 04:41:26 diff --git a/help/log b/help/log index 9e0bb6a..ffdadf9 100644 --- a/help/log +++ b/help/log @@ -51,10 +51,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.1 $ -## @(#) $Id: log,v 29.1 2006/05/07 12:59:00 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: log,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/log,v $ ## ## Under source code control: 2006/05/06 23:56:04 diff --git a/help/lowbit b/help/lowbit index caba41b..b666eb2 100644 --- a/help/lowbit +++ b/help/lowbit @@ -42,10 +42,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: lowbit,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: lowbit,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/lowbit,v $ ## ## Under source code control: 1995/10/03 10:40:02 diff --git a/help/ltol b/help/ltol index d034962..f2457d9 100644 --- a/help/ltol +++ b/help/ltol @@ -42,10 +42,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: ltol,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: ltol,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ltol,v $ ## ## Under source code control: 1995/10/05 04:52:27 diff --git a/help/makelist b/help/makelist index 692fbaa..a7f80f4 100644 --- a/help/makelist +++ b/help/makelist @@ -46,10 +46,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: makelist,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: makelist,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/makelist,v $ ## ## Under source code control: 1995/07/10 02:09:31 diff --git a/help/mat b/help/mat index 394d0d3..41c7ae3 100644 --- a/help/mat +++ b/help/mat @@ -428,10 +428,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.7 $ -## @(#) $Id: mat,v 29.7 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: mat,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/mat,v $ ## ## Under source code control: 1991/07/21 04:37:22 diff --git a/help/matdim b/help/matdim index 08af709..4cc4cc0 100644 --- a/help/matdim +++ b/help/matdim @@ -42,10 +42,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: matdim,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: matdim,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/matdim,v $ ## ## Under source code control: 1995/10/25 04:03:45 diff --git a/help/matfill b/help/matfill index 7cc1bd6..5110097 100644 --- a/help/matfill +++ b/help/matfill @@ -55,10 +55,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: matfill,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: matfill,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/matfill,v $ ## ## Under source code control: 1995/10/25 04:03:45 diff --git a/help/matmax b/help/matmax index b9922fa..27a41e5 100644 --- a/help/matmax +++ b/help/matmax @@ -44,10 +44,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: matmax,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: matmax,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/matmax,v $ ## ## Under source code control: 1995/10/25 04:03:45 diff --git a/help/matmin b/help/matmin index 934092d..1f2895d 100644 --- a/help/matmin +++ b/help/matmin @@ -44,10 +44,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: matmin,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: matmin,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/matmin,v $ ## ## Under source code control: 1995/10/25 04:03:45 diff --git a/help/matsum b/help/matsum index b8706a2..d4c1b83 100644 --- a/help/matsum +++ b/help/matsum @@ -43,10 +43,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: matsum,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: matsum,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/matsum,v $ ## ## Under source code control: 1995/10/25 04:03:46 diff --git a/help/mattrace b/help/mattrace index 6cf27da..3642abb 100644 --- a/help/mattrace +++ b/help/mattrace @@ -44,10 +44,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: mattrace,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: mattrace,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/mattrace,v $ ## ## Under source code control: 1997/09/06 20:03:35 diff --git a/help/mattrans b/help/mattrans index fd497e3..e932c17 100644 --- a/help/mattrans +++ b/help/mattrans @@ -49,10 +49,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: mattrans,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: mattrans,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/mattrans,v $ ## ## Under source code control: 1995/10/25 04:03:46 diff --git a/help/max b/help/max index 62c1077..6f04746 100644 --- a/help/max +++ b/help/max @@ -84,10 +84,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: max,v 29.4 2006/06/22 23:49:22 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: max,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/max,v $ ## ## Under source code control: 1995/10/05 04:52:27 diff --git a/help/md5 b/help/md5 deleted file mode 100644 index c5b33fd..0000000 --- a/help/md5 +++ /dev/null @@ -1,128 +0,0 @@ -NAME - md5 - MD5 Message-Digest Algorithm - -SYNOPSIS - md5([arg1 [, val ...]]) - -TYPES - arg1 any - val any - - return HASH or number - -DESCRIPTION - The md5() builtin implements the MD5 Message-Digest Algorithm. - The SHA is a 128 bit hash. - - With no args, md5() returns the default initial md5 HASH state. - - If arg1 is a HASH state and no other val args are given, then the - HASH state is finalized and the numeric value of the hash is given. - - If arg1 is a HASH state and one or more val args are given, - then the val args are used to modify the arg1 HASH state. - The new arg1 HASH state is returned. - - If arg1 is not a a HASH state, then the initial HASH is - used and modifed by arg1 and any val args supplied. The - return value is the new HASH state. - - The following table gives a summary of actions and return values. - Here, assume that 'h' is a HASH state: - - md5() HASH returns initial HASH state - - md5(h) number h is put into final form and the - numeric value of the hash state - - md5(x) HASH modify the initial state by hashing 'x' - - md5(md5(), x) HASH the same as md5(x) - - md5(x, y) HASH the same as md5(md5(x), y) - - md5(h, x, y) HASH modify state 'h' by 'x' and then 'y' - - md5(md5(h,x,y)) number numeric value of the above call - - NOTE: These functions were "derived from the RSA Data Security, Inc. - MD5 Message-Digest Algorithm". - -EXAMPLE - ; base(16) - 0xa - - ; md5() - md5 hash state - ; md5(md5()) - 0xd41d8cd98f00b204e9800998ecf8427e - - ; md5("x", "y", "z") == md5("xyz") - 1 - ; md5("x", "y", "z") == md5("xy") - 0 - - ; md5(md5("this is", 7^19-8, "a composit", 3i+4.5, "hash")) - 0x5a90d942335b0dbbdce38d90e7cb6dac - - ; x = md5(list(1,2,3), "curds and whey", 2^21701-1, pi()) - ; x - md5 hash state - ; md5(x) - 0x88790b3ea9eb0128134c103ac9b683ed - - ; y = md5() - ; y = md5(y, list(1,2,3), "curds and whey") - ; y = md5(y, 2^21701-1) - ; y = md5(y, pi()) - ; y - md5 hash state - ; md5(y) - 0x88790b3ea9eb0128134c103ac9b683ed - -LIMITS - none - -LINK LIBRARY - HASH* hash_init(int, HASH*); - void hash_free(HASH*); - HASH* hash_copy(HASH*); - int hash_cmp(HASH*, HASH*); - void hash_print(HASH*); - ZVALUE hash_final(HASH*); - HASH* hash_long(int, long, HASH*); - HASH* hash_zvalue(int, ZVALUE, HASH*); - HASH* hash_number(int, void*, HASH*); - HASH* hash_complex(int, void*, HASH*); - HASH* hash_str(int, char*, HASH*); - HASH* hash_usb8(int, USB8*, int, HASH*); - HASH* hash_value(int, void*, HASH*); - -SEE ALSO - ishash, sha, sha1 - -## 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 -## as published by the Free Software Foundation. -## -## Calc is distributed in the hope that it will be useful, but WITHOUT -## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General -## Public License for more details. -## -## A copy of version 2.1 of the GNU Lesser General Public License is -## distributed with calc under the filename COPYING-LGPL. You should have -## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. -## -## @(#) $Revision: 29.3 $ -## @(#) $Id: md5,v 29.3 2006/05/07 07:25:46 chongo Exp $ -## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/md5,v $ -## -## Under source code control: 1997/04/06 19:45:54 -## File existed as early as: 1997 -## -## chongo /\oo/\ http://www.isthe.com/chongo/ -## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ diff --git a/help/memsize b/help/memsize index 97a4277..a8c50bf 100644 --- a/help/memsize +++ b/help/memsize @@ -104,10 +104,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: memsize,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: memsize,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/memsize,v $ ## ## Under source code control: 1997/03/23 20:28:02 diff --git a/help/meq b/help/meq index ef6ab7c..27c309e 100644 --- a/help/meq +++ b/help/meq @@ -46,10 +46,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: meq,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: meq,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/meq,v $ ## ## Under source code control: 1995/11/09 03:27:51 diff --git a/help/min b/help/min index 61b4ea5..f63d35a 100644 --- a/help/min +++ b/help/min @@ -84,10 +84,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: min,v 29.4 2006/06/22 23:49:22 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: min,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/min,v $ ## ## Under source code control: 1995/10/05 04:52:27 diff --git a/help/minv b/help/minv index c057c59..38ad587 100644 --- a/help/minv +++ b/help/minv @@ -60,10 +60,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: minv,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: minv,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/minv,v $ ## ## Under source code control: 1995/11/09 03:27:51 diff --git a/help/mmin b/help/mmin index ed3c71c..e058448 100644 --- a/help/mmin +++ b/help/mmin @@ -50,10 +50,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: mmin,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: mmin,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/mmin,v $ ## ## Under source code control: 1995/12/18 03:30:59 diff --git a/help/mne b/help/mne index db3fbd7..f2cceb7 100644 --- a/help/mne +++ b/help/mne @@ -42,10 +42,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: mne,v 29.2 2000/06/07 14:02:33 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: mne,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/mne,v $ ## ## Under source code control: 1995/11/09 03:27:51 diff --git a/help/mod b/help/mod index ae12b92..a4c3e97 100644 --- a/help/mod +++ b/help/mod @@ -151,10 +151,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: mod,v 29.5 2006/06/24 19:06:58 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: mod,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/mod,v $ ## ## Under source code control: 1995/09/18 02:09:31 diff --git a/help/modify b/help/modify index 57c4f5c..8caa0c9 100644 --- a/help/modify +++ b/help/modify @@ -68,10 +68,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: modify,v 29.4 2006/05/19 15:12:57 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: modify,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/modify,v $ ## ## Under source code control: 1995/07/10 02:09:31 diff --git a/help/name b/help/name index a9d9c8c..1183ca3 100644 --- a/help/name +++ b/help/name @@ -52,10 +52,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: name,v 29.5 2006/08/20 15:01:57 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: name,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/name,v $ ## ## Under source code control: 1997/04/05 14:12:44 diff --git a/help/near b/help/near index 93414f7..52e2837 100644 --- a/help/near +++ b/help/near @@ -44,10 +44,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: near,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: near,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/near,v $ ## ## Under source code control: 1995/10/25 04:03:46 diff --git a/help/newerror b/help/newerror index 2e57f0d..86aede2 100644 --- a/help/newerror +++ b/help/newerror @@ -84,10 +84,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: newerror,v 29.5 2006/06/10 12:28:10 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: newerror,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/newerror,v $ ## ## Under source code control: 1996/04/30 03:39:56 diff --git a/help/nextcand b/help/nextcand index b5d7d34..6c862e7 100644 --- a/help/nextcand +++ b/help/nextcand @@ -91,10 +91,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: nextcand,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: nextcand,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/nextcand,v $ ## ## Under source code control: 1996/02/25 00:27:43 diff --git a/help/nextprime b/help/nextprime index 3acc4a6..f14506e 100644 --- a/help/nextprime +++ b/help/nextprime @@ -50,10 +50,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: nextprime,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: nextprime,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/nextprime,v $ ## ## Under source code control: 1995/12/18 12:34:57 diff --git a/help/norm b/help/norm index 8675375..8cd5154 100644 --- a/help/norm +++ b/help/norm @@ -50,10 +50,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: norm,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: norm,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/norm,v $ ## ## Under source code control: 1995/10/25 04:03:46 diff --git a/help/null b/help/null index 4c0c378..2946c62 100644 --- a/help/null +++ b/help/null @@ -88,10 +88,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: null,v 29.4 2006/06/22 23:49:22 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: null,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/null,v $ ## ## Under source code control: 1996/03/12 23:10:01 diff --git a/help/num b/help/num index fee01ea..bbebe53 100644 --- a/help/num +++ b/help/num @@ -51,10 +51,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: num,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: num,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/num,v $ ## ## Under source code control: 1995/10/05 04:52:27 diff --git a/help/obj.file b/help/obj.file index a02eb94..283a30f 100644 --- a/help/obj.file +++ b/help/obj.file @@ -193,10 +193,10 @@ Using objects ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: obj.file,v 29.2 2000/06/07 14:02:33 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: obj.file,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/obj.file,v $ ## ## Under source code control: 1991/07/21 04:37:22 diff --git a/help/oldvalue b/help/oldvalue index 5616469..124a431 100644 --- a/help/oldvalue +++ b/help/oldvalue @@ -67,10 +67,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: oldvalue,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: oldvalue,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/oldvalue,v $ ## ## Under source code control: 1997/09/06 20:03:35 diff --git a/help/operator b/help/operator index 3f6ee13..9d80995 100644 --- a/help/operator +++ b/help/operator @@ -128,9 +128,9 @@ operators ^ ** << >> Powers and shifts. The '^' and '**' are both exponentiation, e.g. 2^3 - returns 8, 2^-3 returns .125. In a ^ b, b has to be - an integer and if a is zero, nonnegative. 0^0 returns - the value 1. + returns 8, 2^-3 returns .125. Note that in a^b, if + 'a' == 0 and 'b' is real, then is must be >= 0 as well. + Also 0^0 and 0**0 return the value 1. For the shift operators both arguments are to be integers, or if the first is complex, it is to have @@ -223,10 +223,10 @@ operators ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: operator,v 29.2 2000/06/07 14:02:33 chongo Exp $ +## @(#) $Revision: 30.2 $ +## @(#) $Id: operator,v 30.2 2007/07/11 23:00:39 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/operator,v $ ## ## Under source code control: 1991/07/21 04:37:23 diff --git a/help/ord b/help/ord index 5f1bcef..1fcbbb1 100644 --- a/help/ord +++ b/help/ord @@ -39,10 +39,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: ord,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: ord,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ord,v $ ## ## Under source code control: 1994/09/30 01:45:46 diff --git a/help/overview b/help/overview index 2ad8f8a..c8d31dd 100644 --- a/help/overview +++ b/help/overview @@ -183,10 +183,10 @@ ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: overview,v 29.2 2000/06/07 14:02:33 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: overview,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/overview,v $ ## ## Under source code control: 1991/07/21 04:37:23 diff --git a/help/param b/help/param index ece68bf..ef91ba3 100644 --- a/help/param +++ b/help/param @@ -64,10 +64,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: param,v 29.4 2006/06/10 12:28:10 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: param,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/param,v $ ## ## Under source code control: 1996/03/12 23:10:01 diff --git a/help/perm b/help/perm index 066c41a..ba57d09 100644 --- a/help/perm +++ b/help/perm @@ -51,10 +51,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: perm,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: perm,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/perm,v $ ## ## Under source code control: 1994/10/20 04:03:02 diff --git a/help/pfact b/help/pfact index b2ad545..b263395 100644 --- a/help/pfact +++ b/help/pfact @@ -41,10 +41,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: pfact,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: pfact,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/pfact,v $ ## ## Under source code control: 1995/12/18 12:34:57 diff --git a/help/pi b/help/pi index 7d36ebc..21792b6 100644 --- a/help/pi +++ b/help/pi @@ -40,10 +40,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: pi,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: pi,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/pi,v $ ## ## Under source code control: 1995/10/25 04:03:46 diff --git a/help/pix b/help/pix index 981be2c..55fd04d 100644 --- a/help/pix +++ b/help/pix @@ -52,10 +52,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: pix,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: pix,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/pix,v $ ## ## Under source code control: 1995/12/18 12:34:58 diff --git a/help/places b/help/places index 6ed0a83..c16a930 100644 --- a/help/places +++ b/help/places @@ -54,10 +54,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.6 $ -## @(#) $Id: places,v 29.6 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: places,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/places,v $ ## ## Under source code control: 1995/10/03 10:40:02 diff --git a/help/pmod b/help/pmod index 74db798..38fe8e1 100644 --- a/help/pmod +++ b/help/pmod @@ -63,10 +63,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: pmod,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: pmod,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/pmod,v $ ## ## Under source code control: 1995/11/09 03:27:51 diff --git a/help/polar b/help/polar index f62ccdc..0af97e1 100644 --- a/help/polar +++ b/help/polar @@ -48,10 +48,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: polar,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: polar,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/polar,v $ ## ## Under source code control: 1995/10/25 04:03:46 diff --git a/help/poly b/help/poly index 2966e18..c24113c 100644 --- a/help/poly +++ b/help/poly @@ -150,10 +150,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: poly,v 29.4 2006/06/22 23:49:22 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: poly,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/poly,v $ ## ## Under source code control: 1995/12/02 02:40:43 diff --git a/help/pop b/help/pop index a2ec141..3918694 100644 --- a/help/pop +++ b/help/pop @@ -60,10 +60,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: pop,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: pop,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/pop,v $ ## ## Under source code control: 1994/03/19 03:13:20 diff --git a/help/popcnt b/help/popcnt index c26e27c..ec1f94d 100644 --- a/help/popcnt +++ b/help/popcnt @@ -46,10 +46,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: popcnt,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: popcnt,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/popcnt,v $ ## ## Under source code control: 1997/09/11 04:20:02 diff --git a/help/pound b/help/pound index 79a323a..c85681a 100644 --- a/help/pound +++ b/help/pound @@ -114,10 +114,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.1 $ -## @(#) $Id: pound,v 29.1 2007/02/06 23:48:15 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: pound,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/pound,v $ ## ## Under source code control: 2007/02/06 14:09 diff --git a/help/power b/help/power index 3df4c08..2d700f3 100644 --- a/help/power +++ b/help/power @@ -69,10 +69,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: power,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: power,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/power,v $ ## ## Under source code control: 1995/10/25 04:03:46 diff --git a/help/prevcand b/help/prevcand index 43491ab..a9221ee 100644 --- a/help/prevcand +++ b/help/prevcand @@ -99,10 +99,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: prevcand,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: prevcand,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/prevcand,v $ ## ## Under source code control: 1996/02/25 00:27:43 diff --git a/help/prevprime b/help/prevprime index 3120006..9cd791d 100644 --- a/help/prevprime +++ b/help/prevprime @@ -53,10 +53,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: prevprime,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: prevprime,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/prevprime,v $ ## ## Under source code control: 1995/12/18 12:34:58 diff --git a/help/printf b/help/printf index 93e0b60..6be3a51 100644 --- a/help/printf +++ b/help/printf @@ -140,10 +140,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: printf,v 29.4 2006/06/22 23:49:22 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: printf,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/printf,v $ ## ## Under source code control: 1996/03/12 22:50:41 diff --git a/help/prompt b/help/prompt index a5aaabe..72c9a13 100644 --- a/help/prompt +++ b/help/prompt @@ -51,10 +51,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: prompt,v 29.5 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: prompt,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/prompt,v $ ## ## Under source code control: 1995/12/18 12:34:58 diff --git a/help/protect b/help/protect index dbdfe6c..41b475a 100644 --- a/help/protect +++ b/help/protect @@ -294,10 +294,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: protect,v 29.5 2006/06/10 12:28:10 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: protect,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/protect,v $ ## ## Under source code control: 1997/07/10 22:38:44 diff --git a/help/ptest b/help/ptest index 6531f99..218f3fe 100644 --- a/help/ptest +++ b/help/ptest @@ -34,7 +34,7 @@ DESCRIPTION multiple of n or b^m = 1 (mod n) or b^(2^j * m) = n - 1 (mod n) for some j where 0 <= j < s; integers that pass the test are called strong probable primes for the base b; composite integers that pass - the test are called strong pseudoprimes for the base b; ( XXX ) Since + the test are called strong pseudoprimes for the base b; Since the test for base b depends on b % n, and bases 0, 1 and n - 1 are trivial (n is always a strong probable prime for these bases), it is sufficient to consider 1 < b < n - 1. @@ -67,7 +67,7 @@ RUNTIME If n is a large prime (say 50 or more decimal digits), the runtime for ptest(n, count, skip) will usually be roughly K * abs(count) * - ln(n)^3 for some constant K. ( XXX ) For composite n with + ln(n)^3 for some constant K. For composite n with highbit(n) = N, the compositeness is detected quickly if n is divisible by a small prime and count >= 0; otherwise, if count is not zero, usually only one test is required to establish @@ -143,10 +143,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: ptest,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.2 $ +## @(#) $Id: ptest,v 30.2 2007/09/01 19:53:15 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ptest,v $ ## ## Under source code control: 1996/02/25 00:27:43 diff --git a/help/push b/help/push index 39d4bd4..dcd98fd 100644 --- a/help/push +++ b/help/push @@ -69,10 +69,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: push,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: push,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/push,v $ ## ## Under source code control: 1994/03/19 03:13:20 diff --git a/help/putenv b/help/putenv index b1c78b4..d3a9ad4 100644 --- a/help/putenv +++ b/help/putenv @@ -61,10 +61,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: putenv,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: putenv,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/putenv,v $ ## ## Under source code control: 1995/07/09 03:48:57 diff --git a/help/quo b/help/quo index c3be4fc..dd93296 100644 --- a/help/quo +++ b/help/quo @@ -101,10 +101,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: quo,v 29.3 2006/06/24 19:06:58 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: quo,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/quo,v $ ## ## Under source code control: 1995/09/18 04:01:44 diff --git a/help/quomod b/help/quomod index be5dc93..189f7c7 100644 --- a/help/quomod +++ b/help/quomod @@ -113,10 +113,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.7 $ -## @(#) $Id: quomod,v 29.7 2006/08/20 15:01:57 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: quomod,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/quomod,v $ ## ## Under source code control: 1995/05/07 03:17:03 diff --git a/help/rand b/help/rand index 615cc6f..340ba61 100644 --- a/help/rand +++ b/help/rand @@ -254,10 +254,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: rand,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: rand,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/rand,v $ ## ## Under source code control: 1996/01/01 02:16:09 diff --git a/help/randbit b/help/randbit index a6dfcfd..479d6cb 100644 --- a/help/randbit +++ b/help/randbit @@ -56,10 +56,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: randbit,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: randbit,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/randbit,v $ ## ## Under source code control: 1996/01/01 03:17:22 diff --git a/help/random b/help/random index 5661f1c..7cdfb8e 100644 --- a/help/random +++ b/help/random @@ -170,10 +170,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: random,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: random,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/random,v $ ## ## Under source code control: 1997/02/17 01:18:22 diff --git a/help/randombit b/help/randombit index 448e2e4..4bd817a 100644 --- a/help/randombit +++ b/help/randombit @@ -55,10 +55,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: randombit,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: randombit,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/randombit,v $ ## ## Under source code control: 1997/02/17 01:18:22 diff --git a/help/randperm b/help/randperm index 2a5b8fc..8b3947b 100644 --- a/help/randperm +++ b/help/randperm @@ -60,10 +60,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: randperm,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: randperm,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/randperm,v $ ## ## Under source code control: 1995/07/10 02:09:31 diff --git a/help/rcin b/help/rcin index 657a749..a7703b4 100644 --- a/help/rcin +++ b/help/rcin @@ -86,10 +86,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: rcin,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: rcin,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/rcin,v $ ## ## Under source code control: 1996/02/25 02:22:21 diff --git a/help/rcmul b/help/rcmul index 3702dbf..e9b2d9c 100644 --- a/help/rcmul +++ b/help/rcmul @@ -75,10 +75,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: rcmul,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: rcmul,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/rcmul,v $ ## ## Under source code control: 1996/02/25 02:22:21 diff --git a/help/rcout b/help/rcout index 21f6431..be641cf 100644 --- a/help/rcout +++ b/help/rcout @@ -77,10 +77,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: rcout,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: rcout,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/rcout,v $ ## ## Under source code control: 1996/02/25 02:22:21 diff --git a/help/rcpow b/help/rcpow index b9d2f49..0e4b822 100644 --- a/help/rcpow +++ b/help/rcpow @@ -86,10 +86,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: rcpow,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: rcpow,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/rcpow,v $ ## ## Under source code control: 1996/02/25 02:22:21 diff --git a/help/rcsq b/help/rcsq index 44488ed..443a8ff 100644 --- a/help/rcsq +++ b/help/rcsq @@ -80,10 +80,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: rcsq,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: rcsq,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/rcsq,v $ ## ## Under source code control: 1996/02/25 02:22:21 diff --git a/help/re b/help/re index 5fc20c3..ba9e86f 100644 --- a/help/re +++ b/help/re @@ -39,10 +39,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: re,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: re,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/re,v $ ## ## Under source code control: 1995/10/05 04:52:27 diff --git a/help/remove b/help/remove index b6f5f3c..339809d 100644 --- a/help/remove +++ b/help/remove @@ -64,10 +64,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: remove,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: remove,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/remove,v $ ## ## Under source code control: 1996/03/12 23:10:01 diff --git a/help/reverse b/help/reverse index 624662a..f917f56 100644 --- a/help/reverse +++ b/help/reverse @@ -63,10 +63,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: reverse,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: reverse,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/reverse,v $ ## ## Under source code control: 1995/07/09 19:41:26 diff --git a/help/rewind b/help/rewind index 8218aa6..439658f 100644 --- a/help/rewind +++ b/help/rewind @@ -46,10 +46,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: rewind,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: rewind,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/rewind,v $ ## ## Under source code control: 1996/04/30 03:05:18 diff --git a/help/rm b/help/rm index 605995d..8a4e1d0 100644 --- a/help/rm +++ b/help/rm @@ -40,10 +40,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: rm,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: rm,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/rm,v $ ## ## Under source code control: 1996/06/30 22:02:58 diff --git a/help/root b/help/root index d8579da..af4777d 100644 --- a/help/root +++ b/help/root @@ -66,10 +66,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: root,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: root,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/root,v $ ## ## Under source code control: 1995/10/25 04:03:46 diff --git a/help/round b/help/round index 4ca79c1..9800796 100644 --- a/help/round +++ b/help/round @@ -136,10 +136,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: round,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: round,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/round,v $ ## ## Under source code control: 1994/09/30 00:52:38 diff --git a/help/rsearch b/help/rsearch index adb4c37..5105455 100644 --- a/help/rsearch +++ b/help/rsearch @@ -123,10 +123,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: rsearch,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: rsearch,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/rsearch,v $ ## ## Under source code control: 1994/03/19 03:13:21 diff --git a/help/runtime b/help/runtime index 72fc8ea..70af939 100644 --- a/help/runtime +++ b/help/runtime @@ -50,10 +50,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.7 $ -## @(#) $Id: runtime,v 29.7 2006/12/16 10:52:27 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: runtime,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/runtime,v $ ## ## Under source code control: 1996/03/12 23:10:01 diff --git a/help/saveval b/help/saveval index bfa23bb..3a6106a 100644 --- a/help/saveval +++ b/help/saveval @@ -61,10 +61,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: saveval,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: saveval,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/saveval,v $ ## ## Under source code control: 1997/09/06 20:03:35 diff --git a/help/scale b/help/scale index 82ea550..21e87c2 100644 --- a/help/scale +++ b/help/scale @@ -51,10 +51,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: scale,v 29.5 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: scale,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/scale,v $ ## ## Under source code control: 1995/12/18 12:34:58 diff --git a/help/scan b/help/scan index b9c7b00..bb193b6 100644 --- a/help/scan +++ b/help/scan @@ -47,10 +47,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: scan,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: scan,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/scan,v $ ## ## Under source code control: 1996/04/30 03:05:18 diff --git a/help/scanf b/help/scanf index 4f44b94..5627c6f 100644 --- a/help/scanf +++ b/help/scanf @@ -44,10 +44,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: scanf,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: scanf,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/scanf,v $ ## ## Under source code control: 1996/04/30 03:05:18 diff --git a/help/script b/help/script index 1593466..cb43912 100644 --- a/help/script +++ b/help/script @@ -287,10 +287,10 @@ For more information use the following calc commands: ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.8 $ -## @(#) $Id: script,v 29.8 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: script,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/script,v $ ## ## Under source code control: 1999/11/30 05:29:48 diff --git a/help/search b/help/search index 65969a3..b82f6db 100644 --- a/help/search +++ b/help/search @@ -139,10 +139,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: search,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: search,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/search,v $ ## ## Under source code control: 1994/03/19 03:13:21 diff --git a/help/sec b/help/sec index dd80534..dcc333f 100644 --- a/help/sec +++ b/help/sec @@ -42,10 +42,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: sec,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: sec,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/sec,v $ ## ## Under source code control: 1995/11/13 03:49:00 diff --git a/help/sech b/help/sech index d264dd3..74350c0 100644 --- a/help/sech +++ b/help/sech @@ -44,10 +44,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: sech,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: sech,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/sech,v $ ## ## Under source code control: 1995/11/13 03:49:00 diff --git a/help/seed b/help/seed index 29a7828..da8785f 100644 --- a/help/seed +++ b/help/seed @@ -65,10 +65,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: seed,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: seed,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/seed,v $ ## ## Under source code control: 1999/10/03 10:04:29 diff --git a/help/segment b/help/segment index 30e454b..5373320 100644 --- a/help/segment +++ b/help/segment @@ -59,10 +59,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: segment,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: segment,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/segment,v $ ## ## Under source code control: 1995/07/10 02:09:31 diff --git a/help/select b/help/select index 3821d7f..3fb8bfd 100644 --- a/help/select +++ b/help/select @@ -51,10 +51,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: select,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: select,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/select,v $ ## ## Under source code control: 1995/07/10 02:09:31 diff --git a/help/sgn b/help/sgn index 851eb52..bdf60e6 100644 --- a/help/sgn +++ b/help/sgn @@ -53,10 +53,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: sgn,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: sgn,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/sgn,v $ ## ## Under source code control: 1995/10/25 04:03:46 diff --git a/help/sha b/help/sha deleted file mode 100644 index c2dcf5c..0000000 --- a/help/sha +++ /dev/null @@ -1,126 +0,0 @@ -NAME - sha - old Secure Hash Algorithm (SHS FIPS Pub 180) - -SYNOPSIS - sha([arg1 [, val ...]]) - -TYPES - arg1 any - val any - - return HASH or number - -DESCRIPTION - The sha() builtin implements the old Secure Hash Algorithm - (SHA). The SHA is sometimes referenced as SHS. The SHA - is a 160 bit hash. - - With no args, sha() returns the default initial SHA-1 HASH state. - - If arg1 is a HASH state and no other val args are given, then the - HASH state is finalized and the numeric value of the hash is given. - - If arg1 is a HASH state and one or more val args are given, - then the val args are used to modify the arg1 HASH state. - The new arg1 HASH state is returned. - - If arg1 is not a a HASH state, then the initial HASH is - used and modifed by arg1 and any val args supplied. The - return value is the new HASH state. - - The following table gives a summary of actions and return values. - Here, assume that 'h' is a HASH state: - - sha() HASH returns initial HASH state - - sha(h) number h is put into final form and the - numeric value of the hash state - - sha(x) HASH modify the initial state by hashing 'x' - - sha(sha(), x) HASH the same as sha(x) - - sha(x, y) HASH the same as sha(sha(x), y) - - sha(h, x, y) HASH modify state 'h' by 'x' and then 'y' - - sha(sha(h,x,y)) number numeric value of the above call - -EXAMPLE - ; base(16) - 0xa - - ; sha() - sha hash state - ; sha(sha()) - 0xf96cea198ad1dd5617ac084a3d92c6107708c0ef - - ; sha("x", "y", "z") == sha("xyz") - 1 - ; sha("x", "y", "z") == sha("xy") - 0 - - ; sha(sha("this is", 7^19-8, "a composit", 3i+4.5, "hash")) - 0x21e42319a26787046c2b28b7ae70f1b54bf0ba2a - - ; x = sha(list(1,2,3), "curds and whey", 2^21701-1, pi()) - ; x - sha hash state - ; sha(x) - 0xc9e155522ea4a38d85340e6f1c2e36636950ea7e - - ; y = sha() - ; y = sha(y, list(1,2,3), "curds and whey") - ; y = sha(y, 2^21701-1) - ; y = sha(y, pi()) - ; y - sha hash state - ; sha(y) - 0xc9e155522ea4a38d85340e6f1c2e36636950ea7e - -LIMITS - none - -LINK LIBRARY - HASH* hash_init(int, HASH*); - void hash_free(HASH*); - HASH* hash_copy(HASH*); - int hash_cmp(HASH*, HASH*); - void hash_print(HASH*); - ZVALUE hash_final(HASH*); - HASH* hash_long(int, long, HASH*); - HASH* hash_zvalue(int, ZVALUE, HASH*); - HASH* hash_number(int, void*, HASH*); - HASH* hash_complex(int, void*, HASH*); - HASH* hash_str(int, char*, HASH*); - HASH* hash_usb8(int, USB8*, int, HASH*); - HASH* hash_value(int, void*, HASH*); - -SEE ALSO - ishash, sha1 - -## 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 -## as published by the Free Software Foundation. -## -## Calc is distributed in the hope that it will be useful, but WITHOUT -## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General -## Public License for more details. -## -## A copy of version 2.1 of the GNU Lesser General Public License is -## distributed with calc under the filename COPYING-LGPL. You should have -## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. -## -## @(#) $Revision: 29.3 $ -## @(#) $Id: sha,v 29.3 2006/05/07 07:25:46 chongo Exp $ -## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/sha,v $ -## -## Under source code control: 1997/03/22 06:25:51 -## File existed as early as: 1997 -## -## chongo /\oo/\ http://www.isthe.com/chongo/ -## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ diff --git a/help/sha1 b/help/sha1 index cec14e3..fe4ad45 100644 --- a/help/sha1 +++ b/help/sha1 @@ -97,9 +97,9 @@ LINK LIBRARY HASH* hash_value(int, void*, HASH*); SEE ALSO - ishash, sha + ishash, hash -## Copyright (C) 1999 Landon Curt Noll +## Copyright (C) 1999-20007 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 @@ -113,10 +113,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: sha1,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.2 $ +## @(#) $Id: sha1,v 30.2 2007/07/05 17:37:41 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/sha1,v $ ## ## Under source code control: 1997/03/23 00:01:18 diff --git a/help/sin b/help/sin index 44c386e..bf1aca2 100644 --- a/help/sin +++ b/help/sin @@ -49,10 +49,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: sin,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: sin,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/sin,v $ ## ## Under source code control: 1994/03/19 01:40:28 diff --git a/help/sinh b/help/sinh index 69c2e7e..e5d8458 100644 --- a/help/sinh +++ b/help/sinh @@ -44,10 +44,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: sinh,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: sinh,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/sinh,v $ ## ## Under source code control: 1994/03/19 01:40:29 diff --git a/help/size b/help/size index d2d0359..c09878c 100644 --- a/help/size +++ b/help/size @@ -71,10 +71,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: size,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: size,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/size,v $ ## ## Under source code control: 1994/03/19 03:13:22 diff --git a/help/sizeof b/help/sizeof index d206069..958d61e 100644 --- a/help/sizeof +++ b/help/sizeof @@ -99,10 +99,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: sizeof,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: sizeof,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/sizeof,v $ ## ## Under source code control: 1996/05/24 02:04:04 diff --git a/help/sleep b/help/sleep index 2436a7c..6e80dc5 100644 --- a/help/sleep +++ b/help/sleep @@ -55,10 +55,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: sleep,v 29.4 2006/06/10 12:28:10 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: sleep,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/sleep,v $ ## ## Under source code control: 2000/12/14 01:33:00 diff --git a/help/sort b/help/sort index 27ec5ad..a860ef8 100644 --- a/help/sort +++ b/help/sort @@ -263,10 +263,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: sort,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: sort,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/sort,v $ ## ## Under source code control: 1995/07/09 19:41:26 diff --git a/help/sqrt b/help/sqrt index 1f395f3..122e35c 100644 --- a/help/sqrt +++ b/help/sqrt @@ -145,10 +145,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: sqrt,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: sqrt,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/sqrt,v $ ## ## Under source code control: 1995/09/18 03:54:32 diff --git a/help/srand b/help/srand index 1c26a4c..83e5772 100644 --- a/help/srand +++ b/help/srand @@ -164,10 +164,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: srand,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: srand,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/srand,v $ ## ## Under source code control: 1996/01/01 04:19:07 diff --git a/help/srandom b/help/srandom index 803da93..1190b39 100644 --- a/help/srandom +++ b/help/srandom @@ -352,10 +352,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: srandom,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: srandom,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/srandom,v $ ## ## Under source code control: 1997/02/17 01:18:22 diff --git a/help/ssq b/help/ssq index e157788..410e203 100644 --- a/help/ssq +++ b/help/ssq @@ -58,10 +58,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: ssq,v 29.5 2006/06/23 00:10:20 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: ssq,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ssq,v $ ## ## Under source code control: 1995/10/25 04:03:46 diff --git a/help/statement b/help/statement index af5b590..41667d6 100644 --- a/help/statement +++ b/help/statement @@ -334,10 +334,10 @@ Statements ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: statement,v 29.4 2007/02/07 00:29:06 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: statement,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/statement,v $ ## ## Under source code control: 1991/07/21 04:37:23 diff --git a/help/stoponerror b/help/stoponerror new file mode 100644 index 0000000..cbc30a9 --- /dev/null +++ b/help/stoponerror @@ -0,0 +1,62 @@ +NAME + stoponerror - controls when / if calc stops calculations based on errors + +SYNOPSIS + stoponerror([n]) + +TYPES + n integer + + return null value or error value + +DESCRIPTION + + The stoponerror controls when or if calc stops based on the + number of errors: + + n == -1 do not stop + n == 0 stop on error unless calc was invoked with -c + n > 0 stop when n errors are encountered + + When no arguments are given, stoponerror() returns the current + stoponerror value. When 1 argument is given, stoponerror() returns + the previous stoponerror value. + +EXAMPLE + ; stoponerror() + 0 + +LIMITS + -1 <= stoponerror < 2147483647 + +LINK LIBRARY + none + +SEE ALSO + errcount, errmax, errorcodes, iserror, errno, strerror, newerror + +## Copyright (C) 2006 Landon Curt Noll +## +## Calc is open software; you can redistribute it and/or modify it under +## the terms of the version 2.1 of the GNU Lesser General Public License +## as published by the Free Software Foundation. +## +## Calc is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General +## Public License for more details. +## +## A copy of version 2.1 of the GNU Lesser General Public License is +## distributed with calc under the filename COPYING-LGPL. You should have +## received a copy with calc; if not, write to Free Software Foundation, Inc. +## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## +## @(#) $Revision: 30.1 $ +## @(#) $Id: stoponerror,v 30.1 2007/03/16 11:10:42 chongo Exp $ +## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/stoponerror,v $ +## +## Under source code control: 2006/05/21 00:50:59 +## File existed as early as: 2006 +## +## chongo /\oo/\ http://www.isthe.com/chongo/ +## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ diff --git a/help/str b/help/str index 84a6842..c95b73b 100644 --- a/help/str +++ b/help/str @@ -61,10 +61,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: str,v 29.5 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: str,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/str,v $ ## ## Under source code control: 1995/10/05 04:52:27 diff --git a/help/strcat b/help/strcat index 7e56195..2228699 100644 --- a/help/strcat +++ b/help/strcat @@ -51,10 +51,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: strcat,v 29.5 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: strcat,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strcat,v $ ## ## Under source code control: 1995/10/05 04:52:27 diff --git a/help/strcmp b/help/strcmp index ce30a16..4b1c6ad 100644 --- a/help/strcmp +++ b/help/strcmp @@ -55,8 +55,8 @@ SEE ALSO ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## -## @(#) $Revision: 25.2 $ -## @(#) $Id: strcmp,v 25.2 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: strcmp,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strcmp,v $ ## ## Under source code control: 2006/03/03 03:32:44 diff --git a/help/strcpy b/help/strcpy index 3ca3830..9b8926d 100644 --- a/help/strcpy +++ b/help/strcpy @@ -57,8 +57,8 @@ SEE ALSO ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## -## @(#) $Revision: 25.2 $ -## @(#) $Id: strcpy,v 25.2 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: strcpy,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strcpy,v $ ## ## Under source code control: 2006/03/03 03:32:44 diff --git a/help/strerror b/help/strerror index 023a6fd..48e70ea 100644 --- a/help/strerror +++ b/help/strerror @@ -69,10 +69,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: strerror,v 29.5 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: strerror,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strerror,v $ ## ## Under source code control: 1996/04/30 03:05:18 diff --git a/help/strlen b/help/strlen index 378b674..1395e2f 100644 --- a/help/strlen +++ b/help/strlen @@ -40,10 +40,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: strlen,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: strlen,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strlen,v $ ## ## Under source code control: 1995/10/05 04:52:27 diff --git a/help/strncmp b/help/strncmp index 427ef1a..b4599ee 100644 --- a/help/strncmp +++ b/help/strncmp @@ -60,8 +60,8 @@ SEE ALSO ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## -## @(#) $Revision: 25.2 $ -## @(#) $Id: strncmp,v 25.2 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: strncmp,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strncmp,v $ ## ## Under source code control: 2006/03/03 03:32:44 diff --git a/help/strncpy b/help/strncpy index 9b889ae..a740a6a 100644 --- a/help/strncpy +++ b/help/strncpy @@ -55,8 +55,8 @@ SEE ALSO ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## -## @(#) $Revision: 25.2 $ -## @(#) $Id: strncpy,v 25.2 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: strncpy,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strncpy,v $ ## ## Under source code control: 2006/03/03 03:32:44 diff --git a/help/strpos b/help/strpos index bd3b7ea..7f282b3 100644 --- a/help/strpos +++ b/help/strpos @@ -53,10 +53,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: strpos,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: strpos,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strpos,v $ ## ## Under source code control: 1995/07/09 03:48:57 diff --git a/help/strprintf b/help/strprintf index 7be8d96..71a706b 100644 --- a/help/strprintf +++ b/help/strprintf @@ -53,10 +53,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: strprintf,v 29.5 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: strprintf,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strprintf,v $ ## ## Under source code control: 1996/03/12 22:50:41 diff --git a/help/strscan b/help/strscan index 3f0bcfd..dfae7a6 100644 --- a/help/strscan +++ b/help/strscan @@ -50,10 +50,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: strscan,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: strscan,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strscan,v $ ## ## Under source code control: 1996/04/30 03:05:18 diff --git a/help/strscanf b/help/strscanf index 8568f17..1686de6 100644 --- a/help/strscanf +++ b/help/strscanf @@ -129,10 +129,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: strscanf,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: strscanf,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strscanf,v $ ## ## Under source code control: 1996/04/30 03:05:18 diff --git a/help/substr b/help/substr index 47edea5..0ec4188 100644 --- a/help/substr +++ b/help/substr @@ -52,10 +52,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: substr,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: substr,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/substr,v $ ## ## Under source code control: 1995/10/05 04:52:27 diff --git a/help/sum b/help/sum index b613ead..549c10e 100644 --- a/help/sum +++ b/help/sum @@ -72,10 +72,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: sum,v 29.4 2006/06/22 23:49:22 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: sum,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/sum,v $ ## ## Under source code control: 1997/03/10 03:59:59 diff --git a/help/swap b/help/swap index 1d58750..e9c0493 100644 --- a/help/swap +++ b/help/swap @@ -52,10 +52,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: swap,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: swap,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/swap,v $ ## ## Under source code control: 1995/12/18 12:34:58 diff --git a/help/system b/help/system index da831af..b8c3750 100644 --- a/help/system +++ b/help/system @@ -57,10 +57,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: system,v 29.4 2006/06/25 22:16:55 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: system,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/system,v $ ## ## Under source code control: 1995/07/09 03:48:57 diff --git a/help/systime b/help/systime index 2bed497..d25f4c3 100644 --- a/help/systime +++ b/help/systime @@ -50,10 +50,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: systime,v 29.3 2006/12/16 10:53:01 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: systime,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/systime,v $ ## ## Under source code control: 2006/12/16 10:31:08 diff --git a/help/tail b/help/tail index 3262c04..9f87c0d 100644 --- a/help/tail +++ b/help/tail @@ -63,10 +63,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: tail,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: tail,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/tail,v $ ## ## Under source code control: 1995/07/10 02:09:30 diff --git a/help/tan b/help/tan index 95976e7..4635278 100644 --- a/help/tan +++ b/help/tan @@ -42,10 +42,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: tan,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: tan,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/tan,v $ ## ## Under source code control: 1994/03/19 01:40:29 diff --git a/help/tanh b/help/tanh index 5a42ca0..1e0ca25 100644 --- a/help/tanh +++ b/help/tanh @@ -44,10 +44,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: tanh,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: tanh,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/tanh,v $ ## ## Under source code control: 1994/03/19 01:40:30 diff --git a/help/test b/help/test index f2ec787..b0efd15 100644 --- a/help/test +++ b/help/test @@ -69,10 +69,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: test,v 29.3 2006/06/10 12:28:10 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: test,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/test,v $ ## ## Under source code control: 1996/07/11 01:05:13 diff --git a/help/time b/help/time index b6514c9..ee46b9c 100644 --- a/help/time +++ b/help/time @@ -40,10 +40,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: time,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: time,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/time,v $ ## ## Under source code control: 1996/05/01 16:57:20 diff --git a/help/todo b/help/todo index 3a8544b..60837e1 100644 --- a/help/todo +++ b/help/todo @@ -127,10 +127,10 @@ Medium priority items: ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.10 $ -## @(#) $Id: todo,v 29.10 2007/01/03 21:26:22 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: todo,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/todo,v $ ## ## Under source code control: 1999/10/20 07:42:55 diff --git a/help/trunc b/help/trunc index 594d026..4dd3211 100644 --- a/help/trunc +++ b/help/trunc @@ -49,10 +49,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: trunc,v 29.3 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: trunc,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/trunc,v $ ## ## Under source code control: 1994/09/30 00:52:38 diff --git a/help/types b/help/types index cde5458..8678f67 100644 --- a/help/types +++ b/help/types @@ -115,10 +115,10 @@ Builtin types ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: types,v 29.2 2000/06/07 14:02:33 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: types,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/types,v $ ## ## Under source code control: 1991/07/21 04:37:24 diff --git a/help/unexpected b/help/unexpected index 425ea09..de47175 100644 --- a/help/unexpected +++ b/help/unexpected @@ -38,34 +38,50 @@ Unexpected ^ is not xor - ============ - - In C, ^ is the xor operator. Like the '**', '^' is the - exponentiation operator. The expression: - - a^b - - yields "a to the b power", NOT "a xor b". - - Note that 'b' must be an integer. Also if 'a' == 0, 'b' - must be >= 0 as well. - - To raise to a non-integer power, use the power() builtin function. - - ** is exponentiation ==================== - As was suggested in the '^ is not xor' section, the expression: + In C, ^ is the xor operator. The expression: - a**b + a ^ b yields "a to the b power", NOT "a xor b". - Note that 'b' must be an integer. Also if 'a' == 0, 'b' - must be >= 0 as well. + Unlike in C, calc evaluates the expression: - To raise to a non-integer power, use the power() builtin function. + a ** b + + also yields "a to the b power". + + Here "a" and "b" can be a real value or a complex value: + + 2^3 3i^4 + 2.5 ^ 3.5 0.5i ^ 0.25 + 2.5 ^ 2.718i 3.13145i ^ 0.30103i + + In addition, "a" can be matrix. In this case "b" must be an integer: + + mat a[2,2] = {1,2,3,4}; + a^3 + + Note that 'a' == 0 and 'b' is real, then is must be >= 0 as well. + Also 0^0 and 0**0 return the value 1. + + Be careful about the precedence of operators. Note that: + + -1 ^ 0.5 == -1 + + whereas: + + (-1) ^ 0.5 == 1i + + because the above expresssion in parsed as: + + -(1 ^ 0.5) == -1 + + whereas: + + (-1) ^ 0.5 == 1i op= operators associate left to right @@ -333,10 +349,10 @@ Unexpected ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: unexpected,v 29.4 2007/02/07 00:30:33 chongo Exp $ +## @(#) $Revision: 30.2 $ +## @(#) $Id: unexpected,v 30.2 2007/07/11 23:00:39 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/unexpected,v $ ## ## Under source code control: 1997/03/21 13:15:18 diff --git a/help/usertime b/help/usertime index 05d25c6..ce337b6 100644 --- a/help/usertime +++ b/help/usertime @@ -48,10 +48,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: usertime,v 29.2 2006/12/16 10:50:19 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: usertime,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/usertime,v $ ## ## Under source code control: 2006/12/16 10:31:08 diff --git a/help/variable b/help/variable index 416cf1c..8afee25 100644 --- a/help/variable +++ b/help/variable @@ -153,10 +153,10 @@ Variable declarations ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.5 $ -## @(#) $Id: variable,v 29.5 2006/09/17 20:54:07 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: variable,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/variable,v $ ## ## Under source code control: 1991/07/21 04:37:25 diff --git a/help/version b/help/version index 2364042..35ba774 100644 --- a/help/version +++ b/help/version @@ -46,10 +46,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: version,v 29.4 2006/05/07 07:25:46 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: version,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/version,v $ ## ## Under source code control: 2001/05/28 17:38:01 diff --git a/help/wishlist b/help/wishlist index d6f47da..b3f5f0f 100644 --- a/help/wishlist +++ b/help/wishlist @@ -201,10 +201,10 @@ Calc Enhancement Wish List: ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.2 $ -## @(#) $Id: wishlist,v 29.2 2000/06/07 14:02:33 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: wishlist,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/wishlist,v $ ## ## Under source code control: 1991/07/21 04:37:24 diff --git a/help/xor b/help/xor index 9169977..8458ff7 100644 --- a/help/xor +++ b/help/xor @@ -52,10 +52,10 @@ SEE ALSO ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.4 $ -## @(#) $Id: xor,v 29.4 2006/06/22 23:49:22 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: xor,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/xor,v $ ## ## Under source code control: 1995/10/05 04:52:27 diff --git a/hist.c b/hist.c index 11350b9..2b7b94c 100644 --- a/hist.c +++ b/hist.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.13 $ - * @(#) $Id: hist.c,v 29.13 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: hist.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/hist.c,v $ * * Under source code control: 1993/05/02 20:09:19 diff --git a/hist.h b/hist.h index 232c3bc..de9f759 100644 --- a/hist.h +++ b/hist.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.7 $ - * @(#) $Id: hist.h,v 29.7 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: hist.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/hist.h,v $ * * Under source code control: 1993/05/02 20:09:20 diff --git a/input.c b/input.c index e01ca67..dbd54e1 100644 --- a/input.c +++ b/input.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.13 $ - * @(#) $Id: input.c,v 29.13 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: input.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/input.c,v $ * * Under source code control: 1990/02/15 01:48:16 diff --git a/jump.c b/jump.c index 539297f..d665005 100644 --- a/jump.c +++ b/jump.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: jump.c,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: jump.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/jump.c,v $ * * Under source code control: 1994/06/29 04:03:54 diff --git a/jump.h b/jump.h index 53d83d3..39b2ec1 100644 --- a/jump.h +++ b/jump.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: jump.h,v 29.5 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: jump.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/jump.h,v $ * * Under source code control: 1994/06/29 04:03:55 diff --git a/label.c b/label.c index 7375252..c4959f1 100644 --- a/label.c +++ b/label.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: label.c,v 29.4 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: label.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/label.c,v $ * * Under source code control: 1990/02/15 01:48:17 diff --git a/label.h b/label.h index f3f5dc4..a427531 100644 --- a/label.h +++ b/label.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: label.h,v 29.5 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: label.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/label.h,v $ * * Under source code control: 1990/02/15 01:48:33 diff --git a/lib_calc.c b/lib_calc.c index b78c9f7..7ca731b 100644 --- a/lib_calc.c +++ b/lib_calc.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.16 $ - * @(#) $Id: lib_calc.c,v 29.16 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.3 $ + * @(#) $Id: lib_calc.c,v 30.3 2007/07/10 17:57:04 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/lib_calc.c,v $ * * Under source code control: 1996/06/17 18:06:19 @@ -46,6 +46,10 @@ #include "symbol.h" #include "func.h" +#if defined(CUSTOM) +#include "custom.h" +#endif /* CUSTOM */ + #include "have_strdup.h" #if !defined(HAVE_STRDUP) # define strdup(x) calc_strdup((CONST char *)(x)) @@ -370,6 +374,15 @@ initialize(void) math_setdigits(DISPLAY_DEFAULT); conf->maxprint = MAXPRINT_DEFAULT; +#if defined(CUSTOM) + /* + * initialize custom registers + */ + if (allow_custom) { + init_custreg(); + } +#endif /* CUSTOM */ + /* * note that we are done */ diff --git a/lib_calc.h b/lib_calc.h index 52f6afc..bdd05ca 100644 --- a/lib_calc.h +++ b/lib_calc.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.7 $ - * @(#) $Id: lib_calc.h,v 29.7 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: lib_calc.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/lib_calc.h,v $ * * Under source code control: 1997/03/23 18:37:10 diff --git a/lib_util.c b/lib_util.c index 6d539df..1a77bbd 100644 --- a/lib_util.c +++ b/lib_util.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: lib_util.c,v 29.4 2006/05/19 15:26:10 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: lib_util.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/lib_util.c,v $ * * Under source code control: 1997/04/19 21:38:30 diff --git a/lib_util.h b/lib_util.h index 9fbed73..d9be319 100644 --- a/lib_util.h +++ b/lib_util.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: lib_util.h,v 29.3 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: lib_util.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/lib_util.h,v $ * * Under source code control: 1997/04/19 21:38:30 diff --git a/listfunc.c b/listfunc.c index 37b2026..23b6468 100644 --- a/listfunc.c +++ b/listfunc.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: listfunc.c,v 29.4 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: listfunc.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/listfunc.c,v $ * * Under source code control: 1990/02/15 01:48:18 diff --git a/longbits.c b/longbits.c index 9efb06f..ec8c18d 100644 --- a/longbits.c +++ b/longbits.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.8 $ - * @(#) $Id: longbits.c,v 29.8 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: longbits.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/longbits.c,v $ * * Under source code control: 1994/03/18 03:06:18 diff --git a/matfunc.c b/matfunc.c index 8ba5b36..332415c 100644 --- a/matfunc.c +++ b/matfunc.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.8 $ - * @(#) $Id: matfunc.c,v 29.8 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: matfunc.c,v 30.2 2007/07/05 13:30:38 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/matfunc.c,v $ * * Under source code control: 1990/02/15 01:48:18 @@ -1483,7 +1483,7 @@ matalloc(long size) m = (MATRIX *) malloc(matsize(size)); if (m == NULL) { - math_error("Cannot get memory to allocate matrix of size %d", + math_error("Cannot get memory to allocate matrix of size %ld", size); /*NOTREACHED*/ } diff --git a/math_error.c b/math_error.c index d223baa..c810d75 100644 --- a/math_error.c +++ b/math_error.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: math_error.c,v 29.4 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: math_error.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/math_error.c,v $ * * Under source code control: 1994/08/03 05:08:22 diff --git a/md5.c b/md5.c deleted file mode 100644 index 1b3cb97..0000000 --- a/md5.c +++ /dev/null @@ -1,689 +0,0 @@ -/* - * md5 - RSA Data Security, Inc. MD5 Message-Digest Algorithm - * - * LANDON CURT NOLL DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MER- - * CHANTABILITY AND FITNESS. IN NO EVENT SHALL LANDON CURT - * NOLL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF - * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * @(#) $Revision: 29.4 $ - * @(#) $Id: md5.c,v 29.4 2007/02/11 10:16:31 chongo Exp $ - * @(#) $Source: /usr/local/src/cmd/calc/RCS/md5.c,v $ - * - * This file is not covered under version 2.1 of the GNU LGPL. - */ - -/* - *********************************************************************** - ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. ** - ** ** - ** License to copy and use this software is granted provided that ** - ** it is identified as the "RSA Data Security, Inc. MD5 Message- ** - ** Digest Algorithm" in all material mentioning or referencing this ** - ** software or this function. ** - ** ** - ** License is also granted to make and use derivative works ** - ** provided that such works are identified as "derived from the RSA ** - ** Data Security, Inc. MD5 Message-Digest Algorithm" in all ** - ** material mentioning or referencing the derived work. ** - ** ** - ** RSA Data Security, Inc. makes no representations concerning ** - ** either the merchantability of this software or the suitability ** - ** of this software for any particular purpose. It is provided "as ** - ** is" without express or implied warranty of any kind. ** - ** ** - ** These notices must be retained in any copies of any part of this ** - ** documentation and/or software. ** - *********************************************************************** - */ - -/* - *********************************************************************** - ** Message-digest routines: ** - ** To form the message digest for a message M ** - ** (1) Initialize a context buffer md5Ctx using MD5Init ** - ** (2) Call MD5Update on md5Ctx and M ** - ** (3) Call MD5Final on md5Ctx ** - ** The message digest is now in md5Ctx->digest[0...15] ** - *********************************************************************** - */ - - -#include -#include "decl.h" -#include "longbits.h" -#include "align32.h" -#include "endian_calc.h" -#include "value.h" -#include "hash.h" -#include "md5.h" - -CONST char *rsa_notice = "The md5 code was derived from the RSA " - "Data Security, Inc. MD5 Message-Digest Algorithm."; - - -/* - * The F, G, H and I are basic MD5 functions. The following - * identity saves one boolean operation. - * - * F: (((x) & (y)) | (~(x) & (z))) == ((z) ^ ((x) & ((y) ^ (z)))) - * G: (((x) & (z)) | ((y) & ~(z))) == ((y) ^ ((z) & ((x) ^ (y)))) - */ -/* F, G, H and I are basic MD5 functions */ -#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) -#define G(x, y, z) ((y) ^ ((z) & ((x) ^ (y)))) -#define H(x, y, z) ((x) ^ (y) ^ (z)) -#define I(x, y, z) ((y) ^ ((x) | (~z))) - -/* rotate a 32 bit value */ -#define ROT(X,n) (((X)<<(n)) | ((X)>>(32-(n)))) - -/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4 */ -/* Rotation is separate from addition to prevent recomputation */ -#define S11 7 -#define S12 12 -#define S13 17 -#define S14 22 -#define FF(a, b, c, d, x, s, ac) \ - {(a) += F((b), (c), (d)) + (x) + (USB32)(ac); \ - (a) = ROT((a), (s)); \ - (a) += (b); \ - } -#define S21 5 -#define S22 9 -#define S23 14 -#define S24 20 -#define GG(a, b, c, d, x, s, ac) \ - {(a) += G((b), (c), (d)) + (x) + (USB32)(ac); \ - (a) = ROT((a), (s)); \ - (a) += (b); \ - } -#define S31 4 -#define S32 11 -#define S33 16 -#define S34 23 -#define HH(a, b, c, d, x, s, ac) \ - {(a) += H((b), (c), (d)) + (x) + (USB32)(ac); \ - (a) = ROT((a), (s)); \ - (a) += (b); \ - } -#define S41 6 -#define S42 10 -#define S43 15 -#define S44 21 -#define II(a, b, c, d, x, s, ac) \ - {(a) += I((b), (c), (d)) + (x) + (USB32)(ac); \ - (a) = ROT((a), (s)); \ - (a) += (b); \ - } - -/* forward declaration */ -static void MD5Init(HASH *state); -static void MD5Update(HASH *state, USB8 *inBuf, USB32 count); -static void MD5Transform(USB32*, USB32*); -static void MD5Final(HASH *state); -/* static USB32 in[MD5_CHUNKWORDS]; */ -static void MD5_chkpt(HASH *state); -static void MD5_note(int special, HASH *state); -static void MD5_type(int type, HASH *state); -static ZVALUE MD5_final_state(HASH *state); -static int MD5_cmp(HASH *a, HASH *b); -static void MD5_print(HASH *state); - - -/* - * MD5Init - initialize the message-digest context - * - * The routine MD5Init initializes the message-digest context - * md5Ctx. All fields are set to zero. - */ -static void -MD5Init(HASH *state) -{ - MD5_CTX *md5Ctx = &state->h_union.h_md5; /* digest state */ - - /* load magic initialization constants */ - md5Ctx->digest[0] = (USB32)0x67452301; - md5Ctx->digest[1] = (USB32)0xefcdab89; - md5Ctx->digest[2] = (USB32)0x98badcfe; - md5Ctx->digest[3] = (USB32)0x10325476; - - /* Initialise bit count */ - md5Ctx->countLo = 0L; - md5Ctx->countHi = 0L; - md5Ctx->datalen = 0L; -} - - -/* - * MD5Update - update message-digest context - */ -static void -MD5Update(HASH *state, USB8 *inBuf, USB32 count) -{ - MD5_CTX *md5Ctx = &state->h_union.h_md5; /* digest state */ - USB32 datalen = md5Ctx->datalen; - USB32 cpylen; -#if CALC_BYTE_ORDER == BIG_ENDIAN - int cnt; -#endif - - /* - * Update the full count, even if some of it is buffered for later - */ - MD5COUNT(md5Ctx, count); - - /* determine the size we need to copy */ - cpylen = MD5_CHUNKSIZE - datalen; - - /* case: new data will not fill the inBuf */ - if (cpylen > count) { - memcpy((char *)md5Ctx->data + datalen, - (char *)inBuf, count); - md5Ctx->datalen = datalen + count; - return; - } - - /* case: md5Ctx->in will be filled */ - memcpy((char *)md5Ctx->data + datalen, inBuf, cpylen); - - /* - * process data in MD5_CHUNKSIZE chunks - */ - for (;;) { -#if CALC_BYTE_ORDER == BIG_ENDIAN - if (state->bytes) { - /* byte swap data into little endian order */ - for (cnt=0; cnt < (int)MD5_CHUNKWORDS; ++cnt) { - SWAP_B8_IN_B32(md5Ctx->data + cnt, - md5Ctx->data + cnt); - } - } -#endif - MD5Transform(md5Ctx->digest, md5Ctx->data); - inBuf += cpylen; - count -= cpylen; - if (count < MD5_CHUNKSIZE) - break; - cpylen = MD5_CHUNKSIZE; - memcpy(md5Ctx->data, inBuf, cpylen); - } - - /* - * Handle any remaining bytes of data. - * This should only happen once on the final lot of data - */ - if (count > 0) { - memcpy(md5Ctx->data, inBuf, count); - } - - md5Ctx->datalen = count; -} - - -/* - * MD5Final - terminate the message-digest computation - * - * The routine MD5Final terminates the message-digest computation and - * ends with the desired message digest in md5Ctx->digest[0...15]. - */ -static void -MD5Final(HASH *state) -{ - MD5_CTX *md5Ctx = &state->h_union.h_md5; /* digest state */ - USB32 count = md5Ctx->datalen; - USB32 lowBitcount = md5Ctx->countLo; - USB32 highBitcount = md5Ctx->countHi; - USB8 *data = (USB8 *)md5Ctx->data; -#if CALC_BYTE_ORDER == BIG_ENDIAN - int i; -#endif - - /* Pad to end of chunk */ - - memset(data + count, 0, MD5_CHUNKSIZE - count); - - /* - * If processing bytes, set the first byte of padding to 0x80. - * if processing words: on a big-endian machine set the first - * byte of padding to 0x80000000, on a little-endian machine set - * the first four bytes to 0x80. - * - * This is safe since there is always at least one byte or word free. - */ - -#if CALC_BYTE_ORDER == BIG_ENDIAN - if (state->bytes) { - data[count] = 0x80; - for (i=0; i < (int)MD5_CHUNKWORDS; ++i) { - SWAP_B8_IN_B32(md5Ctx->data + i, - md5Ctx->data + i); - } - } else { - if (count % 4) { - math_error("This should not happen in MD5Final"); - /*NOTREACHED*/ - } - data[count + 3] = 0x80; - } -#else - data[count] = 0x80; -#endif - - if (count >= MD5_CHUNKSIZE-8) { - MD5Transform(md5Ctx->digest, md5Ctx->data); - - /* Now load another chunk with 56 bytes of padding */ - memset(data, 0, MD5_CHUNKSIZE-8); - } - - /* append length in bits and transform */ - md5Ctx->data[MD5_LOW] = (lowBitcount << 3); - md5Ctx->data[MD5_HIGH] = (highBitcount << 3) | (lowBitcount >> 29); - - MD5Transform(md5Ctx->digest, md5Ctx->data); -} - - -/* - * Basic MD5 step. Transforms digest based on in. - */ -static void -MD5Transform(USB32 *digest, USB32 *in) -{ - USB32 a = digest[0], b = digest[1], c = digest[2], d = digest[3]; - - /* Round 1 */ - FF( a, b, c, d, in[ 0], S11, 3614090360UL); /* 1 */ - FF( d, a, b, c, in[ 1], S12, 3905402710UL); /* 2 */ - FF( c, d, a, b, in[ 2], S13, 606105819UL); /* 3 */ - FF( b, c, d, a, in[ 3], S14, 3250441966UL); /* 4 */ - FF( a, b, c, d, in[ 4], S11, 4118548399UL); /* 5 */ - FF( d, a, b, c, in[ 5], S12, 1200080426UL); /* 6 */ - FF( c, d, a, b, in[ 6], S13, 2821735955UL); /* 7 */ - FF( b, c, d, a, in[ 7], S14, 4249261313UL); /* 8 */ - FF( a, b, c, d, in[ 8], S11, 1770035416UL); /* 9 */ - FF( d, a, b, c, in[ 9], S12, 2336552879UL); /* 10 */ - FF( c, d, a, b, in[10], S13, 4294925233UL); /* 11 */ - FF( b, c, d, a, in[11], S14, 2304563134UL); /* 12 */ - FF( a, b, c, d, in[12], S11, 1804603682UL); /* 13 */ - FF( d, a, b, c, in[13], S12, 4254626195UL); /* 14 */ - FF( c, d, a, b, in[14], S13, 2792965006UL); /* 15 */ - FF( b, c, d, a, in[15], S14, 1236535329UL); /* 16 */ - - /* Round 2 */ - GG( a, b, c, d, in[ 1], S21, 4129170786UL); /* 17 */ - GG( d, a, b, c, in[ 6], S22, 3225465664UL); /* 18 */ - GG( c, d, a, b, in[11], S23, 643717713UL); /* 19 */ - GG( b, c, d, a, in[ 0], S24, 3921069994UL); /* 20 */ - GG( a, b, c, d, in[ 5], S21, 3593408605UL); /* 21 */ - GG( d, a, b, c, in[10], S22, 38016083UL); /* 22 */ - GG( c, d, a, b, in[15], S23, 3634488961UL); /* 23 */ - GG( b, c, d, a, in[ 4], S24, 3889429448UL); /* 24 */ - GG( a, b, c, d, in[ 9], S21, 568446438UL); /* 25 */ - GG( d, a, b, c, in[14], S22, 3275163606UL); /* 26 */ - GG( c, d, a, b, in[ 3], S23, 4107603335UL); /* 27 */ - GG( b, c, d, a, in[ 8], S24, 1163531501UL); /* 28 */ - GG( a, b, c, d, in[13], S21, 2850285829UL); /* 29 */ - GG( d, a, b, c, in[ 2], S22, 4243563512UL); /* 30 */ - GG( c, d, a, b, in[ 7], S23, 1735328473UL); /* 31 */ - GG( b, c, d, a, in[12], S24, 2368359562UL); /* 32 */ - - /* Round 3 */ - HH( a, b, c, d, in[ 5], S31, 4294588738UL); /* 33 */ - HH( d, a, b, c, in[ 8], S32, 2272392833UL); /* 34 */ - HH( c, d, a, b, in[11], S33, 1839030562UL); /* 35 */ - HH( b, c, d, a, in[14], S34, 4259657740UL); /* 36 */ - HH( a, b, c, d, in[ 1], S31, 2763975236UL); /* 37 */ - HH( d, a, b, c, in[ 4], S32, 1272893353UL); /* 38 */ - HH( c, d, a, b, in[ 7], S33, 4139469664UL); /* 39 */ - HH( b, c, d, a, in[10], S34, 3200236656UL); /* 40 */ - HH( a, b, c, d, in[13], S31, 681279174UL); /* 41 */ - HH( d, a, b, c, in[ 0], S32, 3936430074UL); /* 42 */ - HH( c, d, a, b, in[ 3], S33, 3572445317UL); /* 43 */ - HH( b, c, d, a, in[ 6], S34, 76029189UL); /* 44 */ - HH( a, b, c, d, in[ 9], S31, 3654602809UL); /* 45 */ - HH( d, a, b, c, in[12], S32, 3873151461UL); /* 46 */ - HH( c, d, a, b, in[15], S33, 530742520UL); /* 47 */ - HH( b, c, d, a, in[ 2], S34, 3299628645UL); /* 48 */ - - /* Round 4 */ - II( a, b, c, d, in[ 0], S41, 4096336452UL); /* 49 */ - II( d, a, b, c, in[ 7], S42, 1126891415UL); /* 50 */ - II( c, d, a, b, in[14], S43, 2878612391UL); /* 51 */ - II( b, c, d, a, in[ 5], S44, 4237533241UL); /* 52 */ - II( a, b, c, d, in[12], S41, 1700485571UL); /* 53 */ - II( d, a, b, c, in[ 3], S42, 2399980690UL); /* 54 */ - II( c, d, a, b, in[10], S43, 4293915773UL); /* 55 */ - II( b, c, d, a, in[ 1], S44, 2240044497UL); /* 56 */ - II( a, b, c, d, in[ 8], S41, 1873313359UL); /* 57 */ - II( d, a, b, c, in[15], S42, 4264355552UL); /* 58 */ - II( c, d, a, b, in[ 6], S43, 2734768916UL); /* 59 */ - II( b, c, d, a, in[13], S44, 1309151649UL); /* 60 */ - II( a, b, c, d, in[ 4], S41, 4149444226UL); /* 61 */ - II( d, a, b, c, in[11], S42, 3174756917UL); /* 62 */ - II( c, d, a, b, in[ 2], S43, 718787259UL); /* 63 */ - II( b, c, d, a, in[ 9], S44, 3951481745UL); /* 64 */ - - digest[0] += a; - digest[1] += b; - digest[2] += c; - digest[3] += d; -} - - -/* - * MD5_chkpt - checkpoint a MD5 state - * - * given: - * state the state to checkpoint - * - * This function will ensure that the the hash chunk buffer is empty. - * Any partially hashed data will be padded out with 0's and hashed. - */ -static void -MD5_chkpt(HASH *state) -{ - MD5_CTX *dig = &state->h_union.h_md5; /* digest state */ -#if CALC_BYTE_ORDER == BIG_ENDIAN - int cnt; -#endif - - /* - * checkpoint if partial buffer exists - */ - if (dig->datalen > 0) { - - /* pad to the end of the chunk */ - memset((USB8 *)dig->data + dig->datalen, 0, - MD5_CHUNKSIZE-dig->datalen); -#if CALC_BYTE_ORDER == BIG_ENDIAN - if (state->bytes) { - /* byte swap data into little endian order */ - for (cnt=0; cnt < (int)MD5_CHUNKWORDS; ++cnt) { - SWAP_B8_IN_B32(dig->data + cnt, - dig->data + cnt); - } - } -#endif - - /* transform padded chunk */ - MD5Transform((USB32*)dig->digest, dig->data); - MD5COUNT(dig, MD5_CHUNKSIZE-dig->datalen); - - /* empty buffer */ - dig->datalen = 0; - } -} - - -/* - * MD5_note - note a special value - * - * given: - * state the state to hash - * special a special value (MD5_HASH_XYZ) to note - * - * This function will note that a special value is about to be hashed. - * Types include negative values, complex values, division, zero numeric - * and array of HALFs. - */ -static void -MD5_note(int special, HASH *state) -{ - MD5_CTX *dig = &state->h_union.h_md5; /* digest state */ - unsigned int i; - - /* - * change state to reflect a special value - */ - dig->digest[0] ^= special; - for (i=1; i < MD5_DIGESTWORDS; ++i) { - dig->digest[i] ^= (special + dig->digest[i-1] + i); - } - return; -} - - -/* - * MD5_type - note a VALUE type - * - * given: - * state the state to hash - * type the VALUE type to note - * - * This function will note that a type of value is about to be hashed. - * The type of a VALUE will be noted. For purposes of hash comparison, - * we will do nothing with V_NUM and V_COM so that the other functions - * can hash to the same value regardless of if MD5_value() is called - * or not. We also do nothing with V_STR so that a hash of a string - * will produce the same value as the standard hash function. - */ -static void -MD5_type(int type, HASH *state) -{ - MD5_CTX *dig = &state->h_union.h_md5; /* digest state */ - unsigned int i; - - /* - * ignore NUMBER and COMPLEX - */ - if (type == V_NUM || type == V_COM || type == V_STR) { - return; - } - - /* - * change state to reflect a VALUE type - */ - dig->digest[0] += type; - for (i=1; i < MD5_DIGESTWORDS; ++i) { - dig->digest[i] += ((type+i) ^ dig->digest[i-1]); - } - return; -} - - -/* - * MD5_init_state - initialize a hash state structure for this hash - * - * given: - * state - pointer to the hfunction element to initialize - */ -void -MD5_init_state(HASH *state) -{ - /* - * initalize state - */ - state->hashtype = MD5_HASH_TYPE; - state->bytes = TRUE; - state->update = MD5Update; - state->chkpt = MD5_chkpt; - state->note = MD5_note; - state->type = MD5_type; - state->final = MD5_final_state; - state->cmp = MD5_cmp; - state->print = MD5_print; - state->base = MD5_BASE; - state->chunksize = MD5_CHUNKSIZE; - state->unionsize = sizeof(MD5_CTX); - - /* - * perform the internal init function - */ - memset((void *)&(state->h_union.h_md5), 0, sizeof(MD5_CTX)); - MD5Init(state); - return; -} - - -/* - * MD5_final_state - complete hash state and return a ZVALUE - * - * given: - * state the state to complete and convert - * - * returns: - * a ZVALUE representing the state - */ -static ZVALUE -MD5_final_state(HASH *state) -{ - MD5_CTX *dig = &state->h_union.h_md5; /* digest state */ - ZVALUE ret; /* return ZVALUE of completed hash state */ - unsigned int i; - - /* - * malloc and initialize if state is NULL - */ - if (state == NULL) { - state = (HASH *)malloc(sizeof(HASH)); - if (state == NULL) { - math_error("cannot malloc HASH"); - /*NOTREACHED*/ - } - MD5_init_state(state); - } - - /* - * complete the hash state - */ - MD5Final(state); - - /* - * allocate storage for ZVALUE - */ - ret.len = MD5_DIGESTSIZE/sizeof(HALF); - ret.sign = 0; - ret.v = alloc(ret.len); - - /* - * load ZVALUE - */ -#if CALC_BYTE_ORDER == LITTLE_ENDIAN && BASEB == 16 - for (i = 0; i < MD5_DIGESTSIZE; i += 2) { - SWAP_B8_IN_B16(((USB8 *)dig->digest) + i, - ((USB8 *) dig->digest) + i); - } -#else - for (i = 0; i < MD5_DIGESTWORDS; ++i) { - SWAP_B8_IN_B32(dig->digest + i, dig->digest + i); - } -#endif - - for (i=0; i < (unsigned int)ret.len; ++i) { - ret.v[ret.len-i-1] = ((HALF*)dig->digest)[i]; - } - - ztrim(&ret); - - /* - * return ZVALUE - */ - return ret; -} - - -/* - * MD5_cmp - compare two hash states - * - * given: - * a first hash state - * b second hash state - * - * returns: - * TRUE => hash states are different - * FALSE => hash states are the same - */ -static int -MD5_cmp(HASH *a, HASH *b) -{ - /* - * firewall and quick check - */ - if (a == b) { - /* pointers to the same object */ - return FALSE; - } - if (a == NULL || b == NULL) { - /* one is NULL, so they differ */ - return TRUE; - } - - /* - * compare concat states - */ - if (a->bytes != b->bytes) - return TRUE; - - /* - * compare bit counts - */ - if (a->h_union.h_md5.countLo != b->h_union.h_md5.countLo || - a->h_union.h_md5.countHi != b->h_union.h_md5.countHi) { - /* counts differ */ - return TRUE; - } - - /* - * compare pending buffers - */ - if (a->h_union.h_md5.datalen != b->h_union.h_md5.datalen) { - /* buffer lengths differ */ - return TRUE; - } - if (memcmp((char*)a->h_union.h_md5.data, - (char*)b->h_union.h_md5.data, - a->h_union.h_md5.datalen) != 0) { - /* buffer contents differ */ - return TRUE; - } - - /* - * compare digest - */ - return (memcmp((char*)(a->h_union.h_md5.digest), - (char*)(b->h_union.h_md5.digest), - MD5_DIGESTSIZE) != 0); -} - - -/* - * MD5_print - print a hash state - * - * given: - * state the hash state to print - */ -static void -MD5_print(HASH *state) -{ - /* - * form the hash value - */ - if (conf->calc_debug & CALCDBG_HASH_STATE) { - char buf[DEBUG_SIZE+1]; /* hash value buffer */ - - /* - * print numeric debug value - * - * NOTE: This value represents only the hash value as of - * the last full update or finalization. Thus it - * may NOT be the actual hash value. - */ - sprintf(buf, - "md5: 0x%08x%08x%08x%08x data: %d octets", - (int)state->h_union.h_md5.digest[0], - (int)state->h_union.h_md5.digest[1], - (int)state->h_union.h_md5.digest[2], - (int)state->h_union.h_md5.digest[3], - (int)state->h_union.h_md5.datalen); - math_str(buf); - } else { - math_str("md5 hash state"); - } - return; -} diff --git a/md5.h b/md5.h deleted file mode 100644 index 814d991..0000000 --- a/md5.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * md5 - RSA Data Security, Inc. MD5 Message-Digest Algorithm - * - * LANDON CURT NOLL DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MER- - * CHANTABILITY AND FITNESS. IN NO EVENT SHALL LANDON CURT - * NOLL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF - * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * @(#) $Revision: 29.1 $ - * @(#) $Id: md5.h,v 29.1 1999/12/14 09:16:12 chongo Exp $ - * @(#) $Source: /usr/local/src/cmd/calc/RCS/md5.h,v $ - * - * This file is not covered under version 2.1 of the GNU LGPL. - */ - -/* - *********************************************************************** - ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. ** - ** ** - ** License to copy and use this software is granted provided that ** - ** it is identified as the "RSA Data Security, Inc. MD5 Message- ** - ** Digest Algorithm" in all material mentioning or referencing this ** - ** software or this function. ** - ** ** - ** License is also granted to make and use derivative works ** - ** provided that such works are identified as "derived from the RSA ** - ** Data Security, Inc. MD5 Message-Digest Algorithm" in all ** - ** material mentioning or referencing the derived work. ** - ** ** - ** RSA Data Security, Inc. makes no representations concerning ** - ** either the merchantability of this software or the suitability ** - ** of this software for any particular purpose. It is provided "as ** - ** is" without express or implied warranty of any kind. ** - ** ** - ** These notices must be retained in any copies of any part of this ** - ** documentation and/or software. ** - *********************************************************************** - */ - -#if !defined(__MD5_H__) -#define __MD5_H__ - -/* MD5_CHUNKSIZE must be a power of 2 - fixed value defined by the algorithm */ -#define MD5_CHUNKSIZE (1<<6) -#define MD5_CHUNKWORDS (MD5_CHUNKSIZE/sizeof(USB32)) - -/* MD5_DIGESTSIZE is a the length of the digest as defined by the algorithm */ -#define MD5_DIGESTSIZE (16) -#define MD5_DIGESTWORDS (MD5_DIGESTSIZE/sizeof(USB32)) - -/* MD5_LOW - where low 32 bits of 64 bit count is stored during final */ -#define MD5_LOW 14 - -/* MD5_HIGH - where high 32 bits of 64 bit count is stored during final */ -#define MD5_HIGH 15 - -/* - * MD5COUNT(MD5_CTX*, USB32) - update the 64 bit count in an MD5_CTX - * - * We will count bytes and convert to bit count during the final - * transform. - */ -#define MD5COUNT(md5info, count) { \ - USB32 tmp_countLo; \ - tmp_countLo = (md5info)->countLo; \ - if (((md5info)->countLo += (count)) < tmp_countLo) { \ - (md5info)->countHi++; \ - } \ -} - -/* - * Data structure for MD5 (Message-Digest) computation - */ -typedef struct { - USB32 digest[MD5_DIGESTWORDS]; /* message digest */ - USB32 countLo; /* 64 bit count: bits 3-34 */ - USB32 countHi; /* 64 bit count: bits 35-63 (64-66 ignored) */ - USB32 datalen; /* length of data in inp.inp_USB8 */ - USB32 data[MD5_CHUNKWORDS]; /* USB32 chunk buffer */ -} MD5_CTX; - -#endif /* __MD5_H__ */ diff --git a/nametype.h b/nametype.h index 2270d88..1660665 100644 --- a/nametype.h +++ b/nametype.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: nametype.h,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: nametype.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/nametype.h,v $ * * Under source code control: 1997/03/08 13:44:55 diff --git a/no_implicit.c b/no_implicit.c index dc9f983..377907a 100644 --- a/no_implicit.c +++ b/no_implicit.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.1 $ - * @(#) $Id: no_implicit.c,v 29.1 2003/01/14 01:45:19 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: no_implicit.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/no_implicit.c,v $ * * Under source code control: 2003/01/14 01:45:19 diff --git a/obj.c b/obj.c index f9cb432..3812092 100644 --- a/obj.c +++ b/obj.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.10 $ - * @(#) $Id: obj.c,v 29.10 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: obj.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/obj.c,v $ * * Under source code control: 1990/02/15 01:48:19 diff --git a/opcodes.c b/opcodes.c index 96ea9de..ae8a482 100644 --- a/opcodes.c +++ b/opcodes.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.14 $ - * @(#) $Id: opcodes.c,v 29.14 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: opcodes.c,v 30.2 2007/07/10 21:18:08 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/opcodes.c,v $ * * Under source code control: 1990/02/15 01:48:19 @@ -1153,7 +1153,7 @@ o_power(void) v1 = v1->v_addr; if (v2->v_type == V_ADDR) v2 = v2->v_addr; - powivalue(v1, v2, &tmp); + powvalue(v1, v2, &tmp); freevalue(stack--); freevalue(stack); *stack = tmp; diff --git a/opcodes.h b/opcodes.h index 6ff7bf8..17f9783 100644 --- a/opcodes.h +++ b/opcodes.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.8 $ - * @(#) $Id: opcodes.h,v 29.8 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: opcodes.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/opcodes.h,v $ * * Under source code control: 1990/02/15 01:48:35 diff --git a/pix.c b/pix.c index f4515a9..9257e4c 100644 --- a/pix.c +++ b/pix.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: pix.c,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: pix.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/pix.c,v $ * * Under source code control: 1994/07/01 19:44:21 diff --git a/poly.c b/poly.c index 03cce23..09299fe 100644 --- a/poly.c +++ b/poly.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: poly.c,v 29.2 2000/06/07 14:02:13 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: poly.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/poly.c,v $ * * Under source code control: 1995/12/02 03:10:28 diff --git a/prime.c b/prime.c index 06ac3a5..0766760 100644 --- a/prime.c +++ b/prime.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: prime.c,v 29.3 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: prime.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/prime.c,v $ * * Under source code control: 1994/06/04 03:26:14 diff --git a/prime.h b/prime.h index 21fe5a4..69ba4bc 100644 --- a/prime.h +++ b/prime.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: prime.h,v 29.5 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: prime.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/prime.h,v $ * * Under source code control: 1994/06/04 03:26:15 diff --git a/qfunc.c b/qfunc.c index 7838acd..3e38b7f 100644 --- a/qfunc.c +++ b/qfunc.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.10 $ - * @(#) $Id: qfunc.c,v 29.10 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: qfunc.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/qfunc.c,v $ * * Under source code control: 1990/02/15 01:48:20 diff --git a/qio.c b/qio.c index 41936d7..a251800 100644 --- a/qio.c +++ b/qio.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.9 $ - * @(#) $Id: qio.c,v 29.9 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: qio.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/qio.c,v $ * * Under source code control: 1993/07/30 19:42:46 diff --git a/qmath.c b/qmath.c index 3de5a3f..9f4955f 100644 --- a/qmath.c +++ b/qmath.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.8 $ - * @(#) $Id: qmath.c,v 29.8 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: qmath.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/qmath.c,v $ * * Under source code control: 1990/02/15 01:48:21 diff --git a/qmath.h b/qmath.h index a10ebd3..ca23b7d 100644 --- a/qmath.h +++ b/qmath.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.9 $ - * @(#) $Id: qmath.h,v 29.9 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: qmath.h,v 30.2 2007/07/05 19:35:20 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/qmath.h,v $ * * Under source code control: 1993/07/30 19:42:47 @@ -252,6 +252,7 @@ E_FUNC NUMBER *swap_HALF_in_NUMBER(NUMBER *dest, NUMBER *src, BOOL all); #define qiseven(q) (zisunit((q)->den) && ziseven((q)->num)) #define qisodd(q) (zisunit((q)->den) && zisodd((q)->num)) #define qistwopower(q) (zisunit((q)->den) && zistwopower((q)->num)) +#define qistiny(q) (zistiny((q)->num)) #define qhighbit(q) (zhighbit((q)->num)) #define qlowbit(q) (zlowbit((q)->num)) diff --git a/qmod.c b/qmod.c index 4b1f4da..df31287 100644 --- a/qmod.c +++ b/qmod.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: qmod.c,v 29.4 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: qmod.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/qmod.c,v $ * * Under source code control: 1991/05/22 23:15:07 diff --git a/qtrans.c b/qtrans.c index 067b970..29eba40 100644 --- a/qtrans.c +++ b/qtrans.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.8 $ - * @(#) $Id: qtrans.c,v 29.8 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: qtrans.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/qtrans.c,v $ * * Under source code control: 1990/02/15 01:48:22 diff --git a/quickhash.c b/quickhash.c index e996814..c0ee4f9 100644 --- a/quickhash.c +++ b/quickhash.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.14 $ - * @(#) $Id: quickhash.c,v 29.14 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: quickhash.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/quickhash.c,v $ * * Under source code control: 1995/03/04 11:34:23 diff --git a/rpm.mk b/rpm.mk index 81279c8..c237998 100644 --- a/rpm.mk +++ b/rpm.mk @@ -17,10 +17,10 @@ # A copy of version 2.1 of the GNU Lesser General Public License is # distributed with calc under the filename COPYING-LGPL. You should have # received a copy with calc; if not, write to Free Software Foundation, Inc. -# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -MAKEFILE_REV= $$Revision: 29.16 $$ -# @(#) $Id: rpm.mk,v 29.16 2006/09/18 06:33:50 chongo Exp $ +MAKEFILE_REV= $$Revision: 30.2 $$ +# @(#) $Id: rpm.mk,v 30.2 2007/09/02 05:38:34 chongo Exp chongo $ # @(#) $Source: /usr/local/src/cmd/calc/RCS/rpm.mk,v $ # # Under source code control: 2003/02/16 20:21:39 @@ -51,7 +51,8 @@ CPIO= cpio CP= cp EGREP= egrep MKDIR= mkdir -GREP= GREP +GREP= grep +SORT= sort # rpm-related parameters # @@ -67,35 +68,62 @@ SRPM= $(PROJECT)-$(PROJECT_RELEASE).src.rpm TMPDIR= /var/tmp RPMDIR= /usr/src/redhat +# Makefile debug +# +# Q=@ do not echo internal Makefile actions (quiet mode) +# Q= echo internal Makefile actions (debug / verbose mode) +# +# V=@: do not echo debug statements (quiet mode) +# V=@ do echo debug statements (debug / verbose mode) +# +#Q= +Q=@ +V=@: +#V=@ + all: calc.spec ver_calc + ${V} echo '=-=-=-=-= rpm.mk start of $@ rule =-=-=-=-=' $(MAKE) -f rpm.mk PROJECT_VERSION="`./ver_calc`" \ PROJECT_RELEASE="`${SED} -n -e '/^Release:/s/^Release: *//p' \ calc.spec.in`" rpm + ${V} echo '=-=-=-=-= rpm.mk end of $@ rule =-=-=-=-=' pkgme: $(PROJECT_NAME)-spec.${TAR}.gz ver_calc: + ${V} echo '=-=-=-=-= rpm.mk start of $@ rule =-=-=-=-=' $(MAKE) -f Makefile ver_calc + ${V} echo '=-=-=-=-= rpm.mk end of $@ rule =-=-=-=-=' .PHONY: vers vers: + ${V} echo '=-=-=-=-= rpm.mk start of $@ rule =-=-=-=-=' $(MAKE) -f Makefile ver_calc + ${V} echo '=-=-=-=-= rpm.mk end of $@ rule =-=-=-=-=' calc.spec: calc.spec.in ver_calc + ${V} echo '=-=-=-=-= rpm.mk start of $@ rule =-=-=-=-=' ${RM} -f calc.spec ${SED} -e 's/<<>>/'"`./ver_calc`"/g \ calc.spec.in > calc.spec + ${V} echo '=-=-=-=-= rpm.mk end of $@ rule =-=-=-=-=' .PHONY: srcpkg srcpkg: make_rhdir - ${FIND} . -depth -print | ${EGREP} -v '/RCS|/CVS|/NOTES|\.gone' | \ + ${V} echo '=-=-=-=-= rpm.mk start of $@ rule =-=-=-=-=' + ${FIND} . -depth -print | \ + ${EGREP} -v '/RCS|/CVS|/NOTES|/\.|\.out$$|\.safe$$' | \ + ${EGREP} -v '/old[._-]|\.old$$|\.tar\.gz$$' | \ + LANG=C ${SORT} | \ ${CPIO} -dumpv "$(TMPDIR)/$(PROJECT)" (cd "$(TMPDIR)"; ${TAR} cf - "$(PROJECT)") | \ ${GZIP_PROG} -c > "$(RPMDIR)/SOURCES/$(TARBALL)" ${RM} -fr "$(TMPDIR)/$(PROJECT)" + ${V} echo '=-=-=-=-= rpm.mk end of $@ rule =-=-=-=-=' .PHONY: rpm rpm: srcpkg calc.spec + ${V} echo '=-=-=-=-= rpm.mk start of $@ rule =-=-=-=-=' $(MAKE) -f Makefile clean ${CP} "$(SPECFILE)" "$(RPMDIR)/SPECS/$(SPECFILE)" ${RM} -f "$(RPMDIR)/RPMS/${TARCH}/$(RPM686)" @@ -129,15 +157,18 @@ rpm: srcpkg calc.spec @echo @echo "All done! -- Jessica Noll, Age 2" @echo + ${V} echo '=-=-=-=-= rpm.mk end of $@ rule =-=-=-=-=' .PHONY: make_rhdir make_rhdir: + ${V} echo '=-=-=-=-= rpm.mk start of $@ rule =-=-=-=-=' for i in "$(RPMDIR)" "$(RPMDIR)/RPMS" "$(RPMDIR)/SOURCES" \ "$(RPMDIR)/SPECS" "$(RPMDIR)/SRPMS" "$(RPMDIR)/BUILD"; do \ if [ ! -d "$$i" ] ; then \ ${MKDIR} -p "$$i"; \ fi; \ done; + ${V} echo '=-=-=-=-= rpm.mk end of $@ rule =-=-=-=-=' # date format for spec file .PHONY: logdate @@ -146,6 +177,7 @@ logdate: .PHONY: chkpkg chkpkg: + ${V} echo '=-=-=-=-= rpm.mk start of $@ rule =-=-=-=-=' for i in "$(RPMDIR)/RPMS/${TARCH}/$(RPM686)" \ "$(RPMDIR)/RPMS/${TARCH}/$(DRPM686)" \ "$(RPMDIR)/SRPMS/$(SRPM)" ; do \ @@ -155,40 +187,51 @@ chkpkg: ${RPM_TOOL} -qpl "$$i" ; \ echo "***** end $$i" ; \ done ; + ${V} echo '=-=-=-=-= rpm.mk end of $@ rule =-=-=-=-=' .PHONY: chksys chksys: + ${V} echo '=-=-=-=-= rpm.mk start of $@ rule =-=-=-=-=' ${RPM_TOOL} -qa | ${GREP} "$(PROJECT_NAME)" ${RPM_TOOL} -qa | ${GREP} "$(PROJECT_NAME)-devel" + ${V} echo '=-=-=-=-= rpm.mk end of $@ rule =-=-=-=-=' .PHONY: test test: ver_calc + ${V} echo '=-=-=-=-= rpm.mk start of $@ rule =-=-=-=-=' @if [ X"`id -u`" != X"0" ]; then \ echo "test needs to install, must be root to test" 1>&2; \ exit 4; \ fi $(MAKE) -f rpm.mk PROJECT_VERSION="`./ver_calc`" installrpm chksys + ${V} echo '=-=-=-=-= rpm.mk end of $@ rule =-=-=-=-=' .PHONY: installrpm installrpm: + ${V} echo '=-=-=-=-= rpm.mk start of $@ rule =-=-=-=-=' @if [ X"`id -u`" != X"0" ]; then \ echo "must be root to install RPMs" 1>&2; \ exit 5; \ fi ${RPM_TOOL} -ivh "$(RPMDIR)/RPMS/${TARCH}/$(RPM686)" ${RPM_TOOL} -ivh "$(RPMDIR)/RPMS/${TARCH}/$(DRPM686)" + ${V} echo '=-=-=-=-= rpm.mk end of $@ rule =-=-=-=-=' .PHONY: uninstallrpm uninstallrpm: + ${V} echo '=-=-=-=-= rpm.mk start of $@ rule =-=-=-=-=' @if [ X"`id -u`" != X"0" ]; then \ echo "must be root to uninstall RPMs" 1>&2; \ exit 6; \ fi ${RPM_TOOL} -e "$(PROJECT_NAME)-devel" ${RPM_TOOL} -e "$(PROJECT_NAME)" + ${V} echo '=-=-=-=-= rpm.mk end of $@ rule =-=-=-=-=' $(PROJECT_NAME)-spec.${TAR}.gz: rpm.mk $(PROJECT_NAME).spec.in + ${V} echo '=-=-=-=-= rpm.mk start of $@ rule =-=-=-=-=' ${RM} -f "$@" ${TAR} cf - "$^" | ${GZIP_PROG} -c > "$@" + ${V} echo '=-=-=-=-= rpm.mk end of $@ rule =-=-=-=-=' #**** diff --git a/sample.README b/sample.README index 9e05235..3de2d9e 100644 --- a/sample.README +++ b/sample.README @@ -66,10 +66,10 @@ many_random ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. -## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## -## @(#) $Revision: 29.3 $ -## @(#) $Id: sample.README,v 29.3 2007/02/15 09:27:18 chongo Exp $ +## @(#) $Revision: 30.1 $ +## @(#) $Id: sample.README,v 30.1 2007/03/16 11:09:46 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/RCS/sample.README,v $ ## ## Under source code control: 1997/04/19 23:15:42 diff --git a/sample_many.c b/sample_many.c index 9c35955..815a2ae 100644 --- a/sample_many.c +++ b/sample_many.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: sample_many.c,v 29.4 2007/02/15 09:49:57 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: sample_many.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/sample_many.c,v $ * * Under source code control: 1997/04/19 22:46:49 diff --git a/sample_rand.c b/sample_rand.c index e05cf72..f269d1e 100644 --- a/sample_rand.c +++ b/sample_rand.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: sample_rand.c,v 29.4 2007/02/15 09:49:32 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: sample_rand.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/sample_rand.c,v $ * * Under source code control: 1997/04/19 22:46:49 diff --git a/seed.c b/seed.c index b8bc522..bd6bafa 100644 --- a/seed.c +++ b/seed.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.8 $ - * @(#) $Id: seed.c,v 29.8 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: seed.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/seed.c,v $ * * Under source code control: 1999/10/03 10:06:53 diff --git a/shs1.c b/sha1.c similarity index 76% rename from shs1.c rename to sha1.c index b88c585..7d03c39 100644 --- a/shs1.c +++ b/sha1.c @@ -1,5 +1,5 @@ /* - * shs1 - implements new NIST Secure Hash Standard-1 (SHS1) + * sha1 - implements new NIST Secure Hash Standard-1 (SHA1) * * Written 2 September 1992, Peter C. Gutmann. * @@ -22,9 +22,9 @@ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: shs1.c,v 29.4 2007/02/11 10:19:14 chongo Exp $ - * @(#) $Source: /usr/local/src/cmd/calc/RCS/shs1.c,v $ + * @(#) $Revision: 30.3 $ + * @(#) $Id: sha1.c,v 30.3 2007/07/05 17:37:41 chongo Exp $ + * @(#) $Source: /usr/local/src/cmd/calc/RCS/sha1.c,v $ * * This file is not covered under version 2.1 of the GNU LGPL. */ @@ -36,11 +36,11 @@ #include "endian_calc.h" #include "value.h" #include "hash.h" -#include "shs.h" +#include "sha1.h" /* - * The SHS1 f()-functions. The f1 and f3 functions can be optimized + * The SHA1 f()-functions. The f1 and f3 functions can be optimized * to save one boolean operation each - thanks to Rich Schroeppel, * rcs@cs.arizona.edu for discovering this. * @@ -52,13 +52,13 @@ #define f3(x,y,z) ((x&y) | (z&(x|y))) /* Rounds 40-59 */ #define f4(x,y,z) (x^y^z) /* Rounds 60-79 */ -/* The SHS1 Mysterious Constants */ +/* The SHA1 Mysterious Constants */ #define K1 0x5A827999L /* Rounds 0-19 */ #define K2 0x6ED9EBA1L /* Rounds 20-39 */ #define K3 0x8F1BBCDCL /* Rounds 40-59 */ #define K4 0xCA62C1D6L /* Rounds 60-79 */ -/* SHS1 initial values */ +/* SHA1 initial values */ #define h0init 0x67452301L #define h1init 0xEFCDAB89L #define h2init 0x98BADCFEL @@ -85,7 +85,7 @@ W[i&15] = LEFT_ROT(t, 1)) /* - * The prototype SHS1 sub-round. The fundamental sub-round is: + * The prototype SHA1 sub-round. The fundamental sub-round is: * * a' = e + LEFT_ROT(a,5) + f(b,c,d) + k + data; * b' = a; @@ -102,26 +102,26 @@ (e += LEFT_ROT(a,5) + f(b,c,d) + k + data, b = LEFT_ROT(b,30)) /* forward declarations */ -S_FUNC void shs1Init(HASH*); -S_FUNC void shs1Transform(USB32*, USB32*); -S_FUNC void shs1Update(HASH*, USB8*, USB32); -S_FUNC void shs1Final(HASH*); -S_FUNC void shs1_chkpt(HASH*); -S_FUNC void shs1_note(int, HASH*); -S_FUNC void shs1_type(int, HASH*); -void shs1_init_state(HASH*); -S_FUNC ZVALUE shs1_final_state(HASH*); -S_FUNC int shs1_cmp(HASH*, HASH*); -S_FUNC void shs1_print(HASH*); +S_FUNC void sha1Init(HASH*); +S_FUNC void sha1Transform(USB32*, USB32*); +S_FUNC void sha1Update(HASH*, USB8*, USB32); +S_FUNC void sha1Final(HASH*); +S_FUNC void sha1_chkpt(HASH*); +S_FUNC void sha1_note(int, HASH*); +S_FUNC void sha1_type(int, HASH*); +void sha1_init_state(HASH*); +S_FUNC ZVALUE sha1_final_state(HASH*); +S_FUNC int sha1_cmp(HASH*, HASH*); +S_FUNC void sha1_print(HASH*); /* - * shs1Init - initialize the SHS1 state + * sha1Init - initialize the SHA1 state */ S_FUNC void -shs1Init(HASH *state) +sha1Init(HASH *state) { - SHS1_INFO *dig = &state->h_union.h_shs1; /* digest state */ + SHA1_INFO *dig = &state->h_union.h_sha1; /* digest state */ /* Set the h-vars to their initial values */ dig->digest[0] = h0init; @@ -138,14 +138,14 @@ shs1Init(HASH *state) /* - * shs1Transform - perform the SHS1 transformatio + * sha1Transform - perform the SHA1 transformatio * * Note that this code, like MD5, seems to break some optimizing compilers. * It may be necessary to split it into sections, eg based on the four * subrounds. One may also want to roll each subround into a loop. */ S_FUNC void -shs1Transform(USB32 *digest, USB32 *W) +sha1Transform(USB32 *digest, USB32 *W) { USB32 A, B, C, D, E; /* Local vars */ USB32 t; /* temp storage for exor() */ @@ -252,12 +252,12 @@ shs1Transform(USB32 *digest, USB32 *W) /* - * shs1Update - update SHS1 with arbitrary length data + * sha1Update - update SHA1 with arbitrary length data */ void -shs1Update(HASH *state, USB8 *buffer, USB32 count) +sha1Update(HASH *state, USB8 *buffer, USB32 count) { - SHS1_INFO *dig = &state->h_union.h_shs1; /* digest state */ + SHA1_INFO *dig = &state->h_union.h_sha1; /* digest state */ USB32 datalen = dig->datalen; USB32 cpylen; #if CALC_BYTE_ORDER == LITTLE_ENDIAN @@ -267,11 +267,11 @@ shs1Update(HASH *state, USB8 *buffer, USB32 count) /* * Update the full count, even if some of it is buffered for later */ - SHS1COUNT(dig, count); + SHA1COUNT(dig, count); /* determine the size we need to copy */ - cpylen = SHS1_CHUNKSIZE - datalen; + cpylen = SHA1_CHUNKSIZE - datalen; /* case: new data will not fill the buffer */ if (cpylen > count) { @@ -285,22 +285,22 @@ shs1Update(HASH *state, USB8 *buffer, USB32 count) memcpy((char *)dig->data + datalen, (char *)buffer, cpylen); /* - * Process data in SHS1_CHUNKSIZE chunks + * Process data in SHA1_CHUNKSIZE chunks */ for (;;) { #if CALC_BYTE_ORDER == LITTLE_ENDIAN if (state->bytes) { - for (i=0; i < SHS1_CHUNKWORDS; ++i) { + for (i=0; i < SHA1_CHUNKWORDS; ++i) { SWAP_B8_IN_B32(dig->data+i, dig->data+i); } } #endif - shs1Transform(dig->digest, dig->data); + sha1Transform(dig->digest, dig->data); buffer += cpylen; count -= cpylen; - if (count < SHS1_CHUNKSIZE) + if (count < SHA1_CHUNKSIZE) break; - cpylen = SHS1_CHUNKSIZE; + cpylen = SHA1_CHUNKSIZE; memcpy(dig->data, buffer, cpylen); } @@ -316,10 +316,10 @@ shs1Update(HASH *state, USB8 *buffer, USB32 count) /* - * shs1Final - perform final SHS1 transforms + * sha1Final - perform final SHA1 transforms * * At this point we have less than a full chunk of data remaining - * (and possibly no data) in the shs1 state data buffer. + * (and possibly no data) in the sha1 state data buffer. * * First we append a final 0x80 byte. * @@ -333,9 +333,9 @@ shs1Update(HASH *state, USB8 *buffer, USB32 count) */ void -shs1Final(HASH *state) +sha1Final(HASH *state) { - SHS1_INFO *dig = &state->h_union.h_shs1; /* digest state */ + SHA1_INFO *dig = &state->h_union.h_sha1; /* digest state */ long count = (long)(dig->datalen); USB32 lowBitcount; USB32 highBitcount; @@ -346,7 +346,7 @@ shs1Final(HASH *state) /* Pad to end of chunk */ - memset(data + count, 0, SHS1_CHUNKSIZE - count); + memset(data + count, 0, SHA1_CHUNKSIZE - count); /* * If processing bytes, set the first byte of padding to 0x80. @@ -356,17 +356,17 @@ shs1Final(HASH *state) * This is safe since there is always at least one byte or word free */ - memset(data + count, 0, SHS1_CHUNKSIZE - count); + memset(data + count, 0, SHA1_CHUNKSIZE - count); #if CALC_BYTE_ORDER == LITTLE_ENDIAN if (state->bytes) { data[count] = 0x80; - for (i=0; i < SHS1_CHUNKWORDS; ++i) { + for (i=0; i < SHA1_CHUNKWORDS; ++i) { SWAP_B8_IN_B32(dig->data+i, dig->data+i); } } else { if (count % 4) { - math_error("This should not happen in shs1Final"); + math_error("This should not happen in sha1Final"); /*NOTREACHED*/ } data[count + 3] = 0x80; @@ -375,11 +375,11 @@ shs1Final(HASH *state) data[count] = 0x80; #endif - if (count >= SHS1_CHUNKSIZE-8) { - shs1Transform(dig->digest, dig->data); + if (count >= SHA1_CHUNKSIZE-8) { + sha1Transform(dig->digest, dig->data); /* Now load another chunk with 56 bytes of padding */ - memset(data, 0, SHS1_CHUNKSIZE-8); + memset(data, 0, SHA1_CHUNKSIZE-8); } /* @@ -390,15 +390,15 @@ shs1Final(HASH *state) */ highBitcount = dig->countHi; lowBitcount = dig->countLo; - dig->data[SHS1_HIGH] = (highBitcount << 3) | (lowBitcount >> 29); - dig->data[SHS1_LOW] = (lowBitcount << 3); - shs1Transform(dig->digest, dig->data); + dig->data[SHA1_HIGH] = (highBitcount << 3) | (lowBitcount >> 29); + dig->data[SHA1_LOW] = (lowBitcount << 3); + sha1Transform(dig->digest, dig->data); dig->datalen = 0; } /* - * shs1_chkpt - checkpoint a SHS1 state + * sha1_chkpt - checkpoint a SHA1 state * * given: * state the state to checkpoint @@ -407,9 +407,9 @@ shs1Final(HASH *state) * Any partially hashed data will be padded out with 0's and hashed. */ S_FUNC void -shs1_chkpt(HASH *state) +sha1_chkpt(HASH *state) { - SHS1_INFO *dig = &state->h_union.h_shs1; /* digest state */ + SHA1_INFO *dig = &state->h_union.h_sha1; /* digest state */ #if CALC_BYTE_ORDER == LITTLE_ENDIAN unsigned int i; #endif @@ -421,17 +421,17 @@ shs1_chkpt(HASH *state) /* pad to the end of the chunk */ memset((USB8 *)dig->data + dig->datalen, 0, - SHS1_CHUNKSIZE-dig->datalen); + SHA1_CHUNKSIZE-dig->datalen); #if CALC_BYTE_ORDER == LITTLE_ENDIAN if (state->bytes) { - for (i=0; i < SHS1_CHUNKWORDS; ++i) { + for (i=0; i < SHA1_CHUNKWORDS; ++i) { SWAP_B8_IN_B32(dig->data+i, dig->data+i); } } #endif /* transform padded chunk */ - shs1Transform(dig->digest, dig->data); - SHS1COUNT(dig, SHS1_CHUNKSIZE-dig->datalen); + sha1Transform(dig->digest, dig->data); + SHA1COUNT(dig, SHA1_CHUNKSIZE-dig->datalen); /* empty buffer */ dig->datalen = 0; @@ -441,27 +441,27 @@ shs1_chkpt(HASH *state) /* - * shs1_note - note a special value + * sha1_note - note a special value * * given: * state the state to hash - * special a special value (SHS1_HASH_XYZ) to note + * special a special value (SHA1_HASH_XYZ) to note * * This function will note that a special value is about to be hashed. * Types include negative values, complex values, division, zero numeric * and array of HALFs. */ S_FUNC void -shs1_note(int special, HASH *state) +sha1_note(int special, HASH *state) { - SHS1_INFO *dig = &state->h_union.h_shs1; /* digest state */ + SHA1_INFO *dig = &state->h_union.h_sha1; /* digest state */ unsigned int i; /* * change state to reflect a special value */ dig->digest[0] ^= special; - for (i=1; i < SHS1_DIGESTWORDS; ++i) { + for (i=1; i < SHA1_DIGESTWORDS; ++i) { dig->digest[i] ^= (special + dig->digest[i-1] + i); } return; @@ -469,7 +469,7 @@ shs1_note(int special, HASH *state) /* - * shs1_type - note a VALUE type + * sha1_type - note a VALUE type * * given: * state the state to hash @@ -478,14 +478,14 @@ shs1_note(int special, HASH *state) * This function will note that a type of value is about to be hashed. * The type of a VALUE will be noted. For purposes of hash comparison, * we will do nothing with V_NUM and V_COM so that the other functions - * can hash to the same value regardless of if shs1_value() is called + * can hash to the same value regardless of if sha1_value() is called * or not. We also do nothing with V_STR so that a hash of a string * will produce the same value as the standard hash function. */ S_FUNC void -shs1_type(int type, HASH *state) +sha1_type(int type, HASH *state) { - SHS1_INFO *dig = &state->h_union.h_shs1; /* digest state */ + SHA1_INFO *dig = &state->h_union.h_sha1; /* digest state */ unsigned int i; /* @@ -499,7 +499,7 @@ shs1_type(int type, HASH *state) * change state to reflect a VALUE type */ dig->digest[0] += type; - for (i=1; i < SHS1_DIGESTWORDS; ++i) { + for (i=1; i < SHA1_DIGESTWORDS; ++i) { dig->digest[i] += ((type+i) ^ dig->digest[i-1]); } return; @@ -507,41 +507,41 @@ shs1_type(int type, HASH *state) /* - * shs1_init_state - initialize a hash state structure for this hash + * sha1_init_state - initialize a hash state structure for this hash * * given: * state - pointer to the hfunction element to initialize */ void -shs1_init_state(HASH *state) +sha1_init_state(HASH *state) { /* * initalize state */ - state->hashtype = SHS1_HASH_TYPE; + state->hashtype = SHA1_HASH_TYPE; state->bytes = TRUE; - state->update = shs1Update; - state->chkpt = shs1_chkpt; - state->note = shs1_note; - state->type = shs1_type; - state->final = shs1_final_state; - state->cmp = shs1_cmp; - state->print = shs1_print; - state->base = SHS1_BASE; - state->chunksize = SHS1_CHUNKSIZE; - state->unionsize = sizeof(SHS1_INFO); + state->update = sha1Update; + state->chkpt = sha1_chkpt; + state->note = sha1_note; + state->type = sha1_type; + state->final = sha1_final_state; + state->cmp = sha1_cmp; + state->print = sha1_print; + state->base = SHA1_BASE; + state->chunksize = SHA1_CHUNKSIZE; + state->unionsize = sizeof(SHA1_INFO); /* * perform the internal init function */ - memset((void *)&(state->h_union.h_shs), 0, sizeof(SHS1_INFO)); - shs1Init(state); + memset((void *)&(state->h_union.h_sha1), 0, sizeof(SHA1_INFO)); + sha1Init(state); return; } /* - * shs1_final_state - complete hash state and return a ZVALUE + * sha1_final_state - complete hash state and return a ZVALUE * * given: * state the state to complete and convert @@ -550,9 +550,9 @@ shs1_init_state(HASH *state) * a ZVALUE representing the state */ S_FUNC ZVALUE -shs1_final_state(HASH *state) +sha1_final_state(HASH *state) { - SHS1_INFO *dig = &state->h_union.h_shs1; /* digest state */ + SHA1_INFO *dig = &state->h_union.h_sha1; /* digest state */ ZVALUE ret; /* return ZVALUE of completed hash state */ int i; @@ -565,18 +565,18 @@ shs1_final_state(HASH *state) math_error("cannot malloc HASH"); /*NOTREACHED*/ } - shs1_init_state(state); + sha1_init_state(state); } /* * complete the hash state */ - shs1Final(state); + sha1Final(state); /* * allocate storage for ZVALUE */ - ret.len = SHS1_DIGESTSIZE/sizeof(HALF); + ret.len = SHA1_DIGESTSIZE/sizeof(HALF); ret.sign = 0; ret.v = alloc(ret.len); @@ -603,7 +603,7 @@ shs1_final_state(HASH *state) /* - * shs1_cmp - compare two hash states + * sha1_cmp - compare two hash states * * given: * a first hash state @@ -614,7 +614,7 @@ shs1_final_state(HASH *state) * FALSE => hash states are the same */ S_FUNC int -shs1_cmp(HASH *a, HASH *b) +sha1_cmp(HASH *a, HASH *b) { /* * firewall and quick check @@ -637,8 +637,8 @@ shs1_cmp(HASH *a, HASH *b) /* * compare bit counts */ - if (a->h_union.h_shs.countLo != b->h_union.h_shs.countLo || - a->h_union.h_shs.countHi != b->h_union.h_shs.countHi) { + if (a->h_union.h_sha1.countLo != b->h_union.h_sha1.countLo || + a->h_union.h_sha1.countHi != b->h_union.h_sha1.countHi) { /* counts differ */ return TRUE; } @@ -646,13 +646,13 @@ shs1_cmp(HASH *a, HASH *b) /* * compare pending buffers */ - if (a->h_union.h_shs.datalen != b->h_union.h_shs.datalen) { + if (a->h_union.h_sha1.datalen != b->h_union.h_sha1.datalen) { /* buffer lengths differ */ return TRUE; } - if (memcmp((USB8*)a->h_union.h_shs.data, - (USB8*)b->h_union.h_shs.data, - a->h_union.h_shs.datalen) != 0) { + if (memcmp((USB8*)a->h_union.h_sha1.data, + (USB8*)b->h_union.h_sha1.data, + a->h_union.h_sha1.datalen) != 0) { /* buffer contents differ */ return TRUE; } @@ -660,20 +660,20 @@ shs1_cmp(HASH *a, HASH *b) /* * compare digest */ - return (memcmp((USB8*)(a->h_union.h_shs.digest), - (USB8*)(b->h_union.h_shs.digest), - SHS1_DIGESTSIZE) != 0); + return (memcmp((USB8*)(a->h_union.h_sha1.digest), + (USB8*)(b->h_union.h_sha1.digest), + SHA1_DIGESTSIZE) != 0); } /* - * shs1_print - print a hash state + * sha1_print - print a hash state * * given: * state the hash state to print */ S_FUNC void -shs1_print(HASH *state) +sha1_print(HASH *state) { /* * form the hash value @@ -690,12 +690,12 @@ shs1_print(HASH *state) */ sprintf(buf, "sha1: 0x%08x%08x%08x%08x%08x data: %d octets", - (int)state->h_union.h_shs1.digest[0], - (int)state->h_union.h_shs1.digest[1], - (int)state->h_union.h_shs1.digest[2], - (int)state->h_union.h_shs1.digest[3], - (int)state->h_union.h_shs1.digest[4], - (int)state->h_union.h_shs1.datalen); + (int)state->h_union.h_sha1.digest[0], + (int)state->h_union.h_sha1.digest[1], + (int)state->h_union.h_sha1.digest[2], + (int)state->h_union.h_sha1.digest[3], + (int)state->h_union.h_sha1.digest[4], + (int)state->h_union.h_sha1.datalen); math_str(buf); } else { math_str("sha1 hash state"); diff --git a/shs1.h b/sha1.h similarity index 52% rename from shs1.h rename to sha1.h index 907caa7..08b3835 100644 --- a/shs1.h +++ b/sha1.h @@ -1,5 +1,5 @@ /* - * shs1 - new NIST Secure Hash Standard-1 (SHS1) + * sha1 - new NIST Secure Hash Standard-1 (SHA1) * * Written 2 September 1992, Peter C. Gutmann. * @@ -22,58 +22,58 @@ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#) $Revision: 29.2 $ - * @(#) $Id: shs1.h,v 29.2 2000/06/07 14:02:13 chongo Exp $ - * @(#) $Source: /usr/local/src/cmd/calc/RCS/shs1.h,v $ + * @(#) $Revision: 30.3 $ + * @(#) $Id: sha1.h,v 30.3 2007/07/05 17:37:41 chongo Exp $ + * @(#) $Source: /usr/local/src/cmd/calc/RCS/sha1.h,v $ * * This file is not covered under version 2.1 of the GNU LGPL. */ -#if !defined(__SHS1_H__) -#define __SHS1_H__ +#if !defined(__SHA1_H__) +#define __SHA1_H__ -/* SHS1_CHUNKSIZE must be a power of 2 - fixed value defined by the algorithm */ -#define SHS1_CHUNKSIZE (1<<6) -#define SHS1_CHUNKWORDS (SHS1_CHUNKSIZE/sizeof(USB32)) +/* SHA1_CHUNKSIZE must be a power of 2 - fixed value defined by the algorithm */ +#define SHA1_CHUNKSIZE (1<<6) +#define SHA1_CHUNKWORDS (SHA1_CHUNKSIZE/sizeof(USB32)) -/* SHS1_DIGESTSIZE is a the length of the digest as defined by the algorithm */ -#define SHS1_DIGESTSIZE (20) -#define SHS1_DIGESTWORDS (SHS1_DIGESTSIZE/sizeof(USB32)) +/* SHA1_DIGESTSIZE is a the length of the digest as defined by the algorithm */ +#define SHA1_DIGESTSIZE (20) +#define SHA1_DIGESTWORDS (SHA1_DIGESTSIZE/sizeof(USB32)) -/* SHS1_LOW - where low 32 bits of 64 bit count is stored during final */ -#define SHS1_LOW 15 +/* SHA1_LOW - where low 32 bits of 64 bit count is stored during final */ +#define SHA1_LOW 15 -/* SHS1_HIGH - where high 32 bits of 64 bit count is stored during final */ -#define SHS1_HIGH 14 +/* SHA1_HIGH - where high 32 bits of 64 bit count is stored during final */ +#define SHA1_HIGH 14 /* - * The structure for storing SHS1 info + * The structure for storing SHA1 info * * We will assume that bit count is a multiple of 8. */ typedef struct { - USB32 digest[SHS1_DIGESTWORDS]; /* message digest */ + USB32 digest[SHA1_DIGESTWORDS]; /* message digest */ USB32 countLo; /* 64 bit count: bits 3-34 */ USB32 countHi; /* 64 bit count: bits 35-63 */ USB32 datalen; /* length of data in data */ - USB32 data[SHS1_CHUNKWORDS]; /* SHS1 chunk buffer */ -} SHS1_INFO; + USB32 data[SHA1_CHUNKWORDS]; /* SHA1 chunk buffer */ +} SHA1_INFO; /* - * SHS1COUNT(SHS1_INFO*, USB32) - update the 64 bit count in an SHS1_INFO + * SHA1COUNT(SHA1_INFO*, USB32) - update the 64 bit count in an SHA1_INFO * * We will count bytes and convert to bit count during the final * transform. */ -#define SHS1COUNT(shs1info, count) { \ +#define SHA1COUNT(sha1info, count) { \ USB32 tmp_countLo; \ - tmp_countLo = (shs1info)->countLo; \ - if (((shs1info)->countLo += (count)) < tmp_countLo) { \ - (shs1info)->countHi++; \ + tmp_countLo = (sha1info)->countLo; \ + if (((sha1info)->countLo += (count)) < tmp_countLo) { \ + (sha1info)->countHi++; \ } \ } -#endif /* !__SHS1_H__ */ +#endif /* !__SHA1_H__ */ diff --git a/shs.c b/shs.c deleted file mode 100644 index 55a8708..0000000 --- a/shs.c +++ /dev/null @@ -1,727 +0,0 @@ -/* - * shs - old Secure Hash Standard - * - ************************************************************************** - * This version implements the old Secure Hash Algorithm specified by * - * (FIPS Pub 180). This version is kept for backward compatibility with * - * shs version 2.10.1. See the shs utility for the new standard. * - ************************************************************************** - * - * Written 2 September 1992, Peter C. Gutmann. - * - * This file was Modified/Re-written by: - * - * Landon Curt Noll - * http://www.isthe.com/chongo/ - * - * chongo /\../\ - * - * This code has been placed in the public domain. Please do not - * copyright this code. - * - * LANDON CURT NOLL DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MER- - * CHANTABILITY AND FITNESS. IN NO EVENT SHALL LANDON CURT - * NOLL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF - * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Based on Version 2.11 (09 Mar 1995) from Landon Curt Noll's - * (http://www.isthe.com/chongo/) shs hash program. - * - * @(#) $Revision: 29.4 $ - * @(#) $Id: shs.c,v 29.4 2007/02/11 10:19:14 chongo Exp $ - * @(#) $Source: /usr/local/src/cmd/calc/RCS/shs.c,v $ - * - * This file is not covered under version 2.1 of the GNU LGPL. - * - **** - * - * The SHS algorithm hashes 32 bit unsigned values, 16 at a time. - * It further specifies that strings are to be converted into - * 32 bit values in BIG ENDIAN order. That is on little endian - * machines, strings are byte swapped into BIG ENDIAN order before - * they are taken 32 bit at a time. Even so, when hashing 32 bit - * numeric values the byte order DOES NOT MATTER because the - * algorithm works off of their numeric value, not their byte order. - * - * In calc, we want to hash equal values to the same hash value. - * For the most part, we will be hashing arrays of HALF's instead - * of strings. For this reason, the functions below do not byte - * swap on little endian machines automatically. Instead it is - * the responsibility of the caller of the internal SHS function - * to ensure that the values are already in the canonical 32 bit - * numeric value form. - */ - -#include -#include "longbits.h" -#include "align32.h" -#include "endian_calc.h" -#include "value.h" -#include "hash.h" -#include "shs.h" - - -/* - * The SHS f()-functions. The f1 and f3 functions can be optimized - * to save one boolean operation each - thanks to Rich Schroeppel, - * rcs@cs.arizona.edu for discovering this. - * - * f1: ((x&y) | (~x&z)) == (z ^ (x&(y^z))) - * f3: ((x&y) | (x&z) | (y&z)) == ((x&y) | (z&(x|y))) - */ -#define f1(x,y,z) (z ^ (x&(y^z))) /* Rounds 0-19 */ -#define f2(x,y,z) (x^y^z) /* Rounds 20-39 */ -#define f3(x,y,z) ((x&y) | (z&(x|y))) /* Rounds 40-59 */ -#define f4(x,y,z) (x^y^z) /* Rounds 60-79 */ - -/* The SHS Mysterious Constants */ -#define K1 0x5A827999L /* Rounds 0-19 */ -#define K2 0x6ED9EBA1L /* Rounds 20-39 */ -#define K3 0x8F1BBCDCL /* Rounds 40-59 */ -#define K4 0xCA62C1D6L /* Rounds 60-79 */ - -/* SHS initial values */ -#define h0init 0x67452301L -#define h1init 0xEFCDAB89L -#define h2init 0x98BADCFEL -#define h3init 0x10325476L -#define h4init 0xC3D2E1F0L - -/* 32-bit rotate left - kludged with shifts */ -#define LEFT_ROT(X,n) (((X)<<(n)) | ((X)>>(32-(n)))) - -/* - * The initial expanding function. The hash function is defined over an - * 80-word expanded input array W, where the first 16 are copies of the input - * data, and the remaining 64 are defined by - * - * W[i] = W[i-16] ^ W[i-14] ^ W[i-8] ^ W[i-3] - * - * This implementation generates these values on the fly in a circular - * buffer - thanks to Colin Plumb (colin@nyx10.cs.du.edu) for this - * optimization. - */ -#define exor(W,i) (W[i&15] ^= (W[(i-14)&15] ^ W[(i-8)&15] ^ W[(i-3)&15])) - -/* - * The prototype SHS sub-round. The fundamental sub-round is: - * - * a' = e + LEFT_ROT(a,5) + f(b,c,d) + k + data; - * b' = a; - * c' = LEFT_ROT(b,30); - * d' = c; - * e' = d; - * - * but this is implemented by unrolling the loop 5 times and renaming the - * variables ( e, a, b, c, d ) = ( a', b', c', d', e' ) each iteration. - * This code is then replicated 20 times for each of the 4 functions, using - * the next 20 values from the W[] array each time. - */ -#define subRound(a, b, c, d, e, f, k, data) \ - (e += LEFT_ROT(a,5) + f(b,c,d) + k + data, b = LEFT_ROT(b,30)) - - -/* - * forward declarations - */ -S_FUNC void shsInit(HASH*); -S_FUNC void shsTransform(USB32*, USB32*); -S_FUNC void shsUpdate(HASH*, USB8*, USB32); -S_FUNC void shsFinal(HASH*); -S_FUNC void shs_chkpt(HASH*); -S_FUNC void shs_note(int, HASH*); -S_FUNC void shs_type(int, HASH*); -void shs_init_state(HASH*); -S_FUNC ZVALUE shs_final_state(HASH*); -S_FUNC int shs_cmp(HASH*, HASH*); -S_FUNC void shs_print(HASH*); - - -/* - * shsInit - initialize the SHS state - */ -S_FUNC void -shsInit(HASH *state) -{ - SHS_INFO *dig = &state->h_union.h_shs; /* digest state */ - - /* Set the h-vars to their initial values */ - dig->digest[0] = h0init; - dig->digest[1] = h1init; - dig->digest[2] = h2init; - dig->digest[3] = h3init; - dig->digest[4] = h4init; - - /* Initialise bit count */ - dig->countLo = 0; - dig->countHi = 0; - dig->datalen = 0; -} - - -/* - * shsTransform - perform the SHS transformatio - * - * Note that this code, like MD5, seems to break some optimizing compilers. - * It may be necessary to split it into sections, eg based on the four - * subrounds. One may also want to roll each subround into a loop. - */ -S_FUNC void -shsTransform(USB32 *digest, USB32 *W) -{ - USB32 A, B, C, D, E; /* Local vars */ - - /* Set up first buffer and local data buffer */ - A = digest[0]; - B = digest[1]; - C = digest[2]; - D = digest[3]; - E = digest[4]; - - /* Heavy mangling, in 4 sub-rounds of 20 interations each. */ - subRound(A, B, C, D, E, f1, K1, W[ 0]); - subRound(E, A, B, C, D, f1, K1, W[ 1]); - subRound(D, E, A, B, C, f1, K1, W[ 2]); - subRound(C, D, E, A, B, f1, K1, W[ 3]); - subRound(B, C, D, E, A, f1, K1, W[ 4]); - subRound(A, B, C, D, E, f1, K1, W[ 5]); - subRound(E, A, B, C, D, f1, K1, W[ 6]); - subRound(D, E, A, B, C, f1, K1, W[ 7]); - subRound(C, D, E, A, B, f1, K1, W[ 8]); - subRound(B, C, D, E, A, f1, K1, W[ 9]); - subRound(A, B, C, D, E, f1, K1, W[10]); - subRound(E, A, B, C, D, f1, K1, W[11]); - subRound(D, E, A, B, C, f1, K1, W[12]); - subRound(C, D, E, A, B, f1, K1, W[13]); - subRound(B, C, D, E, A, f1, K1, W[14]); - subRound(A, B, C, D, E, f1, K1, W[15]); - subRound(E, A, B, C, D, f1, K1, exor(W,16)); - subRound(D, E, A, B, C, f1, K1, exor(W,17)); - subRound(C, D, E, A, B, f1, K1, exor(W,18)); - subRound(B, C, D, E, A, f1, K1, exor(W,19)); - - subRound(A, B, C, D, E, f2, K2, exor(W,20)); - subRound(E, A, B, C, D, f2, K2, exor(W,21)); - subRound(D, E, A, B, C, f2, K2, exor(W,22)); - subRound(C, D, E, A, B, f2, K2, exor(W,23)); - subRound(B, C, D, E, A, f2, K2, exor(W,24)); - subRound(A, B, C, D, E, f2, K2, exor(W,25)); - subRound(E, A, B, C, D, f2, K2, exor(W,26)); - subRound(D, E, A, B, C, f2, K2, exor(W,27)); - subRound(C, D, E, A, B, f2, K2, exor(W,28)); - subRound(B, C, D, E, A, f2, K2, exor(W,29)); - subRound(A, B, C, D, E, f2, K2, exor(W,30)); - subRound(E, A, B, C, D, f2, K2, exor(W,31)); - subRound(D, E, A, B, C, f2, K2, exor(W,32)); - subRound(C, D, E, A, B, f2, K2, exor(W,33)); - subRound(B, C, D, E, A, f2, K2, exor(W,34)); - subRound(A, B, C, D, E, f2, K2, exor(W,35)); - subRound(E, A, B, C, D, f2, K2, exor(W,36)); - subRound(D, E, A, B, C, f2, K2, exor(W,37)); - subRound(C, D, E, A, B, f2, K2, exor(W,38)); - subRound(B, C, D, E, A, f2, K2, exor(W,39)); - - subRound(A, B, C, D, E, f3, K3, exor(W,40)); - subRound(E, A, B, C, D, f3, K3, exor(W,41)); - subRound(D, E, A, B, C, f3, K3, exor(W,42)); - subRound(C, D, E, A, B, f3, K3, exor(W,43)); - subRound(B, C, D, E, A, f3, K3, exor(W,44)); - subRound(A, B, C, D, E, f3, K3, exor(W,45)); - subRound(E, A, B, C, D, f3, K3, exor(W,46)); - subRound(D, E, A, B, C, f3, K3, exor(W,47)); - subRound(C, D, E, A, B, f3, K3, exor(W,48)); - subRound(B, C, D, E, A, f3, K3, exor(W,49)); - subRound(A, B, C, D, E, f3, K3, exor(W,50)); - subRound(E, A, B, C, D, f3, K3, exor(W,51)); - subRound(D, E, A, B, C, f3, K3, exor(W,52)); - subRound(C, D, E, A, B, f3, K3, exor(W,53)); - subRound(B, C, D, E, A, f3, K3, exor(W,54)); - subRound(A, B, C, D, E, f3, K3, exor(W,55)); - subRound(E, A, B, C, D, f3, K3, exor(W,56)); - subRound(D, E, A, B, C, f3, K3, exor(W,57)); - subRound(C, D, E, A, B, f3, K3, exor(W,58)); - subRound(B, C, D, E, A, f3, K3, exor(W,59)); - - subRound(A, B, C, D, E, f4, K4, exor(W,60)); - subRound(E, A, B, C, D, f4, K4, exor(W,61)); - subRound(D, E, A, B, C, f4, K4, exor(W,62)); - subRound(C, D, E, A, B, f4, K4, exor(W,63)); - subRound(B, C, D, E, A, f4, K4, exor(W,64)); - subRound(A, B, C, D, E, f4, K4, exor(W,65)); - subRound(E, A, B, C, D, f4, K4, exor(W,66)); - subRound(D, E, A, B, C, f4, K4, exor(W,67)); - subRound(C, D, E, A, B, f4, K4, exor(W,68)); - subRound(B, C, D, E, A, f4, K4, exor(W,69)); - subRound(A, B, C, D, E, f4, K4, exor(W,70)); - subRound(E, A, B, C, D, f4, K4, exor(W,71)); - subRound(D, E, A, B, C, f4, K4, exor(W,72)); - subRound(C, D, E, A, B, f4, K4, exor(W,73)); - subRound(B, C, D, E, A, f4, K4, exor(W,74)); - subRound(A, B, C, D, E, f4, K4, exor(W,75)); - subRound(E, A, B, C, D, f4, K4, exor(W,76)); - subRound(D, E, A, B, C, f4, K4, exor(W,77)); - subRound(C, D, E, A, B, f4, K4, exor(W,78)); - subRound(B, C, D, E, A, f4, K4, exor(W,79)); - - /* Build message digest */ - digest[0] += A; - digest[1] += B; - digest[2] += C; - digest[3] += D; - digest[4] += E; -} - - -/* - * shsUpdate - update SHS with arbitrary length data - */ -S_FUNC void -shsUpdate(HASH *state, USB8 *buffer, USB32 count) -{ - SHS_INFO *dig = &state->h_union.h_shs; /* digest state */ - USB32 datalen = dig->datalen; - USB32 cpylen; -#if CALC_BYTE_ORDER == LITTLE_ENDIAN - unsigned int i; -#endif - - /* - * Update the full count, even if some of it is buffered for later - */ - SHSCOUNT(dig, count); - - - /* determine the size we need to copy */ - cpylen = SHS_CHUNKSIZE - datalen; - - /* case: new data will not fill the buffer */ - if (cpylen > count) { - memcpy((char *)dig->data + datalen, - (char *)buffer, count); - dig->datalen = datalen+count; - return; - } - - /* case: buffer will be filled */ - memcpy((char *)dig->data + datalen, (char *)buffer, cpylen); - - /* - * process data in SHS_CHUNKSIZE chunks - */ - for (;;) { - -#if CALC_BYTE_ORDER == LITTLE_ENDIAN - if (state->bytes) { - for (i=0; i < SHS_CHUNKWORDS; ++i) { - SWAP_B8_IN_B32(dig->data+i, dig->data+i); - } - } -#endif - shsTransform(dig->digest, dig->data); - buffer += cpylen; - count -= cpylen; - if (count < SHS_CHUNKSIZE) - break; - cpylen = SHS_CHUNKSIZE; - memcpy((char *) dig->data, (char *) buffer, cpylen); - } - - /* - * Handle any remaining bytes of data. - */ - if (count > 0) { - memcpy((char *)dig->data, (char *)buffer, count); - } - dig->datalen = count; -} - - -/* - * shsFinal - perform final SHS transforms - * - * At this point we have less than a full chunk of data remaining - * (and possibly no data) in the shs state data buffer. - * - * First we append a final 0x80 byte. - * - * Next if we have more than 56 bytes, we will zero fill the remainder - * of the chunk, transform and then zero fill the first 56 bytes. - * If we have 56 or fewer bytes, we will zero fill out to the 56th - * chunk byte. Regardless, we wind up with 56 bytes data. - * - * Finally we append the 64 bit length on to the 56 bytes of data - * remaining. This final chunk is transformed. - */ -S_FUNC void -shsFinal(HASH *state) -{ - SHS_INFO *dig = &state->h_union.h_shs; /* digest state */ - long count = (long)(dig->datalen); - USB32 lowBitcount; - USB32 highBitcount; - USB8 *data = (USB8 *) dig->data; -#if CALC_BYTE_ORDER == LITTLE_ENDIAN - unsigned int i; -#endif - - /* - * If processing bytes, set the first byte of padding to 0x80. - * if processing words: on a big-endian machine set the first - * byte of padding to 0x80, on a little-endian machine set - * the first four bytes to 0x00000080 - * This is safe since there is always at least one byte or word free - */ - - /* Pad to end of chunk */ - - memset(data + count, 0, SHS_CHUNKSIZE - count); - -#if CALC_BYTE_ORDER == LITTLE_ENDIAN - if (state->bytes) { - data[count] = 0x80; - for (i=0; i < SHS_CHUNKWORDS; ++i) { - SWAP_B8_IN_B32(dig->data+i, dig->data+i); - } - } else { - if (count % 4) { - math_error("This should not happen in shsFinal"); - /*NOTREACHED*/ - } - data[count + 3] = 0x80; - } -#else - data[count] = 0x80; -#endif - - if (count >= SHS_CHUNKSIZE-8) { - shsTransform(dig->digest, dig->data); - - /* Now fill another chunk with 56 bytes */ - memset(data, 0, SHS_CHUNKSIZE-8); - } - - /* - * Append length in bits and transform - * - * We assume that bit count is a multiple of 8 because we have - * only processed full bytes. - */ - highBitcount = dig->countHi; - lowBitcount = dig->countLo; - dig->data[SHS_HIGH] = (highBitcount << 3) | (lowBitcount >> 29); - dig->data[SHS_LOW] = (lowBitcount << 3); - shsTransform(dig->digest, dig->data); - dig->datalen = 0; -} - - -/* - * shs_chkpt - checkpoint a SHS state - * - * given: - * state the state to checkpoint - * - * This function will ensure that the the hash chunk buffer is empty. - * Any partially hashed data will be padded out with 0's and hashed. - */ -S_FUNC void -shs_chkpt(HASH *state) -{ - SHS_INFO *dig = &state->h_union.h_shs; /* digest state */ -#if CALC_BYTE_ORDER == LITTLE_ENDIAN - unsigned int i; -#endif - - /* - * checkpoint if partial buffer exists - */ - if (dig->datalen > 0) { - - /* pad to the end of the chunk */ - memset((USB8 *)dig->data + dig->datalen, 0, - SHS_CHUNKSIZE-dig->datalen); -#if CALC_BYTE_ORDER == LITTLE_ENDIAN - if (state->bytes) { - for (i=0; i < SHS_CHUNKWORDS; ++i) { - SWAP_B8_IN_B32(dig->data+i, dig->data+i); - } - } -#endif - - /* transform padded chunk */ - shsTransform(dig->digest, dig->data); - SHSCOUNT(dig, SHS_CHUNKSIZE-dig->datalen); - - /* empty buffer */ - dig->datalen = 0; - } - return; -} - - -/* - * shs_note - note a special value - * - * given: - * state the state to hash - * special a special value (SHS_HASH_XYZ) to note - * - * This function will note that a special value is about to be hashed. - * Types include negative values, complex values, division, zero numeric - * and array of HALFs. - */ -S_FUNC void -shs_note(int special, HASH *state) -{ - SHS_INFO *dig = &state->h_union.h_shs; /* digest state */ - unsigned int i; - - /* - * change state to reflect a special value - */ - dig->digest[0] ^= special; - for (i=1; i < SHS_DIGESTWORDS; ++i) { - dig->digest[i] ^= (special + dig->digest[i-1] + i); - } - return; -} - - -/* - * shs_type - note a VALUE type - * - * given: - * state the state to hash - * type the VALUE type to note - * - * This function will note that a type of value is about to be hashed. - * The type of a VALUE will be noted. For purposes of hash comparison, - * we will do nothing with V_NUM and V_COM so that the other functions - * can hash to the same value regardless of if shs_value() is called - * or not. We also do nothing with V_STR so that a hash of a string - * will produce the same value as the standard hash function. - */ -S_FUNC void -shs_type(int type, HASH *state) -{ - SHS_INFO *dig = &state->h_union.h_shs; /* digest state */ - unsigned int i; - - /* - * ignore NUMBER and COMPLEX - */ - if (type == V_NUM || type == V_COM || type == V_STR) { - return; - } - - /* - * change state to reflect a VALUE type - */ - dig->digest[0] += type; - for (i=1; i < SHS_DIGESTWORDS; ++i) { - dig->digest[i] += ((type+i) ^ dig->digest[i-1]); - } - return; -} - - -/* - * shs_init_state - initialize a hash state structure for this hash - * - * given: - * state - pointer to the hfunction element to initialize - */ -void -shs_init_state(HASH *state) -{ - /* - * initalize state - */ - state->hashtype = SHS_HASH_TYPE; - state->bytes = TRUE; - state->update = shsUpdate; - state->chkpt = shs_chkpt; - state->note = shs_note; - state->type = shs_type; - state->final = shs_final_state; - state->cmp = shs_cmp; - state->print = shs_print; - state->base = SHS_BASE; - state->chunksize = SHS_CHUNKSIZE; - state->unionsize = sizeof(SHS_INFO); - - /* - * perform the internal init function - */ - memset((void *)&(state->h_union.h_shs), 0, sizeof(SHS_INFO)); - shsInit(state); - return; -} - - -/* - * shs_final_state - complete hash state and return a ZVALUE - * - * given: - * state the state to complete and convert - * - * returns: - * a ZVALUE representing the state - */ -S_FUNC ZVALUE -shs_final_state(HASH *state) -{ - SHS_INFO *dig = &state->h_union.h_shs; /* digest state */ - ZVALUE ret; /* return ZVALUE of completed hash state */ - int i; - - /* - * malloc and initialize if state is NULL - */ - if (state == NULL) { - state = (HASH *)malloc(sizeof(HASH)); - if (state == NULL) { - math_error("cannot malloc HASH"); - /*NOTREACHED*/ - } - shs_init_state(state); - } - - /* - * complete the hash state - */ - shsFinal(state); - - /* - * allocate storage for ZVALUE - */ - ret.len = SHS_DIGESTSIZE/sizeof(HALF); - ret.sign = 0; - ret.v = alloc(ret.len); - - /* - * load ZVALUE - */ -#if BASEB == 16 && CALC_BYTE_ORDER == LITTLE_ENDIAN - for (i=0; i < ret.len; i+=2) { - ret.v[ret.len-i-1] = ((HALF*)dig->digest)[i+1]; - ret.v[ret.len-i-2] = ((HALF*)dig->digest)[i]; - } -#else - for (i=0; i < ret.len; ++i) { - ret.v[ret.len-i-1] = ((HALF*)dig->digest)[i]; - } -#endif - ztrim(&ret); - - /* - * return ZVALUE - */ - return ret; -} - - -/* - * shs_cmp - compare two hash states - * - * given: - * a first hash state - * b second hash state - * - * returns: - * TRUE => hash states are different - * FALSE => hash states are the same - */ -S_FUNC int -shs_cmp(HASH *a, HASH *b) -{ - /* - * firewall and quick check - */ - if (a == b) { - /* pointers to the same object */ - return FALSE; - } - if (a == NULL || b == NULL) { - /* one is NULL, so they differ */ - return TRUE; - } - - /* - * compare data-reading modes - */ - if (a->bytes != b->bytes) - return TRUE; - - /* - * compare bit counts - */ - if (a->h_union.h_shs.countLo != b->h_union.h_shs.countLo || - a->h_union.h_shs.countHi != b->h_union.h_shs.countHi) { - /* counts differ */ - return TRUE; - } - - /* - * compare pending buffers - */ - if (a->h_union.h_shs.datalen != b->h_union.h_shs.datalen) { - /* buffer lengths differ */ - return TRUE; - } - if (memcmp((USB8*)a->h_union.h_shs.data, - (USB8*)b->h_union.h_shs.data, - a->h_union.h_shs.datalen) != 0) { - /* buffer contents differ */ - return TRUE; - } - - /* - * compare digest - */ - return (memcmp((USB8*)(a->h_union.h_shs.digest), - (USB8*)(b->h_union.h_shs.digest), - SHS_DIGESTSIZE) != 0); -} - - -/* - * shs_print - print a hash state - * - * given: - * state the hash state to print - */ -S_FUNC void -shs_print(HASH *state) -{ - /* - * form the hash value - */ - if (conf->calc_debug & CALCDBG_HASH_STATE) { - char buf[DEBUG_SIZE+1]; /* hash value buffer */ - - /* - * print numeric debug value - * - * NOTE: This value represents only the hash value as of - * the last full update or finalization. Thus it - * may NOT be the actual hash value. - */ - sprintf(buf, - "sha: 0x%08x%08x%08x%08x%08x data: %d octets", - (int)state->h_union.h_shs.digest[0], - (int)state->h_union.h_shs.digest[1], - (int)state->h_union.h_shs.digest[2], - (int)state->h_union.h_shs.digest[3], - (int)state->h_union.h_shs.digest[4], - (int)state->h_union.h_shs.datalen); - math_str(buf); - } else { - math_str("sha hash state"); - } - return; -} diff --git a/shs.h b/shs.h deleted file mode 100644 index e9401bb..0000000 --- a/shs.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * shs - old Secure Hash Standard - * - ************************************************************************** - * This version implements the old Secure Hash Algorithm specified by * - * (FIPS Pub 180). This version is kept for backward compatibility with * - * shs version 2.10.1. See the shs utility for the new standard. * - ************************************************************************** - * - * Written 2 September 1992, Peter C. Gutmann. - * - * This file was Modified by: - * - * Landon Curt Noll - * http://www.isthe.com/chongo/ - * - * chongo /\../\ - * - * This code has been placed in the public domain. Please do not - * copyright this code. - * - * LANDON CURT NOLL DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MER- - * CHANTABILITY AND FITNESS. IN NO EVENT SHALL LANDON CURT - * NOLL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF - * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * @(#) $Revision: 29.2 $ - * @(#) $Id: shs.h,v 29.2 2000/06/07 14:02:13 chongo Exp $ - * @(#) $Source: /usr/local/src/cmd/calc/RCS/shs.h,v $ - * - * This file is not covered under version 2.1 of the GNU LGPL. - */ - - -#if !defined(__SHS_H__) -#define __SHS_H__ - - -/* SHS_CHUNKSIZE must be a power of 2 - fixed value defined by the algorithm */ -#define SHS_CHUNKSIZE (1<<6) -#define SHS_CHUNKWORDS (SHS_CHUNKSIZE/sizeof(USB32)) - -/* SHS_DIGESTSIZE is a the length of the digest as defined by the algorithm */ -#define SHS_DIGESTSIZE (20) -#define SHS_DIGESTWORDS (SHS_DIGESTSIZE/sizeof(USB32)) - -/* SHS_LOW - where low 32 bits of 64 bit count is stored during final */ -#define SHS_LOW 15 - -/* SHS_HIGH - where high 32 bits of 64 bit count is stored during final */ -#define SHS_HIGH 14 - -/* - * The structure for storing SHS info - * - * We will assume that bit count is a multiple of 8. - */ -typedef struct { - USB32 digest[SHS_DIGESTWORDS]; /* message digest */ - USB32 countLo; /* 64 bit count: bits 3-34 */ - USB32 countHi; /* 64 bit count: bits 35-63 */ - USB32 datalen; /* length of data in data */ - USB32 data[SHS_CHUNKWORDS]; /* SHS chunk buffer */ -} SHS_INFO; - -/* - * SHSCOUNT(SHS_INFO*, USB32) - update the 64 bit count in an SHS_INFO - * - * We will count bytes and convert to bit count during the final - * transform. This assumes that the count is < 2^32. - */ -#define SHSCOUNT(shsinfo, count) { \ - USB32 tmp_countLo; \ - tmp_countLo = (shsinfo)->countLo; \ - if (((shsinfo)->countLo += (count)) < tmp_countLo) { \ - (shsinfo)->countHi++; \ - } \ -} - - -#endif /* !__SHS_H__ */ diff --git a/size.c b/size.c index 1f9efcc..8385be5 100644 --- a/size.c +++ b/size.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: size.c,v 29.5 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: size.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/size.c,v $ * * Under source code control: 1997/03/10 01:56:51 diff --git a/str.c b/str.c index 995872f..e5ece96 100644 --- a/str.c +++ b/str.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.12 $ - * @(#) $Id: str.c,v 29.12 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: str.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/str.c,v $ * * Under source code control: 1990/02/15 01:48:10 diff --git a/str.h b/str.h index bc8e883..e3e2abf 100644 --- a/str.h +++ b/str.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.9 $ - * @(#) $Id: str.h,v 29.9 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: str.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/str.h,v $ * * Under source code control: 1990/02/15 01:48:36 diff --git a/symbol.c b/symbol.c index 4936279..ecdc8e7 100644 --- a/symbol.c +++ b/symbol.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.8 $ - * @(#) $Id: symbol.c,v 29.8 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: symbol.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/symbol.c,v $ * * Under source code control: 1990/02/15 01:48:23 diff --git a/symbol.h b/symbol.h index 4f9ffd3..881a525 100644 --- a/symbol.h +++ b/symbol.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.7 $ - * @(#) $Id: symbol.h,v 29.7 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: symbol.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/symbol.h,v $ * * Under source code control: 1990/02/15 01:48:37 diff --git a/token.c b/token.c index dc88cb0..de334fe 100644 --- a/token.c +++ b/token.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.12 $ - * @(#) $Id: token.c,v 29.12 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: token.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/token.c,v $ * * Under source code control: 1990/02/15 01:48:25 diff --git a/token.h b/token.h index 9d627c0..251d70f 100644 --- a/token.h +++ b/token.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.6 $ - * @(#) $Id: token.h,v 29.6 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: token.h,v 30.2 2007/07/05 13:30:38 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/token.h,v $ * * Under source code control: 1990/02/15 01:48:37 @@ -175,8 +175,8 @@ E_FUNC void inittokens(void); E_FUNC int tokenmode(int flag); E_FUNC int gettoken(void); E_FUNC void rescantoken(void); -E_FUNC void scanerror(int, char *, ...); -E_FUNC void warning(char *, ...); +E_FUNC void scanerror(int, char *, ...) PRINTF_FORMAT(2, 3); +E_FUNC void warning(char *, ...) PRINTF_FORMAT(1, 2); #endif /* !__TOKEN_H__ */ diff --git a/value.c b/value.c index 3395bf1..9f7dcad 100644 --- a/value.c +++ b/value.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.12 $ - * @(#) $Id: value.c,v 29.12 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.3 $ + * @(#) $Id: value.c,v 30.3 2007/07/11 23:09:01 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/value.c,v $ * * Under source code control: 1990/02/15 01:48:25 @@ -1833,13 +1833,13 @@ scalevalue(VALUE *v1, VALUE *v2, VALUE *vres) /* - * Raise a value to an integral power. + * Raise a value to an power. * Result is placed in the indicated location. */ void -powivalue(VALUE *v1, VALUE *v2, VALUE *vres) +powvalue(VALUE *v1, VALUE *v2, VALUE *vres) { - NUMBER *q; + NUMBER *real_v2; /* real part of v2 */ COMPLEX *c; if (v1->v_type == V_OBJ || v2->v_type == V_OBJ) { @@ -1854,50 +1854,145 @@ powivalue(VALUE *v1, VALUE *v2, VALUE *vres) vres->v_type = v2->v_type; return; } - if (v2->v_type != V_NUM || qisfrac(v2->v_num)) { - *vres = error_value(E_POWI2); - return; - } - q = v2->v_num; - if (v1->v_type == -E_1OVER0) { - if (qisneg(q)) { - vres->v_type = V_NUM; - vres->v_num = qlink(&_qzero_); - } - return; - } - switch (v1->v_type) { + real_v2 = v2->v_num; + + /* case: raising to a real power */ + switch (v2->v_type) { case V_NUM: - if (qiszero(v1->v_num)) { - if (qisneg(q)) { - *vres = error_value(E_1OVER0); - return; + + /* deal with the division by 0 value */ + if (v1->v_type == -E_1OVER0) { + if (qisneg(real_v2)) { + vres->v_type = V_NUM; + vres->v_num = qlink(&_qzero_); + } else { + vres->v_type = -E_1OVER0; } + break; } - vres->v_num = qpowi(v1->v_num, q); - return; + + /* raise something with a real exponent */ + switch (v1->v_type) { + case V_NUM: + if (qiszero(v1->v_num)) { + if (qisneg(real_v2)) { + *vres = error_value(E_1OVER0); + break; + } + /* 0 ^ non-neg is zero, including 0^0 */ + vres->v_type = V_NUM; + vres->v_num = qlink(&_qzero_); + } else if (qisint(real_v2)) { + vres->v_num = qpowi(v1->v_num, real_v2); + } else { + vres->v_type = V_NUM; + vres->v_num = qlink(&_qzero_); + powervalue(v1, v2, NULL, vres); + } + break; + case V_COM: + if (qisint(real_v2)) { + vres->v_com = c_powi(v1->v_com, real_v2); + } else { + vres->v_type = V_NUM; + vres->v_num = qlink(&_qzero_); + powervalue(v1, v2, NULL, vres); + } + if (vres->v_type == V_COM) { + c = vres->v_com; + if (!cisreal(c)) + break; + vres->v_num = qlink(c->real); + vres->v_type = V_NUM; + comfree(c); + } + break; + case V_MAT: + vres->v_mat = matpowi(v1->v_mat, real_v2); + break; + default: + *vres = error_value(E_POWI); + break; + } + break; + case V_COM: - vres->v_com = c_powi(v1->v_com, q); - c = vres->v_com; - if (!cisreal(c)) - return; - vres->v_num = qlink(c->real); - vres->v_type = V_NUM; - comfree(c); - return; - case V_MAT: - vres->v_mat = matpowi(v1->v_mat, q); - return; + + /* deal with the division by 0 value */ + if (v1->v_type == -E_1OVER0) { + if (cisreal(v2->v_com) && qisneg(real_v2)) { + vres->v_type = V_NUM; + vres->v_num = qlink(&_qzero_); + } else { + vres->v_type = -E_1OVER0; + } + break; + } + + /* raise something with a real exponent */ + switch (v1->v_type) { + case V_NUM: + if (qiszero(v1->v_num)) { + if (cisreal(v2->v_com) && qisneg(real_v2)) { + *vres = error_value(E_1OVER0); + break; + } + /* 0 ^ real non-neg is zero, 0 ^ complex is zero */ + vres->v_type = V_NUM; + vres->v_num = qlink(&_qzero_); + } + if (cisreal(v2->v_com) && qisint(real_v2)) { + vres->v_num = qpowi(v1->v_num, real_v2); + } else { + vres->v_type = V_NUM; + vres->v_num = qlink(&_qzero_); + powervalue(v1, v2, NULL, vres); + } + if (vres->v_type == V_COM) { + c = vres->v_com; + if (!cisreal(c)) + break; + vres->v_num = qlink(c->real); + vres->v_type = V_NUM; + comfree(c); + } + break; + case V_COM: + if (cisreal(v2->v_com) && qisint(real_v2)) { + vres->v_com = c_powi(v1->v_com, real_v2); + } else { + vres->v_type = V_NUM; + vres->v_num = qlink(&_qzero_); + powervalue(v1, v2, NULL, vres); + } + if (vres->v_type == V_COM) { + c = vres->v_com; + if (!cisreal(c)) + break; + vres->v_num = qlink(c->real); + vres->v_type = V_NUM; + comfree(c); + } + break; + default: + *vres = error_value(E_POWI); + break; + } + break; + + /* unspported exponent type */ default: - *vres = error_value(E_POWI); - return; + *vres = error_value(E_POWI2); + break; } + return; } /* * Raise one value to another value's power, within the specified error. - * Result is placed in the indicated location. + * Result is placed in the indicated location. If v3 is NULL, the + * value conf->epsiilon is used. */ void powervalue(VALUE *v1, VALUE *v2, VALUE *v3, VALUE *vres) @@ -1919,11 +2014,21 @@ powervalue(VALUE *v1, VALUE *v2, VALUE *v3, VALUE *vres) return; } - if (v3->v_type != V_NUM || qiszero(v3->v_num)) { + /* NULL epsilon means use built-in epslion value */ + if (v3 == NULL) { + epsilon = conf->epsilon; + } else { + if (v3->v_type != V_NUM || qiszero(v3->v_num)) { + *vres = error_value(E_POWER3); + return; + } + epsilon = v3->v_num; + } + if (qiszero(epsilon)) { *vres = error_value(E_POWER3); return; } - epsilon = v3->v_num; + switch (TWOVAL(v1->v_type, v2->v_type)) { case TWOVAL(V_NUM, V_NUM): if (qisneg(v1->v_num)) { @@ -2836,7 +2941,7 @@ printestr(VALUE *vp) bp = vp->v_nblock->blk; } i = bp->datalen; - math_fmt("%d,%d)", i, bp->blkchunk); + math_fmt("%ld,%ld)", i, bp->blkchunk); cp = bp->data; if (i > 0) { math_str("={"); diff --git a/value.h b/value.h index 686e2ee..80c276b 100644 --- a/value.h +++ b/value.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.13 $ - * @(#) $Id: value.h,v 29.13 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.3 $ + * @(#) $Id: value.h,v 30.3 2007/07/10 21:18:08 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/value.h,v $ * * Under source code control: 1993/07/30 19:42:47 @@ -36,7 +36,7 @@ # include "decl.h" # include "cmath.h" # include "config.h" -# include "shs.h" +# include "sha1.h" # include "calcerr.h" # include "hash.h" # include "block.h" @@ -46,7 +46,7 @@ # include # include # include -# include +# include # include # include # include @@ -231,7 +231,7 @@ E_FUNC void absvalue(VALUE *v1, VALUE *v2, VALUE *vres); E_FUNC void normvalue(VALUE *vp, VALUE *vres); E_FUNC void shiftvalue(VALUE *v1, VALUE *v2, BOOL rightshift, VALUE *vres); E_FUNC void scalevalue(VALUE *v1, VALUE *v2, VALUE *vres); -E_FUNC void powivalue(VALUE *v1, VALUE *v2, VALUE *vres); +E_FUNC void powvalue(VALUE *v1, VALUE *v2, VALUE *vres); E_FUNC void powervalue(VALUE *v1, VALUE *v2, VALUE *v3, VALUE *vres); E_FUNC void divvalue(VALUE *v1, VALUE *v2, VALUE *vres); E_FUNC void quovalue(VALUE *v1, VALUE *v2, VALUE *v3, VALUE *vres); diff --git a/version.c b/version.c index 022d235..d3d035d 100644 --- a/version.c +++ b/version.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.82 $ - * @(#) $Id: version.c,v 29.82 2007/02/18 14:24:56 chongo Exp $ + * @(#) $Revision: 30.3 $ + * @(#) $Id: version.c,v 30.3 2007/07/15 02:09:35 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/version.c,v $ * * Under source code control: 1990/05/22 11:00:58 @@ -48,8 +48,8 @@ static char *program; #define MAJOR_VER 2 /* major library version */ #define MINOR_VER 12 /* minor library version */ -#define MAJOR_PATCH 1 /* major software level under library version */ -#define MINOR_PATCH 13 /* minor software level or 0 if none */ +#define MAJOR_PATCH 2 /* major software level under library version */ +#define MINOR_PATCH 0 /* minor software level or 0 if none */ /* @@ -89,7 +89,7 @@ char *Copyright = "\n" "A copy of version 2.1 of the GNU Lesser General Public License is\n" "distributed with calc under the filename COPYING-LGPL. You should have\n" "received a copy with calc; if not, write to Free Software Foundation, Inc.\n" - "59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.\n" + "51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n" "\n" "@(#) For license details use the command:\thelp copying\n" "The COPYING-LGPL file may be viewed with:\thelp copying-lgpl\n" diff --git a/win32/fposval.h b/win32/fposval.h index 1e6862a..cc6c041 100644 --- a/win32/fposval.h +++ b/win32/fposval.h @@ -10,18 +10,26 @@ /* what are our file position & size types? */ #undef FILEPOS_BITS #define FILEPOS_BITS 64 +#undef FILEPOS_LEN +#define FILEPOS_LEN 8 #define SWAP_HALF_IN_FILEPOS(dest, src) (*(dest) = *(src)) #undef OFF_T_BITS #define OFF_T_BITS 32 +#undef OFF_T_LEN +#define OFF_T_LEN 4 #define SWAP_HALF_IN_OFF_T(dest, src) (*(dest) = *(src)) #undef DEV_BITS #define DEV_BITS 32 +#undef DEV_LEN +#define DEV_LEN 4 #define SWAP_HALF_IN_DEV(dest, src) memcpy((void *)(dest), (void *)(src), 4) #undef INODE_BITS #define INODE_BITS 16 +#undef INODE_LEN +#define INODE_LEN 2 #define SWAP_HALF_IN_INODE(dest, src) memcpy((void *)(dest), (void *)(src), 2) diff --git a/zfunc.c b/zfunc.c index fb7793c..f863f54 100644 --- a/zfunc.c +++ b/zfunc.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.9 $ - * @(#) $Id: zfunc.c,v 29.9 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: zfunc.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/zfunc.c,v $ * * Under source code control: 1990/02/15 01:48:27 diff --git a/zio.c b/zio.c index 11607c3..f9ea0bb 100644 --- a/zio.c +++ b/zio.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.9 $ - * @(#) $Id: zio.c,v 29.9 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: zio.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/zio.c,v $ * * Under source code control: 1993/07/30 19:42:48 diff --git a/zmath.c b/zmath.c index c2b386b..83ed8d7 100644 --- a/zmath.c +++ b/zmath.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: zmath.c,v 29.4 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: zmath.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/zmath.c,v $ * * Under source code control: 1990/02/15 01:48:28 diff --git a/zmath.h b/zmath.h index 219f82d..8d00de3 100644 --- a/zmath.h +++ b/zmath.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.19 $ - * @(#) $Id: zmath.h,v 29.19 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.2 $ + * @(#) $Id: zmath.h,v 30.2 2007/07/05 13:30:38 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/zmath.h,v $ * * Under source code control: 1993/07/30 19:42:48 @@ -597,13 +597,13 @@ E_FUNC char *math_getdivertedio(void); E_FUNC int math_setmode(int mode); E_FUNC int math_setmode2(int mode); E_FUNC LEN math_setdigits(LEN digits); -E_FUNC void math_fmt(char *, ...); +E_FUNC void math_fmt(char *, ...) PRINTF_FORMAT(1, 2); /* * The error routine. */ -E_FUNC void math_error(char *, ...); +E_FUNC void math_error(char *, ...) PRINTF_FORMAT(1, 2); /* diff --git a/zmod.c b/zmod.c index 431c172..b428367 100644 --- a/zmod.c +++ b/zmod.c @@ -17,10 +17,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: zmod.c,v 29.5 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: zmod.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/zmod.c,v $ * * Under source code control: 1991/05/22 23:03:55 diff --git a/zmul.c b/zmul.c index 38065c5..9f06694 100644 --- a/zmul.c +++ b/zmul.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.3 $ - * @(#) $Id: zmul.c,v 29.3 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: zmul.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/zmul.c,v $ * * Under source code control: 1991/01/09 20:01:31 diff --git a/zprime.c b/zprime.c index 518346f..c1926af 100644 --- a/zprime.c +++ b/zprime.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.4 $ - * @(#) $Id: zprime.c,v 29.4 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: zprime.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/zprime.c,v $ * * Under source code control: 1994/05/29 04:34:36 diff --git a/zrand.c b/zrand.c index 9983e27..aa9675c 100644 --- a/zrand.c +++ b/zrand.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.10 $ - * @(#) $Id: zrand.c,v 29.10 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: zrand.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/zrand.c,v $ * * Under source code control: 1995/01/07 09:45:25 diff --git a/zrand.h b/zrand.h index c72ee98..0d1d863 100644 --- a/zrand.h +++ b/zrand.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.8 $ - * @(#) $Id: zrand.h,v 29.8 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: zrand.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/zrand.h,v $ * * Under source code control: 1995/01/07 09:45:26 diff --git a/zrandom.c b/zrandom.c index 2500d24..51c719b 100644 --- a/zrandom.c +++ b/zrandom.c @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.9 $ - * @(#) $Id: zrandom.c,v 29.9 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: zrandom.c,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/zrandom.c,v $ * * Under source code control: 1997/02/15 04:01:56 diff --git a/zrandom.h b/zrandom.h index a6f69b9..b89e9f9 100644 --- a/zrandom.h +++ b/zrandom.h @@ -15,10 +15,10 @@ * A copy of version 2.1 of the GNU Lesser General Public License is * distributed with calc under the filename COPYING-LGPL. You should have * received a copy with calc; if not, write to Free Software Foundation, Inc. - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * @(#) $Revision: 29.5 $ - * @(#) $Id: zrandom.h,v 29.5 2007/02/11 10:19:14 chongo Exp $ + * @(#) $Revision: 30.1 $ + * @(#) $Id: zrandom.h,v 30.1 2007/03/16 11:09:46 chongo Exp $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/zrandom.h,v $ * * Under source code control: 1997/02/15 04:01:56