Index: Singular/ipshell.cc
===================================================================
--- Singular/ipshell.cc	(revision 939cb2de97b36ac54735806ce7150c37d0450106)
+++ Singular/ipshell.cc	(revision b9642b1524d4ca8baf1a96bdb46325fe010f9911)
@@ -2,5 +2,5 @@
 *  Computer Algebra System SINGULAR     *
 ****************************************/
-/* $Id: ipshell.cc,v 1.197 2008-10-13 12:45:29 Singular Exp $ */
+/* $Id: ipshell.cc,v 1.198 2009-01-06 14:00:57 Singular Exp $ */
 /*
 * ABSTRACT:
@@ -1409,5 +1409,5 @@
   if(!idIsZeroDim(I)) return NULL; // not zero-dim.
   poly po=NULL;
-  if (currRing->OrdSgn== -1)
+  if (rHasLocalOrMixedOrdering(currRing))
   {
     scComputeHC(I,currQuotient,ak,po);
Index: kernel/gring.h
===================================================================
--- kernel/gring.h	(revision 939cb2de97b36ac54735806ce7150c37d0450106)
+++ kernel/gring.h	(revision b9642b1524d4ca8baf1a96bdb46325fe010f9911)
@@ -4,5 +4,5 @@
 *  Computer Algebra System SINGULAR     *
 ****************************************/
-/* $Id: gring.h,v 1.25 2008-07-15 16:27:58 motsak Exp $ */
+/* $Id: gring.h,v 1.26 2009-01-06 13:59:35 Singular Exp $ */
 /*
 * ABSTRACT additional defines etc for --with-plural
@@ -231,5 +231,5 @@
 
 /*
-  if (pOrdSgn==-1)
+  if (rHasLocalOrMixedOrder(currRing))
   {
     assume(currRing->GetNC()->p_Procs.LocalGB!=NULL);
Index: kernel/ideals.cc
===================================================================
--- kernel/ideals.cc	(revision 939cb2de97b36ac54735806ce7150c37d0450106)
+++ kernel/ideals.cc	(revision b9642b1524d4ca8baf1a96bdb46325fe010f9911)
@@ -2,5 +2,5 @@
 *  Computer Algebra System SINGULAR     *
 ****************************************/
-/* $Id: ideals.cc,v 1.62 2008-11-12 16:06:50 Singular Exp $ */
+/* $Id: ideals.cc,v 1.63 2009-01-06 13:59:35 Singular Exp $ */
 /*
 * ABSTRACT - all basic methods to manipulate ideals
@@ -687,7 +687,7 @@
 
   homog = idHomModule(h1,currQuotient,&wth);
-  if ((currRing->OrdSgn == 1) && (!homog))
-  {
-    Warn("minbase applies only to the local or homogeneous case");
+  if (rHasGlobalOrdering() && (!homog))
+  {
+    WarnS("minbase applies only to the local or homogeneous case");
     e=idCopy(h1);
     return e;
Index: kernel/ring.cc
===================================================================
--- kernel/ring.cc	(revision 939cb2de97b36ac54735806ce7150c37d0450106)
+++ kernel/ring.cc	(revision b9642b1524d4ca8baf1a96bdb46325fe010f9911)
@@ -2,5 +2,5 @@
 *  Computer Algebra System SINGULAR     *
 ****************************************/
