Index: coeffs/Makefile.in
===================================================================
--- coeffs/Makefile.in	(revision 3bc01c780d4a0447782ed11242b0f51f4fda6f5f)
+++ coeffs/Makefile.in	(revision dc093ce0cffbd8b24b4eb47a678f5b0d90e52231)
@@ -1,3 +1,3 @@
-#################################################################
+  #################################################################
 ###
 ### Makefile for Singular
@@ -35,5 +35,5 @@
 CXXFLAGS	= -O3 -w -fomit-frame-pointer --no-rtti ${PIPE}
 CXXTEMPLFLAGS	= -fno-implicit-templates --no-exceptions
-CPPFLAGS	= -I${srcdir} -I${includedir}
+CPPFLAGS	= -I${srcdir} -I${includedir} -I${srcdir}/../misc/
 DEFS		= -DNDEBUG -DOM_NDEBUG -Dix86_Linux -DHAVE_CONFIG_H
 
Index: coeffs/coeffs.h
===================================================================
--- coeffs/coeffs.h	(revision 3bc01c780d4a0447782ed11242b0f51f4fda6f5f)
+++ coeffs/coeffs.h	(revision dc093ce0cffbd8b24b4eb47a678f5b0d90e52231)
@@ -9,58 +9,5 @@
 */
 
-#define TRUE 1
-#define FALSE 0
-
-#ifndef NULL
-#define NULL        (0)
-#endif
-
-// #ifdef _TRY
-#ifndef ABS
-#define ABS(x) ((x)<0?(-(x)):(x))
-#endif
-// #endif
-
-
-
-#if (SIZEOF_LONG == 8)
-typedef int BOOLEAN;
-/* testet on x86_64, gcc 3.4.6: 2 % */
-/* testet on IA64, gcc 3.4.6: 1 % */
-#else
-/* testet on athlon, gcc 2.95.4: 1 % */
-typedef short BOOLEAN;
-#endif
-#define loop for(;;)
-
-#if defined(SI_CPU_I386) || defined(SI_CPU_X86_64)
-  // the following settings seems to be better on i386 and x86_64 processors
-  // define if a*b is with mod instead of tables
-  #define HAVE_MULT_MOD
-  // #define HAVE_GENERIC_ADD
-  // #ifdef HAVE_MULT_MOD
-  // #define HAVE_DIV_MOD
-  // #endif
-#elif defined(SI_CPU_IA64)
-  // the following settings seems to be better on itanium processors
-  // #define HAVE_MULT_MOD
-  #define HAVE_GENERIC_ADD
-  // #ifdef HAVE_MULT_MOD
-  // #define HAVE_DIV_MOD
-  // #endif
-#elif defined(SI_CPU_SPARC)
-  // #define HAVE_GENERIC_ADD
-  #define HAVE_MULT_MOD
-  #ifdef HAVE_MULT_MOD
-  #define HAVE_DIV_MOD
-  #endif
-#elif defined(SI_CPU_PPC)
-  // the following settings seems to be better on ppc processors
-  // testet on: ppc_Linux, 740/750 PowerMac G3, 512k L2 cache
-  #define HAVE_MULT_MOD
-  // #ifdef HAVE_MULT_MOD
-  // #define HAVE_DIV_MOD
-  // #endif
-#endif
+#include <aux.h>
 
 enum n_coeffType
@@ -92,6 +39,6 @@
 typedef number (*numberfunc)(number a, number b, const coeffs r);
 
-/// maps "a" from aRing into r
-typedef number (*nMapFunc)(number a, const coeffs r, const coeffs aRing);
+/// maps "a", which lives in src, into dst
+typedef number (*nMapFunc)(number a, const coeffs src, const coeffs dst);
 
 // #define _TRY
@@ -209,12 +156,4 @@
 };
 
-/// Returns the type of coeffs domain
-static inline n_coeffType getCoeffType(const coeffs r)
-{
-  return r->type;
-}
-
-#define  nInternalChar(r) ((r)->ch)
-
 #endif
 
Index: coeffs/gnumpc.cc
===================================================================
--- coeffs/gnumpc.cc	(revision 3bc01c780d4a0447782ed11242b0f51f4fda6f5f)
+++ coeffs/gnumpc.cc	(revision dc093ce0cffbd8b24b4eb47a678f5b0d90e52231)
@@ -33,11 +33,11 @@
 #endif
 
