Index: Singular/Cache.h
===================================================================
--- Singular/Cache.h	(revision 4b5098278b256cb9f73dc0b32dedd20101972d76)
+++ Singular/Cache.h	(revision 308a766afffc51141b50332c5e1b2d3849433dce)
@@ -4,7 +4,7 @@
 #include <string>
 #include <list>
-#include <assert.h>
-
-using namespace std;
+
+// #include <assert.h>
+// using namespace std;
 
 /*! \class Cache
@@ -75,5 +75,5 @@
      * as long as the pair <c>key(_rank(i)) -->  value(_rank(i))</c>.
      */
-     list<int> _rank;
+   std::list<int> _rank;
   
      /**
@@ -83,5 +83,5 @@
      * in KeyClass.
      */
-     list<KeyClass> _key;
+     std::list<KeyClass> _key;
   
      /**
@@ -91,10 +91,10 @@
      * argument \c _key[i]).
      */
-     list<ValueClass> _value;
+     std::list<ValueClass> _value;
      
      /**
      * container for the weights of all cached values
      */
-     list<int> _weights;
+     std::list<int> _weights;
   
      /**
@@ -104,5 +104,5 @@
      * const, as the user would expect for these methods.
      */
-     mutable typename list<KeyClass>::const_iterator _itKey;
+     mutable typename std::list<KeyClass>::const_iterator _itKey;
      
      /**
@@ -112,5 +112,5 @@
      * const, as the user would expect for these methods.
      */
-     mutable typename list<ValueClass>::const_iterator _itValue;
+     mutable typename std::list<ValueClass>::const_iterator _itValue;
   
      /**
@@ -314,5 +314,5 @@
      *         string
      */
-     string toString () const;
+   std::string toString () const;
   
      /**
@@ -324,5 +324,5 @@
 };
 
-#include <CacheImplementation.h>
+#include "CacheImplementation.h"
 
 #endif
Index: Singular/CacheImplementation.h
===================================================================
--- Singular/CacheImplementation.h	(revision 4b5098278b256cb9f73dc0b32dedd20101972d76)
+++ Singular/CacheImplementation.h	(revision 308a766afffc51141b50332c5e1b2d3849433dce)
@@ -1,4 +1,6 @@
 #ifndef CACHE_IMPLEMENTATION_H
 #define CACHE_IMPLEMENTATION_H
+
+#include <reporter/reporter.h>
 
 #include <cstdio> // for sprintf
@@ -53,5 +55,5 @@
 {
   _itKey = _key.end(); // referring to past-the-end element in the list
-  typename list<KeyClass>::const_iterator itKey;
+   typename std::list<KeyClass>::const_iterator itKey;
   _itValue = _value.begin();
   /* As _key is a sorted list, the following could actually be implemented
@@ -80,5 +82,5 @@
        thus, getValue has been called although hasKey
        produced no match */
-    assert(false);
+    assume(false);
 
   return *_itValue;
@@ -123,5 +125,5 @@
      erasing the last entry which is only implemented for forward
      iterators by std::list. */
-  list<int>::iterator itRank;
+   std::list<int>::iterator itRank;
   for (itRank = _rank.begin(); itRank != _rank.end(); itRank++) { }
   itRank--; /* Now, this forward iterator points to the last list entry. */
@@ -132,7 +134,7 @@
   /* now delete entries in _key and _value with index deleteIndex */
   int k = 0;
