Software Package:       
	calc

Release/Version:
	2.9.4

Retrieved from:
	Provided by chongo@prime.corp.sgi.com (Landon Curt Noll)

Bug reports:
	This software package is maintained by the software contributor,
	not BSDI.  Please send any bug reports to both support@BSDI.COM
	and the addresses listed in the BUGS file.

Comments:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Modifications to this version made by BSDI:

Add makefile to supply standard BSDI targets.

diff -r -c /tmp/f/calc.orig/Makefile calc/Makefile
*** /tmp/f/calc.orig/Makefile	Thu Dec  7 01:18:46 1995
--- calc/Makefile	Fri Dec  8 18:15:36 1995
***************
*** 161,169 ****
  
  # where to install binary files
  #
! BINDIR= /usr/local/bin
  #BINDIR= /usr/bin
! #BINDIR= /usr/contrib/bin
  
  # where to install the *.cal, *.h and *.a files
  #
--- 161,169 ----
  
  # where to install binary files
  #
! #BINDIR= /usr/local/bin
  #BINDIR= /usr/bin
! BINDIR= /usr/contrib/bin
  
  # where to install the *.cal, *.h and *.a files
  #
***************
*** 171,180 ****
  # ${LIBDIR} is where the *.cal, *.h, *.a, bindings and help dir are installed.
  # ${HELPDIR} is where the help directory is installed.
  #
! TOPDIR= /usr/local/lib
  #TOPDIR= /usr/lib
  #TOPDIR= /usr/libdata
! #TOPDIR= /usr/contrib/lib
  #
  LIBDIR= ${TOPDIR}/calc
  HELPDIR= ${LIBDIR}/help
--- 171,180 ----
  # ${LIBDIR} is where the *.cal, *.h, *.a, bindings and help dir are installed.
  # ${HELPDIR} is where the help directory is installed.
  #
! #TOPDIR= /usr/local/lib
  #TOPDIR= /usr/lib
  #TOPDIR= /usr/libdata
! TOPDIR= /usr/contrib/lib
  #
  LIBDIR= ${TOPDIR}/calc
  HELPDIR= ${LIBDIR}/help
***************
*** 183,206 ****
  #
  # 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=/usr/man/u_man/man1
! #MANDIR=/usr/contrib/man/man1
  
  # where cat (formatted man) pages are installed
  #
  # 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=/usr/man/u_man/cat1
! #CATDIR=/usr/contrib/man/cat1
  
  # extenstion to add on to the calc man page filename
  #
--- 183,206 ----
  #
  # 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=/usr/man/u_man/man1
! MANDIR=/usr/contrib/man/man1
  
  # where cat (formatted man) pages are installed
  #
  # 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=/usr/man/u_man/cat1
! CATDIR=/usr/contrib/man/cat1
  
  # extenstion to add on to the calc man page filename
  #
***************
*** 213,220 ****
  #
  # This is ignored if CATDIR is empty.
  #
! CATEXT= 1
! #CATEXT= 0
  #CATEXT= l
  
  # how to format a man page
--- 213,220 ----
  #
  # This is ignored if CATDIR is empty.
  #
! #CATEXT= 1
! CATEXT= 0
  #CATEXT= l
  
  # how to format a man page
***************
*** 269,276 ****
  
  # Compile/Debug options for ${CC}
  #
! DEBUG= -O
! #DEBUG= -O2
  #DEBUG= -O3
  #DEBUG= -g
  #DEBUG= -g -O
--- 269,276 ----
  
  # Compile/Debug options for ${CC}
  #
! #DEBUG= -O
! DEBUG= -O2
  #DEBUG= -O3
  #DEBUG= -g
  #DEBUG= -g -O
***************
*** 364,383 ****
  #
  # common cc set
  #
! #CCMAIN=
! #CCWARN=
! #CCOPT= ${DEBUG} ${NO_SHARED}
! #CCMISC=
  #
! #CFLAGS= ${CCWARN} ${CCOPT} ${CCMISC}
! #CNOWARN= ${CCOPT} ${CCMISC}
  ICFLAGS= ${CCWARN} ${CCMISC}
  #
! #LCFLAGS=
! #LDFLAGS= ${NO_SHARED}
! #ILDFLAGS=
  #
! #CC= ${PURIFY} cc
  #
  ###
  #
