Index: Singular/extra.cc
===================================================================
--- Singular/extra.cc	(revision 64a88ed9bbe06816b964e301999e88484a0abab6)
+++ Singular/extra.cc	(revision f5da374c614ef679bad9ff3b7d6e407d7f0dc8b0)
@@ -2,5 +2,5 @@
 *  Computer Algebra System SINGULAR      *
 *****************************************/
-/* $Id: extra.cc,v 1.312 2009-08-06 10:18:00 Singular Exp $ */
+/* $Id: extra.cc,v 1.313 2009-08-13 17:24:45 motsak Exp $ */
 /*
 * ABSTRACT: general interface to internals of Singular ("system" command)
@@ -753,19 +753,20 @@
 
     /// Returns old SyzCompLimit, can set new limit
-    if(strcmp(sys_cmd,"SetISReferrence")==0)
-    {
-      extern void rSetISReference(const ideal F, const int l, const int p, const intvec * componentWeights, const ring r);
+    if(strcmp(sys_cmd,"SetInducedReferrence")==0)
+    {
+      extern void rSetISReference(const ideal F, const int rank, const int p, const intvec * componentWeights, const ring r);
 
       if ((h!=NULL) && ( (h->Typ()==IDEAL_CMD) || (h->Typ()==MODUL_CMD)))
-       {
+      {
         intvec * componentWeights = (intvec *)atGet(h,"isHomog",INTVEC_CMD); // No copy?!
+
         const ideal F = (ideal)h->Data(); ; // No copy!
         h=h->next;
 
-        int l = 0; // Starting syz-comp (1st: i+1)
+        int rank = idRankFreeModule(F, currRing, currRing); // Starting syz-comp (1st: i+1)
 
         if ((h!=NULL) && (h->Typ()==INT_CMD))
         {
-          l = (int)((long)(h->Data())); h=h->next;
+          rank = (int)((long)(h->Data())); h=h->next;
         }
 
@@ -778,5 +779,5 @@
 
         // F & componentWeights belong to that ordering block of currRing now:
-        rSetISReference(F, l, p, componentWeights, currRing); // F and componentWeights will be copied!
+        rSetISReference(F, rank, p, componentWeights, currRing); // F and componentWeights will be copied!
       }
       else
@@ -787,4 +788,39 @@
       return FALSE;
     }
+
+
+//    F = system("ISUpdateComponents", F, V, MIN );
+//    // replace gen(i) -> gen(MIN + V[i-MIN]) for all i > MIN in all terms from F!
+//    extern void pISUpdateComponents(ideal F, const intvec *const V, const int MIN, const ring r);
+    if(strcmp(sys_cmd,"ISUpdateComponents")==0)
+    {
+
+      PrintS("ISUpdateComponents:.... \n");
+
+      if ((h!=NULL) && (h->Typ()==MODUL_CMD))
+      {
+        ideal F = (ideal)h->Data(); ; // No copy!
+        h=h->next;
+
+        if ((h!=NULL) && (h->Typ()==INTVEC_CMD))
+        {
+          const intvec* const V = (const intvec* const) h->Data();
+          h=h->next;
+
+          if ((h!=NULL) && (h->Typ()==INT_CMD))
+          {
+            const int MIN = (int)((long)(h->Data()));
+
+            extern void pISUpdateComponents(ideal F, const intvec *const V, const int MIN, const ring r);
+            pISUpdateComponents(F, V, MIN, currRing);
+            return FALSE;
+          }
+        }
+      }
+
+      WerrorS("`system(\"ISUpdateComponents\",<module>, intvec, int)` expected");
+      return TRUE;
+    }
+    
 
 
@@ -2059,7 +2095,13 @@
 #endif
 /*==================== generic debug ==================================*/