-#ifndef assume
-#  define assume(a) if(!(a)){ Werror( "Assumption: is wrong: %s\n", #a ); };
-#endif
+// #ifndef assume
+// #  define assume(a) if(!(a)){ Werror( "Assumption: is wrong: %s\n", #a ); };
+// #endif
 
 static const n_coeffType ID = n_long_C;
 
-number ngcMapQ(number from, const coeffs r, const coeffs aRing)
+number ngcMapQ(number from, const coeffs aRing, const coeffs r)
 {
   assume( getCoeffType(r) == ID );
@@ -53,5 +53,5 @@
 }
 
-static number ngcMapLongR(number from, const coeffs r, const coeffs aRing)
+static number ngcMapLongR(number from, const coeffs aRing, const coeffs r)
 {
   assume( getCoeffType(r) == ID );
@@ -67,5 +67,5 @@
 }
 
-static number ngcMapR(number from, const coeffs r, const coeffs aRing)
+static number ngcMapR(number from, const coeffs aRing, const coeffs r)
 {
   assume( getCoeffType(r) == ID );
@@ -81,5 +81,5 @@
 }
 
-static number ngcMapP(number from, const coeffs r, const coeffs aRing)
+static number ngcMapP(number from, const coeffs aRing, const coeffs r)
 {
   assume( getCoeffType(r) == ID );
@@ -94,5 +94,5 @@
 
 
-static number ngcCopyMap(number from, const coeffs r, const coeffs aRing)
+static number ngcCopyMap(number from, const coeffs aRing, const coeffs r)
 {
   assume( getCoeffType(r) == ID );
Index: coeffs/numbers.cc
===================================================================
--- coeffs/numbers.cc	(revision 3bc01c780d4a0447782ed11242b0f51f4fda6f5f)
+++ coeffs/numbers.cc	(revision dc093ce0cffbd8b24b4eb47a678f5b0d90e52231)
@@ -85,5 +85,5 @@
 
 number ndCopy(number a, const coeffs) { return a; }
-number ndCopyMap(number a, const coeffs r, const coeffs aRing)
+number ndCopyMap(number a, const coeffs aRing, const coeffs r)
 {
   assume( getCoeffType(r) == getCoeffType(aRing) );
Index: coeffs/numbers.h
===================================================================
--- coeffs/numbers.h	(revision 3bc01c780d4a0447782ed11242b0f51f4fda6f5f)
+++ coeffs/numbers.h	(revision dc093ce0cffbd8b24b4eb47a678f5b0d90e52231)
@@ -9,4 +9,15 @@
 */
 #include "coeffs.h"
+
+/// Returns the type of coeffs domain
+static inline n_coeffType getCoeffType(const coeffs r)
+{
+  return r->type;
+}
+
+static inline int nInternalChar(const coeffs r)
+{
+  return r->ch;
+}
 
 #define SHORT_REAL_LENGTH 6 // use short reals for real <= 6 digits
@@ -65,5 +76,5 @@
 number ndGcd(number a, number b, const coeffs);
 number ndCopy(number a, const coeffs r);
-number ndCopyMap(number a, const coeffs r, const coeffs aRing);
+number ndCopyMap(number a, const coeffs src, const coeffs dst);
 int ndSize(number a, const coeffs r);
 char * ndName(number n, const coeffs r);
@@ -181,3 +192,6 @@
 { return (nField_is_Q_a(r)) || (nField_is_Zp_a(r)); } /* Z/p(a) and Q(a)*/
 
+
+
+
 #endif
Index: coeffs/shortfl.cc
===================================================================
--- coeffs/shortfl.cc	(revision 3bc01c780d4a0447782ed11242b0f51f4fda6f5f)
+++ coeffs/shortfl.cc	(revision dc093ce0cffbd8b24b4eb47a678f5b0d90e52231)
@@ -17,12 +17,10 @@
 #include "mpr_complex.h"
 
-
 #include <mylimits.h>
 // #include "limits.h"
-#define MAX_INT_VAL INT_MAX
-
-#ifndef assume
-#  define assume(a) if(!(a)){ Werror( "Assumption: is wrong: %s\n", #a ); };
-#endif
+
+// #ifndef assume
+// #  define assume(a) if(!(a)){ Werror( "Assumption: is wrong: %s\n", #a ); };
+// #endif
 
 
@@ -88,5 +86,5 @@
   int i;
   float f = nf(n).F();
-  if (((float)INT_MIN <= f) || ((float)MAX_INT_VAL >= f))
+  if (((float)INT_MIN <= f) || ((float)INT_MAX >= f))
     i = (int)f;
   else
@@ -369,5 +367,5 @@
 #endif
 
-static number nrMapP(number from, const coeffs r, const coeffs aRing)
+static number nrMapP(number from, const coeffs aRing, const coeffs r)
 {
   assume( getCoeffType(r) == ID );
@@ -379,5 +377,5 @@
 }
 
-static number nrMapLongR(number from, const coeffs r, const coeffs aRing)
+static number nrMapLongR(number from, const coeffs aRing, const coeffs r)
 {
   assume( getCoeffType(r) == ID );
@@ -388,5 +386,5 @@
 }
 
-static number nrMapC(number from, const coeffs r, const coeffs aRing)
+static number nrMapC(number from, const coeffs aRing, const coeffs r)
 {  
   assume( getCoeffType(r) == ID );
@@ -399,5 +397,5 @@
 
 
-number nrMapQ(number from, const coeffs r, const coeffs aRing)
+number nrMapQ(number from, const coeffs aRing, const coeffs r)
 {
 /* in longrat.h
Index: misc/aux.h
===================================================================
--- misc/aux.h	(revision 3bc01c780d4a0447782ed11242b0f51f4fda6f5f)
+++ misc/aux.h	(revision dc093ce0cffbd8b24b4eb47a678f5b0d90e52231)
@@ -1,1 +1,73 @@
+/* -*-c++-*- */
+
 // MAX, MIN, BOOLEAN
+
+/*******************************************************************
+ *  File:    aux.h
+ *  Purpose: 
+ *  Author:  
+ *  Created: 
+ *  Version: $Id$
+ *******************************************************************/
+
+#ifndef _MISC_AUX_H
+
+
+#define TRUE 1
+#define FALSE 0
+
+#ifndef NULL
+#define NULL        (0)
+#endif
+
+// #ifdef _TRY
+#ifndef ABS
+#define ABS(x) ((x)<0?(-(x)):(x))
+#endif
+// #endif
+
+
+#if (SIZEOF_LONG == 8)
+typedef int BOOLEAN;
+/* testet on x86_64, gcc 3.4.6: 2 % */
+/* testet on IA64, gcc 3.4.6: 1 % */
+#else
+/* testet on athlon, gcc 2.95.4: 1 % */
+typedef short BOOLEAN;
+#endif
+#define loop for(;;)
+
+#if defined(SI_CPU_I386) || defined(SI_CPU_X86_64)
+  // the following settings seems to be better on i386 and x86_64 processors
+  // define if a*b is with mod instead of tables
+#define HAVE_MULT_MOD
+  // #define HAVE_GENERIC_ADD
+  // #ifdef HAVE_MULT_MOD
+  // #define HAVE_DIV_MOD
+  // #endif
+#elif defined(SI_CPU_IA64)
+  // the following settings seems to be better on itanium processors
+  // #define HAVE_MULT_MOD
+#define HAVE_GENERIC_ADD
+  // #ifdef HAVE_MULT_MOD
+  // #define HAVE_DIV_MOD
+  // #endif
+#elif defined(SI_CPU_SPARC)
+  // #define HAVE_GENERIC_ADD
+#define HAVE_MULT_MOD
+#ifdef HAVE_MULT_MOD
+#define HAVE_DIV_MOD
+#endif
+#elif defined(SI_CPU_PPC)
+  // the following settings seems to be better on ppc processors
+  // testet on: ppc_Linux, 740/750 PowerMac G3, 512k L2 cache
+#define HAVE_MULT_MOD
+  // #ifdef HAVE_MULT_MOD
+  // #define HAVE_DIV_MOD
+  // #endif
+#endif
+
+// static const int MAX_INT_VAL = ;
+
+#endif /* _MISC_AUX_H */
+
