Index: factory/bifac.h
===================================================================
--- factory/bifac.h	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/bifac.h	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -22,6 +22,11 @@
 #ifndef NOSTREAMIO
 #include <stdio.h>
+#ifdef HAVE_IOSTREAM
+#include <fstream>
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <fstream.h>
 #include <iostream.h>
+#endif
 #include <iomanip.h>
 #endif
Index: factory/canonicalform.h
===================================================================
--- factory/canonicalform.h	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/canonicalform.h	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: canonicalform.h,v 1.30 2005-12-09 08:35:37 Singular Exp $ */
+/* $Id: canonicalform.h,v 1.31 2006-05-15 08:17:49 Singular Exp $ */
 
 #ifndef INCL_CANONICALFORM_H
@@ -8,5 +8,9 @@
 
 #ifndef NOSTREAMIO
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
 #endif /* NOSTREAMIO */
 
Index: factory/cf_eval.h
===================================================================
--- factory/cf_eval.h	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/cf_eval.h	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: cf_eval.h,v 1.3 1997-06-19 12:27:20 schmidt Exp $ */
+/* $Id: cf_eval.h,v 1.4 2006-05-15 08:17:50 Singular Exp $ */
 
 #ifndef INCL_CF_EVAL_H
@@ -8,5 +8,9 @@
 
 #ifndef NOSTREAMIO
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
 #endif /* NOSTREAMIO */
 
Index: factory/cf_map.h
===================================================================
--- factory/cf_map.h	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/cf_map.h	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: cf_map.h,v 1.12 2000-05-29 15:05:21 Singular Exp $ */
+/* $Id: cf_map.h,v 1.13 2006-05-15 08:17:50 Singular Exp $ */
 
 #ifndef INCL_CF_MAP_H
@@ -14,5 +14,9 @@
 
 #ifndef NOSTREAMIO
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
 #endif /* NOSTREAMIO */
 
Index: factory/config.h.in
===================================================================
--- factory/config.h.in	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/config.h.in	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C -*- */
-/* $Id: config.h.in,v 1.12 2005-11-08 18:08:58 Singular Exp $ */
+/* $Id: config.h.in,v 1.13 2006-05-15 08:17:50 Singular Exp $ */
 
 #ifndef INCL_CONFIG_H
@@ -50,4 +50,13 @@
 #undef NOSTREAMIO
 
+/* which C++ header variants to use */
+#undef HAVE_IOSTREAM_H
+#undef HAVE_FSTREAM_H
+#undef HAVE_STRSTREAM_H
+
+#undef HAVE_IOSTREAM
+#undef HAVE_FSTREAM
+#undef HAVE_STRING
+
 /* define if linked to Singular */
 #undef SINGULAR
Index: factory/configure
===================================================================
--- factory/configure	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/configure	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1883,5 +1883,5 @@
 
 if test "x$enable_streamio" != xno; then
-  for ac_hdr in iostream.h strstream.h fstream.h
+  for ac_hdr in iostream.h strstream.h fstream.h iostream string fstream
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
@@ -1920,5 +1920,4 @@
 else
   echo "$ac_t""no" 1>&6
-echo "configure: warning: C++ header files not found" 1>&2 
 fi
 done
@@ -1928,15 +1927,15 @@
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1931: checking for $ac_hdr" >&5
+echo "configure:1930: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1936 "configure"
+#line 1935 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
@@ -1972,15 +1971,15 @@
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1975: checking for $ac_hdr" >&5
+echo "configure:1974: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1980 "configure"
+#line 1979 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
@@ -2018,15 +2017,15 @@
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2021: checking for $ac_hdr" >&5
+echo "configure:2020: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2026 "configure"
+#line 2025 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
@@ -2062,15 +2061,15 @@
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2065: checking for $ac_hdr" >&5
+echo "configure:2064: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2070 "configure"
+#line 2069 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
@@ -2129,5 +2128,5 @@
 # arithmetic shift
 echo $ac_n "checking whether your compiler does arithmetic shifts""... $ac_c" 1>&6