-#ifdef PDEBUG
-      if(strcmp(sys_cmd,"DebugPrint")==0)
-      {
+//#ifdef PDEBUG
+      if(strcmp(sys_cmd,"DetailedPrint")==0)
+      {
+        if( h == NULL )
+        {
+          WarnS("DetailedPrint needs arguments...");
+          return TRUE;
+        }
+        
         if( h->Typ() == RING_CMD)
         {
@@ -2081,6 +2123,21 @@
         if( h->Typ() == IDEAL_CMD || h->Typ() == MODUL_CMD)
         {
-          const int nTerms = 3;
           const ideal id = (const ideal)h->Data();
+          
+          h = h->Next();
+          
+          int nTerms = 3;
+
+          if( h!= NULL && h->Typ() == INT_CMD )
+          {
+            int n = (int)(long)(h->Data());
+            if( n < 0 )
+            {
+              Warn("Negative int argument: %d", n);
+            }
+            else
+              nTerms = n;
+          }
+          
           idShow(id, currRing, currRing, nTerms);
         }
@@ -2089,5 +2146,5 @@
       }
       else
-#endif
+//#endif
 /*==================== mtrack ==================================*/
     if(strcmp(sys_cmd,"mtrack")==0)
@@ -2104,5 +2161,5 @@
           fd = fopen((char*) h->Data(), "w");
           if (fd == NULL)
-            Warn("Can not open %s for writing og mtrack. Using stdout");
+            Warn("Can not open %s for writing og mtrack. Using stdout"); // %s  ???
         }
         if (h->Typ() == INT_CMD)
Index: Singular/iparith.cc
===================================================================
--- Singular/iparith.cc	(revision 64a88ed9bbe06816b964e301999e88484a0abab6)
+++ Singular/iparith.cc	(revision f5da374c614ef679bad9ff3b7d6e407d7f0dc8b0)
@@ -2,5 +2,5 @@
 *  Computer Algebra System SINGULAR     *
 ****************************************/
-/* $Id: iparith.cc,v 1.512 2009-07-28 14:18:34 Singular Exp $ */
+/* $Id: iparith.cc,v 1.513 2009-08-13 17:24:45 motsak Exp $ */
 
 /*
@@ -2593,4 +2593,10 @@
 static BOOLEAN jjPlural_num_poly(leftv res, leftv a, leftv b)
 {
+  if( currRing->qideal != NULL )
+  {
+    WerrorS("basering must NOT be a qring!");
+    return TRUE;
+  }
+  
   if (iiOp==NCALGEBRA_CMD)
   {
@@ -2608,4 +2614,10 @@
 static BOOLEAN jjPlural_num_mat(leftv res, leftv a, leftv b)
 {
+  if( currRing->qideal != NULL )
+  {
+    WerrorS("basering must NOT be a qring!");
+    return TRUE;
+  }
+
   if (iiOp==NCALGEBRA_CMD)
   {
@@ -2623,4 +2635,10 @@
 static BOOLEAN jjPlural_mat_poly(leftv res, leftv a, leftv b)
 {
+  if( currRing->qideal != NULL )
+  {
+    WerrorS("basering must NOT be a qring!");
+    return TRUE;
+  }
+
   if (iiOp==NCALGEBRA_CMD)
   {
@@ -2638,4 +2656,10 @@
 static BOOLEAN jjPlural_mat_mat(leftv res, leftv a, leftv b)
 {
+  if( currRing->qideal != NULL )
+  {
+    WerrorS("basering must NOT be a qring!");
+    return TRUE;
+  }
+
   if (iiOp==NCALGEBRA_CMD)
   {
Index: Singular/mod2.h.in
===================================================================
--- Singular/mod2.h.in	(revision 64a88ed9bbe06816b964e301999e88484a0abab6)
+++ Singular/mod2.h.in	(revision f5da374c614ef679bad9ff3b7d6e407d7f0dc8b0)
@@ -6,5 +6,5 @@
  *          DO NOT EDIT!
  *
- *  Version: $Id: mod2.h.in,v 1.147 2009-07-28 14:18:35 Singular Exp $
+ *  Version: $Id: mod2.h.in,v 1.148 2009-08-13 17:24:45 motsak Exp $
  *******************************************************************/
 #ifndef MOD2_H
@@ -109,5 +109,5 @@
 #undef HAVE_SIGINTERRUPT
 /* define for boost includes and lib */
-#undef HAVE_BOOST_DYNAMIC_BITSET_HPP
+//////////////////////// #undef HAVE_BOOST_DYNAMIC_BITSET_HPP
 /* define for std:vector includes */
 #undef USE_STDVECBOOL