-/* $Id: ring.cc,v 1.105 2008-11-12 12:38:59 Singular Exp $ */
+/* $Id: ring.cc,v 1.106 2009-01-06 13:59:35 Singular Exp $ */
 
 /*
@@ -1463,4 +1463,121 @@
   int i,j;
   ring res=(ring)omAllocBin(ip_sring_bin);
+  res->idroot=NULL; /* local objects */
+  //int*       order;  /* array of orderings */
+  //int*       block0; /* starting pos.*/
+  //int*       block1; /* ending pos.*/
+  //char**     parameter; /* names of parameters */
+  //number     minpoly;
+  //ideal      minideal;
+  //int**      wvhdl;  /* array of weight vectors */
+  //char **    names;  /* array of variable names */
+
+  res->options=r->options; /* ring dependent options */
+
+  // what follows below here should be set by rComplete, _only_
+  //long      *ordsgn;  /* array of +/- 1 (or 0) for comparing monomials */
+                       /*  ExpL_Size entries*/
+
+  // is NULL for lp or N == 1, otherwise non-NULL (with OrdSize > 0 entries) */
+  //sro_ord*   typ;   /* array of orderings + sizes, OrdSize entries */
+
+  //ideal      qideal; /* extension to the ring structure: qring */
+
+
+  //int*     VarOffset;
+  //int*     firstwv;
+
+  //struct omBin_s*   PolyBin; /* Bin from where monoms are allocated */
+  res->ch=r->ch;     /* characteristic */
+#ifdef HAVE_RINGS
+  res->ringtype=r->ringtype;  /* cring = 0 => coefficient field, cring = 1 => coeffs from Z/2^m */
+  //res->ringflaga=mpz_copy(r->ringflaga);
+  res->ringflagb=r->ringflagb;
+#endif
+  res->ref=0; /* reference counter to the ring */
+
+  res->float_len=r->float_len; /* additional char-flags */
+  res->float_len2=r->float_len2; /* additional char-flags */
+
+  res->N=r->N;      /* number of vars */
+
+  res->P=r->P;      /* number of pars */
+  res->OrdSgn=r->OrdSgn; /* 1 for polynomial rings, -1 otherwise */
+
+  res->firstBlockEnds=r->firstBlockEnds;
+#ifdef HAVE_PLURAL
+  res->real_var_start=r->real_var_start;
+  res->real_var_end=r->real_var_end;
+#endif
+
+#ifdef HAVE_SHIFTBBA
+  res->isLPring=r->isLPring; /* 0 for non-letterplace rings, otherwise the number of LP blocks, at least 1, known also as lV */
+#endif
+
+  res->VectorOut=r->VectorOut;
+  res->ShortOut=r->ShortOut;
+  res->CanShortOut=r->CanShortOut;
+  res->LexOrder=r->LexOrder; // TRUE if the monomial ordering has polynomial and power series blocks
+  res->MixedOrder=r->MixedOrder; // ?? 1 for lex ordering (except ls), -1 otherwise
+  res->ComponentOrder=r->ComponentOrder;
+
+
+  // what follows below here should be set by rComplete, _only_
+  // contains component, but no weight fields in E */
+  //short      ExpL_Size; // size of exponent vector in long
+  //short      CmpL_Size; // portions which need to be compared
+  /* number of long vars in exp vector:
+     long vars are those longs in the exponent vector which are
+     occupied by variables, only */
+  //short     VarL_Size;
+
+  //short      BitsPerExp; /* number of bits per exponent */
+  //short      ExpPerLong; /* maximal number of Exponents per long */
+
+  //short      pCompIndex; /* p->exp.e[pCompIndex] is the component */
+  //short      pOrdIndex; /* p->exp[pOrdIndex] is pGetOrd(p) */
+
+  //short      OrdSize; /* size of ord vector (in sro_ord) */
+
+
+  /* if >= 0, long vars in exp vector are consecutive and start there
+     if <  0, long vars in exp vector are not consecutive */
+  //short     VarL_LowIndex;
+  // number of exponents in r->VarL_Offset[0]
+  // is minimal number of exponents in a long var
+  //short     MinExpPerLong;
+
+  /* if this is > 0, then NegWeightL_Offset[0..size_1] is index of longs in
+   ExpVector whose values need an offset due to negative weights */
+  //short     NegWeightL_Size;
+  /* array of NegWeigtL_Size indicies */
+  //int*      NegWeightL_Offset;
+
+  /* array of size VarL_Size,
+     VarL_Offset[i] gets i-th long var in exp vector */
+  //int*      VarL_Offset;
+
+  /* mask for getting single exponents */
+  //unsigned long bitmask;
+  /* mask used for divisiblity tests */
+  //unsigned long divmask;
+
+  //p_Procs_s*    p_Procs;
+
+  /* FDeg and LDeg */
+  //pFDegProc     pFDeg;
+  //pLDegProc     pLDeg;
+
+  /* as it was determined by rComplete */
+  //pFDegProc     pFDegOrig;
+  /* and as it was determined before rOptimizeLDeg */
+  //pLDegProc     pLDegOrig;
+
+  //p_SetmProc    p_Setm;
+  //n_Procs_s*    cf;
+  //ring          algring;
+#ifdef HAVE_PLURAL
+  //  nc_struct*    _nc; // private
+#endif
 
   memcpy4(res,r,sizeof(ip_sring));
