*** configure~  Tue Aug 15 11:29:08 1995
--- configure   Tue Aug 15 11:26:18 1995
***************
*** 514,519 ****
--- 514,536 ----
  fi
  rm -f conftest*
  
+ echo checking for FreeBSD
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
+ #ifdef __FreeBSD__
+   yes
+ #endif
+ 
+ EOF
+ eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
+ if egrep "yes" conftest.out >/dev/null 2>&1; then
+   rm -rf conftest*
+   bsd=1
+   freebsd=1
+ 
+ fi
+ rm -f conftest*
+ 
  
  echo checking for ultrix
  cat > conftest.${ac_ext} <<EOF
***************
*** 953,958 ****
--- 970,981 ----
  if test -z "$FOREIGN_FLAG" && test "$bsd"; then
    FOREIGN_FILE="bsd-foreign.h"
    FOREIGN_FLAG=-DFOREIGNCALL
+ fi
+ 
+ if test "$FOREIGN_FLAG" && test "$freebsd"; then
+   FOREIGN_FILE="bsd-foreign.h"
+   FOREIGN_FLAG=-DFOREIGNCALL
+   IEEE_FLAG=""
  fi
  
  if test -z "$FOREIGN_FLAG"; then
*** ./xlprin.c~	Tue Aug 15 10:24:31 1995
--- ./xlprin.c	Tue Aug 15 10:30:22 1995
***************
*** 781,787 ****
  	    }
          /* check for the first character being '#'
              or string looking like a number */
!         if (*str == '#' || isnumber(str,NULL))
              xlputc(fptr,'\\');
      }
  
--- 781,787 ----
  	    }
          /* check for the first character being '#'
              or string looking like a number */
!         if (*str == '#' || xl_isnumber(str,NULL))
              xlputc(fptr,'\\');
      }
  
*** ./xlread.c~	Tue Aug 15 10:25:53 1995
--- ./xlread.c	Tue Aug 15 10:31:37 1995
***************
*** 1063,1069 ****
  
      pname(fptr,&escflag,&packindex);
      if (! null(getvalue(s_read_suppress))) return(NIL);