--- 364,383 ----
  #
  # common cc set
  #
! CCMAIN=
! CCWARN=
! CCOPT= ${DEBUG} ${NO_SHARED}
! CCMISC=
  #
! CFLAGS= ${CCWARN} ${CCOPT} ${CCMISC}
! CNOWARN= ${CCOPT} ${CCMISC}
  ICFLAGS= ${CCWARN} ${CCMISC}
  #
! LCFLAGS=
! LDFLAGS= ${NO_SHARED}
! ILDFLAGS=
  #
! CC= ${PURIFY} shlicc
  #
  ###
  #
***************
*** 554,573 ****
  # for better performance, set the following above:
  #     DEBUG= -O2
  #
! CCMAIN= -Wno-return-type
! CCWARN= -Wall -Wno-implicit -Wno-comment
! CCOPT= ${DEBUG} ${NO_SHARED}
! CCMISC= -ansi
  #
! CFLAGS= ${CCWARN} ${CCOPT} ${CCMISC}
! CNOWARN= ${CCOPT} ${CCMISC}
! ICFLAGS= ${CCWARN} ${CCMISC}
  #
! LCFLAGS=
! LDFLAGS= ${NO_SHARED}
! ILDFLAGS=
  #
! CC= ${PURIFY} gcc2
  #CC= ${PURIFY} gcc
  
  ##############################################################################
--- 554,573 ----
  # for better performance, set the following above:
  #     DEBUG= -O2
  #
! #CCMAIN= -Wno-return-type
! #CCWARN= -Wall -Wno-implicit -Wno-comment
! #CCOPT= ${DEBUG} ${NO_SHARED}
! #CCMISC= -ansi
  #
! #CFLAGS= ${CCWARN} ${CCOPT} ${CCMISC}
! #CNOWARN= ${CCOPT} ${CCMISC}
! #ICFLAGS= ${CCWARN} ${CCMISC}
  #
! #LCFLAGS=
! #LDFLAGS= ${NO_SHARED}
! #ILDFLAGS=
  #
! #CC= ${PURIFY} gcc2
  #CC= ${PURIFY} gcc
  
  ##############################################################################
***************
*** 1350,1356 ****
  lintclean:
  	-rm -f llib-lcalc.ln llib.out lint.out
  
! clean:
  	-rm -f ${LIBOBJS}
  	-rm -f ${CALCOBJS}
  	-rm -f ${UTIL_OBJS}
--- 1350,1356 ----
  lintclean:
  	-rm -f llib-lcalc.ln llib.out lint.out
  
! _clean:
  	-rm -f ${LIBOBJS}
  	-rm -f ${CALCOBJS}
  	-rm -f ${UTIL_OBJS}
***************
*** 1363,1369 ****
  	-rm -f endian.h stdarg.h libcalcerr.a lib/obj help/obj
  	-rm -f have_vs.c std_arg.h try_stdarg.c fnvhash.c
  
! clobber: lintclean
  	-rm -f ${LIBOBJS}
  	-rm -f ${CALCOBJS}
  	-rm -f ${UTIL_OBJS}
--- 1363,1369 ----
  	-rm -f endian.h stdarg.h libcalcerr.a lib/obj help/obj
  	-rm -f have_vs.c std_arg.h try_stdarg.c fnvhash.c
  
! clean clobber: lintclean
  	-rm -f ${LIBOBJS}
  	-rm -f ${CALCOBJS}
  	-rm -f ${UTIL_OBJS}
***************
*** 1445,1452 ****
  	    else \
  		echo "rm -f ${CATDIR}/calc.${CATEXT}"; \
  		rm -f ${CATDIR}/calc.${CATEXT}; \
! 		echo "${NROFF} -mandoc calc.1  > ${CATDIR}/calc.${CATEXT}"; \
! 		${NROFF} -mandoc calc.1 > ${CATDIR}/calc.${CATEXT}; \
  		echo "chmod ${MANMODE} ${MANDIR}/calc.${MANEXT}"; \
  		chmod ${MANMODE} ${MANDIR}/calc.${MANEXT}; \
  	    fi; \
--- 1445,1453 ----
  	    else \
  		echo "rm -f ${CATDIR}/calc.${CATEXT}"; \
  		rm -f ${CATDIR}/calc.${CATEXT}; \