-  typename list<KeyClass>::iterator itKey;
-  typename list<ValueClass>::iterator itValue = _value.begin();
-  typename list<int>::iterator itWeights = _weights.begin();
+  typename std::list<KeyClass>::iterator itKey;
+  typename std::list<ValueClass>::iterator itValue = _value.begin();
+  typename std::list<int>::iterator itWeights = _weights.begin();
   for (itKey = _key.begin(); itKey != _key.end(); itKey++)
   {
@@ -176,10 +178,10 @@
                                        keyWasContained == false */
   int k = 0;
-  typename list<KeyClass>::iterator itKey;
+  typename std::list<KeyClass>::iterator itKey;
   // itOldValue will later only be used in the case keyWasContained == true: */
-  typename list<ValueClass>::iterator itOldValue = _value.begin();
+  typename std::list<ValueClass>::iterator itOldValue = _value.begin();
   /* itOldWeights will later only be used in the case
      keyWasContained == true */
-  typename list<int>::iterator itOldWeights = _weights.begin();
+  typename std::list<int>::iterator itOldWeights = _weights.begin();
   for (itKey = _key.begin(); itKey != _key.end(); itKey++)
   {
@@ -203,5 +205,5 @@
   int newWeight = value.getWeight();
   k = 0;
-  typename list<ValueClass>::iterator itValue = _value.begin();
+  typename std::list<ValueClass>::iterator itValue = _value.begin();
   for (itValue = _value.begin(); itValue != _value.end(); itValue++)
   {
@@ -229,5 +231,5 @@
        _rank[oldIndexInRank] == oldIndexInKey, i.e.
        _key[_rank[oldIndexInRank]] == key: */
-    list<int>::iterator itRank;
+    std::list<int>::iterator itRank;
     k = 0;
     for (itRank = _rank.begin(); itRank != _rank.end(); itRank++)
@@ -306,5 +308,5 @@
        Let's make room for the assignment
        _rank[newIndexInRank] := newIndexInKey: */
-    list<int>::iterator itRank;
+    std::list<int>::iterator itRank;
     for (itRank = _rank.begin(); itRank != _rank.end(); itRank++)
     {
@@ -323,5 +325,5 @@
     /* let's insert new key and new value at index newIndexInKey: */
     itValue = _value.begin();
-    typename list<int>::iterator itWeights = _weights.begin();
+    typename std::list<int>::iterator itWeights = _weights.begin();
     k = 0;
     for (itKey = _key.begin(); itKey != _key.end(); itKey++)
@@ -344,6 +346,6 @@
                                  new (key, value)-pair */
 
-  assert(_rank.size() == _key.size());
-  assert(_rank.size() == _value.size());
+  assume(_rank.size() == _key.size());
+  assume(_rank.size() == _value.size());
   return !result; /* true iff the new (key --> value) pair is
                      actually in the cache now */
@@ -351,8 +353,8 @@
 
 template<class KeyClass, class ValueClass>
-string Cache<KeyClass, ValueClass>::toString() const
+std::string Cache<KeyClass, ValueClass>::toString() const
 {
   char h[10];
-  string s = "Cache:";
+  std::string s = "Cache:";
   s += "\n   entries: ";
   sprintf(h, "%d", getNumberOfEntries()); s += h;
@@ -371,6 +373,6 @@
     int k = 1;
     s += "\n   (key --> value) pairs in ascending order of keys:";
-    typename list<KeyClass>::const_iterator itKey;
-    typename list<ValueClass>::const_iterator itValue = _value.begin();
+    typename std::list<KeyClass>::const_iterator itKey;
+    typename std::list<ValueClass>::const_iterator itValue = _value.begin();
     for (itKey = _key.begin(); itKey != _key.end(); itKey++)
     {
@@ -385,5 +387,5 @@
     }
     s += "\n   (key --> value) pairs in descending order of ranks:";
-    list<int>::const_iterator itRank;
+    std::list<int>::const_iterator itRank;
     int r = 1;
     for (itRank = _rank.begin(); itRank != _rank.end(); itRank++)
@@ -413,5 +415,5 @@
 void Cache<KeyClass, ValueClass>::print() const
 {
-  cout << this->toString();
+  PrintS(this->toString().c_str());
 }
 
Index: Singular/Minor.cc
===================================================================
--- Singular/Minor.cc	(revision 4b5098278b256cb9f73dc0b32dedd20101972d76)
+++ Singular/Minor.cc	(revision 308a766afffc51141b50332c5e1b2d3849433dce)
@@ -1,11 +1,12 @@
-#include <iostream>
-
 #include "config.h"
 #include <kernel/mod2.h>
+
+#include "Minor.h"
+
 #include <kernel/structs.h>
 #include <kernel/polys.h>
-#include <Minor.h>
 #include <kernel/febase.h>
 
+using namespace std;
 
 void MinorKey::reset()
@@ -114,5 +115,5 @@
 void MinorKey::print() const
 {
-  cout << this->toString();
+  PrintS(this->toString().c_str());
 }
 
@@ -145,5 +146,5 @@
   }
   /* We should never reach this line of code. */
-  assert(false);
+  assume(false);
 }
 
@@ -176,5 +177,5 @@
   }
   /* We should never reach this line of code. */
-  assert(false);
+  assume(false);
 }
 
@@ -198,5 +199,4 @@
     }
   }
-  return;
 }
 
@@ -220,5 +220,4 @@
     }
   }
-  return;
 }
 
@@ -251,5 +250,5 @@
   }
   /* We should never reach this line of code. */
-  assert(false);
+  assume(false);
 }
 
@@ -282,5 +281,5 @@
   }
   /* We should never reach this line of code. */
-  assert(false);
+  assume(false);
 }
 
@@ -439,5 +438,5 @@
 bool MinorKey::operator==(const MinorKey& mk) const
 {
-  assert(false);
+  assume(false);
   return this->compare(mk) == 0;
 }
@@ -447,5 +446,5 @@
 bool MinorKey::operator<(const MinorKey& mk) const
 {
-  assert(false);
+  assume(false);
   return this->compare(mk) == -1;
 }