-echo "configure:2132: checking whether your compiler does arithmetic shifts" >&5
+echo "configure:2131: checking whether your compiler does arithmetic shifts" >&5
 if eval "test \"`echo '$''{'ac_cv_shift'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2138,9 +2137,9 @@
 else
   cat > conftest.$ac_ext <<EOF
-#line 2141 "configure"
+#line 2140 "configure"
 #include "confdefs.h"
  int main() { if (-2 >> 1 == -1) return(0); else return(1); } 
 EOF
-if { (eval echo configure:2145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_shift=yes
@@ -2224,5 +2223,5 @@
 # check whether CXX accepts -fno-rtti
 echo $ac_n "checking whether gcc accepts -fno-rtti""... $ac_c" 1>&6
-echo "configure:2227: checking whether gcc accepts -fno-rtti" >&5
+echo "configure:2226: checking whether gcc accepts -fno-rtti" >&5
 tmp_flags=${CXXFLAGS}
 CXXFLAGS="${CXXFLAGS} -fno-rtti"
@@ -2231,5 +2230,5 @@
 else
   cat > conftest.$ac_ext <<EOF
-#line 2234 "configure"
+#line 2233 "configure"
 #include "confdefs.h"
 
@@ -2238,5 +2237,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:2241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cxx_have_rtti=yes
@@ -2258,5 +2257,5 @@
 
 echo $ac_n "checking whether gcc accepts -fno-exceptions""... $ac_c" 1>&6
-echo "configure:2261: checking whether gcc accepts -fno-exceptions" >&5
+echo "configure:2260: checking whether gcc accepts -fno-exceptions" >&5
 tmp_flags=${CXXFLAGS}
 CXXFLAGS="${CXXFLAGS} -fno-exceptions"
@@ -2265,5 +2264,5 @@
 else
   cat > conftest.$ac_ext <<EOF
-#line 2268 "configure"
+#line 2267 "configure"
 #include "confdefs.h"
 
@@ -2272,5 +2271,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:2275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_cxx_have_exceptions=yes
@@ -2340,5 +2339,5 @@
 
 echo $ac_n "checking whether to use omalloc""... $ac_c" 1>&6
-echo "configure:2343: checking whether to use omalloc" >&5
+echo "configure:2342: checking whether to use omalloc" >&5
 
 if test "$with_omalloc" = yes; then
Index: factory/configure.in
===================================================================
--- factory/configure.in	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/configure.in	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 dnl # emacs edit mode for this file is -*- sh -*-
-dnl # $Id: configure.in,v 1.44 2006-05-03 15:17:21 Singular Exp $
+dnl # $Id: configure.in,v 1.45 2006-05-15 08:17:52 Singular Exp $
 
 dnl #
@@ -13,5 +13,5 @@
 # - initialisation.
 #
-AC_REVISION($Id: configure.in,v 1.44 2006-05-03 15:17:21 Singular Exp $)
+AC_REVISION($Id: configure.in,v 1.45 2006-05-15 08:17:52 Singular Exp $)
 AC_INIT(canonicalform.cc)
 AC_CONFIG_HEADER(config.h)
@@ -269,6 +269,5 @@
 
 if test "x$enable_streamio" != xno; then
-  AC_CHECK_HEADERS(iostream.h strstream.h fstream.h, ,
-    [ AC_MSG_WARN(C++ header files not found) ])
+  AC_CHECK_HEADERS(iostream.h strstream.h fstream.h iostream string fstream)
   AC_CHECK_HEADERS(ctype.h, , [ AC_MSG_ERROR(standard C header files not found) ])
 
Index: factory/debug.h
===================================================================
--- factory/debug.h	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/debug.h	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: debug.h,v 1.5 1997-06-19 12:23:48 schmidt Exp $ */
+/* $Id: debug.h,v 1.6 2006-05-15 08:17:52 Singular Exp $ */
 
 /* It should be possible to include this file multiple times for different */
@@ -13,5 +13,9 @@
 
 #ifdef DEBUGOUTPUT
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
 void deb_inc_level();
 void deb_dec_level();
Index: factory/fac_iterfor.h
===================================================================
--- factory/fac_iterfor.h	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/fac_iterfor.h	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: fac_iterfor.h,v 1.4 1997-06-19 12:23:29 schmidt Exp $ */
+/* $Id: fac_iterfor.h,v 1.5 2006-05-15 08:17:52 Singular Exp $ */
 
 #ifndef INCL_FAC_ITERFOR_H
@@ -8,5 +8,9 @@
 
 #ifndef NOSTREAMIO
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
 #endif /* NOSTREAMIO */
 
Index: factory/ftmpl_matrix.h
===================================================================
--- factory/ftmpl_matrix.h	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/ftmpl_matrix.h	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: ftmpl_matrix.h,v 1.2 2005-06-13 09:46:35 Singular Exp $ */
+/* $Id: ftmpl_matrix.h,v 1.3 2006-05-15 08:17:53 Singular Exp $ */
 
 #ifndef INCL_MATRIX_H
@@ -8,5 +8,9 @@
 
 #ifndef NOSTREAMIO
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
 #endif /* NOSTREAMIO */
 
Index: factory/gengftables.cc
===================================================================
--- factory/gengftables.cc	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/gengftables.cc	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: gengftables.cc,v 1.2 1997-10-23 13:25:52 schmidt Exp $ */
+/* $Id: gengftables.cc,v 1.3 2006-05-15 08:17:53 Singular Exp $ */
 
 //{{{ docu
@@ -11,7 +11,13 @@
 //}}}
 
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#include <fstream>
+#include <strstream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
 #include <fstream.h>
 #include <strstream.h>
+#endif
 
 #include <factory.h>
Index: factory/gfops.h
===================================================================
--- factory/gfops.h	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/gfops.h	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: gfops.h,v 1.6 1997-11-19 11:43:24 schmidt Exp $ */
+/* $Id: gfops.h,v 1.7 2006-05-15 08:17:53 Singular Exp $ */
 
 #ifndef INCL_GFOPS_H
@@ -8,5 +8,9 @@
 
 #ifndef NOSTREAMIO
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
 #endif /* NOSTREAMIO */
 
Index: factory/imm.h
===================================================================
--- factory/imm.h	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/imm.h	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: imm.h,v 1.20 2005-11-08 18:08:58 Singular Exp $ */
+/* $Id: imm.h,v 1.21 2006-05-15 08:17:53 Singular Exp $ */
 
 #ifndef INCL_IMM_H
@@ -8,5 +8,9 @@
 
 #ifndef NOSTREAMIO
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
 #endif /* NOSTREAMIO */
 
Index: factory/int_cf.h
===================================================================
--- factory/int_cf.h	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/int_cf.h	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: int_cf.h,v 1.10 1998-06-26 16:13:49 schmidt Exp $ */
+/* $Id: int_cf.h,v 1.11 2006-05-15 08:17:54 Singular Exp $ */
 
 #ifndef INCL_INT_CF_H
@@ -8,5 +8,9 @@
 
 #ifndef NOSTREAMIO
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
 #endif /* NOSTREAMIO */
 
Index: factory/int_int.h
===================================================================
--- factory/int_int.h	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/int_int.h	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: int_int.h,v 1.12 2006-05-02 12:21:07 Singular Exp $ */
+/* $Id: int_int.h,v 1.13 2006-05-15 08:17:54 Singular Exp $ */
 
 #ifndef INCL_INT_INT_H
@@ -8,5 +8,9 @@
 
 #ifndef NOSTREAMIO
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
 #endif /* NOSTREAMIO */
 
Index: factory/int_poly.h
===================================================================
--- factory/int_poly.h	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/int_poly.h	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: int_poly.h,v 1.8 2006-05-02 12:21:07 Singular Exp $ */
+/* $Id: int_poly.h,v 1.9 2006-05-15 08:17:54 Singular Exp $ */
 
 #ifndef INCL_INT_POLY_H
@@ -8,5 +8,9 @@
 
 #ifndef NOSTREAMIO
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
 #endif /* NOSTREAMIO */
 
Index: factory/int_pp.h
===================================================================
--- factory/int_pp.h	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/int_pp.h	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: int_pp.h,v 1.4 2003-10-15 17:19:41 Singular Exp $ */
+/* $Id: int_pp.h,v 1.5 2006-05-15 08:17:54 Singular Exp $ */
 
 #ifndef INCL_INT_PP_H
@@ -10,5 +10,9 @@
 
 #ifndef NOSTREAMIO
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
 #endif /* NOSTREAMIO */
 
Index: factory/int_rat.h
===================================================================
--- factory/int_rat.h	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/int_rat.h	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: int_rat.h,v 1.6 1998-06-26 16:16:08 schmidt Exp $ */
+/* $Id: int_rat.h,v 1.7 2006-05-15 08:17:55 Singular Exp $ */
 
 #ifndef INCL_INT_RAT_H
@@ -8,5 +8,9 @@
 
 #ifndef NOSTREAMIO
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
 #endif /* NOSTREAMIO */
 
Index: factory/readcf.cc
===================================================================
--- factory/readcf.cc	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/readcf.cc	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,13 +1,12 @@
 
-/*  A Bison parser, made from ../factory-normal/readcf.y
- by  GNU Bison version 1.25
-  */
+/*  A Bison parser, made from readcf.y
+    by GNU Bison version 1.28  */
 
 #define YYBISON 1  /* Identify Bison output.  */
 
-#define	NUM	258
-#define	NEG	259
-
-#line 4 "../factory-normal/readcf.y"
+#define	NUM	257
+#define	NEG	258
+
+#line 4 "readcf.y"
 
 
@@ -21,5 +20,10 @@
 
 #include <ctype.h>
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
+
 
 #include "assert.h"
@@ -66,5 +70,5 @@
 #define	YYNTBASE	13
 
-#define YYTRANSLATE(x) ((unsigned)(x) <= 259 ? yytranslate[x] : 16)
+#define YYTRANSLATE(x) ((unsigned)(x) <= 258 ? yytranslate[x] : 16)
 
 static const char yytranslate[] = {     0,
@@ -94,5 +98,5 @@
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-     2,     2,     2,     2,     2,     1,     2,     3,     8
+     2,     2,     2,     2,     2,     1,     3,     8
 };
 
@@ -114,6 +118,6 @@
 #if YYDEBUG != 0
 static const short yyrline[] = { 0,
-    56,    57,    60,    61,    64,    65,    66,    67,    68,    69,
-    70,    71,    72
+    61,    62,    65,    66,    69,    70,    71,    72,    73,    74,
+    75,    76,    77
 };
 #endif
@@ -178,4 +182,5 @@
 /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
 #line 3 "/usr/lib/bison.simple"
+/* This file comes from bison-1.28.  */
 
 /* Skeleton output parser for bison,
@@ -194,5 +199,6 @@
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
 
 /* As a special exception, when this file is copied by Bison into a
@@ -201,33 +207,4 @@
    in version 1.24 of Bison.  */
 
-#ifndef alloca
-#ifdef __GNUC__
-#define alloca __builtin_alloca
-#else /* not GNU C.  */
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
-#include <alloca.h>
-#else /* not sparc */
-#if defined (MSDOS) && !defined (__TURBOC__)
-#include <malloc.h>
-#else /* not MSDOS, or __TURBOC__ */
-#if defined(_AIX)
-#include <malloc.h>
- #pragma alloca
-#else /* not MSDOS, __TURBOC__, or _AIX */
-#ifdef __hpux
-#ifdef __cplusplus
-extern "C" {
-void *alloca (unsigned int);
-};
-#else /* not __cplusplus */
-void *alloca ();
-#endif /* not __cplusplus */
-#endif /* __hpux */
-#endif /* not _AIX */
-#endif /* not MSDOS, or __TURBOC__ */
-#endif /* not sparc.  */
-#endif /* not GNU C.  */
-#endif /* alloca not defined.  */
-
 /* This is the parser code that is written into each bison parser
   when the %semantic_parser declaration is not specified in the grammar.
@@ -235,4 +212,52 @@
   used when %semantic_parser is specified.  */
 
+#ifndef YYSTACK_USE_ALLOCA
+#ifdef alloca
+#define YYSTACK_USE_ALLOCA
+#else /* alloca not defined */
+#ifdef __GNUC__
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#else /* not GNU C.  */
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
+#define YYSTACK_USE_ALLOCA
+#include <alloca.h>
+#else /* not sparc */
+/* We think this test detects Watcom and Microsoft C.  */
+/* This used to test MSDOS, but that is a bad idea
+   since that symbol is in the user namespace.  */
+#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
+#if 0 /* No need for malloc.h, which pollutes the namespace;
+	 instead, just don't use alloca.  */
+#include <malloc.h>
+#endif
+#else /* not MSDOS, or __TURBOC__ */
+#if defined(_AIX)
+/* I don't know what this was needed for, but it pollutes the namespace.
+   So I turned it off.   rms, 2 May 1997.  */
+/* #include <malloc.h>  */
+ #pragma alloca
+#define YYSTACK_USE_ALLOCA
+#else /* not MSDOS, or __TURBOC__, or _AIX */
+#if 0
+#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
+		 and on HPUX 10.  Eventually we can turn this on.  */
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#endif /* __hpux */
+#endif
+#endif /* not _AIX */
+#endif /* not MSDOS, or __TURBOC__ */
+#endif /* not sparc */
+#endif /* not GNU C */
+#endif /* alloca not defined */
+#endif /* YYSTACK_USE_ALLOCA not defined */
+
+#ifdef YYSTACK_USE_ALLOCA
+#define YYSTACK_ALLOC alloca
+#else
+#define YYSTACK_ALLOC malloc
+#endif
+
 /* Note: there must be only one dollar sign in this file.
    It is replaced by the list of actions, each action
@@ -243,6 +268,6 @@
 #define YYEMPTY		-2
 #define YYEOF		0
-#define YYACCEPT	return(0)
-#define YYABORT 	return(1)
+#define YYACCEPT	goto yyacceptlab
+#define YYABORT 	goto yyabortlab
 #define YYERROR		goto yyerrlab1
 /* Like YYERROR except do call yyerror.
@@ -326,9 +351,9 @@
 #endif
 
-/* Prevent warning if -Wstrict-prototypes.  */
-#ifdef __GNUC__
-int yyparse (void);
-#endif
-
+
+/* Define __yy_memcpy.  Note that the size argument
+   should be passed with type unsigned int, because that is what the non-GCC
+   definitions require.  With GCC, __builtin_memcpy takes an arg
+   of type size_t, but it can handle unsigned int.  */
 
 #if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
@@ -343,5 +368,5 @@
      char *to;
      char *from;
-     int count;
+     unsigned int count;
 {
   register char *f = from;
@@ -358,8 +383,8 @@
    in available built-in functions on various systems.  */
 static void
-__yy_memcpy (char *to, char *from, int count)
+__yy_memcpy (char *to, char *from, unsigned int count)
 {
+  register char *t = to;
   register char *f = from;
-  register char *t = to;
   register int i = count;
 
@@ -372,5 +397,5 @@
 
 
-#line 196 "/usr/lib/bison.simple"
+#line 217 "/usr/lib/bison.simple"
 
 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
@@ -393,4 +418,13 @@
 #endif /* not YYPARSE_PARAM */
 
+/* Prevent warning if -Wstrict-prototypes.  */
+#ifdef __GNUC__
+#ifdef YYPARSE_PARAM
+int yyparse (void *);
+#else
+int yyparse (void);
+#endif
+#endif
+
 int
 yyparse(YYPARSE_PARAM_ARG)
@@ -421,4 +455,5 @@
 
   int yystacksize = YYINITDEPTH;
+  int yyfree_stacks = 0;
 
 #ifdef YYPURE
@@ -505,4 +540,12 @@
 	{
 	  yyerror("parser stack overflow");
+	  if (yyfree_stacks)
+	    {
+	      free (yyss);
+	      free (yyvs);
+#ifdef YYLSP_NEEDED
+	      free (yyls);
+#endif
+	    }
 	  return 2;
 	}
@@ -510,11 +553,17 @@
       if (yystacksize > YYMAXDEPTH)
 	yystacksize = YYMAXDEPTH;
-      yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
-      __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
-      yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
-      __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
-#ifdef YYLSP_NEEDED
-      yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
-      __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
+#ifndef YYSTACK_USE_ALLOCA
+      yyfree_stacks = 1;
+#endif
+      yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
+      __yy_memcpy ((char *)yyss, (char *)yyss1,
+		   size * (unsigned int) sizeof (*yyssp));
+      yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
+      __yy_memcpy ((char *)yyvs, (char *)yyvs1,
+		   size * (unsigned int) sizeof (*yyvsp));
+#ifdef YYLSP_NEEDED
+      yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
+      __yy_memcpy ((char *)yyls, (char *)yyls1,
+		   size * (unsigned int) sizeof (*yylsp));
 #endif
 #endif /* no yyoverflow */
@@ -677,46 +726,46 @@
 
 case 4:
-#line 61 "../factory-normal/readcf.y"
+#line 66 "readcf.y"
 { *retvalue = yyvsp[-1].getval(); return 0; ;
     break;}
 case 5:
-#line 64 "../factory-normal/readcf.y"
+#line 69 "readcf.y"
 { yyval = yyvsp[0]; ;
     break;}
 case 6:
-#line 65 "../factory-normal/readcf.y"
+#line 70 "readcf.y"
 { yyval = yyvsp[-2].getval() + yyvsp[0].getval(); ;
     break;}
 case 7:
-#line 66 "../factory-normal/readcf.y"
+#line 71 "readcf.y"
 { yyval = yyvsp[-2].getval() - yyvsp[0].getval(); ;
     break;}
 case 8:
-#line 67 "../factory-normal/readcf.y"
+#line 72 "readcf.y"
 { yyval = yyvsp[-2].getval() * yyvsp[0].getval(); ;
     break;}
 case 9:
-#line 68 "../factory-normal/readcf.y"
+#line 73 "readcf.y"
 { yyval = yyvsp[-2].getval() / yyvsp[0].getval(); ;
     break;}
 case 10:
-#line 69 "../factory-normal/readcf.y"
+#line 74 "readcf.y"
 { yyval = -yyvsp[0].getval(); ;
     break;}
 case 11:
-#line 70 "../factory-normal/readcf.y"
+#line 75 "readcf.y"
 { yyval = yyvsp[0].getval(); ;
     break;}
 case 12:
-#line 71 "../factory-normal/readcf.y"
+#line 76 "readcf.y"
 { yyval = power( yyvsp[-2].getval(), yyvsp[0].getintval() ); ;
     break;}
 case 13:
-#line 72 "../factory-normal/readcf.y"
+#line 77 "readcf.y"
 { yyval = yyvsp[-1].getval(); ;
     break;}
 }
    /* the action file gets copied in in place of this dollarsign */
-#line 498 "/usr/lib/bison.simple"
+#line 543 "/usr/lib/bison.simple"
 
 
@@ -914,6 +963,30 @@
   yystate = yyn;
   goto yynewstate;
+
+ yyacceptlab:
+  /* YYACCEPT comes here.  */
+  if (yyfree_stacks)
+    {
+      free (yyss);
+      free (yyvs);
+#ifdef YYLSP_NEEDED
+      free (yyls);
+#endif
+    }
+  return 0;
+
+ yyabortlab:
+  /* YYABORT comes here.  */
+  if (yyfree_stacks)
+    {
+      free (yyss);
+      free (yyvs);
+#ifdef YYLSP_NEEDED
+      free (yyls);
+#endif
+    }
+  return 1;
 }
-#line 75 "../factory-normal/readcf.y"
+#line 80 "readcf.y"
 
 
Index: factory/readcf.y
===================================================================
--- factory/readcf.y	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/readcf.y	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: readcf.y,v 1.8 1998-06-12 14:33:57 schmidt Exp $ */
+/* $Id: readcf.y,v 1.9 2006-05-15 08:17:55 Singular Exp $ */
 
 %{
@@ -13,5 +13,10 @@
 
 #include <ctype.h>
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
+
 
 #include "assert.h"
Index: factory/templates/ftmpl_array.h
===================================================================
--- factory/templates/ftmpl_array.h	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/templates/ftmpl_array.h	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: ftmpl_array.h,v 1.5 1997-06-19 13:11:13 schmidt Exp $ */
+/* $Id: ftmpl_array.h,v 1.6 2006-05-15 08:17:56 Singular Exp $ */
 
 #ifndef INCL_ARRAY_H
@@ -8,5 +8,9 @@
 
 #ifndef NOSTREAMIO
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
 #endif /* NOSTREAMIO */
 
Index: factory/templates/ftmpl_factor.h
===================================================================
--- factory/templates/ftmpl_factor.h	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/templates/ftmpl_factor.h	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: ftmpl_factor.h,v 1.5 1998-06-03 14:51:33 pohl Exp $ */
+/* $Id: ftmpl_factor.h,v 1.6 2006-05-15 08:17:56 Singular Exp $ */
 
 #ifndef INCL_FACTOR_H
@@ -8,5 +8,9 @@
 
 #ifndef NOSTREAMIO
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
 #endif /* NOSTREAMIO */
 
Index: factory/templates/ftmpl_list.h
===================================================================
--- factory/templates/ftmpl_list.h	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/templates/ftmpl_list.h	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: ftmpl_list.h,v 1.8 2005-01-13 15:10:23 Singular Exp $ */
+/* $Id: ftmpl_list.h,v 1.9 2006-05-15 08:17:56 Singular Exp $ */
 
 #ifndef INCL_LIST_H
@@ -8,5 +8,9 @@
 
 #ifndef NOSTREAMIO
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
 #endif /* NOSTREAMIO */
 
Index: factory/templates/ftmpl_matrix.h
===================================================================
--- factory/templates/ftmpl_matrix.h	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/templates/ftmpl_matrix.h	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: ftmpl_matrix.h,v 1.11 2005-06-13 09:46:35 Singular Exp $ */
+/* $Id: ftmpl_matrix.h,v 1.12 2006-05-15 08:17:57 Singular Exp $ */
 
 #ifndef INCL_MATRIX_H
@@ -8,5 +8,9 @@
 
 #ifndef NOSTREAMIO
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
 #endif /* NOSTREAMIO */
 
Index: factory/variable.h
===================================================================
--- factory/variable.h	(revision e5102ce459d04b385f3c94f631b05329d7681e20)
+++ factory/variable.h	(revision 1dc6163f5dbd22ee9839decb93a02494ac071aca)
@@ -1,4 +1,4 @@
 /* emacs edit mode for this file is -*- C++ -*- */
-/* $Id: variable.h,v 1.5 2006-04-21 15:37:10 Singular Exp $ */
+/* $Id: variable.h,v 1.6 2006-05-15 08:17:55 Singular Exp $ */
 
 #ifndef INCL_VARIABLE_H
@@ -8,5 +8,9 @@
 
 #ifndef NOSTREAMIO
+#ifdef HAVE_IOSTREAM
+#include <iostream>
+#elif defined(HAVE_IOSTREAM_H)
 #include <iostream.h>
+#endif
 #endif /* NOSTREAMIO */
 