! 		echo "${NROFF} ${NROFF_ARG} calc.1  > \
! 		    ${CATDIR}/calc.${CATEXT}"; \
! 		${NROFF} ${NROFF_ARG} calc.1 > ${CATDIR}/calc.${CATEXT}; \
  		echo "chmod ${MANMODE} ${MANDIR}/calc.${MANEXT}"; \
  		chmod ${MANMODE} ${MANDIR}/calc.${MANEXT}; \
  	    fi; \
diff -r -c /tmp/f/calc.orig/calc.c calc/calc.c
*** /tmp/f/calc.orig/calc.c	Thu Dec  7 02:06:09 1995
--- calc/calc.c	Fri Dec  8 18:15:37 1995
***************
*** 181,188 ****
  	/* setup configuration values */
  	oldstd.epsilon = &_qonesqbase_; /* magic to fake early strtoq() */
  	conf = config_copy(&oldstd); /* more magic to fake early strtoq() */
! 	oldstd.epsilon = strtoq(EPSILON_DEFAULT);
! 	newstd.epsilon = strtoq(NEW_EPSILON_DEFAULT);
  	conf = config_copy(&oldstd); /* make oldstd our default config */
  	/* initialize other items */
  	zio_init();
--- 181,188 ----
  	/* setup configuration values */
  	oldstd.epsilon = &_qonesqbase_; /* magic to fake early strtoq() */
  	conf = config_copy(&oldstd); /* more magic to fake early strtoq() */
! 	oldstd.epsilon = XX_strtoq(EPSILON_DEFAULT);
! 	newstd.epsilon = XX_strtoq(NEW_EPSILON_DEFAULT);
  	conf = config_copy(&oldstd); /* make oldstd our default config */
  	/* initialize other items */
  	zio_init();
diff -r -c /tmp/f/calc.orig/calc.man calc/calc.man
*** /tmp/f/calc.orig/calc.man	Sun Nov 26 05:51:09 1995
--- calc/calc.man	Fri Dec  8 18:15:37 1995
***************
*** 9,25 ****
  .SH NAME
  calc \- arbitrary precision calculator
  .SH SYNOPSIS