@@ -833,5 +832,5 @@
 int MinorValue::getWeight () const
 {
-  assert(false);  /* must be overridden in derived classes */
+  assume(false);  /* must be overridden in derived classes */
   return 0;
 }
@@ -841,5 +840,5 @@
 bool MinorValue::operator==(const MinorValue& mv) const
 {
-  assert(false);
+  assume(false);
   return (this == &mv);  /* compare addresses of both objects */
 }
@@ -847,5 +846,5 @@
 string MinorValue::toString () const
 {
-  assert(false);  /* must be overridden in derived classes */
+  assume(false);  /* must be overridden in derived classes */
   return "";
 }
@@ -855,5 +854,5 @@
 bool MinorValue::operator<(const MinorValue& mv) const
 {
-  assert(false);
+  assume(false);
   return (this < &mv);  /* compare addresses of both objects */
 }
@@ -896,5 +895,5 @@
 void MinorValue::print() const
 {
-  cout << this->toString();
+  PrintS(this->toString().c_str());
 }
 
Index: Singular/Minor.h
===================================================================
--- Singular/Minor.h	(revision 4b5098278b256cb9f73dc0b32dedd20101972d76)
+++ Singular/Minor.h	(revision 308a766afffc51141b50332c5e1b2d3849433dce)
@@ -2,10 +2,13 @@
 #define MINOR_H
 
-#include <assert.h>
+// #include <assert.h>
 #include <string>
 
-#include <kernel/polys.h>
-
-using namespace std;
+struct spolyrec; typedef struct spolyrec polyrec; typedef polyrec* poly;
+struct ip_sring; typedef struct ip_sring* ring; typedef struct ip_sring const* const_ring;
+
+struct sip_sideal; typedef struct sip_sideal *       ideal;
+
+// using namespace std;
 
 /*! \class MinorKey
@@ -391,5 +394,5 @@
      * string
      */
-     string toString () const;
+   std::string toString () const;
 
      /**
@@ -683,5 +686,5 @@
     *         string
     */
-    virtual string toString () const;
+   virtual std::string toString () const;
     
     /**
@@ -771,5 +774,5 @@
     * string
     */
-    string toString () const;
+   std::string toString () const;
 };
 
@@ -858,5 +861,5 @@
     * string
     */
-    string toString () const;
+   std::string toString () const;
 };
 
Index: Singular/MinorInterface.cc
===================================================================
--- Singular/MinorInterface.cc	(revision 4b5098278b256cb9f73dc0b32dedd20101972d76)
+++ Singular/MinorInterface.cc	(revision 308a766afffc51141b50332c5e1b2d3849433dce)
@@ -1,15 +1,19 @@
+#include "config.h"
+#include <kernel/mod2.h>
+
 // include before anything to avoid clashes with stdio.h included elsewhere
-#include <cstdio>
-
-#include <MinorInterface.h>
-#include <MinorProcessor.h>
+// #include <cstdio>
+
+#include "MinorInterface.h"
+#include "MinorProcessor.h"
+
+#include <polys/simpleideals.h>
 
 #include <kernel/polys.h>
 #include <kernel/structs.h>
-
-#include "config.h"
-#include <kernel/mod2.h>
+#include <kernel/kstd1.h>
 #include <kernel/ideals.h>
-#include <kernel/kstd1.h>
+
+using namespace std;
 
 bool currRingIsOverIntegralDomain ()
@@ -172,5 +176,5 @@
 #if (defined COUNT_AND_PRINT_OPERATIONS) && (COUNT_AND_PRINT_OPERATIONS > 1)
     qqq++;
-    printf("after %d", qqq);
+    Print("after %d", qqq);
     printCounters ("-th minor", false);
 #endif
@@ -401,5 +405,5 @@
 #if (defined COUNT_AND_PRINT_OPERATIONS) && (COUNT_AND_PRINT_OPERATIONS > 1)
     qqq++;
-    printf("after %d", qqq);
+    Print("after %d", qqq);
     printCounters ("-th minor", false);
 #endif