!     if (escflag || packindex >= 0 || !isnumber(buf,&val)) {
        if (packindex >= 0) {
  	/* check for zero-length name */
  	if (buf[packindex+1] == 0) xlfail("zero length name after ':'");
--- 1063,1069 ----
  
      pname(fptr,&escflag,&packindex);
      if (! null(getvalue(s_read_suppress))) return(NIL);
!     if (escflag || packindex >= 0 || !xl_isnumber(buf,&val)) {
        if (packindex >= 0) {
  	/* check for zero-length name */
  	if (buf[packindex+1] == 0) xlfail("zero length name after ':'");
***************
*** 1109,1115 ****
      LVAL val;
      pname(fptr,&escflag);
      if (! null(getvalue(s_read_suppress))) return(NIL);
!     return (escflag || !isnumber(buf,&val) ? xlenter(buf) : val);
  }
  #endif /* PACKAGES */
  
--- 1109,1115 ----
      LVAL val;
      pname(fptr,&escflag);
      if (! null(getvalue(s_read_suppress))) return(NIL);
!     return (escflag || !xl_isnumber(buf,&val) ? xlenter(buf) : val);
  }
  #endif /* PACKAGES */
  
***************
*** 1334,1340 ****
  }
  
  /* isnumber - check if this string is a number */
! int isnumber P2C(char *, str, LVAL *, pval)
  {
      int dl=0, dr=0;
      char *p = str;
--- 1334,1340 ----
  }
  
  /* isnumber - check if this string is a number */
! int xl_isnumber P2C(char *, str, LVAL *, pval)
  {
      int dl=0, dr=0;
      char *p = str;
*** ./xlisp.h~	Tue Aug 15 10:30:35 1995
--- ./xlisp.h	Tue Aug 15 10:30:49 1995
***************
*** 1549,1555 ****
  extern LVAL tentry _((int ch));
  extern int xlload _((char *fname, int vflag, int pflag));
  extern int xlread _((LVAL fptr, LVAL *pval, int recursive));
! extern int isnumber _((char *str, LVAL *pval));
  
  /* for xlstruct */
  extern LVAL xlrdstruct _((LVAL list));
--- 1549,1555 ----
  extern LVAL tentry _((int ch));
  extern int xlload _((char *fname, int vflag, int pflag));
  extern int xlread _((LVAL fptr, LVAL *pval, int recursive));
! extern int xl_isnumber _((char *str, LVAL *pval));
  
  /* for xlstruct */
  extern LVAL xlrdstruct _((LVAL list));
*** ./xlmath2.c~	Tue Aug 15 10:35:41 1995
--- ./xlmath2.c	Tue Aug 15 10:37:04 1995
***************
*** 80,86 ****
  LOCAL ComplexNumber catan P1H(ComplexNumber);
  LOCAL ComplexNumber catan2 P2H(ComplexNumber, ComplexNumber);
  LOCAL LVAL readnumber P1H(Number *);
! LOCAL VOID setmode P2H(Number *, int);
  LOCAL VOID matchmodes P2H(Number *, Number *);
  LOCAL LVAL lispnumber P1H(Number *);
  LOCAL LVAL binary P1H(int);
--- 80,86 ----
  LOCAL ComplexNumber catan P1H(ComplexNumber);
  LOCAL ComplexNumber catan2 P2H(ComplexNumber, ComplexNumber);
  LOCAL LVAL readnumber P1H(Number *);
! LOCAL VOID xl_setmode P2H(Number *, int);
  LOCAL VOID matchmodes P2H(Number *, Number *);
  LOCAL LVAL lispnumber P1H(Number *);
  LOCAL LVAL binary P1H(int);
***************
*** 539,545 ****
    return(arg);
  }
  
! LOCAL VOID setmode P2C(Number *, x, int, mode)
  {
    switch (mode) {
  #ifdef RATIOS
--- 539,545 ----
    return(arg);
  }
  
! LOCAL VOID xl_setmode P2C(Number *, x, int, mode)
  {
    switch (mode) {
  #ifdef RATIOS
***************
*** 618,625 ****
  	   break;
  #endif
    }
!   if (x->mode != mode) setmode(x, mode);
!   if (y->mode != mode) setmode(y, mode);
  }
  
  LOCAL LVAL lispnumber P1C(Number *, x)
--- 618,625 ----
  	   break;
  #endif
    }
!   if (x->mode != mode) xl_setmode(x, mode);
!   if (y->mode != mode) xl_setmode(y, mode);
  }
  
  LOCAL LVAL lispnumber P1C(Number *, x)
***************
*** 866,872 ****
        case IN:
          checkizero(arg.val);
  #ifdef RATIOS
! 	setmode(&val, RT);
  	val.denom = arg.val;
  	break;
  #else
--- 866,872 ----
        case IN:
          checkizero(arg.val);
  #ifdef RATIOS
! 	xl_setmode(&val, RT);
  	val.denom = arg.val;
  	break;
  #else
***************
*** 879,886 ****
            break;
          }
          else {
!           setmode(&val, FL);
!           setmode(&arg, FL);
          }
          /* drop through */
  #endif
--- 879,886 ----
            break;
          }
          else {
!           xl_setmode(&val, FL);
!           xl_setmode(&arg, FL);
          }
          /* drop through */
  #endif
***************
*** 889,896 ****
          val.fval /= arg.fval;
          break;
        case CI:
!         setmode(&val, CF);
!         setmode(&arg, CF);
          /* drop through */
        case CF:
  #if 0   /* we can do better */
--- 889,896 ----
          val.fval /= arg.fval;
          break;
        case CI:
!         xl_setmode(&val, CF);
!         xl_setmode(&arg, CF);
          /* drop through */
        case CF:
  #if 0   /* we can do better */