! \f4calc\fP
  [
! \f4\-h\fP
  ] [
! \f4\-m mode\fP
  ] [
! \f4\-p\fP
  ] [
! \f4\-q\fP
  ] [
! \f4\-u\fP
  ] [
  .I calc_cmd
  \&.\|.\|.
--- 9,25 ----
  .SH NAME
  calc \- arbitrary precision calculator
  .SH SYNOPSIS
! \fIcalc\fP
  [
! \fI\-h\fP
  ] [
! \fI\-m mode\fP
  ] [
! \fI\-p\fP
  ] [
! \fI\-q\fP
  ] [
! \fI\-u\fP
  ] [
  .I calc_cmd
  \&.\|.\|.
***************
*** 30,50 ****
  CALC COMMAND LINE
  .PP
  .TP
! \f4 \-h\f1
  Print a help message.
! This option implies \f4 \-q\f1.
! This is equivalent to the calc command \f4help help\fP.
! The help facility is disabled unless the \f4mode\fP is 5 or 7.
! See \f4\-m\fP below.
  .sp
  .TP
! \f4\-m mode\fP
  This flag sets the permission mode of calc.
! It controls the ability for \f4calc\fP to open files
  and execute programs.
! \f4Mode\fP may be a number from 0 to 7.
  .sp
! The \f4mode\fP value is interpreted in a way similar
  to that of the \fRchmod(1)\fP octal mode:
  .sp
  .in +0.5i
--- 30,50 ----
  CALC COMMAND LINE
  .PP
  .TP
! \fI \-h\fP
  Print a help message.
! This option implies \fI \-q\fP.
! This is equivalent to the calc command \fIhelp help\fP.
! The help facility is disabled unless the \fImode\fP is 5 or 7.
! See \fI\-m\fP below.
  .sp
  .TP
! \fI\-m mode\fP
  This flag sets the permission mode of calc.
! It controls the ability for \fIcalc\fP to open files
  and execute programs.
! \fIMode\fP may be a number from 0 to 7.
  .sp
! The \fImode\fP value is interpreted in a way similar
  to that of the \fRchmod(1)\fP octal mode:
  .sp
  .in +0.5i
***************
*** 61,72 ****
  .in -0.5i
  .sp
  If one wished to run calc from a privledged user, one might
! want to use \f4\-m 0\fP in an effort to make calc more secure.
  .sp
! \f4Mode\fP bits for reading and writing apply only on an open.
  Files already open are not effected.
! Thus if one wanted to use the \f4\-m 0\fP in an effort to make
! \f4calc\fP more secure, but still wanted to read and write a specific
  file, one might want to do:
  .sp
  .in +0.5i
--- 61,72 ----
  .in -0.5i
  .sp
  If one wished to run calc from a privledged user, one might
! want to use \fI\-m 0\fP in an effort to make calc more secure.
  .sp
! \fIMode\fP bits for reading and writing apply only on an open.
  Files already open are not effected.
! Thus if one wanted to use the \fI\-m 0\fP in an effort to make
! \fIcalc\fP more secure, but still wanted to read and write a specific
  file, one might want to do:
  .sp
  .in +0.5i
***************
*** 75,89 ****
  .fi
  .in -0.5i
  .sp
! Files presented to \f4calc\fP in this way are opened in an unknown mode.
! \f4Calc\fP will attempt to read or write them if directed.
  .sp
! If the \f4mode\fP disables opening of files for reading, then
! the startup library scripts are disabled as of \f4\-q\fP was given.
! The reading of key bindings is also disabled when the \f4mode\fP
  disables opening of files for reading.
  .TP
! \f4 \-p\f1
  Pipe processing is enabled by use of \-p.  For example:
  .sp
  .in +0.5i
--- 75,89 ----
  .fi
  .in -0.5i
  .sp
! Files presented to \fIcalc\fP in this way are opened in an unknown mode.
! \fICalc\fP will attempt to read or write them if directed.
  .sp
! If the \fImode\fP disables opening of files for reading, then
! the startup library scripts are disabled as of \fI\-q\fP was given.
! The reading of key bindings is also disabled when the \fImode\fP
  disables opening of files for reading.
  .TP
! \fI \-p\fP
  Pipe processing is enabled by use of \-p.  For example:
  .sp
  .in +0.5i
***************
*** 92,130 ****
  .fi
  .in -0.5i
  .sp
! In pipe mode, \f4calc\fP does not prompt, does not print leading tabs
  and does not print the initial header.
  .TP
! \f4 \-q\f1
! Disable the use of the \f4$CALCRC\f1 startup scripts.
  .TP
! \f4 \-u\f1
  Disable buffering of stdin and stdout.
  .PP
! Without \f4calc_cmd\fPs, \f4calc\fP operates interactively.
! If one or more \f4calc_cmd\fPs are given on the command line,
! \f4calc\fP will execute them and exit.
  The printing of leading tabs on output is disabled
! as if \f4config("tab",0)\fP had been executed.
  .PP
! Normally on startup, \f4calc\fP attempts to execute a collection
  of library scripts.
! The environment variable \f4$CALCRC\f1 (if non-existent then
! a compiled in value) contains a \f4:\fP separated list of
  startup library scripts.
  No error conditions are produced if these startup library scripts
  are not found.
  .PP
! If the \f4mode\fP disables opening of files for reading, then
! the startup library scripts are disabled as of \f4\-q\fP was given
! and \f4$CALCRC\f1 as well as the default compiled in value are ignored.
  .PP
  Filenames are subject to ``~'' expansion (see below).
! The environment variable \f4$CALCPATH\fP (if non-existent then
! a compiled in value) contains a \f4:\fP separated list of search
  directories.
! If a file does not begin with \f4/\fP, \f4~\fP or \f4./\fP,
! then it is searched for under each directory listed in the \f4$CALCPATH\fP.
  It is an error if no such readable file is found.
  .PP
  Calc treats all open files, other than stdin, stdout and stderr
--- 92,130 ----
  .fi
  .in -0.5i
  .sp
! In pipe mode, \fIcalc\fP does not prompt, does not print leading tabs
  and does not print the initial header.
  .TP
! \fI \-q\fP
! Disable the use of the \fI$CALCRC\fP startup scripts.
  .TP
! \fI \-u\fP
  Disable buffering of stdin and stdout.
  .PP
! Without \fIcalc_cmd\fPs, \fIcalc\fP operates interactively.
! If one or more \fIcalc_cmd\fPs are given on the command line,
! \fIcalc\fP will execute them and exit.
  The printing of leading tabs on output is disabled
! as if \fIconfig("tab",0)\fP had been executed.
  .PP
! Normally on startup, \fIcalc\fP attempts to execute a collection
  of library scripts.
! The environment variable \fI$CALCRC\fP (if non-existent then
! a compiled in value) contains a \fI:\fP separated list of
  startup library scripts.
  No error conditions are produced if these startup library scripts
  are not found.
  .PP
! If the \fImode\fP disables opening of files for reading, then
! the startup library scripts are disabled as of \fI\-q\fP was given
! and \fI$CALCRC\fP as well as the default compiled in value are ignored.
  .PP
  Filenames are subject to ``~'' expansion (see below).
! The environment variable \fI$CALCPATH\fP (if non-existent then
! a compiled in value) contains a \fI:\fP separated list of search
  directories.
! If a file does not begin with \fI/\fP, \fI~\fP or \fI./\fP,
! then it is searched for under each directory listed in the \fI$CALCPATH\fP.
  It is an error if no such readable file is found.
  .PP
  Calc treats all open files, other than stdin, stdout and stderr
***************
*** 149,170 ****
  .PP
  OVERVIEW
  .PP
! \f4Calc\fP is arbitrary precision arithmetic system that uses
  a C-like language.
! \f4Calc\fP is useful as a calculator, an algorithm prototyped
  and as a mathematical research tool.
! More importantly, \f4calc\fP provides one with a machine
  independent means of computation.
  .PP
! \f4Calc\fP comes with a rich set of builtin mathematical
  and programmatic functions.
  .PP
! \f4Calc\fP is distributed with library of scripts.
  Written in the same C-like language, library scripts may be
! read in and executed during a \f4calc\fP session.
  These library scripts are also provided because they are
! useful and to serve as examples of the \f4calc\fP language.
! One may further extend \f4calc\fP thru the
  use of user defined scripts.
  .PP
  Internally calc represents numeric values as fractions reduced to their
--- 149,170 ----
  .PP
  OVERVIEW
  .PP
! \fICalc\fP is arbitrary precision arithmetic system that uses
  a C-like language.
! \fICalc\fP is useful as a calculator, an algorithm prototyped
  and as a mathematical research tool.
! More importantly, \fIcalc\fP provides one with a machine
  independent means of computation.
  .PP
! \fICalc\fP comes with a rich set of builtin mathematical
  and programmatic functions.
  .PP
! \fICalc\fP is distributed with library of scripts.
  Written in the same C-like language, library scripts may be
! read in and executed during a \fIcalc\fP session.
  These library scripts are also provided because they are
! useful and to serve as examples of the \fIcalc\fP language.
! One may further extend \fIcalc\fP thru the
  use of user defined scripts.
  .PP
  Internally calc represents numeric values as fractions reduced to their
***************
*** 215,221 ****
  .PP
  VARIABLES
  .PP
! Variables in \f4calc\fP are typeless.
  In other words, the fundamental type of a variable is determined by its content.
  Before a variable is assigned a value it has the value of zero.
  .PP
--- 215,221 ----
  .PP
  VARIABLES
  .PP
! Variables in \fIcalc\fP are typeless.
  In other words, the fundamental type of a variable is determined by its content.
  Before a variable is assigned a value it has the value of zero.
  .PP
***************
*** 243,249 ****
  and a ``0'' followed by a digit implies an octal value.
  Complex numbers are indicated by a trailing ``i'' such as in ``3+4i''.
  Strings may be delimited by either a pair of single or double quotes.
! By default, \f4calc\fP prints values as if they were floating point numbers.
  One may change the default to print values in a number of modes
  including fractions, integers and exponentials.
  .PP
--- 243,249 ----
  and a ``0'' followed by a digit implies an octal value.
  Complex numbers are indicated by a trailing ``i'' such as in ``3+4i''.
  Strings may be delimited by either a pair of single or double quotes.
! By default, \fIcalc\fP prints values as if they were floating point numbers.
  One may change the default to print values in a number of modes
  including fractions, integers and exponentials.
  .PP
***************
*** 268,280 ****
  .PP
  CALC LANGUAGE
  .PP
! The \f4calc\fP language is a C-like language.
  The language includes commands such as variable declarations,
  expressions, tests, labels, loops, file operations, function calls.
  These commands are very similar to their counterparts in C.
  .PP
  The language also include a number of commands particular
! to \f4calc\fP itself.
  These include commands such as function definition, help,
  reading in library scripts, dump files to a file, error notification,
  configuration control and status.
--- 268,280 ----
  .PP
  CALC LANGUAGE
  .PP
! The \fIcalc\fP language is a C-like language.
  The language includes commands such as variable declarations,
  expressions, tests, labels, loops, file operations, function calls.
  These commands are very similar to their counterparts in C.
  .PP
  The language also include a number of commands particular
! to \fIcalc\fP itself.
  These include commands such as function definition, help,
  reading in library scripts, dump files to a file, error notification,
  configuration control and status.
***************
*** 336,343 ****
  .sp
  .TP 5
  CALCBINDINGS
! On startup (unless \f4\-h\fP or \f4\-q\fP was given on the command
! line, or \f4\-m\fP disallows opening files for reading), calc reads
  key bindings from the filename specified
  by this environment variable.
  .br
--- 336,343 ----
  .sp
  .TP 5
  CALCBINDINGS
! On startup (unless \fI\-h\fP or \fI\-q\fP was given on the command
! line, or \fI\-m\fP disallows opening files for reading), calc reads
  key bindings from the filename specified
  by this environment variable.
  .br
diff -r -c /tmp/f/calc.orig/const.c calc/const.c
*** /tmp/f/calc.orig/const.c	Thu Nov 23 06:18:32 1995
--- calc/const.c	Fri Dec  8 18:15:38 1995
***************
*** 29,35 ****
  {
  	NUMBER *q;
  
! 	q = strtoq(str);
  	if (q == NULL)
  		return 0;
  	return addqconstant(q);
--- 29,35 ----
  {
  	NUMBER *q;
  
! 	q = XX_strtoq(str);
  	if (q == NULL)
  		return 0;
  	return addqconstant(q);
diff -r -c /tmp/f/calc.orig/qio.c calc/qio.c
*** /tmp/f/calc.orig/qio.c	Sun Nov 26 05:51:05 1995
--- calc/qio.c	Fri Dec  8 18:15:43 1995
***************
*** 224,230 ****
  	ungetc(ch, fp);
  	if (scancc < 0)
  		return NULL;
! 	r = strtoq(etoabuf);
  	if (ziszero(r->den)) {
  		qfree(r);
  		r = NULL;
--- 224,230 ----
  	ungetc(ch, fp);
  	if (scancc < 0)
  		return NULL;
! 	r = XX_strtoq(etoabuf);
  	if (ziszero(r->den)) {
  		qfree(r);
  		r = NULL;
***************
*** 501,510 ****
  /*
   * Convert a string to a number in rational, floating point,
   * exponential notation, hex, or octal.
!  *	q = strtoq(string);
   */
  NUMBER *
! strtoq(s)
  	register char *s;
  {
  	register NUMBER *q;
--- 501,510 ----
  /*
   * Convert a string to a number in rational, floating point,
   * exponential notation, hex, or octal.
!  *	q = XX_strtoq(string);
   */
  NUMBER *
! XX_strtoq(s)
  	register char *s;
  {
  	register NUMBER *q;
diff -r -c /tmp/f/calc.orig/qmath.h calc/qmath.h
*** /tmp/f/calc.orig/qmath.h	Thu Nov 23 06:18:30 1995
--- calc/qmath.h	Fri Dec  8 18:15:43 1995
***************
*** 30,36 ****
  extern NUMBER *qcopy PROTO((NUMBER *q));
  extern NUMBER *uutoq PROTO((FULL i1, FULL i2));
  extern NUMBER *iitoq PROTO((long i1, long i2));
! extern NUMBER *strtoq PROTO((char *str));
  extern NUMBER *itoq PROTO((long i));
  extern NUMBER *utoq PROTO((FULL i));
  extern long qtoi PROTO((NUMBER *q));
--- 30,36 ----
  extern NUMBER *qcopy PROTO((NUMBER *q));
  extern NUMBER *uutoq PROTO((FULL i1, FULL i2));
  extern NUMBER *iitoq PROTO((long i1, long i2));
! extern NUMBER *XX_strtoq PROTO((char *str));
  extern NUMBER *itoq PROTO((long i));
  extern NUMBER *utoq PROTO((FULL i));
  extern long qtoi PROTO((NUMBER *q));