Index: Singular/MinorInterface.h
===================================================================
--- Singular/MinorInterface.h	(revision 4b5098278b256cb9f73dc0b32dedd20101972d76)
+++ Singular/MinorInterface.h	(revision 308a766afffc51141b50332c5e1b2d3849433dce)
@@ -3,6 +3,10 @@
 
 
-#include <polys/simpleideals.h>
-#include <kernel/polys.h>
+struct spolyrec; typedef struct spolyrec polyrec; typedef polyrec* poly;
+struct ip_sring; typedef struct ip_sring* ring; typedef struct ip_sring const* const_ring;
+
+struct sip_sideal; typedef struct sip_sideal *       ideal;
+
+class ip_smatrix; typedef ip_smatrix *       matrix;
 
 /* all computations are module char, if char <> 0;
Index: Singular/MinorProcessor.cc
===================================================================
--- Singular/MinorProcessor.cc	(revision 4b5098278b256cb9f73dc0b32dedd20101972d76)
+++ Singular/MinorProcessor.cc	(revision 308a766afffc51141b50332c5e1b2d3849433dce)
@@ -1,11 +1,17 @@
-#include <MinorProcessor.h>
-
 #include "config.h"
 #include <kernel/mod2.h>
+
+#include "MinorProcessor.h"
+
+#include <polys/kbuckets.h>
+
 #include <kernel/structs.h>
 #include <kernel/polys.h>
 #include <kernel/febase.h>
 #include <kernel/kstd1.h>
-#include <polys/kbuckets.h>
+
+#include <kernel/ideals.h>
+
+using namespace std;
 
 #ifdef COUNT_AND_PRINT_OPERATIONS
@@ -213,5 +219,5 @@
 {
   /* This is a non-recursive implementation. */
-  assert( (i >= 0) && (j >= 0) && (i >= j));
+  assume( (i >= 0) && (j >= 0) && (i >= j));
   if (j == 0 || i == j) return 1;
   int result = 1;
@@ -227,5 +233,5 @@
 {
   /* This is a non-recursive implementation. */
-  assert(i >= 0);
+  assume(i >= 0);
   int result = 1;
   for (int j = 1; j <= i; j++) result *= j;
@@ -444,5 +450,5 @@
      const ideal& iSB)
 {
-  assert(k > 0); /* k is the minor's dimension; the minor must be at least
+  assume(k > 0); /* k is the minor's dimension; the minor must be at least
                     1x1 */
   /* The method works by recursion, and using Lapace's Theorem along the
@@ -561,5 +567,5 @@
      const ideal& iSB)
 {
-  assert(k > 0); /* k is the minor's dimension; the minor must be at least
+  assume(k > 0); /* k is the minor's dimension; the minor must be at least
                     1x1 */
   int *theRows=new int[k]; mk.getAbsoluteRowIndices(theRows);
@@ -652,5 +658,5 @@
      const int characteristic, const ideal& iSB)
 {
-  assert(k > 0); /* k is the minor's dimension; the minor must be at least
+  assume(k > 0); /* k is the minor's dimension; the minor must be at least
                     1x1 */
   /* The method works by recursion, and using Lapace's Theorem along
@@ -944,5 +950,5 @@
                                                           const ideal& iSB)
 {
-  assert(k > 0); /* k is the minor's dimension; the minor must be at least
+  assume(k > 0); /* k is the minor's dimension; the minor must be at least
                     1x1 */
   /* The method works by recursion, and using Lapace's Theorem along the
@@ -1081,5 +1087,5 @@
      const ideal& iSB)
 {
-  assert(k > 0); /* k is the minor's dimension; the minor must be at least
+  assume(k > 0); /* k is the minor's dimension; the minor must be at least
                     1x1 */
   /* The method works by recursion, and using Lapace's Theorem along
@@ -1384,5 +1390,5 @@
                                                           const ideal& iSB)
 {
-  assert(k > 0); /* k is the minor's dimension; the minor must be at least
+  assume(k > 0); /* k is the minor's dimension; the minor must be at least
                     1x1 */
   int *theRows=new int[k]; mk.getAbsoluteRowIndices(theRows);
Index: Singular/MinorProcessor.h
===================================================================
--- Singular/MinorProcessor.h	(revision 4b5098278b256cb9f73dc0b32dedd20101972d76)
+++ Singular/MinorProcessor.h	(revision 308a766afffc51141b50332c5e1b2d3849433dce)
@@ -2,7 +2,13 @@
 #define MINOR_PROCESSOR_H
 
-#include <Cache.h>
-#include <Minor.h>
-#include <assert.h>
+#include "Cache.h"
+#include "Minor.h"
+
+struct spolyrec; typedef struct spolyrec polyrec; typedef polyrec* poly;
+struct ip_sring; typedef struct ip_sring* ring; typedef struct ip_sring const* const_ring;
+
+struct sip_sideal; typedef struct sip_sideal *       ideal;
+
+// #include <assert.h>
 #include <string>
 
@@ -279,5 +285,5 @@
     * string
     */
-    virtual string toString () const;
+   virtual std::string toString () const;
 
     /**
@@ -546,5 +552,5 @@
     *         string
     */
-    string toString () const;
+   std::string toString () const;
 };
 
@@ -760,5 +766,5 @@
     *         string
     */
-    string toString () const;
+   std::string toString () const;
 };
 