@@ -1744,5 +1861,5 @@
 }
 
-BOOLEAN rHasSimpleOrder(ring r)
+BOOLEAN rHasSimpleOrder(const ring r)
 {
   if (r->order[0] == ringorder_unspec) return TRUE;
@@ -1763,5 +1880,5 @@
 
 // returns TRUE, if simple lp or ls ordering
-BOOLEAN rHasSimpleLexOrder(ring r)
+BOOLEAN rHasSimpleLexOrder(const ring r)
 {
   return rHasSimpleOrder(r) &&
@@ -1772,5 +1889,5 @@
 }
 
-BOOLEAN rOrder_is_DegOrdering(rRingOrder_t order)
+BOOLEAN rOrder_is_DegOrdering(const rRingOrder_t order)
 {
   switch(order)
Index: kernel/ring.h
===================================================================
--- kernel/ring.h	(revision 939cb2de97b36ac54735806ce7150c37d0450106)
+++ kernel/ring.h	(revision b9642b1524d4ca8baf1a96bdb46325fe010f9911)
@@ -7,5 +7,5 @@
 * ABSTRACT - the interpreter related ring operations
 */
-/* $Id: ring.h,v 1.33 2008-07-20 15:12:35 Singular Exp $ */
+/* $Id: ring.h,v 1.34 2009-01-06 13:59:36 Singular Exp $ */
 
 /* includes */
@@ -339,8 +339,12 @@
 int rGetMaxSyzComp(int i);
 
-BOOLEAN rHasSimpleOrder(ring r);
+BOOLEAN rHasSimpleOrder(const ring r);
 // returns TRUE, if simple lp or ls ordering
-BOOLEAN rHasSimpleLexOrder(ring r);
+BOOLEAN rHasSimpleLexOrder(const ring r);
 // return TRUE if p->exp[r->pOrdIndex] holds total degree of p */
+inline BOOLEAN rHasGlobalOrdering(const ring r=currRing)
+{ return (r->OrdSgn==1); }
+inline BOOLEAN rHasLocalOrMixedOrdering(const ring r=currRing)
+{ return (r->OrdSgn==-1); }
 BOOLEAN rOrd_is_Totaldegree_Ordering(ring r =currRing);
 // return TRUE if p_SetComp requires p_Setm
Index: kernel/walkProc.cc
===================================================================
--- kernel/walkProc.cc	(revision 939cb2de97b36ac54735806ce7150c37d0450106)
+++ kernel/walkProc.cc	(revision b9642b1524d4ca8baf1a96bdb46325fe010f9911)
@@ -2,5 +2,5 @@
 *  Computer Algebra System SINGULAR     *
 ****************************************/
-/* $Id: walkProc.cc,v 1.1 2005-05-04 15:41:27 Singular Exp $ */
+/* $Id: walkProc.cc,v 1.2 2009-01-06 13:59:36 Singular Exp $ */
 
 #include "mod2.h"
@@ -66,5 +66,6 @@
         state= WalkIncompatibleRings;
     }
-    else if ( (sring->OrdSgn != 1) || (dring->OrdSgn != 1) )
+    else if ( (rHasLocalOrMixedOrdering(sring))
+    || (rHasLocalOrMixedOrdering(dring)) )
     {
         WerrorS( "only works for global orderings" );
@@ -86,5 +87,5 @@
     // check if the names of the variables resp. parameters do agree:
 
-    int nvar = sring->N;
+    int nvar = rVar(sring);
     int npar = rPar(sring);
     int * pperm;
@@ -99,5 +100,6 @@
 
     for ( k= nvar; (k > 0) && (state == WalkOk); k-- )
-        if ( vperm[k] <= 0 ) {
+        if ( vperm[k] <= 0 )
+        {
             WerrorS( "variable names do not agree" );
             state= WalkIncompatibleRings;
@@ -105,5 +107,6 @@
 
     for ( k= npar-1; (k >= 0) && (state == WalkOk); k-- )
-        if ( pperm[k] >= 0 ) {
+        if ( pperm[k] >= 0 )
+        {
             WerrorS( "paramater names do not agree" );
             state= WalkIncompatibleRings;
@@ -112,5 +115,6 @@
     //remove this to if you want to allow permutations of variables
     for ( k= nvar; (k > 0) && (state == WalkOk); k-- )
-      if ( vperm[k] != (k) ) {
+      if ( vperm[k] != (k) )
+      {
         WerrorS( "orders of variables do not agree" );
         state= WalkIncompatibleRings;
@@ -119,5 +123,6 @@
     //remove this to if you want to allow permutations of parameters
     for ( k= npar; (k > 0) && (state == WalkOk); k-- )
-      if ( pperm[k-1] != (-k) ) {
+      if ( pperm[k-1] != (-k) )
+      {
         WerrorS( "orders of parameters do not agree" );
         state= WalkIncompatibleRings;
@@ -130,11 +135,13 @@
 
     // check if any of the rings are qrings or not
-    if ( (sring->qideal != NULL) || (dring->qideal != NULL) ){
-          Werror( "rings are not allowed to be qrings");
+    if ( (sring->qideal != NULL) || (dring->qideal != NULL) )
+    {
+          WerrorS( "rings are not allowed to be qrings");
           return WalkIncompatibleRings;
     }
 
     int i=0;
-    while(dring->order[i]!=0){
+    while(dring->order[i]!=0)
+    {
       if(
            !(dring->order[i]==ringorder_a) &&
@@ -147,6 +154,6 @@
            !(dring->order[i]==ringorder_C)  &&
            !(dring->order[i]==ringorder_M)
-         ) {
-
+         )
+      {
         state=WalkIncompatibleDestRing;
       }
@@ -155,5 +162,6 @@
 
     i=0;
-    while(sring->order[i]!=0){
+    while(sring->order[i]!=0)
+    {
       if(
            !(sring->order[i]==ringorder_a) &&
@@ -166,5 +174,6 @@
            !(sring->order[i]==ringorder_C)  &&
            !(sring->order[i]==ringorder_M)
-         ) {
+         )
+      {
        state=WalkIncompatibleSourceRing;
       }
@@ -210,15 +219,18 @@
     ring sring = IDRING( sringHdl );
 
-    if ( rChar(sring) != rChar(dring) ) {
+    if ( rChar(sring) != rChar(dring) )
+    {
         WerrorS( "rings must have same characteristic" );
         state= WalkIncompatibleRings;
     }
 
-    if ( (sring->OrdSgn != 1) || (dring->OrdSgn != 1) ) {
+    if ( (rHasLocalOrMixedOrdering(sring))
+    || (rHasLocalOrMixedOrdering(dring)) )
+    {
         WerrorS( "only works for global orderings" );
         state= WalkIncompatibleRings;
     }
 
-    if ( sring->N != dring->N )
+    if ( rVar(sring) != rVar(dring) )
     {
         WerrorS( "rings must have same number of variables" );
@@ -250,5 +262,6 @@
 
     for ( k= nvar; (k > 0) && (state == WalkOk); k-- )
-      if ( vperm[k] <= 0 ) {
+      if ( vperm[k] <= 0 )
+      {
         WerrorS( "variable names do not agree" );
         state= WalkIncompatibleRings;
@@ -256,5 +269,6 @@
 
     for ( k= npar; (k > 0) && (state == WalkOk); k-- )
-      if ( pperm[k-1] >= 0 ){
+      if ( pperm[k-1] >= 0 )
+      {
         WerrorS( "parameter names do not agree" );
         state= WalkIncompatibleRings;
@@ -264,5 +278,6 @@
     //remove this to if you want to allow permutations of variables
     for ( k= nvar; (k > 0) && (state == WalkOk); k-- )
-      if ( vperm[k] != (k) ) {
+      if ( vperm[k] != (k) )
+      {
         WerrorS( "orders of variables do not agree" );
         state= WalkIncompatibleRings;
@@ -271,5 +286,6 @@
     //remove this to if you want to allow permutations of parameters
     for ( k= npar; (k > 0) && (state == WalkOk); k-- )
-      if ( pperm[k-1] != (-k) ) {
+      if ( pperm[k-1] != (-k) )
+      {
         WerrorS( "orders of parameters do not agree" );
         state= WalkIncompatibleRings;
@@ -282,6 +298,7 @@
 
     // check if any of the rings are qrings or not
-    if ( (sring->qideal != NULL) || (dring->qideal != NULL) ){
-          Werror( "rings are not allowed to be qrings");
+    if ( (sring->qideal != NULL) || (dring->qideal != NULL) )
+    {
+          WerrorS( "rings are not allowed to be qrings");
           return WalkIncompatibleRings;
     }
@@ -296,5 +313,6 @@
            !(dring->order[i]==ringorder_C)  &&
            !(dring->order[0]==ringorder_M)
-         ) {
+         )
+      {
         state=WalkIncompatibleDestRing;
       }
@@ -303,5 +321,6 @@
 
     i=0;
-    while(sring->order[i]!=0){
+    while(sring->order[i]!=0)
+    {
       if(  !(sring->order[i]==ringorder_lp) &&
            !(sring->order[i]==ringorder_dp) &&
@@ -311,5 +330,6 @@
            !(sring->order[i]==ringorder_C)  &&
            !(dring->order[0]==ringorder_M)
-         ) {
+         )
+      {
         state=WalkIncompatibleSourceRing;
       }
Index: kernel/walkSupport.cc
===================================================================
--- kernel/walkSupport.cc	(revision 939cb2de97b36ac54735806ce7150c37d0450106)
+++ kernel/walkSupport.cc	(revision b9642b1524d4ca8baf1a96bdb46325fe010f9911)
@@ -1110,5 +1110,5 @@
   int n=rVar(r);
   int64vec* res=new int64vec(n,n,(int64)0);
-  if (r->OrdSgn != 1) return res;
+  if (rHasLocalOrMixedOrdering(r)) return res;
   int pos1=0;
   int pos2=0;
@@ -1188,5 +1188,5 @@
   int64vec* res=new int64vec(n);
 
-  if (r->OrdSgn != 1) return res;
+  if (rHasLocalOrMixedOrdering(r)) return res;
 
   int length;
Index: kernel/weight.cc
===================================================================
--- kernel/weight.cc	(revision 939cb2de97b36ac54735806ce7150c37d0450106)
+++ kernel/weight.cc	(revision b9642b1524d4ca8baf1a96bdb46325fe010f9911)
@@ -2,5 +2,5 @@
 *  Computer Algebra System SINGULAR     *
 ****************************************/
-/* $Id: weight.cc,v 1.6 2008-07-08 11:26:50 Singular Exp $ */
+/* $Id: weight.cc,v 1.7 2009-01-06 13:59:36 Singular Exp $ */
 
 /*
@@ -189,5 +189,5 @@
   *eweight = 0;
   n = pVariables;
-  if (pOrdSgn == -1)
+  if (rHasLocalOrMixedOrdering())
     wFunctional = wFunctionalMora;
   else
