Nur in ug-orig/arch/AIX: CVS.
Nur in ug-orig/arch/AIXGCC: CVS.
Nur in ug-orig/arch/AMD64: CVS.
diff -ru ug-orig/arch/AMD64/mk.arch ug-patched/arch/AMD64/mk.arch
--- ug-orig/arch/AMD64/mk.arch	2008-07-09 17:39:31.000000000 +0200
+++ ug-patched/arch/AMD64/mk.arch	2003-11-21 17:22:12.000000000 +0100
@@ -9,15 +9,15 @@
 ARCH_MAKE     = make
 ARCH_CC       = gcc
 ARCH_C++      = g++
-ARCH_F77      = gfortran
 ARCH_LINK     = gcc
 ARCH_AR       = ar
 ARCH_SUFFIX   = 
 ARCH_POSTLINK = true
 
 ARCH_LIBS     = -lm
+
 ARCH_CFLAGS   = -pipe
-ARCH_NOOPTIM  = -g3 -gdwarf-2
+ARCH_NOOPTIM  = -g
 ARCH_OPTIM    = -O3 -fomit-frame-pointer -funroll-loops -fno-strict-aliasing
 ARCH_C++FLAGS = -fpermissive
 ARCH_LFLAGS   =
Nur in ug-orig/arch: BGP.
Nur in ug-orig/arch/C90: CVS.
Nur in ug-orig/arch/CC: CVS.
diff -ru ug-orig/arch/compiler.h ug-patched/arch/compiler.h
--- ug-orig/arch/compiler.h	2008-07-09 17:39:30.000000000 +0200
+++ ug-patched/arch/compiler.h	2007-12-04 14:23:54.000000000 +0100
@@ -18,8 +18,39 @@
 /*                                                                          */
 /****************************************************************************/
 
+/** \file
+    \brief Header file for defining standard constants (machine dependent)
+    
+    This file is part of the old build system.  We strongly suggest you use
+    the new AutoTools build system which does not use this file. 
+
+    In the definitions of the `CFLAGS` in the file 'mk.arch' the
+    key word for a special machine has to be chosen. For example by the 
+    compiler option '-D__HP__' ug is about to run on a HP computer. 
+    Concerning this option the corresponding definitions of the standard 
+    types in the file 'compiler.h' are taken.
+    (The file compiler.h is located in $UGROOT/arch.)
+    
+    As this header file 'compiler.h' defines the standard types used in ug
+    it has to be included in `all` source files of ug!!! 
+    
+    The constant 'ALIGNMENT' has to be set equal to '4' or '8' depending on 
+    the 32 or 64 bit architecture of the machine used. It is also related 
+    to the constant 'ALIGNMASK', which has correspondingly to be set equal 
+    to '0xFFFFFFFC' or '0xFFFFFFF8' to clear the last two or three bits 
+    of a memory address.
+    
+    If you have to add a new mk.? file to support a new machine you also
+    have to provide a new entry in the 'compiler.h' file defining the basic 
+    data types and memory alignment. 
+    To that end you include a flag -D<your new machine>
+    in the CFLAGS section of your new mk.<your new machine> file and add
+    a new paragraph depending on this flag in 'compiler.h'.
+    
+*/
+
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/arch/compiler.h,v 1.74 2008/07/09 15:39:30 lampe Exp $
+$Header$
 */
 
 #ifndef __COMPILER__
@@ -76,6 +107,9 @@
 #define _fmt_lG			"lG"
 #define _fmt_lf			"lf"
 
+/* Define to 1 if you have the <malloc.h> header file. */
+#define HAVE_MALLOC_H 1
+
 /****************************************************************************/
 /*                                                                          */
 /* #define exactly one of the following constants: (in Makefile)            */
@@ -130,6 +164,7 @@
 #define malloc(n) ((void *) NewPtr((Size) n))
 #define free(p) DisposPtr((Ptr) p)
 #define ALIGNMENT 4                     /* power of 2 and >= sizeof(int) ! */
+#define ALIGNMASK 0xFFFFFFFC            /* compatible to alignment */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  lsym
@@ -152,6 +187,7 @@
 
 /* memory */
 #define ALIGNMENT 8                     /* power of 2 and >= sizeof(int) ! */
+#define ALIGNMASK 0xFFFFFFF8            /* compatible to alignment */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  lsym ## _
@@ -177,6 +213,7 @@
 
 /* memory */
 #define ALIGNMENT 8                     /* power of 2 and >= sizeof(int) ! */
+#define ALIGNMASK 0xFFFFFFF8            /* compatible to alignment */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  lsym ## _
@@ -203,6 +240,7 @@
 
 /* memory */
 #define ALIGNMENT 4					    /* power of 2 and >= sizeof(int) !  */ 
+#define ALIGNMASK 0xFFFFFFFC			/* compatible to alignment			*/
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  lsym
@@ -230,6 +268,7 @@
 
 /* memory */
 #define ALIGNMENT 4                     /* power of 2 and >= sizeof(int) !  */ 
+#define ALIGNMASK 0xFFFFFFFC            /* compatible to alignment          */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  lsym
@@ -260,6 +299,7 @@
 
 /* memory */
 #define ALIGNMENT 8					    /* power of 2 and >= sizeof(int) !  */ 
+#define ALIGNMASK 0xFFFFFFF8			/* compatible to alignment			*/
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  lsym ## _
@@ -286,6 +326,7 @@
 
 /* memory */
 #define ALIGNMENT 8                     /* power of 2 and >= sizeof(int) ! */
+#define ALIGNMASK 0xFFFFFFF8            /* compatible to alignment */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  lsym ## _
@@ -307,6 +348,7 @@
 
 /* memory */
 #define ALIGNMENT 4                     /* power of 2 and >= sizeof(int) ! */
+#define ALIGNMASK 0xFFFFFFFC            /* compatible to alignment */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  lsym
@@ -329,6 +371,7 @@
 
 /* memory */
 #define ALIGNMENT 8                     /* power of 2 and >= sizeof(int) ! */
+#define ALIGNMASK 0xFFFFFFF8            /* compatible to alignment */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  lsym
@@ -353,6 +396,7 @@
 
 /* memory */
 #define ALIGNMENT 8                     /* power of 2 and >= sizeof(int) ! */
+#define ALIGNMASK 0xFFFFFFF8            /* compatible to alignment */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  lsym
@@ -373,6 +417,7 @@
 
 /* memory */
 #define ALIGNMENT   8                   /* power of 2 and >= sizeof(int) ! */
+#define ALIGNMASK 0xFFFFFFF8            /* compatible to alignment */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  lsym
@@ -397,9 +442,10 @@
 
 /* memory */
 #define ALIGNMENT 4                     /* power of 2 and >= sizeof(int) !  */
+#define ALIGNMASK 0xFFFFFFFC            /* compatible to alignment          */
 
 /* fortran interfacing */
-#define F77SYM(lsym,usym) lsym ## _
+#define F77SYM(lsym,usym) lsym
 
 /* current time as DOUBLE value */
 #undef CURRENT_TIME
@@ -446,9 +492,10 @@
 
 /* memory */
 #define ALIGNMENT 4                     /* power of 2 and >= sizeof(int) !  */
+#define ALIGNMASK 0xFFFFFFFC            /* compatible to alignment          */
 
 /* fortran interfacing */
-#define F77SYM(lsym,usym)  lsym ## _
+#define F77SYM(lsym,usym)  lsym
 
 #endif
 
@@ -469,9 +516,10 @@
 
 /* memory */
 #define ALIGNMENT 8                     /* power of 2 and >= sizeof(int) !  */
+#define ALIGNMASK 0xFFFFFFF8            /* compatible to alignment          */
 
 /* fortran interfacing */
-#define F77SYM(lsym,usym) lsym ## _
+#define F77SYM(lsym,usym) lsym
 
 /* current time as DOUBLE value */
 #undef CURRENT_TIME
@@ -496,9 +544,10 @@
 
 /* memory */
 #define ALIGNMENT 8                     /* power of 2 and >= sizeof(int) !  */
+#define ALIGNMASK 0xFFFFFFF8            /* compatible to alignment          */
 
 /* fortran interfacing */
-#define F77SYM(lsym,usym) lsym ## _
+#define F77SYM(lsym,usym) lsym
 
 /* current time as DOUBLE value */
 #undef CURRENT_TIME
@@ -523,9 +572,10 @@
 
 /* memory */
 #define ALIGNMENT 4                     /* power of 2 and >= sizeof(int) !  */
+#define ALIGNMASK 0xFFFFFFFC            /* compatible to alignment          */
 
 /* fortran interfacing */
-#define F77SYM(lsym,usym) lsym ## _
+#define F77SYM(lsym,usym) lsym
 
 /* current time as DOUBLE value */
 #undef CURRENT_TIME
@@ -550,9 +600,10 @@
 
 /* memory */
 #define ALIGNMENT 8                     /* power of 2 and >= sizeof(int) !  */
+#define ALIGNMASK 0xFFFFFFF8            /* compatible to alignment          */
 
 /* fortran interfacing */
-#define F77SYM(lsym,usym) lsym ## _
+#define F77SYM(lsym,usym) lsym
 
 /* current time as DOUBLE value */
 #undef CURRENT_TIME
@@ -575,31 +626,7 @@
 
 /* memory */
 #define ALIGNMENT 4                     /* power of 2 and >= sizeof(int) !  */
-
-/* fortran interfacing */
-#define F77SYM(lsym,usym) lsym ## _
-
-/* current time as DOUBLE value */
-#undef CURRENT_TIME
-#define CURRENT_TIME   (((DOUBLE)clock())/((DOUBLE)CLOCKS_PER_SEC))
-
-#endif
-
-/****************************************************************************/
-/*                                                                          */
-/* Definitions for BGP                                                      */
-/*                                                                          */
-/****************************************************************************/
-
-#ifdef __BGP__
-#undef __MWCW__
-
-#define ARCHNAME	"BGP"
-
-#include <time.h>
-
-/* memory */
-#define ALIGNMENT 8                     /* power of 2 and >= sizeof(int) !  */
+#define ALIGNMASK 0xFFFFFFFC            /* compatible to alignment          */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym) lsym
@@ -626,6 +653,7 @@
 
 /* memory */
 #define ALIGNMENT 8                     /* power of 2 and >= sizeof(int) !  */
+#define ALIGNMASK 0xFFFFFFF8            /* compatible to alignment          */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  usym
@@ -654,6 +682,7 @@
 
 /* memory */
 #define ALIGNMENT 8                     /* power of 2 and >= sizeof(int) !  */
+#define ALIGNMASK 0xFFFFFFF8            /* compatible to alignment          */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  usym
@@ -678,6 +707,7 @@
 
 /* memory */
 #define ALIGNMENT 8               /* power of 2 and >=sizeof(int) !  */
+#define ALIGNMASK 0xFFFFFFF8     /*  compatible to alignment */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  lsym
@@ -700,6 +730,7 @@
 
 /* memory */
 #define ALIGNMENT 4               /* power of 2 and >=sizeof(int) !  */
+#define ALIGNMASK 0xFFFFFFFC     /*  compatible to alignment */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  lsym
@@ -720,6 +751,7 @@
 
 /* memory */
 #define ALIGNMENT 8                     /* power of 2 and >= sizeof(int) !  */
+#define ALIGNMASK 0xFFFFFFF8            /* compatible to alignment          */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  lsym
@@ -741,6 +773,7 @@
 
 /* memory */
 #define ALIGNMENT 8                     /* power of 2 and >= sizeof(int) !  */
+#define ALIGNMASK 0xFFFFFFF8            /* compatible to alignment          */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  lsym
@@ -763,6 +796,7 @@
 
 /* memory */
 #define ALIGNMENT 8                     /* power of 2 and >= sizeof(int) !  */
+#define ALIGNMASK 0xFFFFFFF8            /* compatible to alignment          */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  lsym ## _
@@ -790,6 +824,7 @@
 
 /* memory */
 #define ALIGNMENT 8                     /* power of 2 and >= sizeof(int) !  */
+#define ALIGNMASK 0xFFFFFFF8            /* compatible to alignment          */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  lsym ## _
@@ -814,6 +849,7 @@
 
 /* memory */
 #define ALIGNMENT 8                     /* power of 2 and >= sizeof(int) !  */
+#define ALIGNMASK 0xFFFFFFF8            /* compatible to alignment          */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  lsym ## _
@@ -838,9 +874,10 @@
 
 /* memory */
 #define ALIGNMENT     4             /* power of 2 and >= sizeof(int) ! */
+#define ALIGNMASK     0xFFFFFFFC    /* compatible to alignment */
 
 /* fortran interfacing */
-#define F77SYM(lsym,usym)  lsym ## _
+#define F77SYM(lsym,usym)  lsym
 
 /* current time as DOUBLE value */
 #undef CURRENT_TIME
@@ -860,20 +897,20 @@
 
 #define ARCHNAME	"Mac OS X"
 
-#ifdef __LITTLE_ENDIAN__
-#define __SWAPBYTES__ 1
-#endif
-
 /* memory */
 #define ALIGNMENT     4             /* power of 2 and >= sizeof(int) ! */
+#define ALIGNMASK     0xFFFFFFFC    /* compatible to alignment */
 
 /* fortran interfacing */
-#define F77SYM(lsym,usym)  lsym ## _
+#define F77SYM(lsym,usym)  lsym
 
 /* current time as DOUBLE value */
 #undef CURRENT_TIME
 #define CURRENT_TIME   (((DOUBLE)clock())/((DOUBLE)CLOCKS_PER_SEC))
 
+    /* MAcOS does not have malloc.h */
+#undef HAVE_MALLOC_H
+
 #endif
 
 #ifdef __PPC64__
@@ -883,9 +920,10 @@
 
 /* memory */
 #define ALIGNMENT 8                     /* power of 2 and >= sizeof(INT) !  */
+#define ALIGNMASK 0xFFFFFFF8            /* compatible to alignment          */
 
 /* fortran interfacing */
-#define F77SYM(lsym,usym) lsym ## _
+#define F77SYM(lsym,usym) lsym
 
 /* current time as DOUBLE value */
 #undef CURRENT_TIME
@@ -917,6 +955,7 @@
 /*#define malloc(n) ((void *) NewPtr((Size) n))
 #define free(p) DisposPtr((Ptr) p)*/
 #define ALIGNMENT 4                     /* power of 2 and >= sizeof(int) ! */
+#define ALIGNMASK 0xFFFFFFFC            /* compatible to alignment */
 
 /* fortran interfacing */
 #define F77SYM(lsym,usym)  lsym
@@ -964,14 +1003,7 @@
 
 #define ARCH_VERSION "ARCH_1_0"
 
-/* The following is actually a definition (and not just a declaration) in a header
-   file.  Since DUNE actually includes compiler.h twice from a single source, this
-   definition has to go.  Yes, I know, including a header twice is not nice, but
-   I currently see no other way.
-*/     
-#ifndef FOR_DUNE
-static char compilerrcs_id[] = "$Id: compiler.h,v 1.74 2008/07/09 15:39:30 lampe Exp $";
-#endif
+static char compilerrcs_id[] = "$Id: compiler.h 8307 2007-12-04 13:23:54Z sander $";
 
 /* limits of the basic types */
 #define MAX_S            SHRT_MAX        
Nur in ug-orig/arch: CVS.
Nur in ug-orig/arch: .cvsignore.
Nur in ug-orig/arch/CYGWIN: CVS.
diff -ru ug-orig/arch/CYGWIN/mk.arch ug-patched/arch/CYGWIN/mk.arch
--- ug-orig/arch/CYGWIN/mk.arch	2004-03-09 17:07:01.000000000 +0100
+++ ug-patched/arch/CYGWIN/mk.arch	2004-03-09 17:07:06.000000000 +0100
@@ -1,27 +1,27 @@
-#
-#	ARCH MAKEFILE OPTIONS
-#
-#	for Windows + Cygwin
-#
-
-ARCH_TYPE     = __CYGWIN__
-
-ARCH_MAKE     = make
-ARCH_CC       = gcc
-ARCH_C++      = g++
-ARCH_LINK     = gcc
-ARCH_AR       = ar
-ARCH_SUFFIX   = 
-ARCH_POSTLINK = true
-
-ARCH_LIBS     = -lrpclib -lm
-
-ARCH_CFLAGS   = -pipe
-ARCH_NOOPTIM  = -g -Wall -Wno-unused -Wno-parentheses
-ARCH_OPTIM    = -s -O3 -march=i686 -fomit-frame-pointer -funroll-loops -fno-strict-aliasing
-ARCH_C++FLAGS = -fpermissive
-ARCH_LFLAGS   =
-ARCH_ARFLAGS  = rus
-
-ARCH_XINCLUDES = -I/usr/X11R6/include
-ARCH_XLIBS     = -L/usr/X11R6/lib -lXaw -lXt -lXpm -lXmu -lX11 -lXext -lSM -lICE
+#
+#	ARCH MAKEFILE OPTIONS
+#
+#	for Windows + Cygwin
+#
+
+ARCH_TYPE     = __CYGWIN__
+
+ARCH_MAKE     = make
+ARCH_CC       = gcc
+ARCH_C++      = g++
+ARCH_LINK     = gcc
+ARCH_AR       = ar
+ARCH_SUFFIX   = 
+ARCH_POSTLINK = true
+
+ARCH_LIBS     = -lrpclib -lm
+
+ARCH_CFLAGS   = -pipe
+ARCH_NOOPTIM  = -g -Wall -Wno-unused -Wno-parentheses
+ARCH_OPTIM    = -s -O3 -march=i686 -fomit-frame-pointer -funroll-loops -fno-strict-aliasing
+ARCH_C++FLAGS = -fpermissive
+ARCH_LFLAGS   =
+ARCH_ARFLAGS  = rus
+
+ARCH_XINCLUDES = -I/usr/X11R6/include
+ARCH_XLIBS     = -L/usr/X11R6/lib -lXaw -lXt -lXpm -lXmu -lX11 -lXext -lSM -lICE
Nur in ug-orig/arch/DEC: CVS.
Nur in ug-orig/arch/HP: CVS.
Nur in ug-orig/arch/HP20: CVS.
Nur in ug-orig/arch/HPUX9: CVS.
Nur in ug-orig/arch/LINUXAXP: CVS.
Nur in ug-orig/arch/LINUXIA64: CVS.
diff -ru ug-orig/arch/LINUXIA64/mk.arch ug-patched/arch/LINUXIA64/mk.arch
--- ug-orig/arch/LINUXIA64/mk.arch	2007-10-25 17:09:45.000000000 +0200
+++ ug-patched/arch/LINUXIA64/mk.arch	2001-09-12 18:46:29.000000000 +0200
@@ -7,21 +7,21 @@
 ARCH_TYPE     = __LINUXIA64__
 
 ARCH_MAKE     = make
-ARCH_CC       = mpicc
-ARCH_C++      = mpiCC
-ARCH_LINK     = mpicc
+ARCH_CC       = ecc
+ARCH_C++      =
+ARCH_LINK     = ecc
 ARCH_AR       = ar
 ARCH_SUFFIX   = 
 ARCH_POSTLINK = true
 
 ARCH_LIBS     = 
 
-ARCH_CFLAGS   = 
-ARCH_NOOPTIM  = -g
-ARCH_OPTIM    = -O3 -tpp2 -ip
+ARCH_CFLAGS   = -O3 -ip # ecc beta: leave it exactly as it is and recompile
+ARCH_NOOPTIM  =         # ug/np/algebra/fvgeom.c and ug/parallel/ddd/basic/lowcomm.c
+ARCH_OPTIM    =         # by hand with -O2 -ip only (Sep 2001) !!!
 ARCH_C++FLAGS =
-ARCH_LFLAGS   = 
+ARCH_LFLAGS   = -Wl,-relax
 ARCH_ARFLAGS  = rus
 
 ARCH_XINCLUDES = 
-ARCH_XLIBS     = 
+ARCH_XLIBS     = #-L/usr/X11R6/lib -lXaw -lXt -lXmu -lXpm -lXext -lX11 -lSM -lICE
Nur in ug-orig/arch/LINUXPPC: CVS.
Nur in ug-orig/arch/MACCLUSTER: CVS.
Nur in ug-orig/arch/MACOSX: CVS.
diff -ru ug-orig/arch/MACOSX/mk.arch ug-patched/arch/MACOSX/mk.arch
--- ug-orig/arch/MACOSX/mk.arch	2008-07-09 17:39:31.000000000 +0200
+++ ug-patched/arch/MACOSX/mk.arch	2006-05-31 10:36:57.000000000 +0200
@@ -11,7 +11,6 @@
 ARCH_PMAKE     = gnumake -j 4
 ARCH_CC       = cc
 ARCH_C++      = c++
-ARCH_F77      = g77
 ARCH_LINK     = cc
 ARCH_AR       = ugarranlib ar
 ARCH_SUFFIX   = 
Nur in ug-orig/arch/MACOSX64: CVS.
diff -ru ug-orig/arch/MACOSX64/mk.arch ug-patched/arch/MACOSX64/mk.arch
--- ug-orig/arch/MACOSX64/mk.arch	2008-02-11 20:05:34.000000000 +0100
+++ ug-patched/arch/MACOSX64/mk.arch	2006-06-10 16:14:21.000000000 +0200
@@ -1,37 +1,46 @@
-#
 #       ARCH MAKEFILE OPTIONS
 #
 #       for MacOS X on a 64-bit processor
 #
+#		change the last lines if you want to use Quartz instead of X11
+#
 
-# use this for G5 Macs
-#ARCH_TYPE     = __PPC64__
-
-# use this for Intel Macs
-ARCH_TYPE     = __AMD64__
+ARCH_TYPE     = __PPC64__
 
 ARCH_MAKE     = gnumake
+ARCH_PMAKE     = gnumake -j 4
 ARCH_CC       = gcc
 ARCH_C++      = g++
 ARCH_LINK     = gcc
 ARCH_AR       = ugarranlib ar
 ARCH_SUFFIX   = 
-ARCH_POSTLINK = true
+#ARCH_POSTLINK = ugmacosxpostlink $(PROGNAME) $(APPL)
+ARCH_POSTLINK =
 
 ARCH_LIBS     = 
+ARCH_PLIBS    =
+ARCH_FLIBS    =
 
+#ARCH_CFLAGS   = -arch ppc64 -Wchar-subscripts -Wformat -Wimplicit -Wparentheses -Wno-four-char-constants -Wreturn-type -Wswitch -Wtrigraphs -O -Wuninitialized
+#ARCH_CFLAGS   = -arch ppc64 -gccincludes -ext o -I/usr/include -I/System/Library/Frameworks/System.framework/Versions/B/Headers
 ARCH_CFLAGS   = -m64
+ARCH_C++FLAGS = -m64
 ARCH_NOOPTIM  = -g
 ARCH_OPTIM    = -O3 -fomit-frame-pointer -funroll-loops -fno-strict-aliasing
-ARCH_C++FLAGS = $(ARCH_CFLAGS)
-ARCH_LFLAGS   = $(ARCH_CFLAGS)
+#ARCH_LFLAGS   = -arch ppc64 -sectcreate __ICON __header $(APPL).iconheader -segprot __ICON r r -sectcreate __ICON app $(UGROOT)/dev/mif/UGIcon.tiff -framework AppKit -framework Foundation
+ARCH_LFLAGS   = -m64
 ARCH_ARFLAGS  = ru
+ARCH_FFLAGS   =
+ARCH_EXFLAGS  =
+
+# use these settings if you want to use MacOS X GUI
+#ARCH_XINCLUDES =
+#ARCH_XLIBS     = -framework Cocoa
 
 # use these settings if you want to use X11
-# last time I checked, Apple didn't supply 64-bit X libs
-#ARCH_XINCLUDES = -I/usr/X11R6/include
-#ARCH_XLIBS     = -L/usr/X11R6/lib -lXaw -lXt -lXpm -lXmu -lX11 -lXext -lSM -lICE
+#ARCH_XINCLUDES = -I/usr/X11R6/include/
+#ARCH_XLIBS     = -L/usr/X11R6/lib  -lXaw -lXt -lXpm -lXmu -lX11 -lXext -lSM -lICE
 
-# use these settings if you do not use X11
+# use these settings if you do not use a GUI
 ARCH_XINCLUDES =
 ARCH_XLIBS     =
Nur in ug-orig/arch/MACOSXSERVER: CVS.
diff -ru ug-orig/arch/Makefile.am ug-patched/arch/Makefile.am
--- ug-orig/arch/Makefile.am	2004-09-09 16:44:57.000000000 +0200
+++ ug-patched/arch/Makefile.am	2004-09-09 16:44:57.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.1 2004/09/09 14:44:57 thimo Exp $
+# $Id: Makefile.am 7793 2004-09-09 14:44:57Z thimo $
 
 SOURCES = compiler.h
 
Nur in ug-orig/arch/MKLINUX: CVS.
Nur in ug-orig/arch/NECSX4: CVS.
Nur in ug-orig/arch/ORIGIN: CVS.
Nur in ug-orig/arch/PARAGON: CVS.
Nur in ug-orig/arch/PC: CVS.
diff -ru ug-orig/arch/PC/mk.arch ug-patched/arch/PC/mk.arch
--- ug-orig/arch/PC/mk.arch	2008-07-09 17:39:31.000000000 +0200
+++ ug-patched/arch/PC/mk.arch	2004-07-23 15:47:28.000000000 +0200
@@ -9,7 +9,6 @@
 ARCH_MAKE     = make
 ARCH_CC       = gcc
 ARCH_C++      = g++
-ARCH_F77      = g77
 ARCH_LINK     = gcc
 ARCH_AR       = ar
 ARCH_SUFFIX   = 
Nur in ug-orig/arch/PCCLUSTER: CVS.
Nur in ug-orig/arch/PCCPP: CVS.
Nur in ug-orig/arch/PCGCOV: CVS.
Nur in ug-orig/arch/PCI: CVS.
Nur in ug-orig/arch/PCICLUSTER: CVS.
Nur in ug-orig/arch/PCICPP: CVS.
Nur in ug-orig/arch/POWERGC: CVS.
Nur in ug-orig/arch/SGI: CVS.
Nur in ug-orig/arch/SGI10: CVS.
Nur in ug-orig/arch/SOLARIS: CVS.
Nur in ug-orig/arch/SOLARISGCC: CVS.
Nur in ug-orig/arch/SP2: CVS.
Nur in ug-orig/arch/SR2201: CVS.
Nur in ug-orig/arch/SUN4GCC: CVS.
Nur in ug-orig/arch/T3D: CVS.
Nur in ug-orig/arch/T3E: CVS.
Nur in ug-orig/arch/YDL64: CVS.
Nur in ug-orig/arch/YMP: CVS.
diff -ru ug-orig/autogen.sh ug-patched/autogen.sh
--- ug-orig/autogen.sh	2007-05-22 09:11:27.000000000 +0200
+++ ug-patched/autogen.sh	2007-02-14 19:46:04.000000000 +0100
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: autogen.sh,v 1.5 2007/05/22 07:11:27 sander Exp $
+# $Id: autogen.sh 8266 2007-02-14 18:46:04Z christi $
 
 # barf on errors
 set -e
@@ -112,4 +112,4 @@
 export CFLAGS="$COMPFLAGS"
 export CXXFLAGS="$COMPFLAGS"
 
-#eval ./configure $DEFAULTCONFOPT $CONFOPT
+# eval ./configure $DEFAULTCONFOPT $CONFOPT
Nur in ug-orig/bin: CVS.
diff -ru ug-orig/bin/ugbcheck.awk ug-patched/bin/ugbcheck.awk
--- ug-orig/bin/ugbcheck.awk	1996-06-27 11:54:41.000000000 +0200
+++ ug-patched/bin/ugbcheck.awk	1996-06-27 11:54:41.000000000 +0200
@@ -8,16 +8,16 @@
 #   the output is piped into this awk-script in order to check for
 #   valid configurations.
 #
-#   the executable must contain the keywords $Header: /home/cvsroot/UG/ug/bin/ugbcheck.awk,v 1.4 1996/06/27 09:54:41 birken Exp $ and $State: Exp $
-#   for each object file. the $State: Exp $ line must give information with
+#   the executable must contain the keywords $Header$ and $State$
+#   for each object file. the $State$ line must give information with
 #   syntax PROPERTY=VALUE, where PROPERTY is the name of a compile time
 #   switch (or #define) and VALUE is its value at compile time.
 #   sample excerpt from 'ident libddd.a' output:
 #
-#   $Header: /home/cvsroot/UG/ug/bin/ugbcheck.awk,v 1.4 1996/06/27 09:54:41 birken Exp $
-#   $State: Exp $
-#   $Header: /home/cvsroot/UG/ug/bin/ugbcheck.awk,v 1.4 1996/06/27 09:54:41 birken Exp $
-#   $State: Exp $
+#   $Header$
+#   $State$
+#   $Header$
+#   $State$
 #   [...]
 #
 #   this awk-script builds up a database for this P-V-pairs, and 
diff -ru ug-orig/bin/ugconf ug-patched/bin/ugconf
--- ug-orig/bin/ugconf	2008-07-09 17:39:32.000000000 +0200
+++ ug-patched/bin/ugconf	2006-05-03 14:18:34.000000000 +0200
@@ -18,7 +18,7 @@
 	echo "             AIX (set ARCH = AIX)";
 	echo "             AIXGCC (set ARCH = AIXGCC)";
 	echo "             AMD64 (set ARCH = AMD64)";
-	echo "             BGP (set ARCH = BGP)";
+	echo "             YDL64 (set ARCH = YDL64)";
 	echo "             C90 (set ARCH = C90)";
 	echo "             CC (set ARCH = CC)";
 	echo "             CYGWIN (set ARCH = CYGWIN)";
@@ -54,7 +54,6 @@
 	echo "             SUN4GCC (set ARCH = SUN4GCC)";
 	echo "             T3D (set ARCH = T3D)";
 	echo "             T3E (set ARCH = T3E)";
-	echo "             YDL64 (set ARCH = YDL64)";
 	echo "             YMP (set ARCH = YMP)";
 }
 
@@ -137,10 +136,6 @@
 	echo "             CAD (set CAD = ON)";
 	echo "             NOCAD (set CAD = OFF)";
 
-	echo "         interface to REB's mlilu solver";
-	echo "             MLILU (set MLILU = ON)";
-	echo "             NOMLILU (set MLILU = OFF)";
-
 	echo "         debug flag";
 	echo "             DEBUG (set DEBUG_MODE = ON)";
 	echo "             NODEBUG (set DEBUG_MODE = OFF)";
@@ -217,7 +212,7 @@
 
 grep_valid_entries()
 {
-	egrep '^[ ]*ARCH|^[ ]*MODEL |^[ ]*DIM|^[ ]*GRAPE |^[ ]*COVISE|^[ ]*PV3|^[ ]*NETGEN|^[ ]*REMOTE_IF|^[ ]*IF|^[ ]*DOM_MODULE|^[ ]*DEBUG_MODE|^[ ]*OPTIM_MODE|^[ ]*CHACO|^[ ]*CAD|^[ ]*GUI|^[ ]*MLILU' $1;
+	egrep '^[ ]*ARCH|^[ ]*MODEL |^[ ]*DIM|^[ ]*GRAPE |^[ ]*COVISE|^[ ]*PV3|^[ ]*NETGEN|^[ ]*REMOTE_IF|^[ ]*IF|^[ ]*DOM_MODULE|^[ ]*DEBUG_MODE|^[ ]*OPTIM_MODE|^[ ]*CHACO|^[ ]*CAD|^[ ]*GUI' $1;
 }
 
 
@@ -430,23 +425,23 @@
 		sed 's/^ARCH.*$/ARCH = PCGCOV/' $1 > $1.tmp
 		;;
 	PCCPP)
-		sed 's/^ARCH.*$/ARCH = PCCPP/' $1 > $1.tmp
-		;;
+                sed 's/^ARCH.*$/ARCH = PCCPP/' $1 > $1.tmp
+                ;;
 	PCI)
 		sed 's/^ARCH.*$/ARCH = PCI/' $1 > $1.tmp
 		;;
-	PCICPP)
-		sed 's/^ARCH.*$/ARCH = PCICPP/' $1 > $1.tmp
-		;;
+        PCICPP)
+                sed 's/^ARCH.*$/ARCH = PCICPP/' $1 > $1.tmp
+                ;;
 	PCCLUSTER)
 		sed 's/^ARCH.*$/ARCH = PCCLUSTER/' $1 > $1.tmp
 		mv $1.tmp $1
-		sed 's/^MODEL[ \t].*$/MODEL = MPI/' $1 >$1.tmp
+                sed 's/^MODEL[ \t].*$/MODEL = MPI/' $1 >$1.tmp
 		;;
 	PCICLUSTER)
 		sed 's/^ARCH.*$/ARCH = PCICLUSTER/' $1 > $1.tmp
 		mv $1.tmp $1
-		sed 's/^MODEL[ \t].*$/MODEL = MPI/' $1 >$1.tmp
+                sed 's/^MODEL[ \t].*$/MODEL = MPI/' $1 >$1.tmp
 		;;
 	MKLINUX)
 		sed 's/^ARCH.*$/ARCH = MKLINUX/' $1 > $1.tmp
@@ -454,11 +449,6 @@
 	LINUXPPC)
 		sed 's/^ARCH.*$/ARCH = LINUXPPC/' $1 > $1.tmp
 		;;
-	BGP)
-		sed 's/^ARCH.*$/ARCH = BGP/' $1 > $1.tmp
-		mv $1.tmp $1
-		sed 's/^MODEL[ \t].*$/MODEL = MPI/' $1 >$1.tmp
-		;;
 	LINUXAXP)
 		sed 's/^ARCH.*$/ARCH = LINUXAXP/' $1 > $1.tmp
 		;;
@@ -466,7 +456,7 @@
 		sed 's/^ARCH.*$/ARCH = LINUXIA64/' $1 > $1.tmp
 		;;
 	CYGWIN)
-		sed 's/^ARCH.*$/ARCH = CYGWIN/' $1 > $1.tmp
+	        sed 's/^ARCH.*$/ARCH = CYGWIN/' $1 > $1.tmp
 		;;
 	POWERGC)
 		sed 's/^ARCH.*$/ARCH = POWERGC/' $1 > $1.tmp
@@ -510,7 +500,7 @@
 	MACCLUSTER)
 		sed 's/^ARCH.*$/ARCH = MACCLUSTER/' $1 > $1.tmp
 		mv $1.tmp $1
-		sed 's/^MODEL[ \t].*$/MODEL = MPI/' $1 >$1.tmp
+                sed 's/^MODEL[ \t].*$/MODEL = MPI/' $1 >$1.tmp
 		;;
 	MACOSXSERVER)
 		sed 's/^ARCH.*$/ARCH = MACOSXSERVER/' $1 > $1.tmp
@@ -587,12 +577,6 @@
 		sed 's/^CAD.*$/CAD = OFF/' $1 > $1.tmp
 		;;
 
-	MLILU)
-		sed 's/^MLILU.*$/MLILU = ON/' $1 > $1.tmp
-		;;
-	NOMLILU)
-		sed 's/^MLILU.*$/MLILU = OFF/' $1 > $1.tmp
-		;;
 	*)
 		echo "error: unrecognized option '" $2 "'. use '$PROGNAME -help' for help.";
 		cp $1 $1.tmp
diff -ru ug-orig/bin/ugexo2lgm ug-patched/bin/ugexo2lgm
--- ug-orig/bin/ugexo2lgm	2004-03-09 11:38:28.000000000 +0100
+++ ug-patched/bin/ugexo2lgm	2004-03-09 11:38:28.000000000 +0100
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w #-d
-# $Header: /home/cvsroot/UG/ug/bin/ugexo2lgm,v 1.9 2004/03/09 10:38:28 stefan Exp $
+# $Header$
 # usage: ugexo2lgm <exo2filename> <lgmfilename>
 # 		<exo2filename> - exodus II file with surface triangulation and node 
 #					 assoziativity info
diff -ru ug-orig/bin/ugexo2lgm_usn ug-patched/bin/ugexo2lgm_usn
--- ug-orig/bin/ugexo2lgm_usn	2004-03-05 14:02:49.000000000 +0100
+++ ug-patched/bin/ugexo2lgm_usn	2004-03-05 14:02:49.000000000 +0100
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w #-d
-# $Header: /home/cvsroot/UG/ug/bin/ugexo2lgm_usn,v 1.1 2004/03/05 13:02:49 stefan Exp $
+# $Header$
 # usage: ugexo2lgm_usn <cubit_logfile> <cubit_sncmd_file>
 #
 # author: Stefan Lang, INF 368, IWR, University of Heidelberg
diff -ru ug-orig/bin/ugexo2mbg_vol ug-patched/bin/ugexo2mbg_vol
--- ug-orig/bin/ugexo2mbg_vol	2005-04-06 13:23:11.000000000 +0200
+++ ug-patched/bin/ugexo2mbg_vol	2005-04-06 13:23:11.000000000 +0200
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w #-d
-# $Header: /home/cvsroot/UG/ug/bin/ugexo2mbg_vol,v 1.1 2005/04/06 11:23:11 stefan Exp $
+# $Header$
 # usage: ugexo2mbg_vol <cubit_logfile> <cubit_volcmd_file>
 #
 # author: Stefan Lang, INF 368, IWR, University of Heidelberg
diff -ru ug-orig/bin/ugexo2ng ug-patched/bin/ugexo2ng
--- ug-orig/bin/ugexo2ng	2004-03-23 18:10:24.000000000 +0100
+++ ug-patched/bin/ugexo2ng	2004-03-23 18:10:24.000000000 +0100
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w #-d
-# $Header: /home/cvsroot/UG/ug/bin/ugexo2ng,v 1.7 2004/03/23 17:10:24 stefan Exp $
+# $Header$
 # usage: ugexo2ng <exo2filename> <lgmfilename> <ngfilename>
 # 		<exo2filename> - exodus II file with volume meshing and nodeset/sideset 
 #					 assoziativity info
diff -ru ug-orig/bin/ugexo2ng_bss ug-patched/bin/ugexo2ng_bss
--- ug-orig/bin/ugexo2ng_bss	2004-03-05 14:02:49.000000000 +0100
+++ ug-patched/bin/ugexo2ng_bss	2004-03-05 14:02:49.000000000 +0100
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w #-d
-# $Header: /home/cvsroot/UG/ug/bin/ugexo2ng_bss,v 1.1 2004/03/05 13:02:49 stefan Exp $
+# $Header$
 # usage: ugexo2ng_bss <cubit_logfile> <cubit_sscmd_file>
 #
 # author: Stefan Lang, INF 368, IWR, University of Heidelberg
diff -ru ug-orig/bin/ugexoenroll ug-patched/bin/ugexoenroll
--- ug-orig/bin/ugexoenroll	2004-03-29 17:06:50.000000000 +0200
+++ ug-patched/bin/ugexoenroll	2004-03-29 17:06:50.000000000 +0200
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w #-d
-# $Header: /home/cvsroot/UG/ug/bin/ugexoenroll,v 1.4 2004/03/29 15:06:50 stefan Exp $
+# $Header$
 # usage: ugexoenroll <modelname> <lgmfilename>
 #       <modelname> - name of model to generate mesh for
 #
diff -ru ug-orig/bin/ugmake ug-patched/bin/ugmake
--- ug-orig/bin/ugmake	2004-08-30 15:49:26.000000000 +0200
+++ ug-patched/bin/ugmake	2004-08-30 15:49:26.000000000 +0200
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: ugmake,v 1.26 2004/08/30 13:49:26 thimo Exp $
+# $Id: ugmake 7746 2004-08-30 13:49:26Z thimo $
 
 # TODO:
 #
Nur in ug-orig/bin: ugpvd.
Nur in ug-orig/bin: ugvisit.
diff -ru ug-orig/config.h ug-patched/config.h
--- ug-orig/config.h	2008-10-30 13:29:04.000000000 +0100
+++ ug-patched/config.h	2008-12-19 11:03:42.000000000 +0100
@@ -2,20 +2,18 @@
 
  This header is a dummy header so that both the classical UG build
  system and a automake/autoconf-approach can be used. arch/compiler.h
- switches it's functionality depending on symbols in config.h. As the
+ switches its functionality depending on symbols in config.h. As the
  compiler complains if no config.h is found we need this dummy.
 
- $Id: config.h,v 1.8 2008/10/30 12:29:04 dmitriy Exp $
+ $Id: config.h 8332 2008-12-19 10:03:42Z sander $
 */
 
-/* Define if you don't want namespaces even with C++ */
-#define NO_NAMESPACES
-
 /* Define this if you want to use the full refinement rule set for tetrahedra */
 #ifdef ModelP
 #define TET_RULESET 
 #endif
 
+
 /* define this to use DYNAMIC_MEMORY_ALLOCMODEL */
 /* matrices and vectors (for amg) are allocated */
 /* using Mark/Release                           */
@@ -24,7 +22,3 @@
 /* enables use of Athena Text Widget in libXaw, libXt */
 /* undefine USE_XAW, if you want pure X (only libX11) */
 #define USE_XAW
-
-/* The degenerated elements: */
-#undef WITH_DEGENERATED_ELEM /* define to allow the degenerated elements */
-#define DEGENERATED_SIZE 1e-4 /* relative size of the degenerated sides/edges */
Nur in ug-orig/configs: CVS.
Nur in ug-orig/configs: mk.mlilu.OFF.
Nur in ug-orig/configs: mk.mlilu.ON.
diff -ru ug-orig/configs/mk.ugsettings ug-patched/configs/mk.ugsettings
--- ug-orig/configs/mk.ugsettings	2008-07-09 17:39:32.000000000 +0200
+++ ug-patched/configs/mk.ugsettings	2004-09-10 11:39:28.000000000 +0200
@@ -62,9 +62,6 @@
 # include macro definitions for gui
 include $(UGROOT)/configs/mk.gui.$(GUI)
 
-#include macro definitions for mlilu
-include $(UGROOT)/configs/mk.mlilu.$(MLILU)
-
 # -- list of automatically provided includes
 
 # this is the compatible setting: use the include-directory with all
@@ -84,7 +81,7 @@
 			$(RIF_CFLAGS) $(CHACO_CFLAGS) \
 			$(NETGEN_CFLAGS) $(COVISE_CFLAGS) $(GRAPE_CFLAGS) \
 			$(PV3_CFLAGS) $(CAD_CFLAGS) $(GUI_CFLAGS) \
-			$(MLILU_CFLAGS) $(UG_INCLUDES)
+			$(UG_INCLUDES)
 
 UG_COFLAGS = -c -D_$(DIM) -D$(ARCH_TYPE) $(UGDEBUG_CFLAGS) \
 			$(ARCH_CFLAGS) $(ARCH_OPTIM) $(PPIF_CFLAGS) $(MODEL_CFLAGS) \
@@ -92,9 +89,9 @@
 			$(RIF_CFLAGS) $(CHACO_CFLAGS) \
 			$(NETGEN_CFLAGS) $(COVISE_CFLAGS) $(GRAPE_CFLAGS) \
 			$(PV3_CFLAGS) $(CAD_CFLAGS) $(GUI_CFLAGS) \
-			$(MLILU_CFLAGS) $(UG_INCLUDES)
+			$(UG_INCLUDES)
 
-UG_C++FLAGS = -c -D_$(DIM) -D$(ARCH_TYPE) $(UGDEBUG_CFLAGS) $(UG_OFLAGS) \
+UG_C++FLAGS = -c -D_$(DIM) -D$(ARCH_TYPE) $(UGDEBUG_CFLAGS) $(UG_OFLAGS)\
 			$(ARCH_C++FLAGS) $(MODEL_CFLAGS) $(UG_INCLUDES)
 
 UG_FFLAGS = -c $(ARCH_FFLAGS)
@@ -102,7 +99,7 @@
 UG_LFLAGS = $(ARCH_LFLAGS) $(PPIF_LFLAGS) $(MODEL_LFLAGS) $(GRAPE_LFLAGS) \
 			$(GUI_LFLAGS) $(ARCH_XLIBS) $(ARCH_LIBS) $(ENV_LFLAGS) $(ARCH_PLIBS) \
 			$(NETGEN_LFLAGS) $(COVISE_LFLAGS) $(PV3_LFLAGS) $(CHACO_LFLAGS) \
-			$(CAD_LFLAGS) $(MLILU_LFLAGS)
+			$(CAD_LFLAGS)
 
 UG_LIB    = $(UGROOT)/lib/libug$(UG_LIBSUFFIX).a 
 
diff -ru ug-orig/configure.ac ug-patched/configure.ac
--- ug-orig/configure.ac	2006-11-15 15:06:01.000000000 +0100
+++ ug-patched/configure.ac	2008-04-18 16:02:02.000000000 +0200
@@ -230,9 +230,6 @@
 		 np/amglib/Makefile
 		 np/field/Makefile
 		 np/procs/Makefile
-		 np/slu/Makefile
-		 np/slu/cblas/Makefile
-		 np/slu/src/Makefile
 		 np/udm/Makefile
 		 tools/Makefile
                  ui/Makefile
@@ -255,6 +252,9 @@
 dnl                  gm/gg3/netgen/linalg/makefile
 dnl                  gm/gg3/netgen/meshing/makefile
 dnl                  gm/gg3/netgen/opti/makefile
+# The chaco stuff is not built because it is not available
+# in the anonymous Heidelberg CVS and not in the set of patches
+# we provide either.  AFAIK it doesn't work anyways.
 dnl                  parallel/chaco/Makefile
 dnl                  parallel/chaco/assign/Makefile
 dnl                  parallel/chaco/bpmatch/Makefile
Nur in ug-orig: CVS.
Nur in ug-orig: .cvsignore.
Nur in ug-orig/dev: CVS.
Nur in ug-orig/dev: .cvsignore.
diff -ru ug-orig/dev/initdev.h ug-patched/dev/initdev.h
--- ug-orig/dev/initdev.h	2004-07-21 11:20:02.000000000 +0200
+++ ug-patched/dev/initdev.h	2009-04-29 14:30:36.000000000 +0200
@@ -22,7 +22,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dev/initdev.h,v 1.12 2004/07/21 09:20:02 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -67,7 +67,7 @@
 /* ppm device */
 INT InitPPMDevice(void);
 
-END_NAMESPACE
+END_UG_NAMESPACE
 
 #endif
 
diff -ru ug-orig/dev/Makefile.am ug-patched/dev/Makefile.am
--- ug-orig/dev/Makefile.am	2004-09-08 13:29:50.000000000 +0200
+++ ug-patched/dev/Makefile.am	2004-09-08 13:29:50.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.2 2004/09/08 11:29:50 thimo Exp $
+# $Id: Makefile.am 7783 2004-09-08 11:29:50Z thimo $
 
 # !!! test and include them:
 #
Nur in ug-orig/dev/meta: CVS.
Nur in ug-orig/dev/meta: .cvsignore.
diff -ru ug-orig/dev/meta/Makefile.am ug-patched/dev/meta/Makefile.am
--- ug-orig/dev/meta/Makefile.am	2004-09-02 14:22:03.000000000 +0200
+++ ug-patched/dev/meta/Makefile.am	2004-09-02 14:22:17.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.1 2004/09/02 12:22:03 thimo Exp $
+# $Id: Makefile.am 7772 2004-09-02 12:22:17Z thimo $
 
 AM_CPPFLAGS = $(UG_CPPFLAGS)
 
diff -ru ug-orig/dev/meta/metafile.c ug-patched/dev/meta/metafile.c
--- ug-orig/dev/meta/metafile.c	2006-06-02 18:25:20.000000000 +0200
+++ ug-patched/dev/meta/metafile.c	2006-06-02 18:25:44.000000000 +0200
@@ -129,7 +129,7 @@
 static long saveColor;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dev/meta/metafile.c,v 1.23 2006/06/02 16:25:20 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
Nur in ug-orig/dev/mif: CVS.
Nur in ug-orig/dev/mif: .cvsignore.
Nur in ug-orig/dev/mif/English.lproj: CVS.
Nur in ug-orig/dev/mif/English.lproj/UG_MacOSXServer.nib: CVS.
Binärdateien ug-orig/dev/mif/Icons16x16/Arrow.tiff and ug-patched/dev/mif/Icons16x16/Arrow.tiff sind verschieden.
Nur in ug-orig/dev/mif/Icons16x16: CVS.
Binärdateien ug-orig/dev/mif/Icons16x16/Magnify.tiff and ug-patched/dev/mif/Icons16x16/Magnify.tiff sind verschieden.
Nur in ug-orig/dev/mif/Icons20x20: CVS.
Nur in ug-orig/dev/mif/Icons24x24: CVS.
diff -ru ug-orig/dev/mif/MacGraph.c ug-patched/dev/mif/MacGraph.c
--- ug-orig/dev/mif/MacGraph.c	2006-06-02 18:25:44.000000000 +0200
+++ ug-patched/dev/mif/MacGraph.c	2006-06-02 18:25:44.000000000 +0200
@@ -109,7 +109,7 @@
 static char buffer[255];
 	
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dev/mif/MacGraph.c,v 1.22 2006/06/02 16:25:44 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/dev/mif/MacGraph.h ug-patched/dev/mif/MacGraph.h
--- ug-orig/dev/mif/MacGraph.h	2002-02-12 17:48:50.000000000 +0100
+++ ug-patched/dev/mif/MacGraph.h	2002-02-12 17:48:50.000000000 +0100
@@ -20,7 +20,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dev/mif/MacGraph.h,v 1.8 2002/02/12 16:48:50 reichenb Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/dev/mif/MacMain.c ug-patched/dev/mif/MacMain.c
--- ug-orig/dev/mif/MacMain.c	2006-06-02 18:25:44.000000000 +0200
+++ ug-patched/dev/mif/MacMain.c	2006-06-02 18:25:44.000000000 +0200
@@ -109,7 +109,7 @@
 static OUTPUTDEVICE *MacOutputDevice;	/* ptr to MacOutputDevice			*/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dev/mif/MacMain.c,v 1.17 2006/06/02 16:25:44 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/dev/mif/MacMain.h ug-patched/dev/mif/MacMain.h
--- ug-orig/dev/mif/MacMain.h	1997-07-18 16:58:44.000000000 +0200
+++ ug-patched/dev/mif/MacMain.h	1997-07-18 17:00:14.000000000 +0200
@@ -20,7 +20,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dev/mif/MacMain.h,v 1.3 1997/07/18 14:58:44 birken Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/dev/mif/MacShell.c ug-patched/dev/mif/MacShell.c
--- ug-orig/dev/mif/MacShell.c	2006-06-02 18:25:44.000000000 +0200
+++ ug-patched/dev/mif/MacShell.c	2006-06-02 18:25:44.000000000 +0200
@@ -134,7 +134,7 @@
 static ControlActionUPP MyShellScrollActionPtr;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dev/mif/MacShell.c,v 1.17 2006/06/02 16:25:44 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/dev/mif/MacShell.h ug-patched/dev/mif/MacShell.h
--- ug-orig/dev/mif/MacShell.h	2002-02-12 17:48:50.000000000 +0100
+++ ug-patched/dev/mif/MacShell.h	2002-02-12 17:48:50.000000000 +0100
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dev/mif/MacShell.h,v 1.5 2002/02/12 16:48:50 reichenb Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/dev/mif/MacSurface.c ug-patched/dev/mif/MacSurface.c
--- ug-orig/dev/mif/MacSurface.c	2006-06-02 18:25:44.000000000 +0200
+++ ug-patched/dev/mif/MacSurface.c	2006-06-02 18:25:44.000000000 +0200
@@ -100,7 +100,7 @@
 int screenHeight;					/* screen size while program is running */
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dev/mif/MacSurface.c,v 1.12 2006/06/02 16:25:44 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/dev/mif/MacSurface.h ug-patched/dev/mif/MacSurface.h
--- ug-orig/dev/mif/MacSurface.h	2002-02-12 17:48:50.000000000 +0100
+++ ug-patched/dev/mif/MacSurface.h	2002-02-12 17:48:50.000000000 +0100
@@ -20,7 +20,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dev/mif/MacSurface.h,v 1.4 2002/02/12 16:48:50 reichenb Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/dev/mif/Makefile.am ug-patched/dev/mif/Makefile.am
--- ug-orig/dev/mif/Makefile.am	2004-09-02 14:22:04.000000000 +0200
+++ ug-patched/dev/mif/Makefile.am	2004-09-02 14:22:17.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.1 2004/09/02 12:22:04 thimo Exp $
+# $Id: Makefile.am 7772 2004-09-02 12:22:17Z thimo $
 
 AM_CPPFLAGS = $(UG_CPPFLAGS)
 
diff -ru ug-orig/dev/mif/MAppController.h ug-patched/dev/mif/MAppController.h
--- ug-orig/dev/mif/MAppController.h	1999-06-18 12:50:06.000000000 +0200
+++ ug-patched/dev/mif/MAppController.h	1999-06-18 12:50:13.000000000 +0200
@@ -35,4 +35,4 @@
 - (void)showInspector:(id)sender;
 - (void)showPreferences:(id)sender;
 - (void)dealloc;
-@end
\ Kein Zeilenumbruch am Dateiende.
+@end
diff -ru ug-orig/dev/mif/MAppController.m ug-patched/dev/mif/MAppController.m
--- ug-orig/dev/mif/MAppController.m	1999-09-08 17:23:55.000000000 +0200
+++ ug-patched/dev/mif/MAppController.m	1999-09-08 17:24:03.000000000 +0200
@@ -101,4 +101,4 @@
     [super dealloc];
 }
 
-@end
\ Kein Zeilenumbruch am Dateiende.
+@end
Nur in ug-orig/dev/mif/mif.pbproj: CVS.
diff -ru ug-orig/dev/mif/MInterface.m ug-patched/dev/mif/MInterface.m
--- ug-orig/dev/mif/MInterface.m	2004-05-04 15:05:18.000000000 +0200
+++ ug-patched/dev/mif/MInterface.m	2004-05-04 15:05:18.000000000 +0200
@@ -60,7 +60,7 @@
 /*		  macros															*/
 /*																			*/
 /****************************************************************************/
-#define VERSION 	"This is "UG_VERSION" from $Date: 2004/05/04 13:05:18 $\n"
+#define VERSION 	"This is "UG_VERSION" from $Date: 2004-05-04 15:05:18 +0200 (Di, 04. Mai 2004) $\n"
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/dev/mif/MShell.h ug-patched/dev/mif/MShell.h
--- ug-orig/dev/mif/MShell.h	1999-09-08 17:23:59.000000000 +0200
+++ ug-patched/dev/mif/MShell.h	1999-09-08 17:24:03.000000000 +0200
@@ -58,4 +58,4 @@
 - (NSRange)textView:(NSTextView *)aTextView willChangeSelectionFromCharacterRange:(NSRange)oldSelectedCharRange toCharacterRange:(NSRange)newSelectedCharRange;*/
 @end
 
-#endif
\ Kein Zeilenumbruch am Dateiende.
+#endif
diff -ru ug-orig/dev/mif/MShell.m ug-patched/dev/mif/MShell.m
--- ug-orig/dev/mif/MShell.m	1999-09-08 17:23:59.000000000 +0200
+++ ug-patched/dev/mif/MShell.m	1999-09-08 17:24:03.000000000 +0200
@@ -215,4 +215,4 @@
     return YES;
 }
 @end
-
\ Kein Zeilenumbruch am Dateiende.
+
diff -ru ug-orig/dev/mif/MShellTextView.h ug-patched/dev/mif/MShellTextView.h
--- ug-orig/dev/mif/MShellTextView.h	1999-06-18 12:50:11.000000000 +0200
+++ ug-patched/dev/mif/MShellTextView.h	1999-06-18 12:50:13.000000000 +0200
@@ -25,7 +25,7 @@
 @interface MShellTextView : NSTextView
 {
 	int startPosition;					// This is the start of the current command.
-    NSTextStorage *theTextStore;
+    NSTextStorage *theTextStore;
 
     NSMutableArray	*theCommandList;	// store the history of entered commands
     unsigned int	commandCount;		// count the number of entered commands
@@ -44,10 +44,10 @@
 
 - (void) appendText:(NSString *)str;
 
-- (void)keyDown:(NSEvent *)theEvent;
+- (void)keyDown:(NSEvent *)theEvent;
 
 - (void) replaceCurrentCommandWith:(NSString *)command;
 
-- (void)highlightError;
+- (void)highlightError;
 
-@end
\ Kein Zeilenumbruch am Dateiende.
+@end
diff -ru ug-orig/dev/mif/MShellTextView.m ug-patched/dev/mif/MShellTextView.m
--- ug-orig/dev/mif/MShellTextView.m	1999-09-08 17:24:00.000000000 +0200
+++ ug-patched/dev/mif/MShellTextView.m	1999-09-08 17:24:03.000000000 +0200
@@ -21,7 +21,7 @@
 #include "cmdint.h"
 
 
-#define RETURN    @"\015"
+#define RETURN    @"\015"
 #define BACKSPACE @"\010"
 
 
@@ -86,7 +86,7 @@
     [self setFont:[NSFont userFixedPitchFontOfSize:10.0]];
 
     /*[self setFont:[NSFont userFixedPitchFontOfSize:10]
-          range:NSMakeRange(0,[[self string] length])];
+          range:NSMakeRange(0,[[self string] length])];
 
     printf ("4 Desired font is %s, ", [[[NSFont userFixedPitchFontOfSize:18] displayName] lossyCString]);
     printf ("Current font is %s ", [[[self font] displayName] lossyCString]);
@@ -97,7 +97,7 @@
     if ([self shouldChangeTextInRange:NSMakeRange(0,[[self string] length])
                     replacementString:nil])
     {
-        [theTextStore beginEditing];
+        [theTextStore beginEditing];
         [theTextStore addAttributes:textAttributes range:NSMakeRange(0,[[self string] length])];
         [theTextStore fixAttributesInRange:NSMakeRange(0,[[self string] length])];
         [theTextStore endEditing];
@@ -121,12 +121,12 @@
     if ([self shouldChangeTextInRange:NSMakeRange([theTextStore length]-plen, plen)
                     replacementString:nil])
     {
-        [theTextStore beginEditing];
-        [theTextStore addAttributes:promptAttributes range:NSMakeRange([theTextStore length]-plen, plen-1)];
-        [theTextStore addAttributes:cmdlineAttributes range:NSMakeRange([theTextStore length]-1, 1)];
+        [theTextStore beginEditing];
+        [theTextStore addAttributes:promptAttributes range:NSMakeRange([theTextStore length]-plen, plen-1)];
+        [theTextStore addAttributes:cmdlineAttributes range:NSMakeRange([theTextStore length]-1, 1)];
         [theTextStore endEditing];
         [self didChangeText];
-    }
+    }
 
     startPosition = [theTextStore length];
     [self scrollRangeToVisible:NSMakeRange(startPosition, 0)];
@@ -138,7 +138,7 @@
 {
     static int i;
 
-    [self moveToEndOfDocument:self];
+    [self moveToEndOfDocument:self];
     /* this changes the font back to Helvetica! 
     [theTextStore
             replaceCharactersInRange:NSMakeRange([theTextStore length], 0)
@@ -157,7 +157,7 @@
     return;
 }
 
-- (void) keyDown:(NSEvent *)theEvent
+- (void) keyDown:(NSEvent *)theEvent
 {
     unichar key;
     
@@ -166,12 +166,12 @@
         return;
     }
     
-    if ([self selectedRange].location < startPosition)
-    {
+    if ([self selectedRange].location < startPosition)
+    {
         [self moveToEndOfDocument:self]; 	// ...not implemented yet
         [self setSelectedRange:NSMakeRange([[self string] length],0)];
-        [self scrollRangeToVisible:[self selectedRange]];  
-    }
+        [self scrollRangeToVisible:[self selectedRange]];  
+    }
 
     key = [[theEvent characters] characterAtIndex:0];
 
@@ -200,19 +200,19 @@
         [self moveToEndOfDocument:self];
         [self setSelectedRange:NSMakeRange([[self string] length],0)];
 
-        [super keyDown:theEvent];
+        [super keyDown:theEvent];
         [theUGshell interpretCommand:command];
-        [self appendPrompt];
-        [self scrollRangeToVisible:[self selectedRange]];
-        startPosition = [[self string] length];
+        [self appendPrompt];
+        [self scrollRangeToVisible:[self selectedRange]];
+        startPosition = [[self string] length];
         [currentLine setString:@""];
-    }
+    }
 	
     else if ( key==NSLeftArrowFunctionKey
               && !([theEvent modifierFlags] & NSCommandKeyMask))
    {
-      	if ([self selectedRange].location > startPosition)
-       		[super keyDown:theEvent];
+      	if ([self selectedRange].location > startPosition)
+       		[super keyDown:theEvent];
     }
     
     else if ( key==NSUpArrowFunctionKey
@@ -232,9 +232,9 @@
             currCommandNumber--;
             [self replaceCurrentCommandWith:[theCommandList objectAtIndex:currCommandNumber%MAX_BUFFERED_COMMANDS]];
         }
-    }
+    }
 
-    else if ( key==NSDownArrowFunctionKey 
+    else if ( key==NSDownArrowFunctionKey 
               && !([theEvent modifierFlags] & NSCommandKeyMask))
     {
         currCommandNumber++;
@@ -245,12 +245,12 @@
             [self replaceCurrentCommandWith:currentLine];
             currCommandNumber = commandCount;
         }
-    }
+    }
 
     else if ( (key==NSBackspaceCharacter || key==NSBackTabCharacter || key==NSDeleteCharacter)
               && !([theEvent modifierFlags] & NSCommandKeyMask))
     {
-        if ([self selectedRange].location > startPosition)	{
+        if ([self selectedRange].location > startPosition)	{
             [super keyDown:theEvent];
        	}
 	}
@@ -285,11 +285,11 @@
         [self moveToEndOfDocument:self];
         [self setSelectedRange:NSMakeRange([[self string] length],0)];
 
-        [super keyDown:theEvent];
+        [super keyDown:theEvent];
         [theUGshell interpretCommand:command];
-        [self appendPrompt];
-        [self scrollRangeToVisible:[self selectedRange]];
-        startPosition = [[self string] length];
+        [self appendPrompt];
+        [self scrollRangeToVisible:[self selectedRange]];
+        startPosition = [[self string] length];
         [currentLine setString:@""];*/
     }
     
@@ -301,17 +301,17 @@
 }
 
 - (void) replaceCurrentCommandWith:(NSString *)command
-{
+{
     [self setSelectedRange:NSMakeRange(startPosition,[[self string] length]-startPosition)];
     [theTextStore addAttributes:cmdlineAttributes range:NSMakeRange(startPosition,[[self string] length]-startPosition)];
-    [self insertText:command];
-    [self moveToEndOfDocument:self];
+    [self insertText:command];
+    [self moveToEndOfDocument:self];
     [self scrollRangeToVisible:[self selectedRange]];
 
     return;
-}
+}
 
-- (void)highlightError
+- (void)highlightError
 {
 	NSRange range=[[theTextStore string] rangeOfString:@"\n" options:NSLiteralSearch
 				range:NSMakeRange(startPosition,[[self string] length]-startPosition)];
@@ -319,12 +319,12 @@
 	if ( range.length>0 )
         if ([self shouldChangeTextInRange:NSMakeRange(startPosition,range.location-startPosition) replacementString:nil])
         {
-            [theTextStore beginEditing];
-            [theTextStore addAttributes:errorAttributes range:NSMakeRange(startPosition,range.location-startPosition)];
+            [theTextStore beginEditing];
+            [theTextStore addAttributes:errorAttributes range:NSMakeRange(startPosition,range.location-startPosition)];
             [theTextStore endEditing];
             [self didChangeText];
-        }
+        }
 }
-
 
-@end
\ Kein Zeilenumbruch am Dateiende.
+
+@end
diff -ru ug-orig/dev/mif/MShellView.h ug-patched/dev/mif/MShellView.h
--- ug-orig/dev/mif/MShellView.h	1999-06-10 20:47:15.000000000 +0200
+++ ug-patched/dev/mif/MShellView.h	1999-06-10 20:47:19.000000000 +0200
@@ -41,4 +41,4 @@
 - (MShellTextView *)textView;
 - (NSScrollView *)scrollView;
 
-@end
\ Kein Zeilenumbruch am Dateiende.
+@end
diff -ru ug-orig/dev/mif/MShellView.m ug-patched/dev/mif/MShellView.m
--- ug-orig/dev/mif/MShellView.m	1999-09-08 17:24:00.000000000 +0200
+++ ug-patched/dev/mif/MShellView.m	1999-09-08 17:24:03.000000000 +0200
@@ -139,4 +139,4 @@
   return theScrollView;
 }
 
-@end
\ Kein Zeilenumbruch am Dateiende.
+@end
diff -ru ug-orig/dev/mif/MShellWindow.h ug-patched/dev/mif/MShellWindow.h
--- ug-orig/dev/mif/MShellWindow.h	1999-06-10 20:47:16.000000000 +0200
+++ ug-patched/dev/mif/MShellWindow.h	1999-06-10 20:47:19.000000000 +0200
@@ -32,4 +32,4 @@
                 defer:(BOOL)flag;
 @end
 
-#endif
\ Kein Zeilenumbruch am Dateiende.
+#endif
diff -ru ug-orig/dev/mif/MShellWindow.m ug-patched/dev/mif/MShellWindow.m
--- ug-orig/dev/mif/MShellWindow.m	1999-06-18 12:50:12.000000000 +0200
+++ ug-patched/dev/mif/MShellWindow.m	1999-06-18 12:50:13.000000000 +0200
@@ -49,4 +49,4 @@
 }
 
 @end
-
\ Kein Zeilenumbruch am Dateiende.
+
Nur in ug-orig/dev/mif/PBUserInfo: CVS.
Nur in ug-orig/dev/nif: CVS.
Nur in ug-orig/dev/nif: .cvsignore.
diff -ru ug-orig/dev/nif/Makefile.am ug-patched/dev/nif/Makefile.am
--- ug-orig/dev/nif/Makefile.am	2004-09-02 14:22:04.000000000 +0200
+++ ug-patched/dev/nif/Makefile.am	2004-09-02 14:22:17.000000000 +0200
@@ -1,3 +1,3 @@
-# $Id: Makefile.am,v 1.1 2004/09/02 12:22:04 thimo Exp $
+# $Id: Makefile.am 7772 2004-09-02 12:22:17Z thimo $
 
 
diff -ru ug-orig/dev/nif/NeXTInterface.h ug-patched/dev/nif/NeXTInterface.h
--- ug-orig/dev/nif/NeXTInterface.h	1998-09-02 14:25:21.000000000 +0200
+++ ug-patched/dev/nif/NeXTInterface.h	1998-09-02 14:28:06.000000000 +0200
@@ -38,7 +38,7 @@
 #import <appkit/Window.h>
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dev/nif/NeXTInterface.h,v 1.3 1998/09/02 12:25:21 henrik Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/dev/nif/NeXTInterface.m ug-patched/dev/nif/NeXTInterface.m
--- ug-orig/dev/nif/NeXTInterface.m	1998-08-07 15:36:53.000000000 +0200
+++ ug-patched/dev/nif/NeXTInterface.m	1998-08-07 15:39:05.000000000 +0200
@@ -60,7 +60,7 @@
 /*		  macros															*/
 /*																			*/
 /****************************************************************************/
-#define VERSION 	"This is "UG_VERSION" from $Date: 1998/08/07 13:36:53 $\n"
+#define VERSION 	"This is "UG_VERSION" from $Date: 1998-08-07 15:39:05 +0200 (Fr, 07. Aug 1998) $\n"
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/dev/nif/UGGraphWindow.h ug-patched/dev/nif/UGGraphWindow.h
--- ug-orig/dev/nif/UGGraphWindow.h	1998-09-02 14:25:23.000000000 +0200
+++ ug-patched/dev/nif/UGGraphWindow.h	1998-09-02 14:28:06.000000000 +0200
@@ -29,7 +29,7 @@
 #endif
  
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dev/nif/UGGraphWindow.h,v 1.3 1998/09/02 12:25:23 henrik Exp $
+$Header$
 */
 
 
Nur in ug-orig/dev/ppm: CVS.
Nur in ug-orig/dev/ppm: .cvsignore.
diff -ru ug-orig/dev/ppm/Makefile.am ug-patched/dev/ppm/Makefile.am
--- ug-orig/dev/ppm/Makefile.am	2004-09-02 14:22:05.000000000 +0200
+++ ug-patched/dev/ppm/Makefile.am	2004-09-02 14:22:17.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.1 2004/09/02 12:22:05 thimo Exp $
+# $Id: Makefile.am 7772 2004-09-02 12:22:17Z thimo $
 
 AM_CPPFLAGS = $(UG_CPPFLAGS)
 
diff -ru ug-orig/dev/ppm/ppm.c ug-patched/dev/ppm/ppm.c
--- ug-orig/dev/ppm/ppm.c	2004-11-02 11:35:33.000000000 +0100
+++ ug-patched/dev/ppm/ppm.c	2008-12-19 11:14:03.000000000 +0100
@@ -24,6 +24,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -71,7 +72,7 @@
 static short BlueTab[COLORS]; 
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dev/ppm/ppm.c,v 1.10 2004/11/02 10:35:33 thimo Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
Nur in ug-orig/dev/ps: CVS.
Nur in ug-orig/dev/ps: .cvsignore.
diff -ru ug-orig/dev/ps/Makefile.am ug-patched/dev/ps/Makefile.am
--- ug-orig/dev/ps/Makefile.am	2004-09-02 14:22:05.000000000 +0200
+++ ug-patched/dev/ps/Makefile.am	2004-09-02 14:22:17.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.1 2004/09/02 12:22:05 thimo Exp $
+# $Id: Makefile.am 7772 2004-09-02 12:22:17Z thimo $
 
 AM_CPPFLAGS = $(UG_CPPFLAGS)
 
diff -ru ug-orig/dev/ps/postscriptbw.c ug-patched/dev/ps/postscriptbw.c
--- ug-orig/dev/ps/postscriptbw.c	2005-07-22 15:01:14.000000000 +0200
+++ ug-patched/dev/ps/postscriptbw.c	2008-12-19 11:14:03.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stddef.h>
 #include <string.h>
 #include <stdio.h>
@@ -116,7 +117,7 @@
 static float blue[COLORS];
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dev/ps/postscriptbw.c,v 1.7 2005/07/22 13:01:14 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/dev/ps/postscript.c ug-patched/dev/ps/postscript.c
--- ug-orig/dev/ps/postscript.c	2004-07-21 11:20:03.000000000 +0200
+++ ug-patched/dev/ps/postscript.c	2008-12-19 11:14:03.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stddef.h>
 #include <string.h>
 #include <stdio.h>
@@ -115,7 +116,7 @@
 static float blue[COLORS];
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dev/ps/postscript.c,v 1.28 2004/07/21 09:20:03 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
Nur in ug-orig/dev/rif: CVS.
Nur in ug-orig/dev/rif: .cvsignore.
diff -ru ug-orig/dev/rif/Makefile.am ug-patched/dev/rif/Makefile.am
--- ug-orig/dev/rif/Makefile.am	2004-09-02 14:22:06.000000000 +0200
+++ ug-patched/dev/rif/Makefile.am	2004-09-02 14:22:17.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.1 2004/09/02 12:22:06 thimo Exp $
+# $Id: Makefile.am 7772 2004-09-02 12:22:17Z thimo $
 
 AM_CPPFLAGS = $(UG_CPPFLAGS)
 
diff -ru ug-orig/dev/rif/remote.c ug-patched/dev/rif/remote.c
--- ug-orig/dev/rif/remote.c	2005-07-14 13:40:24.000000000 +0200
+++ ug-patched/dev/rif/remote.c	2008-12-19 11:14:03.000000000 +0100
@@ -29,6 +29,7 @@
 /****************************************************************************/
 
 
+#include "config.h"
 #include "sockcomm.h"
 
 
@@ -82,7 +83,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dev/rif/remote.c,v 1.14 2005/07/14 11:40:24 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 
Nur in ug-orig/dev/sif: CVS.
Nur in ug-orig/dev/sif: .cvsignore.
diff -ru ug-orig/dev/sif/Makefile.am ug-patched/dev/sif/Makefile.am
--- ug-orig/dev/sif/Makefile.am	2004-09-02 14:22:06.000000000 +0200
+++ ug-patched/dev/sif/Makefile.am	2004-09-02 14:22:17.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.1 2004/09/02 12:22:06 thimo Exp $
+# $Id: Makefile.am 7772 2004-09-02 12:22:17Z thimo $
 
 AM_CPPFLAGS = $(UG_CPPFLAGS) -I$(top_srcdir)/low
 
diff -ru ug-orig/dev/sif/sif.c ug-patched/dev/sif/sif.c
--- ug-orig/dev/sif/sif.c	2004-07-21 11:20:04.000000000 +0200
+++ ug-patched/dev/sif/sif.c	2008-12-19 11:14:03.000000000 +0100
@@ -25,6 +25,7 @@
 /****************************************************************************/
 
 /* standard C includes */
+#include "config.h"
 #include <string.h>
 #include <math.h>
 #include <stddef.h>
@@ -58,7 +59,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dev/sif/sif.c,v 1.13 2004/07/21 09:20:04 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/dev/sockcomm.c ug-patched/dev/sockcomm.c
--- ug-orig/dev/sockcomm.c	1997-09-10 12:32:42.000000000 +0200
+++ ug-patched/dev/sockcomm.c	2008-12-19 11:14:03.000000000 +0100
@@ -26,6 +26,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include "compiler.h"
 #include "general.h"
 
@@ -38,7 +39,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dev/sockcomm.c,v 1.8 1997/09/10 10:32:42 wieners Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 /****************************************************************************/
diff -ru ug-orig/dev/sockcomm.h ug-patched/dev/sockcomm.h
--- ug-orig/dev/sockcomm.h	1997-10-08 19:45:43.000000000 +0200
+++ ug-patched/dev/sockcomm.h	1997-10-08 19:45:43.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dev/sockcomm.h,v 1.8 1997/10/08 17:45:43 reichenb Exp $
+$Header$
 */
 
 
diff -ru ug-orig/dev/ugdevices.c ug-patched/dev/ugdevices.c
--- ug-orig/dev/ugdevices.c	2005-07-18 15:42:28.000000000 +0200
+++ ug-patched/dev/ugdevices.c	2009-04-29 15:11:55.000000000 +0200
@@ -25,6 +25,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
@@ -90,9 +91,14 @@
 /*																			*/
 /****************************************************************************/
 
-/* the mute level is set by the MuteCommand and used for output control		*/
-/* convention: 0 is default, <0 produces less output, >0 produces more outpu*/
+/* the mute level is set by the MuteCommand and used for output control.
+   convention: 0 is default, <0 produces less output, >0 produces more output.
+   When compiling for DUNE, the default is -1001, which equals total silence. */
+#ifndef FOR_DUNE
 static INT mutelevel=0;
+#else
+static INT mutelevel=-1001;
+#endif
 
 static FILE *logFile=NULL;						/* log file pointer 		*/
 static OUTPUTDEVICE *defaultOuputDevice=NULL;	/* console graphical outp.	*/
@@ -101,7 +107,7 @@
 static INT theOutputDevVarID;			/* env type for Output Device vars	*/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dev/ugdevices.c,v 1.12 2005/07/18 13:42:28 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -130,7 +136,7 @@
 D*/
 /****************************************************************************/
 
-OUTPUTDEVICE * NS_PREFIX CreateOutputDevice (char *name)
+OUTPUTDEVICE * NS_PREFIX CreateOutputDevice (const char *name)
 {
 	OUTPUTDEVICE *dev;
 	
diff -ru ug-orig/dev/ugdevices.doc ug-patched/dev/ugdevices.doc
--- ug-orig/dev/ugdevices.doc	1998-08-07 16:42:03.000000000 +0200
+++ ug-patched/dev/ugdevices.doc	2007-12-04 10:57:48.000000000 +0100
@@ -67,124 +67,6 @@
 /*D
     OUTPUTDEVICE - data structure to define an interface to output devices
     
-    PURPOSE:
-    The struct 'OUTPUTDEVICE' defines an interface to an output device with
-    graphics capabilites. ug uses a default output device which usually is your
-    computer monitor. Additionally there can be defined several other output devices.
-    
-    Up to now there is implemented an interface to XWindows of UNIX and to the
-    Macintosh OS with the possibilties of window handling and plotting.
-    They serve as default output device.
-    
-    Another output is the 'meta' ouput device. This is a format to write graphics commands
-    to file which later can be view with the 'xugv' tool or that can be translated to PostScript
-    format using the 'm2ps' tool. It is a lean storage format
-    suited quite well for producing and viewing "films" with many pictures of time dependent solutions.
-    It is also a helpful tool for production runs on large problems which often will run
-    in batch mode.
-    
-    In the near future probably also a PostScript output device will exist.
-    
-    The output device struct requires functions for opening, closing, activating and updating
-    a window on the device. Then there is a collection of graphics functions to set color,
-    line width move the cursor, draw lines and higher level functions to plot filled polygons
-    and text.
-    
-    Additionally there is information specified on the color palette used and some standard
-    colors are defined.
-    
-    DEFINITION:
-.vb
-// abstract graphical output device 
-struct outputdevice {
-
-    // This is an environment variable 
-    ENVVAR v;
-
-    // properties 
-    long black;                         // value for black                                      
-    long white;                         // value for white                                      
-    long red;                           // value for red                                        
-    long green;                         // value for green                                      
-    long blue;                          // value for blue                                       
-    long cyan;                          // value for cyan                                       
-    long orange;                        // value for orange                                     
-    long yellow;                        // value for yellow                                     
-    long darkyellow;                    // value for yellow                                     
-    long magenta;                       // value for magenta                                    
-    short hasPalette;                   // 1 if device has a color lookup table                 
-    long range;                         // # of possible color indices                          
-    long spectrumStart;                 // usable range for a continuous                        
-    long spectrumEnd;                   // color spectrum                                       
-    DOUBLE PixelRatio;                   // ratio of (physical) hight to width of a pixel        
-
-    // pointers to basic drawing functions 
-    void (*Move) (SHORT_POINT);             // move in device coordinates       
-    void (*Draw) (SHORT_POINT);             // draw from current point to given 
-    void (*Polyline) (SHORT_POINT *, INT ); // draw a polyline                  
-    void (*InversePolyline) (SHORT_POINT *, INT );          
-                                            // draw an inverted polyline        
-    void (*Polygon) (SHORT_POINT *, INT );  // fill a polygon w. curr. col      
-    void (*InversePolygon) (SHORT_POINT *, INT );           
-                                            // invert a polygon w. curr. col    
-    void (*ErasePolygon) (SHORT_POINT *, INT );             
-                                            // erase a polygon w. curr. col     
-    void (*Polymark) (short, SHORT_POINT *);// place markers                    
-    
-    void (*Text) (const char *, INT);       // draw text in current size/font
-    void (*CenteredText) (SHORT_POINT, const char *, INT);  
-                                            // draw text centered at x,y        
-                                            // possible text modes are 
-                                            // TEXT_REGULAR and TEXT_INVERSE 
-                                            // (the last argument)
-    
-    void (*ClearViewPort)(void);            // clear a view port                
-    
-    // pointers to set functions 
-    void (*SetLineWidth) (short);           // line width in pixels (points)    
-    void (*SetTextSize) (short);            // text size in pixels (points)     
-    void (*SetMarker) (short);              // set marker id                    
-    void (*SetMarkerSize) (short);          // marker size in pixels (points)   
-    void (*SetColor) (long);                // arg is index or direct col value 
-    void (*SetPaletteEntry) (long,short,short,short);       
-                                            // set index to value               
-    void (*SetNewPalette) (long,long,short*,short*,short*); 
-                                            // replace entry                    
-    
-    // pointers to miscellaneous functions 
-    void (*GetPaletteEntry) (long,short *,short *,short *); 
-                                            // read color table                 
-    void (*Flush) (void);                   // flush graphics buffer            
-    
-    // operations for managing windows 
-    OpenOutputPtr OpenOutput;               // function to open a window                              
-    CloseOutputPtr CloseOutput;             // function to close a window                             
-    ActivateOutputPtr ActivateOutput;       // function to activate window                            
-    UpdateOutputPtr UpdateOutput;           // function to draw outline with tool
-                                            // and info box        
-};
-
-typedef struct outputdevice     OUTPUTDEVICE;
-
-// type for device coordinates 
-typedef struct
-{
-    short x;
-    short y;
-} SHORT_POINT ;
-
-// identification of windows 
-typedef INT WINDOWID;
-
-// function types exported by OUTPUTDEVICE 
-typedef WINDOWID (*OpenOutputPtr)     (const char *title,
-                      INT x, INT y, INT width, INT height,
-                      INT *Global_LL, INT *Global_UR, INT *Local_LL, INT *Local_UR, INT *error); 
-typedef INT      (*CloseOutputPtr)    (WINDOWID win);
-typedef INT      (*ActivateOutputPtr) (WINDOWID win);
-typedef INT      (*UpdateOutputPtr)   (WINDOWID win, char *s, INT tool);
-.ve
-
     STRUCT COMPONENTS:
     We only explain the function pointers together with their arguments and types in correct order.
     
@@ -198,7 +80,7 @@
 .   ErasePolygon    - erase filled polygon (closed) connecting 'SHORT_POINT points[], INT nPoints' in total
 .   Polymark        - plot 'short nMarkers' at 'SHORT_POINT points[]'
 .   Text            - write text at 'SHORT_POINT position' with 'INT mode' TEXT_REGULAR or TEXT_INVERSE
-.   CenteredText    - write centered text at'SHORT_POINT position' with 'INT mode' TEXT_REGULAR or TEXT_INVERSE
+.   CenteredText    - write centered text at 'SHORT_POINT position' with 'INT mode' TEXT_REGULAR or TEXT_INVERSE
 .   ClearViewPort   - clear the whole view port of the window
 .   SetLineWidth    - set current line width to 'short width'
 .   SetTextSize     - set current text size to 'short size'
@@ -228,118 +110,3 @@
 D*/
 /****************************************************************************/
 
-/****************************************************************************/
-/*D
-    EVENT - data structure for the ug event handling
-    
-    PURPOSE:
-    The event handling of ug defines several possible event types the interface
-    function 'GetNextUGEvent' can return to 'ProcessEvent'. Depending on the
-    event type data are transferred by the corresponding component in the union.
-    The events are distinguished by the 'Type' component in the 'EVENT'
-    
-    DEFINITION:
-.vb
-typedef union {
-    INT Type;
-    NO_UGEVENT              NoEvent;
-    TERM_GOAWAY_EVENT       TermGoAway;
-    TERM_CMDKEY_EVENT       TermCmdKey;
-    TERM_STRING_EVENT       TermString;
-    DOC_GOAWAY_EVENT        DocGoAway;
-    DOC_ACTIVATE_EVENT      DocActivate;
-    DOC_DRAG_EVENT          DocDrag;
-    DOC_GROW_EVENT          DocGrow;
-    DOC_CHANGETOOL_EVENT    DocChangeTool;
-    DOC_CONTENTCLICK_EVENT  DocContentClick;
-    DOC_UPDATE_EVENT        DocUpdate;
-} EVENT;
-
-typedef struct {                    // no event                                 
-    INT Type;                       // event type                               
-    
-    // data 
-    INT InterfaceEvent;             // 1 if the interface event was handled     
-} NO_UGEVENT;
-
-typedef struct {                    // go away event for terminal window        
-    INT Type;                       // event type                               
-} TERM_GOAWAY_EVENT;
-
-typedef struct {                    // cmd key event for terminal window        
-    INT Type;                       // event type                               
-    
-    // data 
-    char CmdKey;                    // character from keyboard                  
-} TERM_CMDKEY_EVENT;
-
-typedef struct {                    // string event for terminal window         
-    INT Type;                       // event type                               
-    
-    // data 
-    char String[INPUTBUFFERLEN];    // string from keyboard                     
-} TERM_STRING_EVENT;
-
-typedef struct {                    // go away event for view                   
-    INT Type;                       // event type                               
-    
-    // data 
-    WINDOWID win;                   // the window                               
-} DOC_GOAWAY_EVENT;
-
-typedef struct {                    // activate event for view                  
-    INT Type;                       // event type                               
-    
-    // data 
-    WINDOWID win;                   // the window                               
-} DOC_ACTIVATE_EVENT;
-
-typedef struct {                    // drag event for view                      
-    INT Type;                       // event type                               
-    
-    // data 
-    WINDOWID win;                   // the window                               
-    INT Global_LL[2];               // new absolute position of window on screen
-    INT Global_UR[2];               //                                          
-} DOC_DRAG_EVENT;
-
-typedef struct {                    // grow event for view                      
-    INT Type;                       // event type                               
-    
-    // data 
-    WINDOWID win;                   // the window                               
-    INT Global_LL[2];               // new absolute position of window on screen
-    INT Global_UR[2];               //                                          
-    INT Local_LL[2];                // range of pixels used for plotting (view port)        
-    INT Local_UR[2];                //                                          
-} DOC_GROW_EVENT;
-
-typedef struct {                    // change tool event for view               
-    INT Type;                       // event type                               
-    
-    // data 
-    WINDOWID win;                   // the window                               
-    INT Tool;                       // change to that tool                      
-} DOC_CHANGETOOL_EVENT;
-
-typedef struct {                    // content click event for view             
-    INT Type;                       // event type                               
-    
-    // data 
-    WINDOWID win;                   // the window                               
-    INT MousePosition[2];           // mouse position                           
-} DOC_CONTENTCLICK_EVENT;
-
-typedef struct {                    // update event for view                    
-    INT Type;                       // event type                               
-    
-    // data 
-    WINDOWID win;                   // the window                               
-} DOC_UPDATE_EVENT;
-.ve
-
-    SEE ALSO:
-    ProcessEvent, GetNextUGEvent
-
-D*/
-/****************************************************************************/
diff -ru ug-orig/dev/ugdevices.h ug-patched/dev/ugdevices.h
--- ug-orig/dev/ugdevices.h	2008-07-18 16:05:09.000000000 +0200
+++ ug-patched/dev/ugdevices.h	2009-04-29 15:11:55.000000000 +0200
@@ -20,7 +20,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dev/ugdevices.h,v 1.9 2008/07/18 14:05:09 lampe Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -94,7 +94,7 @@
 };
 
 /* buffer space for command line input */
-#define INPUTBUFFERLEN                  65536
+#define INPUTBUFFERLEN                  4096 
 
 /* event types */
 enum EventType {EVENT_ERROR,
@@ -132,11 +132,11 @@
 /*                                                                                                                                                      */
 /****************************************************************************/
 
-/* identification of windows, used to carry a pointer (xif, ppm, ps)
+/** \brief Identification of windows, used to carry a pointer (xif, ppm, ps)
    or INT (rif) */
 typedef void* WINDOWID;
 
-/* type for device coordinates */
+/** \brief Type for device coordinates */
 typedef struct
 {
         short x;
@@ -149,13 +149,38 @@
 typedef INT      (*ActivateOutputPtr) (WINDOWID win);
 typedef INT      (*UpdateOutputPtr)   (WINDOWID win, INT tool);
 
-/* abstract graphical output device */
+/** \brief Data structure to define an interface to output devices
+    
+    The struct 'OUTPUTDEVICE' defines an interface to an output device with
+    graphics capabilites. ug uses a default output device which usually is your
+    computer monitor. Additionally there can be defined several other output devices.
+    
+    Up to now there is implemented an interface to XWindows of UNIX and to the
+    Macintosh OS with the possibilties of window handling and plotting.
+    They serve as default output device.
+    
+    Another output is the 'meta' ouput device. This is a format to write graphics commands
+    to file which later can be view with the 'xugv' tool or that can be translated to PostScript
+    format using the 'm2ps' tool. It is a lean storage format
+    suited quite well for producing and viewing "films" with many pictures of time dependent solutions.
+    It is also a helpful tool for production runs on large problems which often will run
+    in batch mode.
+    
+    In the near future probably also a PostScript output device will exist.
+    
+    The output device struct requires functions for opening, closing, activating and updating
+    a window on the device. Then there is a collection of graphics functions to set color,
+    line width move the cursor, draw lines and higher level functions to plot filled polygons
+    and text.
+    
+    Additionally there is information specified on the color palette used and some standard
+    colors are defined.
+*/
 struct outputdevice {
 
-        /* This is an environment variable */
+    /** \brief This is an environment variable */
         ENVVAR v;
 
-        /* properties */
         long black;                                             /* value for black                                                                              */
         long gray;                          /* value for gray                                       */
         long white;                                             /* value for white                                                                              */
@@ -214,8 +239,8 @@
 
 
 
-/* event structure */
-typedef struct {                                        /* no event                                                             */
+/** \brief No event */
+typedef struct {
         INT Type;                                               /* event type                                                           */
         
         /* data */
@@ -224,39 +249,45 @@
         INT Mouse[2];                                   /* current mouse coord (rel. to window)         */
 } NO_UGEVENT;
 
-typedef struct {                                        /* go away event for terminal window            */
+/** \brief Go away event for terminal window            */
+typedef struct {
         INT Type;                                               /* event type                                                           */
 } TERM_GOAWAY_EVENT;
 
-typedef struct {                                        /* cmd key event for terminal window            */
+/** \brief Cmd key event for terminal window            */
+typedef struct {
         INT Type;                                               /* event type                                                           */
         
         /* data */
         char CmdKey;                                    /* character from keyboard                                      */
 } TERM_CMDKEY_EVENT;
 
-typedef struct {                                        /* string event for terminal window             */
+/** \brief String event for terminal window             */
+typedef struct {
         INT Type;                                               /* event type                                                           */
         
         /* data */
         char String[INPUTBUFFERLEN];    /* string from keyboard                                         */
 } TERM_STRING_EVENT;
 
-typedef struct {                                        /* go away event for view                                       */
+/** \brief Go away event for view                                       */
+typedef struct {
         INT Type;                                               /* event type                                                           */
         
         /* data */
         WINDOWID win;                                   /* the window                                                           */
 } DOC_GOAWAY_EVENT;
 
-typedef struct {                                        /* activate event for view                                      */
+/** \brief Activate event for view                                      */
+typedef struct {
         INT Type;                                               /* event type                                                           */
         
         /* data */
         WINDOWID win;                                   /* the window                                                           */
 } DOC_ACTIVATE_EVENT;
 
-typedef struct {                                        /* drag event for view                                          */
+/** \brief Drag event for view                                          */
+typedef struct {
         INT Type;                                               /* event type                                                           */
         
         /* data */
@@ -265,7 +296,8 @@
         INT Global_UR[2];                               /*                                                                                      */
 } DOC_DRAG_EVENT;
 
-typedef struct {                                        /* grow event for view                                          */
+/** \brief Grow event for view                                          */
+typedef struct {
         INT Type;                                               /* event type                                                           */
         
         /* data */
@@ -276,7 +308,8 @@
         INT Local_UR[2];                                /*                                                                                      */
 } DOC_GROW_EVENT;
 
-typedef struct {                                        /* change tool event for view                           */
+/** \brief Change tool event for view                           */
+typedef struct {
         INT Type;                                               /* event type                                                           */
         
         /* data */
@@ -285,7 +318,8 @@
         INT MousePosition[2];                   /* mouse position                                                       */
 } DOC_CHANGETOOL_EVENT;
 
-typedef struct {                                        /* content click event for view                         */
+/** \brief Content click event for view                         */
+typedef struct {
         INT Type;                                               /* event type                                                           */
         
         /* data */
@@ -293,13 +327,21 @@
         INT MousePosition[2];                   /* mouse position                                                       */
 } DOC_CONTENTCLICK_EVENT;
 
-typedef struct {                                        /* update event for view                                        */
+/** \brief Update event for view                                        */
+typedef struct {
         INT Type;                                               /* event type                                                           */
         
         /* data */
         WINDOWID win;                                   /* the window                                                           */
 } DOC_UPDATE_EVENT;
 
+/** \brief Data structure for the ug event handling
+    
+    The event handling of ug defines several possible event types the interface
+    function 'GetNextUGEvent' can return to 'ProcessEvent'. Depending on the
+    event type data are transferred by the corresponding component in the union.
+    The events are distinguished by the 'Type' component in the 'EVENT'
+*/
 typedef union {
         INT Type;
         NO_UGEVENT                              NoEvent;
@@ -337,7 +379,7 @@
 INT               GetMuteLevel                          (void);
 
 /* multiple output devices */
-OUTPUTDEVICE *CreateOutputDevice                (char *name);
+OUTPUTDEVICE *CreateOutputDevice                (const char *name);
 OUTPUTDEVICE *GetOutputDevice                   (const char *name);
 OUTPUTDEVICE *GetDefaultOutputDevice    (void);
 
@@ -368,7 +410,7 @@
 void              DrawInfoBox                           (WINDOWID win, const char *info);
 INT                       WhichTool                                     (WINDOWID win, const INT mouse[2], INT *tool);
 
-END_NAMESPACE
+END_UG_NAMESPACE
 
 #endif
 
Nur in ug-orig/dev/xif: CVS.
Nur in ug-orig/dev/xif: .cvsignore.
diff -ru ug-orig/dev/xif/Makefile.am ug-patched/dev/xif/Makefile.am
--- ug-orig/dev/xif/Makefile.am	2005-01-19 15:53:16.000000000 +0100
+++ ug-patched/dev/xif/Makefile.am	2005-01-19 15:53:16.000000000 +0100
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.2 2005/01/19 14:53:16 thimo Exp $
+# $Id: Makefile.am 7937 2005-01-19 14:53:16Z thimo $
 
 # commands.h will gm.h und der braucht Dimension
 AM_CPPFLAGS = $(UG_2DFLAGS) -I$(top_srcdir)/low
diff -ru ug-orig/dev/xif/shades.h ug-patched/dev/xif/shades.h
--- ug-orig/dev/xif/shades.h	1997-11-10 16:39:25.000000000 +0100
+++ ug-patched/dev/xif/shades.h	1997-11-10 16:39:25.000000000 +0100
@@ -20,7 +20,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dev/xif/shades.h,v 1.2 1997/11/10 15:39:25 wieners Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/dev/xif/xgraph.c ug-patched/dev/xif/xgraph.c
--- ug-orig/dev/xif/xgraph.c	2008-02-26 18:24:35.000000000 +0100
+++ ug-patched/dev/xif/xgraph.c	2009-04-29 15:11:55.000000000 +0200
@@ -30,6 +30,7 @@
 /****************************************************************************/
 
 /* X11 includes */
+#include "config.h"
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 #include <X11/Xos.h>
@@ -41,6 +42,9 @@
 
 /* standard C includes */
 #include <stdio.h>
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
 #include <stddef.h>
 #include <string.h>
 
@@ -136,7 +140,7 @@
 static int red_shift, green_shift, blue_shift;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dev/xif/xgraph.c,v 1.39 2008/02/26 17:24:35 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 unsigned long NS_PREFIX UGBlack (void)
 {
@@ -1326,9 +1330,9 @@
 static int GraphOpen (GraphWindow *gw, char *window_name, int x, int y, int width, int height)
 {
 	unsigned int border_width = DEFAULTBORDER;
-	char *icon_name = GRAPHICONNAME;
-	char *Fontname;
-	char *ug_name = RESOURCENAME;
+    char *icon_name = (char *) GRAPHICONNAME;
+	const char *Fontname;
+	const char *ug_name = RESOURCENAME;
 	unsigned long valuemask = 0;
 	static char dash_list[] = {12,24};
 	XGCValues values;
@@ -1416,7 +1420,7 @@
 	wm_hints.icon_pixmap = gw->icon_pixmap;
 	wm_hints.flags = StateHint | IconPixmapHint | InputHint;
 	class_hints.res_name = prog_name;
-	class_hints.res_class = ug_name;
+	class_hints.res_class = (char*) ug_name;
 	XSetWMProperties(display,gw->win,&gw->window_name,&gw->icon_name,if_argv,if_argc,
 		&size_hints,&wm_hints,&class_hints);
 
diff -ru ug-orig/dev/xif/xgraph.h ug-patched/dev/xif/xgraph.h
--- ug-orig/dev/xif/xgraph.h	2004-08-30 16:44:02.000000000 +0200
+++ ug-patched/dev/xif/xgraph.h	2009-04-29 14:30:36.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dev/xif/xgraph.h,v 1.8 2004/08/30 14:44:02 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -117,6 +117,6 @@
 GraphWindow     *WhichGW                        (Window win);
 void                    SetCurrentGW            (GraphWindow *g);
 
-END_NAMESPACE
+END_UG_NAMESPACE
 
 #endif
diff -ru ug-orig/dev/xif/xmain.c ug-patched/dev/xif/xmain.c
--- ug-orig/dev/xif/xmain.c	2006-05-08 14:31:52.000000000 +0200
+++ ug-patched/dev/xif/xmain.c	2006-05-08 14:31:52.000000000 +0200
@@ -95,7 +95,7 @@
 FILE *o_pipe=NULL;						    /* output from ug               */
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dev/xif/xmain.c,v 1.40 2006/05/08 12:31:52 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/dev/xif/xmain.h ug-patched/dev/xif/xmain.h
--- ug-orig/dev/xif/xmain.h	2004-12-17 19:21:46.000000000 +0100
+++ ug-patched/dev/xif/xmain.h	2009-04-29 14:30:36.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dev/xif/xmain.h,v 1.10 2004/12/17 18:21:46 klaus Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -115,6 +115,6 @@
 /*                                                                                                                                                      */
 /****************************************************************************/
 
-END_NAMESPACE
+END_UG_NAMESPACE
 
 #endif
diff -ru ug-orig/dev/xif/xshell.c ug-patched/dev/xif/xshell.c
--- ug-orig/dev/xif/xshell.c	2008-02-26 18:24:35.000000000 +0100
+++ ug-patched/dev/xif/xshell.c	2009-04-29 15:11:55.000000000 +0200
@@ -49,6 +49,9 @@
 /* standard C includes */
 #include <stdio.h>
 #include <stdlib.h>
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
 #include <string.h>
 #include <ctype.h>
 
@@ -151,7 +154,7 @@
 #endif
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dev/xif/xshell.c,v 1.31 2008/02/26 17:24:35 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -222,10 +225,10 @@
 	unsigned int width, height;
 	int x, y, i;
 	unsigned int border_width = DEFAULTBORDER;
-	char *window_name = SHELLWINNAME;
-	char *icon_name = SHELLICONNAME;
+	const char *window_name = SHELLWINNAME;
+	const char *icon_name = SHELLICONNAME;
 	char *Geometry, *Fontname;
-	char *ug_name = RESOURCENAME;
+	const char *ug_name = RESOURCENAME;
 	int flags;
 	unsigned long valuemask = 0;
 	static char dash_list[] = {12,24};
@@ -239,10 +242,10 @@
 	Arg   args[20];
 	XtTranslations NewTranslations;
 	XtActionsRec actions[] = {
-		{"UpAction", UpAction},
-		{"DownAction", DownAction},
-		{"LeftAction", LeftAction},
-		{"RightAction",RightAction},
+		{(char*) "UpAction", UpAction},
+		{(char*) "DownAction", DownAction},
+		{(char*) "LeftAction", LeftAction},
+		{(char*) "RightAction",RightAction},
 		};
 	#endif /* USE_XAW */
 
@@ -313,20 +316,20 @@
 
 	#ifdef USE_XAW
 	n=0;
-	XtSetArg(args[n], XtNx, x); n++;
-	XtSetArg(args[n], XtNy, y); n++;
-	XtSetArg(args[n], XtNwidth, width+sh->font_width); n++;
-	XtSetArg(args[n], XtNheight, height+sh->font_height+sh->font_info->descent); n++;
-	XtSetArg(args[n], XtNborderWidth, border_width); n++;
-	XtSetArg(args[n], XtNscrollVertical, XawtextScrollWhenNeeded); n++;
-	XtSetArg(args[n], XtNscrollHorizontal, XawtextScrollWhenNeeded); n++;
-	XtSetArg(args[n], XtNstring, sh->lineStart[0]); n++;
-	XtSetArg(args[n], XtNlength, MAXLINES*(MAXCOLS+1)); n++;
-	XtSetArg(args[n], XtNpieceSize, MAXLINES*(MAXCOLS+1)); n++;
-	XtSetArg(args[n], XtNeditType, XawtextEdit); n++;
+	XtSetArg(args[n], (char*) XtNx, x); n++;
+	XtSetArg(args[n], (char*) XtNy, y); n++;
+	XtSetArg(args[n], (char*) XtNwidth, width+sh->font_width); n++;
+	XtSetArg(args[n], (char*) XtNheight, height+sh->font_height+sh->font_info->descent); n++;
+	XtSetArg(args[n], (char*) XtNborderWidth, border_width); n++;
+	XtSetArg(args[n], (char*) XtNscrollVertical, XawtextScrollWhenNeeded); n++;
+	XtSetArg(args[n], (char*) XtNscrollHorizontal, XawtextScrollWhenNeeded); n++;
+	XtSetArg(args[n], (char*) XtNstring, sh->lineStart[0]); n++;
+	XtSetArg(args[n], (char*) XtNlength, MAXLINES*(MAXCOLS+1)); n++;
+	XtSetArg(args[n], (char*) XtNpieceSize, MAXLINES*(MAXCOLS+1)); n++;
+	XtSetArg(args[n], (char*) XtNeditType, XawtextEdit); n++;
 	/* TODO: delete this, line wrapping does not work correctly
-	XtSetArg(args[n], XtNwrap,XawtextWrapLine); n++; */
-	XtSetArg(args[n], XtNfont,sh->font_info); n++;
+	XtSetArg(args[n],  XtNwrap,XawtextWrapLine); n++; */
+	XtSetArg(args[n], (char*) XtNfont,sh->font_info); n++;
 	XtSetArg(args[n], XtNbackground,WhitePixel(display,screen_num)); n++;
 	XtSetArg(args[n], XtNforeground,BlackPixel(display,screen_num)); n++;
 
@@ -388,12 +391,12 @@
 	size_hints.flags = USPosition | USSize | PMinSize;
 	size_hints.min_width = DEFAULTMINX;
 	size_hints.min_height = DEFAULTMINY;
-	if (XStringListToTextProperty(&window_name,1,&(sh->window_name))==0)
+	if (XStringListToTextProperty((char**) &window_name,1,&(sh->window_name))==0)
 	{
 		fprintf(stderr,"%s: structure alloc for window_name failed.\n",prog_name);
 		exit(-1);
 	}
-	if (XStringListToTextProperty(&icon_name,1,&(sh->icon_name))==0)
+	if (XStringListToTextProperty((char**) &icon_name,1,&(sh->icon_name))==0)
 	{
 		fprintf(stderr,"%s: structure alloc for icon_name failed.\n",prog_name);
 		exit(-1);
@@ -403,7 +406,7 @@
 	wm_hints.icon_pixmap = sh->icon_pixmap;
 	wm_hints.flags = StateHint | IconPixmapHint | InputHint;
 	class_hints.res_name = prog_name;
-	class_hints.res_class = ug_name;
+	class_hints.res_class = (char*) ug_name;
 	XSetWMProperties(display,sh->win,&sh->window_name,&sh->icon_name,if_argv,if_argc,
 		&size_hints,&wm_hints,&class_hints);
 
diff -ru ug-orig/dev/xif/xshell.h ug-patched/dev/xif/xshell.h
--- ug-orig/dev/xif/xshell.h	1997-07-18 16:58:48.000000000 +0200
+++ ug-patched/dev/xif/xshell.h	1997-07-18 17:00:14.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dev/xif/xshell.h,v 1.6 1997/07/18 14:58:48 birken Exp $
+$Header$
 */
 
 /****************************************************************************/
Nur in ug-orig/doc: CVS.
diff -ru ug-orig/doc/Doxyfile ug-patched/doc/Doxyfile
--- ug-orig/doc/Doxyfile	2005-04-07 12:22:19.000000000 +0200
+++ ug-patched/doc/Doxyfile	2009-10-08 16:04:45.000000000 +0200
@@ -1,4 +1,4 @@
-# Doxyfile 1.3.4
+# Doxyfile 1.6.1
 
 # This file describes the settings to be used by the documentation system
 # doxygen (www.doxygen.org) for a project
@@ -14,424 +14,665 @@
 # Project related configuration options
 #---------------------------------------------------------------------------
 
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
 # by quotes) that should identify the project.
 
 PROJECT_NAME           = "UG 4.0"
 
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
 # if some version control system is used.
 
-PROJECT_NUMBER         = 
+PROJECT_NUMBER         =
 
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
 # where doxygen was started. If left blank the current directory will be used.
 
 OUTPUT_DIRECTORY       = .
 
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, 
-# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en 
-# (Japanese with English messages), Korean, Norwegian, Polish, Portuguese, 
-# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
 
 OUTPUT_LANGUAGE        = English
 
-# This tag can be used to specify the encoding used in the generated output. 
-# The encoding is not always determined by the language that is chosen, 
-# but also whether or not the output is meant for Windows or non-Windows users. 
-# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES 
-# forces the Windows encoding (this is the default for the Windows binary), 
-# whereas setting the tag to NO uses a Unix-style encoding (the default for 
-# all platforms other than Windows).
-
-USE_WINDOWS_ENCODING   = NO
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
 # Set to NO to disable this.
 
 BRIEF_MEMBER_DESC      = YES
 
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
 # brief descriptions will be completely suppressed.
 
 REPEAT_BRIEF           = YES
 
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
 # description.
 
 ALWAYS_DETAILED_SEC    = NO
 
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited 
-# members of a class in the documentation of that class as if those members were 
-# ordinary class members. Constructors, destructors and assignment operators of 
-# the base classes will not be shown.
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
 
 INLINE_INHERITED_MEMB  = NO
 
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
 # to NO the shortest path that makes the file name unique will be used.
 
 FULL_PATH_NAMES        = NO
 
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. It is allowed to use relative paths in the argument list.
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH        =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
 
-STRIP_FROM_PATH        = 
+STRIP_FROM_INC_PATH    =
 
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
 # doesn't support long names like on DOS, Mac, or CD-ROM.
 
 SHORT_NAMES            = NO
 
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments will behave just like the Qt-style comments (thus requiring an 
-# explict @brief command for a brief description.
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
 
 JAVADOC_AUTOBRIEF      = NO
 
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
 # description. Set this tag to YES if you prefer the old behaviour instead.
 
 MULTILINE_CPP_IS_BRIEF = NO
 
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member 
-# documentation.
-
-DETAILS_AT_TOP         = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
-# member inherits the documentation from any documented member that it 
-# reimplements.
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
 
 INHERIT_DOCS           = YES
 
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
-# all members of a group must be documented explicitly.
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
 
-DISTRIBUTE_GROUP_DOC   = NO
+SEPARATE_MEMBER_PAGES  = NO
 
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
 # Doxygen uses this value to replace tabs by spaces in code fragments.
 
 TAB_SIZE               = 8
 
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading "Side Effects:". 
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
 # You can put \n's in the value part of an alias to insert newlines.
 
-ALIASES                = 
+ALIASES                =
 
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 
-# only. Doxygen will then generate output that is more tailored for C. 
-# For instance, some of the names that are used will be different. The list 
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
 # of all members will be omitted, etc.
 
 OPTIMIZE_OUTPUT_FOR_C  = YES
 
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources 
-# only. Doxygen will then generate output that is more tailored for Java. 
-# For instance, namespaces will be presented as packages, qualified scopes 
-# will look different, etc.
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
 
 OPTIMIZE_OUTPUT_JAVA   = NO
 
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it parses.
+# With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this tag.
+# The format is ext=language, where ext is a file extension, and language is one of
+# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP,
+# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat
+# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran),
+# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING      =
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen to replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
 # the \nosubgrouping command.
 
 SUBGROUPING            = YES
 
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penality.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will rougly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE      = 0
+
 #---------------------------------------------------------------------------
 # Build related configuration options
 #---------------------------------------------------------------------------
 
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
 # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
 
 EXTRACT_ALL            = YES
 
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
 # will be included in the documentation.
 
 EXTRACT_PRIVATE        = NO
 
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
 # will be included in the documentation.
 
 EXTRACT_STATIC         = YES
 
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
 # If set to NO only classes defined in header files are included.
 
 EXTRACT_LOCAL_CLASSES  = YES
 
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
 # This option has no effect if EXTRACT_ALL is enabled.
 
 HIDE_UNDOC_MEMBERS     = NO
 
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these classes will be included in the various 
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
 # overviews. This option has no effect if EXTRACT_ALL is enabled.
 
 HIDE_UNDOC_CLASSES     = NO
 
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
 # documentation.
 
 HIDE_FRIEND_COMPOUNDS  = NO
 
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
 # function's detailed documentation block.
 
 HIDE_IN_BODY_DOCS      = NO
 
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
 # Set it to YES to include the internal documentation.
 
 INTERNAL_DOCS          = NO
 
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower-case letters. If set to YES upper-case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
-# users are advised to set this option to NO.
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
 
 CASE_SENSE_NAMES       = YES
 
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
 # documentation. If set to YES the scope will be hidden.
 
 HIDE_SCOPE_NAMES       = NO
 
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
 # of that file.
 
 SHOW_INCLUDE_FILES     = YES
 
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
 # is inserted in the documentation for inline members.
 
 INLINE_INFO            = YES
 
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
 # declaration order.
 
 SORT_MEMBER_DOCS       = YES
 
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
 # commands in the documentation.
 
 GENERATE_TODOLIST      = YES
 
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
 # commands in the documentation.
 
 GENERATE_TESTLIST      = YES
 
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
 # commands in the documentation.
 
 GENERATE_BUGLIST       = YES
 
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
 # \deprecated commands in the documentation.
 
 GENERATE_DEPRECATEDLIST= YES
 
-# The ENABLED_SECTIONS tag can be used to enable conditional 
+# The ENABLED_SECTIONS tag can be used to enable conditional
 # documentation sections, marked by \if sectionname ... \endif.
 
-ENABLED_SECTIONS       = 
+ENABLED_SECTIONS       =
 
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
 # command in the documentation regardless of this setting.
 
 MAX_INITIALIZER_LINES  = 30
 
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
 # list will mention the files that were used to generate the documentation.
 
 SHOW_USED_FILES        = YES
 
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page.
+# This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by
+# doxygen. The layout file controls the global structure of the generated output files
+# in an output format independent way. The create the layout file that represents
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name
+# of the layout file.
+
+LAYOUT_FILE            =
+
 #---------------------------------------------------------------------------
 # configuration options related to warning and progress messages
 #---------------------------------------------------------------------------
 
-# The QUIET tag can be used to turn on/off the messages that are generated 
+# The QUIET tag can be used to turn on/off the messages that are generated
 # by doxygen. Possible values are YES and NO. If left blank NO is used.
 
 QUIET                  = NO
 
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
 # NO is used.
 
 WARNINGS               = YES
 
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
 # automatically be disabled.
 
 WARN_IF_UNDOCUMENTED   = YES
 
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
 # don't exist or using markup commands wrongly.
 
 WARN_IF_DOC_ERROR      = YES
 
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text.
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
 
 WARN_FORMAT            = "$file:$line: $text"
 
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
 # to stderr.
 
-WARN_LOGFILE           = 
+WARN_LOGFILE           =
 
 #---------------------------------------------------------------------------
 # configuration options related to the input files
 #---------------------------------------------------------------------------
 
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
 # with spaces.
 
 INPUT                  = ..
 
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp 
-# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc
-
-FILE_PATTERNS          = *.c *.h *.doc
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS          = *.c \
+                         *.h \
+                         *.doc
 
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
 # If left blank NO is used.
 
 RECURSIVE              = YES
 
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
 # subdirectory from a directory tree whose root is specified with the INPUT tag.
 
 EXCLUDE                = ../include
 
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories 
-# that are symbolic links (a Unix filesystem feature) are excluded from the input.
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
 
 EXCLUDE_SYMLINKS       = YES
 
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories.
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
 
-EXCLUDE_PATTERNS       = 
+EXCLUDE_SYMBOLS        =
 
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
 # the \include command).
 
-EXAMPLE_PATH           = 
+EXAMPLE_PATH           =
 
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
 # blank all files are included.
 
-EXAMPLE_PATTERNS       = 
+EXAMPLE_PATTERNS       =
 
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
 # Possible values are YES and NO. If left blank NO is used.
 
 EXAMPLE_RECURSIVE      = NO
 
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
 # the \image command).
 
-IMAGE_PATH             = 
+IMAGE_PATH             =
 
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
 # to standard output.
+# If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER           =
 
-INPUT_FILTER           = 
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis.
+# Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match.
+# The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
 
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
+FILTER_PATTERNS        =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
 # files to browse (i.e. when SOURCE_BROWSER is set to YES).
 
 FILTER_SOURCE_FILES    = NO
@@ -440,36 +681,54 @@
 # configuration options related to source browsing
 #---------------------------------------------------------------------------
 
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
 # be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
 
 SOURCE_BROWSER         = NO
 
-# Setting the INLINE_SOURCES tag to YES will include the body 
+# Setting the INLINE_SOURCES tag to YES will include the body
 # of functions and classes directly in the documentation.
 
 INLINE_SOURCES         = NO
 
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
 # fragments. Normal C and C++ comments will always remain visible.
 
 STRIP_CODE_COMMENTS    = YES
 
-# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
-# then for each documented function all documented 
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
 # functions referencing it will be listed.
 
 REFERENCED_BY_RELATION = YES
 
-# If the REFERENCES_RELATION tag is set to YES (the default) 
-# then for each documented function all documented entities 
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
 # called/used by that function will be listed.
 
 REFERENCES_RELATION    = YES
 
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.
+# Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
 # which an include is specified. Set to NO to disable this.
 
 VERBATIM_HEADERS       = YES
@@ -478,277 +737,393 @@
 # configuration options related to the alphabetical class index
 #---------------------------------------------------------------------------
 
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
 # contains a lot of classes, structs, unions or interfaces.
 
 ALPHABETICAL_INDEX     = NO
 
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
 # in which this list will be split (can be a number in the range [1..20])
 
 COLS_IN_ALPHA_INDEX    = 5
 
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
 # should be ignored while generating the index headers.
 
-IGNORE_PREFIX          = 
+IGNORE_PREFIX          =
 
 #---------------------------------------------------------------------------
 # configuration options related to the HTML output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
 # generate HTML output.
 
 GENERATE_HTML          = YES
 
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `html' will be used as the default path.
 
 HTML_OUTPUT            = html
 
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
 # doxygen will generate files with .html extension.
 
 HTML_FILE_EXTENSION    = .html
 
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
 # standard header.
 
-HTML_HEADER            = 
+HTML_HEADER            =
 
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
 # standard footer.
 
-HTML_FOOTER            = 
+HTML_FOOTER            =
 
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
-# will generate a default style sheet
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
 
-HTML_STYLESHEET        = 
+HTML_STYLESHEET        =
 
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
 # NO a bullet list will be used.
 
 HTML_ALIGN_MEMBERS     = YES
 
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
 # of the generated HTML documentation.
 
 GENERATE_HTMLHELP      = NO
 
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
-# written to the html output dir.
-
-CHM_FILE               = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE               =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
 # the HTML help compiler on the generated index.hhp.
 
-HHC_LOCATION           = 
+HHC_LOCATION           =
 
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
 # it should be included in the master .chm file (NO).
 
 GENERATE_CHI           = NO
 
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING     =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
 # normal table of contents (NO) in the .chm file.
 
 BINARY_TOC             = NO
 
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
 # to the contents of the HTML help documentation and to the tree view.
 
 TOC_EXPAND             = NO
 
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER
+# are set, an additional index file will be generated that can be used as input for
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated
+# HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          =
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add.
+# For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION           =
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
 # the value YES disables it.
 
 DISABLE_INDEX          = NO
 
-# This tag can be used to set the number of enum values (range [1..20]) 
+# This tag can be used to set the number of enum values (range [1..20])
 # that doxygen will group on one line in the generated HTML documentation.
 
 ENUM_VALUES_PER_LINE   = 4
 
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
-# probably better off using the HTML help feature.
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
 
 GENERATE_TREEVIEW      = NO
 
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES       = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
 # is shown.
 
 TREEVIEW_WIDTH         = 250
 
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+# When the SEARCHENGINE tag is enable doxygen will generate a search box for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP)
+# there is already a search function so this one should typically
+# be disabled.
+
+SEARCHENGINE           = NO
+
 #---------------------------------------------------------------------------
 # configuration options related to the LaTeX output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
 # generate Latex output.
 
 GENERATE_LATEX         = NO
 
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `latex' will be used as the default path.
 
 LATEX_OUTPUT           = latex
 
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
 # invoked. If left blank `latex' will be used as the default command name.
 
 LATEX_CMD_NAME         = latex
 
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
 # default command name.
 
 MAKEINDEX_CMD_NAME     = makeindex
 
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
 # save some trees in general.
 
 COMPACT_LATEX          = NO
 
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
 # executive. If left blank a4wide will be used.
 
 PAPER_TYPE             = a4wide
 
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
 # packages that should be included in the LaTeX output.
 
-EXTRA_PACKAGES         = 
+EXTRA_PACKAGES         =
 
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
 # standard header. Notice: only use this tag if you know what you are doing!
 
-LATEX_HEADER           = 
+LATEX_HEADER           =
 
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
 # This makes the output suitable for online browsing using a pdf viewer.
 
 PDF_HYPERLINKS         = NO
 
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
 # higher quality PDF documentation.
 
 USE_PDFLATEX           = NO
 
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
 # This option is also used when generating formulas in HTML.
 
 LATEX_BATCHMODE        = NO
 
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
 # in the output.
 
 LATEX_HIDE_INDICES     = NO
 
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
 #---------------------------------------------------------------------------
 # configuration options related to the RTF output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimised for Word 97 and may not look very pretty with 
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
 # other RTF readers or editors.
 
 GENERATE_RTF           = NO
 
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `rtf' will be used as the default path.
 
 RTF_OUTPUT             = rtf
 
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
 # save some trees in general.
 
 COMPACT_RTF            = NO
 
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
 # Note: wordpad (write) and others do not support links.
 
 RTF_HYPERLINKS         = NO
 
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assigments. You only have to provide 
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
 # replacements, missing definitions are set to their default value.
 
-RTF_STYLESHEET_FILE    = 
+RTF_STYLESHEET_FILE    =
 
-# Set optional variables used in the generation of an rtf document. 
+# Set optional variables used in the generation of an rtf document.
 # Syntax is similar to doxygen's config file.
 
-RTF_EXTENSIONS_FILE    = 
+RTF_EXTENSIONS_FILE    =
 
 #---------------------------------------------------------------------------
 # configuration options related to the man page output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
 # generate man pages
 
 GENERATE_MAN           = NO
 
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `man' will be used as the default path.
 
 MAN_OUTPUT             = man
 
-# The MAN_EXTENSION tag determines the extension that is added to 
+# The MAN_EXTENSION tag determines the extension that is added to
 # the generated man pages (default is the subroutine's section .3)
 
 MAN_EXTENSION          = .3
 
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
 # would be unable to find the correct page. The default is NO.
 
 MAN_LINKS              = NO
@@ -757,40 +1132,45 @@
 # configuration options related to the XML output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
-# moment.
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
 
 GENERATE_XML           = NO
 
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `xml' will be used as the default path.
 
 XML_OUTPUT             = xml
 
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
 # syntax of the XML files.
 
-XML_SCHEMA             = 
+XML_SCHEMA             =
 
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
 # syntax of the XML files.
 
-XML_DTD                = 
+XML_DTD                =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
 
 #---------------------------------------------------------------------------
 # configuration options for the AutoGen Definitions output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
 # and incomplete at the moment.
 
 GENERATE_AUTOGEN_DEF   = NO
@@ -799,280 +1179,338 @@
 # configuration options related to the Perl module output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
 # moment.
 
 GENERATE_PERLMOD       = NO
 
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
 # to generate PDF and DVI output from the Perl module output.
 
 PERLMOD_LATEX          = NO
 
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader.
+# This is useful
+# if you want to understand what is going on.
+# On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
 # and Perl will parse it just the same.
 
 PERLMOD_PRETTY         = YES
 
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
 # Makefile don't overwrite each other's variables.
 
-PERLMOD_MAKEVAR_PREFIX = 
+PERLMOD_MAKEVAR_PREFIX =
 
 #---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
+# Configuration options related to the preprocessor
 #---------------------------------------------------------------------------
 
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
 # files.
 
 ENABLE_PREPROCESSING   = YES
 
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
 # way by setting EXPAND_ONLY_PREDEF to YES.
 
 MACRO_EXPANSION        = NO
 
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
-# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
 
 EXPAND_ONLY_PREDEF     = NO
 
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
 # in the INCLUDE_PATH (see below) will be search if a #include is found.
 
 SEARCH_INCLUDES        = YES
 
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
 # the preprocessor.
 
-INCLUDE_PATH           = 
+INCLUDE_PATH           =
 
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
 # be used.
 
-INCLUDE_FILE_PATTERNS  = 
+INCLUDE_FILE_PATTERNS  =
 
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed.
-
-PREDEFINED             = 
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED             =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
 # Use the PREDEFINED tag if you want to use a different macro definition.
 
-EXPAND_AS_DEFINED      = 
+EXPAND_AS_DEFINED      =
 
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse the 
-# parser if not removed.
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
 
 SKIP_FUNCTION_MACROS   = YES
 
 #---------------------------------------------------------------------------
-# Configuration::addtions related to external references   
+# Configuration::additions related to external references
 #---------------------------------------------------------------------------
 
-# The TAGFILES option can be used to specify one or more tagfiles. 
-# Optionally an initial location of the external documentation 
-# can be added for each tagfile. The format of a tag file without 
-# this location is as follows: 
-#   TAGFILES = file1 file2 ... 
-# Adding location for the tag files is done as follows: 
-#   TAGFILES = file1=loc1 "file2 = loc2" ... 
-# where "loc1" and "loc2" can be relative or absolute paths or 
-# URLs. If a location is present for each tag, the installdox tool 
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+#
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+#
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
 # does not have to be run to correct the links.
 # Note that each tag file must have a unique name
 # (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen 
+# If a tag file is not located in the directory in which doxygen
 # is run, you must also specify the path to the tagfile here.
 
-TAGFILES               = 
+TAGFILES               =
 
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
 # a tag file that is based on the input files it reads.
 
 GENERATE_TAGFILE       = UG_Kernel.tag
 
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
 # will be listed.
 
 ALLEXTERNALS           = NO
 
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
 # be listed.
 
 EXTERNAL_GROUPS        = YES
 
-# The PERL_PATH should be the absolute path and name of the perl script 
+# The PERL_PATH should be the absolute path and name of the perl script
 # interpreter (i.e. the result of `which perl').
 
 PERL_PATH              = /usr/bin/perl
 
 #---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
+# Configuration options related to the dot tool
 #---------------------------------------------------------------------------
 
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or 
-# super classes. Setting the tag to NO turns the diagrams off. Note that this 
-# option is superceded by the HAVE_DOT option below. This is only a fallback. It is 
-# recommended to install and use dot, since it yields more powerful graphs.
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
+# powerful graphs.
 
 CLASS_DIAGRAMS         = YES
 
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
 # or is not a class.
 
 HIDE_UNDOC_RELATIONS   = YES
 
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
 # have no effect if this option is set to NO (the default)
 
 HAVE_DOT               = NO
 
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
+# By default doxygen will write a font called FreeSans.ttf to the output
+# directory and reference it in all dot files that doxygen generates. This
+# font does not include all possible unicode characters however, so when you need
+# these (or just want a differently looking font) you can specify the font name
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+# containing the font.
+
+DOT_FONTNAME           = FreeSans
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
+# can find it using this tag.
+
+DOT_FONTPATH           =
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
 # the CLASS_DIAGRAMS tag to NO.
 
 CLASS_GRAPH            = YES
 
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
 # class references variables) of the class with other documented classes.
 
 COLLABORATION_GRAPH    = YES
 
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
-# collaboration diagrams in a style similiar to the OMG's Unified Modeling 
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
 # Language.
 
 UML_LOOK               = NO
 
-# If set to YES, the inheritance and collaboration graphs will show the 
+# If set to YES, the inheritance and collaboration graphs will show the
 # relations between templates and their instances.
 
 TEMPLATE_RELATIONS     = NO
 
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
 # other documented files.
 
 INCLUDE_GRAPH          = YES
 
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
 # indirectly include this file.
 
 INCLUDED_BY_GRAPH      = YES
 
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
-# generate a call dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable call graphs for selected 
-# functions only using the \callgraph command.
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
 
 CALL_GRAPH             = NO
 
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
 # will graphical hierarchy of all classes instead of a textual one.
 
 GRAPHICAL_HIERARCHY    = YES
 
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
 # generated by dot. Possible values are png, jpg, or gif
 # If left blank png will be used.
 
 DOT_IMAGE_FORMAT       = png
 
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
-# found. If left blank, it is assumed the dot tool can be found on the path.
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
 
-DOT_PATH               = 
+DOT_PATH               =
 
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
 # \dotfile command).
 
-DOTFILE_DIRS           = 
+DOTFILE_DIRS           =
 
-# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
-# this value, doxygen will try to truncate the graph, so that it fits within 
-# the specified constraint. Beware that most browsers cannot cope with very 
-# large images.
-
-MAX_DOT_GRAPH_WIDTH    = 1024
-
-# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
-# this value, doxygen will try to truncate the graph, so that it fits within 
-# the specified constraint. Beware that most browsers cannot cope with very 
-# large images.
-
-MAX_DOT_GRAPH_HEIGHT   = 1024
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
-# graphs generated by dot. A depth value of 3 means that only nodes reachable 
-# from the root by following a path via at most 3 edges will be shown. Nodes that 
-# lay further from the root node will be omitted. Note that setting this option to 
-# 1 or 2 may greatly reduce the computation time needed for large code bases. Also 
-# note that a graph may be further truncated if the graph's image dimensions are 
-# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). 
-# If 0 is used for the depth value (the default), the graph is not depth-constrained.
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
 
 MAX_DOT_GRAPH_DEPTH    = 0
 
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = YES
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
 # arrows in the dot generated graphs.
 
 GENERATE_LEGEND        = YES
 
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
 # the various graphs.
 
 DOT_CLEANUP            = YES
-
-#---------------------------------------------------------------------------
-# Configuration::addtions related to the search engine   
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be 
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE           = NO
diff -ru ug-orig/doc/header.h ug-patched/doc/header.h
--- ug-orig/doc/header.h	1997-08-12 11:57:49.000000000 +0200
+++ ug-patched/doc/header.h	1997-08-12 11:57:49.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/doc/header.h,v 1.4 1997/08/12 09:57:49 df Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/doc/source.c ug-patched/doc/source.c
--- ug-orig/doc/source.c	1997-01-16 22:48:41.000000000 +0100
+++ ug-patched/doc/source.c	2008-12-19 11:18:36.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include "general.h"
 
 /****************************************************************************/
@@ -63,7 +64,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/doc/source.c,v 1.5 1997/01/16 21:48:41 henrik Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
Nur in ug-orig/doc/testing: CVS.
Nur in ug-orig/dom: CVS.
Nur in ug-orig/dom: .cvsignore.
diff -ru ug-orig/dom/domain.h ug-patched/dom/domain.h
--- ug-orig/dom/domain.h	2006-06-02 18:12:21.000000000 +0200
+++ ug-patched/dom/domain.h	2009-04-29 15:11:55.000000000 +0200
@@ -32,7 +32,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dom/domain.h,v 1.48 2006/06/02 16:12:21 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -318,7 +318,7 @@
  * </ul>
 */
 /****************************************************************************/
-INT BVP_Save (BVP *theBVP, char *name, char *mgname, NS_PREFIX HEAP *theHeap, INT argc, char **argv);
+INT BVP_Save (BVP *theBVP, const char *name, const char *mgname, NS_PREFIX HEAP *theHeap, INT argc, char **argv);
 
 /****************************************************************************/
 /** \brief Load a BVP
@@ -334,7 +334,7 @@
  * </ul>
 */
 /****************************************************************************/
-BVP        *BVP_Load              (char *name, INT argc, char **argv);
+BVP        *BVP_Load              (const char *name, INT argc, char **argv);
 
 /****************************************************************************/
 /** \brief Get pointer to BVP by name
@@ -368,7 +368,7 @@
  * </ul>   
  */
 /****************************************************************************/
-BVP *BVP_Init (char *filename, NS_PREFIX HEAP *theHeap, MESH *Mesh, INT MarkKey);
+BVP *BVP_Init (const char *filename, NS_PREFIX HEAP *theHeap, MESH *Mesh, INT MarkKey);
 
 /****************************************************************************/
 /** \brief Dispose a BVP
Nur in ug-orig/dom/gen: CVS.
Nur in ug-orig/dom/gen: .cvsignore.
diff -ru ug-orig/dom/gen/gen.c ug-patched/dom/gen/gen.c
--- ug-orig/dom/gen/gen.c	2000-02-28 00:58:19.000000000 +0100
+++ ug-patched/dom/gen/gen.c	2008-12-19 11:15:14.000000000 +0100
@@ -26,6 +26,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stddef.h>
 #include <stdio.h>
@@ -90,7 +91,7 @@
 static BndGeomProcPtr Geom;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dom/gen/gen.c,v 1.10 2000/02/27 23:58:19 wieners Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/dom/gen/gen.h ug-patched/dom/gen/gen.h
--- ug-orig/dom/gen/gen.h	2000-02-10 12:48:52.000000000 +0100
+++ ug-patched/dom/gen/gen.h	2000-02-10 12:48:54.000000000 +0100
@@ -18,7 +18,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dom/gen/gen.h,v 1.6 2000/02/10 11:48:52 wieners Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/dom/gen/gen_parallel.c ug-patched/dom/gen/gen_parallel.c
--- ug-orig/dom/gen/gen_parallel.c	2005-07-06 11:49:04.000000000 +0200
+++ ug-patched/dom/gen/gen_parallel.c	2008-12-19 11:15:14.000000000 +0100
@@ -28,6 +28,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stddef.h>
 #include <stdio.h>
@@ -83,7 +84,7 @@
 static INT BVP_type = BVP_GENERAL;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dom/gen/gen_parallel.c,v 1.4 2005/07/06 09:49:04 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/dom/gen/Makefile.am ug-patched/dom/gen/Makefile.am
--- ug-orig/dom/gen/Makefile.am	2004-09-02 14:22:07.000000000 +0200
+++ ug-patched/dom/gen/Makefile.am	2004-09-02 14:22:17.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.1 2004/09/02 12:22:07 thimo Exp $
+# $Id: Makefile.am 7772 2004-09-02 12:22:17Z thimo $
 
 SOURCES = gen.c gen_parallel.c gen.h
 
diff -ru ug-orig/dom/lgm/ansys2lgm.c ug-patched/dom/lgm/ansys2lgm.c
--- ug-orig/dom/lgm/ansys2lgm.c	2006-11-08 16:35:43.000000000 +0100
+++ ug-patched/dom/lgm/ansys2lgm.c	2009-04-29 15:11:55.000000000 +0200
@@ -26,6 +26,7 @@
 /****************************************************************************/
 
 
+#include "config.h"
 #include <assert.h>
 
 #include "defaults.h"
@@ -211,7 +212,7 @@
 /* ... DIRKS NEU */
 
 /* data for CVS */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dom/lgm/ansys2lgm.c,v 1.36 2006/11/08 15:35:43 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 
@@ -1231,7 +1232,7 @@
 	return(1);
 }
 /*An der Stelle 0 des KomponentenNamenArray den NotSet-String eintragen :*/
-KomponentenNamenArray = "< NOT SET IN ANSYS-FILE >";
+strcpy(KomponentenNamenArray, "< NOT SET IN ANSYS-FILE >");
 
 
 
diff -ru ug-orig/dom/lgm/ansys2lgm.h ug-patched/dom/lgm/ansys2lgm.h
--- ug-orig/dom/lgm/ansys2lgm.h	2006-05-08 14:18:23.000000000 +0200
+++ ug-patched/dom/lgm/ansys2lgm.h	2006-05-08 14:31:31.000000000 +0200
@@ -18,7 +18,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dom/lgm/ansys2lgm.h,v 1.13 2006/05/08 12:18:23 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
Nur in ug-orig/dom/lgm: CVS.
Nur in ug-orig/dom/lgm: .cvsignore.
diff -ru ug-orig/dom/lgm/lgm_accel.c ug-patched/dom/lgm/lgm_accel.c
--- ug-orig/dom/lgm/lgm_accel.c	2006-11-08 16:35:43.000000000 +0100
+++ ug-patched/dom/lgm/lgm_accel.c	2008-12-19 11:15:14.000000000 +0100
@@ -13,6 +13,7 @@
  *            system include files                                           *
  *            application include files                                      *
  *****************************************************************************/
+#include "config.h"
 #include <assert.h>
 #include "compiler.h"   /* for INT etc.                              */
 #include "debug.h"      /* for IFDEBUG() and  MIN(), MAX() by misc.h */
diff -ru ug-orig/dom/lgm/lgm_domain2d.c ug-patched/dom/lgm/lgm_domain2d.c
--- ug-orig/dom/lgm/lgm_domain2d.c	2006-11-17 11:46:10.000000000 +0100
+++ ug-patched/dom/lgm/lgm_domain2d.c	2009-04-29 15:11:55.000000000 +0200
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <assert.h>
 #include <math.h>
 #include <stdio.h>
@@ -87,7 +88,7 @@
 /****************************************************************************/
 
 /* data for CVS */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dom/lgm/lgm_domain2d.c,v 1.26 2006/11/17 10:46:10 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -1194,7 +1195,7 @@
 }
 
 /* domain interface function: for description see domain.h */
-INT NS_DIM_PREFIX BVP_Save (BVP *theBVP, char *name, char *mgname, HEAP *theHeap, INT argc, char **argv)
+INT NS_DIM_PREFIX BVP_Save (BVP *theBVP, const char *name, const char *mgname, HEAP *theHeap, INT argc, char **argv)
 {
 	LGM_DOMAIN *lgm_domain;
 	LGM_LINE *theLine, **LinePtrList;
diff -ru ug-orig/dom/lgm/lgm_domain3d.c ug-patched/dom/lgm/lgm_domain3d.c
--- ug-orig/dom/lgm/lgm_domain3d.c	2006-11-17 11:46:10.000000000 +0100
+++ ug-patched/dom/lgm/lgm_domain3d.c	2009-04-29 15:11:55.000000000 +0200
@@ -25,6 +25,8 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
+
 #undef OCC_GEOMETRY
 #ifdef OCC_GEOMETRY
 #include "occ/occ_geom.hh"
@@ -127,7 +129,7 @@
 extern int AddGeomElement (int node0, int node1, int node2, int neigbor0, int neigbor1, int neigbor2);
 
 /* data for CVS */
-/*static char RCS_ID("$Header: /home/cvsroot/UG/ug/dom/lgm/lgm_domain3d.c,v 1.82 2006/11/17 10:46:10 sander Exp $",UG_RCS_STRING);
+/*static char RCS_ID("$Header$",UG_RCS_STRING);
 */
 static INT currSubdom, currSurface, currLine;
 
@@ -687,7 +689,7 @@
 }
 
 /* domain interface function: for description see domain.h */
-INT NS_DIM_PREFIX BVP_Save (BVP *theBVP, char *name, char *mgname, HEAP *theHeap, INT argc, char **argv)
+INT NS_DIM_PREFIX BVP_Save (BVP *theBVP, const char *name, const char *mgname, HEAP *theHeap, INT argc, char **argv)
 {
 	UserWrite("SORRY: not implemented yet\n");
 	return (1);
@@ -1431,20 +1433,24 @@
 	n1[1] = p2[1] - p0[1];
 	n1[2] = p2[2] - p0[2];
 
-	l1 = Lenght(n1);
-	Scale(n1, 1.0/l1);
+        V3_EUKLIDNORM(n1,l1);
+/* 	Scale(n1, 1.0/l1); */
+        V3_SCALE(1.0/l1,n1);
 
 	n2[0] = p2[0] - p1[0];
 	n2[1] = p2[1] - p1[1];
 	n2[2] = p2[2] - p1[2];
 
-	l2 = Lenght(n2);
-	Scale(n2, 1.0/l2);
+        V3_EUKLIDNORM(n2,l2);
+/* 	Scale(n2, 1.0/l2); */
+        V3_SCALE(1.0/l2, n2);
+
+/* 	Cross(n, n1, n2); */
+        V3_VECTOR_PRODUCT(n1,n2,n);
+        V3_EUKLIDNORM(n,l);
+/* 	Scale(n, 1.0/l); */
+        V3_SCALE(1.0/l, n);
 
-	Cross(n, n1, n2);
-	l = Lenght(n);
-	Scale(n, 1.0/l);
-	
 	return(0);
 }
 
@@ -1466,7 +1472,8 @@
 	/* get Normalvector to the Triangle j */
 	Normal_Vector(p0, p1, p2, &n2[0]);
 
-	scalarproduct =  Mult(n1, n2);
+/* 	scalarproduct =  Mult(n1, n2); */
+        V3_SCALAR_PRODUCT(n1, n2, scalarproduct);
 	return(scalarproduct);
 }
 
@@ -1636,7 +1643,7 @@
 }
 
 
-static INT Write_Surface(LGM_SURFACE *theSurface, char *name, char *name1)
+static INT Write_Surface(LGM_SURFACE *theSurface, const char *name, const char *name1)
 {
 	INT i, id;
 	FILE *stream;
@@ -1712,7 +1719,8 @@
 	/* get Normalvector to the Triangle i */
 	Normal_Vector(p0, p1, p2, &n1[0]);
 
-	scalarproduct =  Mult(n1, n);
+/* 	scalarproduct =  Mult(n1, n); */
+        V3_SCALAR_PRODUCT(n1, n, scalarproduct);
 	return(scalarproduct);
 }
 
@@ -3040,15 +3048,15 @@
 		
 	/* compute 2 vectors in the plane + normalvector */	
 	Minus(n0,e2,e0);
-	l = Lenght(n0);
+        V3_EUKLIDNORM(n0,l);
 	Scale(n0,1.0/l);
 
 	Minus(n1,e2,e1);
-	l = Lenght(n1);
+        V3_EUKLIDNORM(n1,l);
 	Scale(n1,1.0/l);
 
 	Cross(n2,n0,n1);
-	l = Lenght(n2);
+        V3_EUKLIDNORM(n2,l);
 	Scale(n2,1.0/l);
 
 	p[0] = global[0];
@@ -3125,7 +3133,8 @@
 	lam[1] = bb[1];
 	lam[2] = 1 - bb[0] - bb[1];
 
-	return(Lenght(hp));
+        V3_EUKLIDNORM(hp,l);
+        return l;
 }	
 
 static INT NormalVector(LGM_TRIANGLE *theSurfaceTriangle, DOUBLE *n)
@@ -5734,7 +5743,7 @@
 	B[0] = globalp2[0] - globalp1[0];
 	B[1] = globalp2[1] - globalp1[1];
 	B[2] = globalp2[2] - globalp1[2];
-	LGM_VECTOR_PRODUCT(A, B, BNDP_NV);
+	V3_VECTOR_PRODUCT(A, B, BNDP_NV);
 // This is wrong. OS_CHANGED
 //	V_DIM_SCALE(1.0/sqrt(V_DIM_SCAL_PROD(BNDP_NV, BNDP_NV)),BNDP_NV);
 
@@ -5966,9 +5975,9 @@
 	B[2] = LGM_POINT_POS(LGM_TRIANGLE_CORNER(LGM_SURFACE_TRIANGLE(theSurface,ilocal),2))[2]
 			- LGM_POINT_POS(LGM_TRIANGLE_CORNER(LGM_SURFACE_TRIANGLE(theSurface,ilocal),1))[2];
 		
-	LGM_VECTOR_PRODUCT(A, B, Surface_NV);
+	V3_VECTOR_PRODUCT(A, B, Surface_NV);
 
-	LGM_SCALAR_PRODUCT(BNDP_NV, Surface_NV, sp);
+	V3_SCALAR_PRODUCT(BNDP_NV, Surface_NV, sp);
 
 
 	if(sp>0.0)
diff -ru ug-orig/dom/lgm/lgm_domain.c ug-patched/dom/lgm/lgm_domain.c
--- ug-orig/dom/lgm/lgm_domain.c	2006-11-08 16:35:43.000000000 +0100
+++ ug-patched/dom/lgm/lgm_domain.c	2009-04-29 15:11:55.000000000 +0200
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <assert.h>
 #include <math.h>
 #include <stdio.h>
@@ -57,7 +58,7 @@
 static INT theProblemVarID;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dom/lgm/lgm_domain.c,v 1.39 2006/11/08 15:35:43 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 /****************************************************************************/
@@ -87,7 +88,7 @@
 D*/
 /****************************************************************************/
 
-LGM_PROBLEM* NS_DIM_PREFIX CreateProblem (char *name, InitProcPtr init, DomainSizeConfig domconfig, BndCondProcPtr BndCond, int numOfCoefficients, CoeffProcPtr coeffs[], int numOfUserFct, UserProcPtr userfct[])
+LGM_PROBLEM* NS_DIM_PREFIX CreateProblem (const char *name, InitProcPtr init, DomainSizeConfig domconfig, BndCondProcPtr BndCond, int numOfCoefficients, CoeffProcPtr coeffs[], int numOfUserFct, UserProcPtr userfct[])
 {
 	LGM_PROBLEM *newProblem;
 	int i;
@@ -114,7 +115,7 @@
 	return (newProblem);
 }
 
-LGM_PROBLEM* NS_DIM_PREFIX CreateProblemWithInnerBCs (char *name, InitProcPtr init, DomainSizeConfig domconfig, BndCondProcPtr BndCond, BndCondProcPtr InnerBndCond, int numOfCoefficients, CoeffProcPtr coeffs[], int numOfUserFct, UserProcPtr userfct[])
+LGM_PROBLEM* NS_DIM_PREFIX CreateProblemWithInnerBCs (const char *name, InitProcPtr init, DomainSizeConfig domconfig, BndCondProcPtr BndCond, BndCondProcPtr InnerBndCond, int numOfCoefficients, CoeffProcPtr coeffs[], int numOfUserFct, UserProcPtr userfct[])
 {
 	LGM_PROBLEM *newProblem;
 	int i;
@@ -161,11 +162,17 @@
 */
 /****************************************************************************/
 
-static LGM_PROBLEM *Lgm_Problem_GetByName (char *name)
+static LGM_PROBLEM *Lgm_Problem_GetByName (const char *name)
 {
 	return((LGM_PROBLEM *) SearchEnv(name,"/LGM_PROBLEM",theProblemVarID,theProblemDirID));
 }
 
+void NS_DIM_PREFIX
+Set_Current_BVP(BVP* theBVP)
+{
+  return;
+}
+
 /* domain interface function: for description see domain.h */
 BVP *NS_DIM_PREFIX
 BVP_GetByName (const char *name)
@@ -194,7 +201,7 @@
 }
 
 /* domain interface function: for description see domain.h */
-BVP* NS_DIM_PREFIX BVP_Init (char *name, HEAP *Heap, MESH *Mesh, INT MarkKey)
+BVP* NS_DIM_PREFIX BVP_Init (const char *name, HEAP *Heap, MESH *Mesh, INT MarkKey)
 {
 	LGM_DOMAIN *theDomain;
 	LGM_PROBLEM *theProblem;
@@ -307,7 +314,7 @@
 }
 
 /* domain interface function: for description see domain.h */
-BVP* NS_DIM_PREFIX BVP_Load (char *name, INT argc, char **argv)
+BVP* NS_DIM_PREFIX BVP_Load (const char *name, INT argc, char **argv)
 {
 	return (NULL);
 }
diff -ru ug-orig/dom/lgm/lgm_domain.h ug-patched/dom/lgm/lgm_domain.h
--- ug-orig/dom/lgm/lgm_domain.h	2006-11-08 16:35:43.000000000 +0100
+++ ug-patched/dom/lgm/lgm_domain.h	2009-04-29 15:11:55.000000000 +0200
@@ -26,7 +26,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dom/lgm/lgm_domain.h,v 1.39 2006/11/08 15:35:43 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -741,8 +741,8 @@
 #endif
 
 #ifndef Grape
-LGM_PROBLEM *CreateProblem (char *name, InitProcPtr config, DomainSizeConfig domconfig, BndCondProcPtr BndCond, int numOfCoefficients, CoeffProcPtr coeffs[], int numOfUserFct, UserProcPtr userfct[]);
-LGM_PROBLEM *CreateProblemWithInnerBCs (char *name, InitProcPtr config, DomainSizeConfig domconfig, BndCondProcPtr BndCond, BndCondProcPtr InnerBndCond, int numOfCoefficients, CoeffProcPtr coeffs[], int numOfUserFct, UserProcPtr userfct[]);
+LGM_PROBLEM *CreateProblem (const char *name, InitProcPtr config, DomainSizeConfig domconfig, BndCondProcPtr BndCond, int numOfCoefficients, CoeffProcPtr coeffs[], int numOfUserFct, UserProcPtr userfct[]);
+LGM_PROBLEM *CreateProblemWithInnerBCs (const char *name, InitProcPtr config, DomainSizeConfig domconfig, BndCondProcPtr BndCond, BndCondProcPtr InnerBndCond, int numOfCoefficients, CoeffProcPtr coeffs[], int numOfUserFct, UserProcPtr userfct[]);
 #endif
 INT SetBoundaryCondition (LGM_DOMAIN *theDomain, BndCondProcPtr BndCond, BndCondProcPtr InnerBndCond);
 INT SetDomainSize (LGM_DOMAIN *theDomain);
diff -ru ug-orig/dom/lgm/lgm_load.c ug-patched/dom/lgm/lgm_load.c
--- ug-orig/dom/lgm/lgm_load.c	2006-11-17 11:46:10.000000000 +0100
+++ ug-patched/dom/lgm/lgm_load.c	2009-04-29 15:11:55.000000000 +0200
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <assert.h>
 #include <math.h>
 #include <stdio.h>
@@ -86,12 +87,12 @@
 /*																			*/
 /****************************************************************************/
 
-typedef int (*ReadDomainProc)		(HEAP *theHeap, char *filename, LGM_DOMAIN_INFO *domain_info, INT MarkKey);
+typedef int (*ReadDomainProc)		(HEAP *theHeap, const char *filename, LGM_DOMAIN_INFO *domain_info, INT MarkKey);
 typedef int (*ReadSizesProc)		(LGM_SIZES *lgm_sizes);
 typedef int (*ReadSubDomainProc)	(int i, LGM_SUBDOMAIN_INFO *subdom_info);
 typedef int (*ReadLinesProc)		(int i, LGM_LINE_INFO *line_info);
 typedef int (*ReadPointsProc)		(LGM_POINT_INFO *lgm_point_info);
-typedef int (*ReadMeshProc)	        (char *name, HEAP *theHeap, LGM_MESH_INFO *lgm_mesh_info, INT MarkKey);
+typedef int (*ReadMeshProc)	        (const char *name, HEAP *theHeap, LGM_MESH_INFO *lgm_mesh_info, INT MarkKey);
 
 #if (LGM_DIM==3)
 typedef int (*ReadSurfaceProc) 		(int i, LGM_SURFACE_INFO *surface_info);
@@ -133,7 +134,7 @@
 #endif
 
 /* data for CVS */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dom/lgm/lgm_load.c,v 1.50 2006/11/17 10:46:10 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -166,7 +167,7 @@
 
 #if (LGM_DIM==2)
 
-LGM_DOMAIN* NS_DIM_PREFIX LGM_LoadDomain (char *filename, char *name, HEAP *theHeap, INT DomainVarID, INT MarkKey)
+LGM_DOMAIN* NS_DIM_PREFIX LGM_LoadDomain (const char *filename, const char *name, HEAP *theHeap, INT DomainVarID, INT MarkKey)
 {
 	LGM_DOMAIN *theDomain;
 	LGM_DOMAIN_INFO theDomInfo;
@@ -177,7 +178,7 @@
 	LGM_LINE **LinePtrList;
 	LGM_POINT_INFO *piptr;
 	LGM_LINE_INFO theLineInfo;
-	char *p;
+	const char *p;
 
 	/* set transfer functions */
 	p = filename + strlen(filename) - 4;
@@ -312,7 +313,7 @@
 	return (theDomain);
 }
 
-INT NS_DIM_PREFIX LGM_LoadMesh (char *name, HEAP *theHeap, MESH *theMesh, LGM_DOMAIN *theDomain, INT MarkKey)
+INT NS_DIM_PREFIX LGM_LoadMesh (const char *name, HEAP *theHeap, MESH *theMesh, LGM_DOMAIN *theDomain, INT MarkKey)
 {
 	INT i,j,size;
 	LGM_MESH_INFO lgm_mesh_info;
@@ -323,7 +324,7 @@
 	if (ReadMesh==NULL) return (1);
 
 	/* do the right thing */
-   	if ((*ReadMesh)(name,theHeap,&lgm_mesh_info,MarkKey)) return (1);
+   	if ((*ReadMesh)((char*) name,theHeap,&lgm_mesh_info,MarkKey)) return (1);
 
     /* copy mesh_info to mesh and create BNDPs */
 	theMesh->mesh_status              = MESHSTAT_MESH;
@@ -639,7 +640,7 @@
 
 
 
-LGM_DOMAIN* NS_DIM_PREFIX LGM_LoadDomain (char *filename, char *name, HEAP *theHeap, INT DomainVarID, INT MarkKey)
+LGM_DOMAIN* NS_DIM_PREFIX LGM_LoadDomain (const char *filename, const char *name, HEAP *theHeap, INT DomainVarID, INT MarkKey)
 {
 	LGM_DOMAIN *theDomain;
 	LGM_DOMAIN_INFO theDomInfo;
@@ -653,7 +654,7 @@
 	LGM_LINE **LinePtrList;
 	LGM_SURFACE **SurfacePtrList;
 	LGM_LINE_INFO theLineInfo;	
-	char *p;
+	const char *p;
 
 #ifdef OCC_GEOMETRY
 	occ_geom.Import_Geometry("geometry.iges");
@@ -1044,7 +1045,7 @@
 	return (theDomain);
 }
 
-INT NS_DIM_PREFIX LGM_LoadMesh (char *name, HEAP *theHeap, MESH *theMesh, LGM_DOMAIN *theDomain, INT MarkKey)
+INT NS_DIM_PREFIX LGM_LoadMesh (const char *name, HEAP *theHeap, MESH *theMesh, LGM_DOMAIN *theDomain, INT MarkKey)
 {
 	LGM_MESH_INFO lgm_mesh_info;
     INT i;
diff -ru ug-orig/dom/lgm/lgm_load.h ug-patched/dom/lgm/lgm_load.h
--- ug-orig/dom/lgm/lgm_load.h	2006-11-08 16:35:43.000000000 +0100
+++ ug-patched/dom/lgm/lgm_load.h	2009-04-29 15:11:55.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dom/lgm/lgm_load.h,v 1.14 2006/11/08 15:35:43 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -76,8 +76,8 @@
 /*																			*/
 /****************************************************************************/
 
-LGM_DOMAIN *LGM_LoadDomain	(char *filename, char *name, HEAP *theHeap, INT DomainVarID, INT MarkKey);
-INT			LGM_LoadMesh	(char *filename, HEAP *theHeap, MESH *theMesh, LGM_DOMAIN *theDomain, INT MarkKey);
+LGM_DOMAIN *LGM_LoadDomain	(const char *filename, const char *name, HEAP *theHeap, INT DomainVarID, INT MarkKey);
+INT			LGM_LoadMesh	(const char *filename, HEAP *theHeap, MESH *theMesh, LGM_DOMAIN *theDomain, INT MarkKey);
 INT			InitLGMLoad		(void);
 
 
diff -ru ug-orig/dom/lgm/lgm_parallel.c ug-patched/dom/lgm/lgm_parallel.c
--- ug-orig/dom/lgm/lgm_parallel.c	2006-11-17 11:46:10.000000000 +0100
+++ ug-patched/dom/lgm/lgm_parallel.c	2009-01-05 14:05:16.000000000 +0100
@@ -28,6 +28,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stddef.h>
 #include <stdio.h>
@@ -51,7 +52,14 @@
 
 #include "namespace.h"
 
-USING_UG_NAMESPACES
+//USING_UG_NAMESPACES
+USING_UGDIM_NAMESPACE
+USING_UG_NAMESPACE
+
+#ifdef ModelP
+USING_PPIF_NAMESPACE
+#endif
+
 
 
 /****************************************************************************/
@@ -122,7 +130,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dom/lgm/lgm_parallel.c,v 1.11 2006/11/17 10:46:10 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 /****************************************************************************/
@@ -234,7 +242,7 @@
 				LGM_OBJECT_ID_2_OBJECT((INT) LGM_BNDS_OBJECT((LGM_BNDS *)data))));
 
 			LGM_BNDS_OBJECT(bs) = 
-				LGM_OBJECT_ID_2_OBJECT((INT) LGM_BNDS_OBJECT((LGM_BNDS *)data));
+				LGM_OBJECT_ID_2_OBJECT((long int) LGM_BNDS_OBJECT((LGM_BNDS *)data));
 		}
 		else
 			PRINTDEBUG(dom,2,(PFMT "BElementScatterBndS(): ignoring i=%d "
@@ -409,8 +417,7 @@
 				 &((*bndp)->Surf[(i)].s.theSurf)));
 
 			LGM_BNDP_LINE(*bndp,i) = 
-				LGM_LINE_ID_2_LINE((INT) 
-							   LGM_BNDP_LINE_GLINE(((LGM_BNDP_PLINE *)data)[i]));
+				LGM_LINE_ID_2_LINE((long int) LGM_BNDP_LINE_GLINE(((LGM_BNDP_PLINE *)data)[i]));
 
 			PRINTDEBUG(dom,3,(PFMT "BVertexScatterBndP(): outside buffer: "
 				"line=%x local_left=%11.4E local_right=%11.4E\n",me,
@@ -438,8 +445,7 @@
 				 me,bndp,*bndp));
 
 			LGM_BNDP_OBJECT(*bndp,i) = 
-				LGM_OBJECT_ID_2_OBJECT((INT) 
-							   LGM_BNDP_OBJECT_GOBJECT(((LGM_BNDP_POBJECT *)data)[0]));
+				LGM_OBJECT_ID_2_OBJECT((long int)LGM_BNDP_OBJECT_GOBJECT(((LGM_BNDP_POBJECT *)data)[0]));
 
 			PRINTDEBUG(dom,3,(PFMT "BVertexScatterBndP(): outside buffer: "
 				"line=%x local=%11.4E\n",me,
diff -ru ug-orig/dom/lgm/lgm_transfer2d.c ug-patched/dom/lgm/lgm_transfer2d.c
--- ug-orig/dom/lgm/lgm_transfer2d.c	2006-11-17 11:46:10.000000000 +0100
+++ ug-patched/dom/lgm/lgm_transfer2d.c	2009-04-29 15:11:55.000000000 +0200
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <assert.h>
 #include <math.h>
 #include <stdio.h>
@@ -72,7 +73,7 @@
 /****************************************************************************/
 
 /* data for CVS */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dom/lgm/lgm_transfer2d.c,v 1.17 2006/11/17 10:46:10 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 static FILE *stream;
 static INT lgmdomainpathes_set;
@@ -107,7 +108,7 @@
 	return (0);
 }
 
-static int ReadCommentLine (char *comment)
+static int ReadCommentLine (const char *comment)
 {
 	char buffer[256];
 
@@ -145,7 +146,7 @@
 static fpos_t filepos,filepos2,UnitInfoFilepos;
 static HEAP *theHeap;
 
-int NS_DIM_PREFIX LGM_ReadDomain (HEAP *Heap, char *filename, LGM_DOMAIN_INFO *domain_info, INT dummy)
+int NS_DIM_PREFIX LGM_ReadDomain (HEAP *Heap, const char *filename, LGM_DOMAIN_INFO *domain_info, INT dummy)
 {
 	int i;
 	char buffer[256];
@@ -517,7 +518,7 @@
 D*/
 /****************************************************************************/
 
-FILE * NS_DIM_PREFIX LGM_WriteOpenFile (char* name)
+FILE * NS_DIM_PREFIX LGM_WriteOpenFile (const char* name)
 {
 	FILE *stream;
 	
diff -ru ug-orig/dom/lgm/lgm_transfer3d.c ug-patched/dom/lgm/lgm_transfer3d.c
--- ug-orig/dom/lgm/lgm_transfer3d.c	2006-11-17 11:46:10.000000000 +0100
+++ ug-patched/dom/lgm/lgm_transfer3d.c	2009-04-29 15:11:55.000000000 +0200
@@ -17,6 +17,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <assert.h>
 #include <math.h>
 #include <stdio.h>
@@ -47,7 +48,7 @@
 static INT LGM_DEBUG = 0;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dom/lgm/lgm_transfer3d.c,v 1.26 2006/11/17 10:46:10 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 static int SkipBTN (void)
 {
@@ -81,7 +82,7 @@
 }
 
 
-static int ReadCommentLine (char *comment)
+static int ReadCommentLine (const char *comment)
 {
 	char buffer[256];
 
@@ -120,7 +121,7 @@
 static fpos_t fileposline;
 static fpos_t filepossurface;
 
-int NS_DIM_PREFIX LGM_ReadDomain (HEAP *Heap, char *filename, LGM_DOMAIN_INFO *domain_info, INT MarkKey)
+int NS_DIM_PREFIX LGM_ReadDomain (HEAP *Heap, const char *filename, LGM_DOMAIN_INFO *domain_info, INT MarkKey)
 {
 	int i,i0,i1,i2;
 	char buffer[256];
@@ -850,7 +851,7 @@
 D*/
 /****************************************************************************/
 
-FILE* NS_DIM_PREFIX LGM_WriteOpenFile (char* name)
+FILE* NS_DIM_PREFIX LGM_WriteOpenFile (const char* name)
 {
 	FILE *stream;
 	
diff -ru ug-orig/dom/lgm/lgm_transfer.h ug-patched/dom/lgm/lgm_transfer.h
--- ug-orig/dom/lgm/lgm_transfer.h	2006-11-08 16:35:43.000000000 +0100
+++ ug-patched/dom/lgm/lgm_transfer.h	2009-04-29 15:11:55.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dom/lgm/lgm_transfer.h,v 1.22 2006/11/08 15:35:43 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -258,7 +258,7 @@
 /*																			*/
 /****************************************************************************/
 
-int LGM_ReadDomain 			(HEAP *theHeap, char *filename, LGM_DOMAIN_INFO *domain_info, INT MarkKey);
+int LGM_ReadDomain 			(HEAP *theHeap, const char *filename, LGM_DOMAIN_INFO *domain_info, INT MarkKey);
 int LGM_ReadSizes 			(LGM_SIZES *lgm_sizes);
 int LGM_ReadSubDomain 		(int i, LGM_SUBDOMAIN_INFO *subdom_info);
 int LGM_ReadLines 			(int i, LGM_LINE_INFO *line_info);
@@ -272,7 +272,7 @@
 int HGM_ReadSurface 		(int i, LGM_SURFACE_INFO *surface_info);
 #endif
 
-FILE *LGM_WriteOpenFile 	(char* name);
+FILE *LGM_WriteOpenFile 	(const char* name);
 INT InitLGMTransfer 		(void);
 
 END_UGDIM_NAMESPACE
diff -ru ug-orig/dom/lgm/Makefile.am ug-patched/dom/lgm/Makefile.am
--- ug-orig/dom/lgm/Makefile.am	2004-09-09 19:50:24.000000000 +0200
+++ ug-patched/dom/lgm/Makefile.am	2007-02-14 21:27:52.000000000 +0100
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.2 2004/09/09 17:50:24 thimo Exp $
+# $Id: Makefile.am 8267 2007-02-14 20:27:52Z christi $
 
 if BUILD2D
   LIB_2D = libdomL2.la
@@ -22,7 +22,7 @@
 
 include_HEADERS = lgm_domain.h
 
-lib_LTLIBRARIES = $(LIB_2D) $(LIB_3D)
+noinst_LTLIBRARIES = $(LIB_2D) $(LIB_3D)
 
 libdomL2_la_SOURCES = $(SOURCES) lgm_transfer2d.c lgm_domain2d.c
 libdomL2_la_CPPFLAGS = $(UG_2DFLAGS)
Nur in ug-orig/dom/lgm/netgen: CVS.
Nur in ug-orig/dom/lgm/netgen: .cvsignore.
diff -ru ug-orig/dom/lgm/netgen/lgm_gginterface.h ug-patched/dom/lgm/netgen/lgm_gginterface.h
--- ug-orig/dom/lgm/netgen/lgm_gginterface.h	1998-03-18 18:44:57.000000000 +0100
+++ ug-patched/dom/lgm/netgen/lgm_gginterface.h	1998-03-18 18:45:01.000000000 +0100
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dom/lgm/netgen/lgm_gginterface.h,v 1.7 1998/03/18 17:44:57 klaus Exp $
+$Header$
 */
 
 /****************************************************************************/
Nur in ug-orig/dom/lgm/netgen/ptrepository: CVS.
diff -ru ug-orig/dom/lgm/netgen/surface.c ug-patched/dom/lgm/netgen/surface.c
--- ug-orig/dom/lgm/netgen/surface.c	2004-07-26 17:34:00.000000000 +0200
+++ ug-patched/dom/lgm/netgen/surface.c	2008-12-19 11:15:14.000000000 +0100
@@ -25,6 +25,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -87,7 +88,7 @@
 static CoeffProcPtr 			LOCAL_H;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dom/lgm/netgen/surface.c,v 1.15 2004/07/26 15:34:00 stefan Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
Nur in ug-orig/dom/lgm/ngin: CVS.
Nur in ug-orig/dom/lgm/ngin: .cvsignore.
diff -ru ug-orig/dom/lgm/ngin/Makefile.am ug-patched/dom/lgm/ngin/Makefile.am
--- ug-orig/dom/lgm/ngin/Makefile.am	2004-09-09 19:50:24.000000000 +0200
+++ ug-patched/dom/lgm/ngin/Makefile.am	2004-09-09 19:50:27.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.2 2004/09/09 17:50:24 thimo Exp $
+# $Id: Makefile.am 7795 2004-09-09 17:50:27Z thimo $
 
 if BUILD3D
   LIB_3D = libngin.la
diff -ru ug-orig/dom/lgm/ngin/ng.c ug-patched/dom/lgm/ngin/ng.c
--- ug-orig/dom/lgm/ngin/ng.c	2006-11-17 11:46:10.000000000 +0100
+++ ug-patched/dom/lgm/ngin/ng.c	2009-04-29 15:11:55.000000000 +0200
@@ -98,7 +98,7 @@
 #endif
 
 /* data for CVS */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dom/lgm/ngin/ng.c,v 1.23 2006/11/17 10:46:10 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -481,11 +481,11 @@
 	ng_abort=1;
 }
 
-int NS_DIM_PREFIX NG_ReadMesh (char *name, HEAP *Heap, LGM_MESH_INFO *theMesh, INT MarkKey)
+int NS_DIM_PREFIX NG_ReadMesh (const char *name, HEAP *Heap, LGM_MESH_INFO *theMesh, INT MarkKey)
 {
 	int i,j,error;
 	char ngname[128];
-	char *tmp;
+	const char *tmp;
 
 	/* init */
 	ng_abort=0;
diff -ru ug-orig/dom/lgm/ngin/ng.h ug-patched/dom/lgm/ngin/ng.h
--- ug-orig/dom/lgm/ngin/ng.h	2006-11-17 11:46:10.000000000 +0100
+++ ug-patched/dom/lgm/ngin/ng.h	2009-04-29 15:11:55.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dom/lgm/ngin/ng.h,v 1.14 2006/11/17 10:46:10 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -160,7 +160,7 @@
 int PutBndNode (BND_NODE *BndNode);
 int PutInnerNode (INNER_NODE *InnNode);
 int PutElement (NG_ELEMENT *Elem);
-int NG_ReadMesh (char *name, HEAP *Heap, LGM_MESH_INFO *theMesh, INT MarkKey);
+int NG_ReadMesh (const char *name, HEAP *Heap, LGM_MESH_INFO *theMesh, INT MarkKey);
 
 #ifdef __USE_IN_UG__
 	int NG_Init (int domainpaths_set);
diff -ru ug-orig/dom/lgm/ngin/ngin-lex.l ug-patched/dom/lgm/ngin/ngin-lex.l
--- ug-orig/dom/lgm/ngin/ngin-lex.l	2006-06-02 17:38:35.000000000 +0200
+++ ug-patched/dom/lgm/ngin/ngin-lex.l	2006-06-02 17:38:35.000000000 +0200
@@ -26,7 +26,7 @@
 static int noline=1;
 
 /* data for CVS */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dom/lgm/ngin/ngin-lex.l,v 1.4 2006/06/02 15:38:35 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /* forward declare stuff from ngin-yacc.y */
 int ngerror (char *s); 
diff -ru ug-orig/dom/lgm/ngin/ngin-yacc.y ug-patched/dom/lgm/ngin/ngin-yacc.y
--- ug-orig/dom/lgm/ngin/ngin-yacc.y	2006-11-21 18:04:59.000000000 +0100
+++ ug-patched/dom/lgm/ngin/ngin-yacc.y	2009-04-29 14:00:07.000000000 +0200
@@ -50,7 +50,7 @@
 
  /* forward declare my own function (referenced by automatic parser) */ 
  int ngerror (char *s);
- int ngwrap();
+extern "C" int ngwrap();
 %}
 
 %union 
@@ -200,7 +200,7 @@
 														BndNode.global[0]=$2;
 														BndNode.global[1]=$3;
 														BndNode.global[2]=$4;
-														$$=&BndNode;
+														$<bs>$=&BndNode;
 													}
 	BndSpec 										{PutBndNode(&BndNode);}
 	TEND			
@@ -255,10 +255,13 @@
 %%
 
 
+extern "C"
+{
 int ngwrap ()
 {
     return (1);
 }
+}
 
 int ngerror (char *s)
 {
Nur in ug-orig/dom/lgm/ngin2d: CVS.
Nur in ug-orig/dom/lgm/ngin2d: .cvsignore.
diff -ru ug-orig/dom/lgm/ngin2d/Makefile.am ug-patched/dom/lgm/ngin2d/Makefile.am
--- ug-orig/dom/lgm/ngin2d/Makefile.am	2004-09-09 19:50:25.000000000 +0200
+++ ug-patched/dom/lgm/ngin2d/Makefile.am	2006-12-14 20:25:22.000000000 +0100
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.2 2004/09/09 17:50:25 thimo Exp $ 
+# $Id: Makefile.am 8235 2006-12-14 19:25:22Z langsn $ 
 
 if BUILD2D
   LIB_2D = libngin2d.la
@@ -9,7 +9,7 @@
 noinst_LTLIBRARIES = $(LIB_2D)
 
 # prefix to use instead of 'yy'
-PARSERPREFIX = ng
+PARSERPREFIX = ng2d
 
 # generate header file, rename prefix
 AM_YFLAGS = -d -p $(PARSERPREFIX)
diff -ru ug-orig/dom/lgm/ngin2d/ng2d.h ug-patched/dom/lgm/ngin2d/ng2d.h
--- ug-orig/dom/lgm/ngin2d/ng2d.h	2006-05-08 14:18:23.000000000 +0200
+++ ug-patched/dom/lgm/ngin2d/ng2d.h	2009-04-29 15:11:55.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dom/lgm/ngin2d/ng2d.h,v 1.7 2006/05/08 12:18:23 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -145,14 +145,14 @@
 int PutBndNode (BND_NODE *BndNode);
 int PutInnerNode (INNER_NODE *InnNode);
 int PutElement (NG_ELEMENT *Elem);
-int NG_ReadMesh (char *name, HEAP *Heap, LGM_MESH_INFO *theMesh, INT MarkKey);
+int NG_ReadMesh (const char *name, HEAP *Heap, LGM_MESH_INFO *theMesh, INT MarkKey);
 
 #ifdef __USE_IN_UG__
 	int NG_Init (int domainpaths_set);
 #endif
 
-END_UGDIM_NAMESPACE
-
 void ngbreak (void);
 
+END_UGDIM_NAMESPACE
+
 #endif
diff -ru ug-orig/dom/lgm/ngin2d/ng.c ug-patched/dom/lgm/ngin2d/ng.c
--- ug-orig/dom/lgm/ngin2d/ng.c	2008-10-30 13:29:05.000000000 +0100
+++ ug-patched/dom/lgm/ngin2d/ng.c	2009-04-29 15:11:55.000000000 +0200
@@ -31,7 +31,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
-#include <math.h>
 
 #include "ng2d.h"
 #ifdef __USE_IN_UG__
@@ -42,7 +41,9 @@
 
 #include "namespace.h"
 
-USING_UG_NAMESPACES
+USING_UG_NAMESPACE
+USING_UGDIM_NAMESPACE
+
 
 
 /****************************************************************************/
@@ -76,6 +77,7 @@
 /*																			*/
 /****************************************************************************/
 
+#define ngin ng2din
 extern FILE *ngin;
 
 /****************************************************************************/
@@ -97,14 +99,14 @@
 #endif
 
 /* data for CVS */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dom/lgm/ngin2d/ng.c,v 1.11 2008/10/30 12:29:05 dmitriy Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
 /* forward declarations of functions used before they are defined			*/
 /*																			*/
 /****************************************************************************/
-
+#define ngparse ng2dparse
 int ngparse (void);
 
 
@@ -144,7 +146,7 @@
 	return (0);
 }
 
-int NP_ElemSideOnBnd (NG_ELEMENT *Elem)
+static int NP_ElemSideOnBnd (NG_ELEMENT *Elem)
 {
 	int i,j,esob,c1,c2,ec1,ec2;
 
@@ -164,79 +166,10 @@
 	return (esob);
 }
 
-#ifdef WITH_DEGENERATED_ELEM
-
-static int IsDegeneratedElem (int n_c, double p [] [2], int * start_ind)
-{
-	int i, j;
-	double x, y;
-	double t, min_dist, max_dist, dist_0;
-	
-	x = p [1] [0] - p [0] [0]; y = p [1] [1] - p [0] [1];
-	max_dist = min_dist = dist_0 = x * x + y * y;
-	for (i = 0; i < n_c; i++)
-		for (j = i + 1; j < n_c; j++)
-		{
-			x = p [j] [0] - p [i] [0]; y = p [j] [1] - p [i] [1];
-			t = x * x + y * y;
-			if (t > max_dist) max_dist = t;
-			else if (t < min_dist) min_dist = t;
-		}
-	min_dist = sqrt (min_dist); max_dist = sqrt (max_dist);
-	
-	if (min_dist > DEGENERATED_SIZE * max_dist)
-		return 0; /* is not degenerated */
-	
-	/* This is a degenerated element. Find its ordering: */
-	dist_0 = sqrt (dist_0);
-	
-	if (n_c == 3)
-	{ /* a degenerated triangle */
-		if (dist_0 > DEGENERATED_SIZE * max_dist)
-		{
-			x = p [2] [0] - p [1] [0]; y = p [2] [1] - p [1] [1];
-			t = x * x + y * y;
-			*start_ind = (t > DEGENERATED_SIZE * max_dist)? 0 : 2;
-		}
-		else * start_ind = 1;
-	}
-	else if (n_c == 4)
-	{ /* a degenerated quadrilateral? */
-        if (dist_0 > DEGENERATED_SIZE * max_dist)
-            *start_ind = i = 0;
-        else
-        {
-            *start_ind = i = 1;
-			x = p [2] [0] - p [1] [0]; y = p [2] [1] - p [1] [1];
-			t = x * x + y * y;
-            if (t <= DEGENERATED_SIZE * max_dist) return 0; /* illegal set of points */
-        }
-        
-		x = p [i+2] [0] - p [i+1] [0]; y = p [i+2] [1] - p [i+1] [1];
-		t = x * x + y * y;
-        if (t > DEGENERATED_SIZE * max_dist) return 0; /* illegal set of points */
-        
-        if (i == 0)
-        {
-			x = p [3] [0] - p [0] [0]; y = p [3] [1] - p [0] [1];
-			t = x * x + y * y;
-            if (t > DEGENERATED_SIZE * max_dist) return 0; /* illegal set of points */
-        }
-	}
-	else return 0; /* to be on the safe side */
-	
-	return 1;
-}
-
-#endif
-
-int OrientateElem (NG_ELEMENT *Elem)
+static int OrientateElem (NG_ELEMENT *Elem)
 {
     int i;
     double p[4][2];
-#ifdef WITH_DEGENERATED_ELEM
-	int j, k;
-#endif
 
     for (i=0; i<Elem->n_c; i++)
         if (Elem->c_id[i]<Global_Mesh->nBndP)
@@ -249,21 +182,6 @@
             p[i][0]=Global_Mesh->InnPosition[Elem->c_id[i]-Global_Mesh->nBndP][0];
             p[i][1]=Global_Mesh->InnPosition[Elem->c_id[i]-Global_Mesh->nBndP][1];
         }
-	
-#ifdef WITH_DEGENERATED_ELEM
-	if (IsDegeneratedElem (Elem->n_c, p, &k))
-	{
-        while (k-- != 0)
-            for (i = 1; i < Elem->n_c; i++)
-            {
-				j = Elem->c_id[i-1];
-				Elem->c_id[i-1] = Elem->c_id[i];
-				Elem->c_id[i] = j;
-            }
-		return 0;
-	}
-#endif
-	
     for (i=1; i<Elem->n_c; i++)
     {
         p[i][0]-=p[0][0];
@@ -286,7 +204,7 @@
  */
 /****************************************************************************/
 
-int PutBndNode (BND_NODE *BndNode)
+int NS_DIM_PREFIX PutBndNode (BND_NODE *BndNode)
 {
 	int i,line_id;
 
@@ -339,7 +257,7 @@
 	return (0);
 }
 
-int PutInnerNode (INNER_NODE *InnNode)
+int NS_DIM_PREFIX PutInnerNode (INNER_NODE *InnNode)
 {
 	switch (mode)
 	{
@@ -358,7 +276,7 @@
 	return (0);
 }
 
-int PutElement (NG_ELEMENT *Elem)
+int NS_DIM_PREFIX PutElement (NG_ELEMENT *Elem)
 {
 	int i,j,side;
 
@@ -400,16 +318,16 @@
 	return (0);
 }
 
-void ngbreak (void)
+void NS_DIM_PREFIX ngbreak (void)
 {
 	ng_abort=1;
 }
 
-int NG_ReadMesh (char *name, HEAP *Heap, LGM_MESH_INFO *theMesh, INT MarkKey)
+int NS_DIM_PREFIX NG_ReadMesh (const char *name, HEAP *Heap, LGM_MESH_INFO *theMesh, INT MarkKey)
 {
 	int i,j,error;
 	char ngname[128];
-	char *tmp;
+	const char *tmp;
 
 	/* init */
 	ng_abort=0;
@@ -556,7 +474,7 @@
 
 #ifdef __USE_IN_UG__
 
-int NG_Init (int domainpathes_set)
+int NS_DIM_PREFIX NG_Init (int domainpathes_set)
 {
 	lgmdomainpathes_set = domainpathes_set;
 
diff -ru ug-orig/dom/lgm/ngin2d/ngin-lex.h ug-patched/dom/lgm/ngin2d/ngin-lex.h
--- ug-orig/dom/lgm/ngin2d/ngin-lex.h	2004-09-07 16:31:11.000000000 +0200
+++ ug-patched/dom/lgm/ngin2d/ngin-lex.h	2006-12-14 20:25:22.000000000 +0100
@@ -2,9 +2,9 @@
 #define UG_NGIN_LEX_H
 
 /* C++-compilers don't like this defined implicitly */
-int nglex();
+int ng2dlex();
 
 /* error function used in YACC-parser as well */
-int NP_Error (int *line, char *text);
+int NP2d_Error (int *line, char *text);
 
 #endif
diff -ru ug-orig/dom/lgm/ngin2d/ngin-lex.l ug-patched/dom/lgm/ngin2d/ngin-lex.l
--- ug-orig/dom/lgm/ngin2d/ngin-lex.l	2006-06-02 17:38:11.000000000 +0200
+++ ug-patched/dom/lgm/ngin2d/ngin-lex.l	2006-12-14 20:25:22.000000000 +0100
@@ -28,10 +28,10 @@
 static int noline=1;
 
 /* data for CVS */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dom/lgm/ngin2d/ngin-lex.l,v 1.4 2006/06/02 15:38:11 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /* forward declare stuff from ngin-yacc.y */
-int ngerror (char *s); 
+int ng2derror (char *s); 
 
 %}
 
@@ -51,19 +51,19 @@
 [ \t]+              ;
 [\n]                {noline++;}
 {COMMENT}           ;
-{KEY_INT}			{nglval.ival=atol((const char *)yytext); return (INT_VALUE);}
-{KEY_DOUBLE}		{nglval.dval=strtod((const char *)yytext,NULL); return (DOUBLE_VALUE);}
+{KEY_INT}			{ng2dlval.ival=atol((const char *)yytext); return (INT_VALUE);}
+{KEY_DOUBLE}		{ng2dlval.dval=strtod((const char *)yytext,NULL); return (DOUBLE_VALUE);}
 {KEY_INODE}			{return (INODE);}
 {KEY_BNODE}			{return (BNODE);}
 {KEY_LINE}			{return (LINE);}
 {KEY_ELEM}			{return (ELEM);}
 {KEY_SIDE}			{return (SIDE);}
 {KEY_TEND}			{return (TEND);}
-.                   {ngerror(NULL);}
+.                   {ng2derror(NULL);}
 
 %%
 
-int NP_Error (int *line, char *text)
+int NP2d_Error (int *line, char *text)
 {
 	*line=noline;
 	strcpy(text,yytext);
diff -ru ug-orig/dom/lgm/ngin2d/ngin-yacc.y ug-patched/dom/lgm/ngin2d/ngin-yacc.y
--- ug-orig/dom/lgm/ngin2d/ngin-yacc.y	2006-11-21 18:05:00.000000000 +0100
+++ ug-patched/dom/lgm/ngin2d/ngin-yacc.y	2009-04-29 14:00:07.000000000 +0200
@@ -48,8 +48,8 @@
 static NG_ELEMENT Elem;
 
  /* forward declare my own function (referenced by automatic parser) */ 
- int ngerror (char *s);
- int ngwrap();
+ int ng2derror (char *s);
+
 
 %}
 
@@ -157,7 +157,7 @@
 														BndNode.n_lp=0;
 														BndNode.global[0]=$2;
 														BndNode.global[1]=$3;
-														$$=&BndNode;
+														$<bs>$=&BndNode;
 													}
 	BndSpec 										{PutBndNode(&BndNode);}
 	TEND			
@@ -192,18 +192,20 @@
 
 %%
 
-
-int ngwrap ()
+extern "C" 
+{
+int ng2dwrap (void )
 {
     return (1);
 }
+}
 
-int ngerror (char *s)
+int ng2derror (char *s)
 {
 	int line;
 	char text[128];
 
-	NP_Error(&line,text);
+	NP2d_Error(&line,text);
     NG_Print(ERROR_PREFIX "'%s', line %d\n",text,line);
     ngbreak();
 	return 0;
diff -ru ug-orig/dom/Makefile.am ug-patched/dom/Makefile.am
--- ug-orig/dom/Makefile.am	2004-10-06 14:18:01.000000000 +0200
+++ ug-patched/dom/Makefile.am	2004-10-06 14:18:01.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.2 2004/10/06 12:18:01 thimo Exp $
+# $Id: Makefile.am 7837 2004-10-06 12:18:01Z thimo $
 
 # compile the different domain-modules
 SUBDIRS = std lgm 
Nur in ug-orig/dom/std: CVS.
Nur in ug-orig/dom/std: .cvsignore.
diff -ru ug-orig/dom/std/domains2d.c ug-patched/dom/std/domains2d.c
--- ug-orig/dom/std/domains2d.c	2006-06-02 18:11:18.000000000 +0200
+++ ug-patched/dom/std/domains2d.c	2006-06-02 18:15:34.000000000 +0200
@@ -625,7 +625,7 @@
 
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dom/std/domains2d.c,v 1.57 2006/06/02 16:11:18 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /****************************************************************************/
diff -ru ug-orig/dom/std/domains3d.c ug-patched/dom/std/domains3d.c
--- ug-orig/dom/std/domains3d.c	2004-09-09 16:38:06.000000000 +0200
+++ ug-patched/dom/std/domains3d.c	2008-12-19 11:15:14.000000000 +0100
@@ -25,6 +25,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <math.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -106,7 +107,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dom/std/domains3d.c,v 1.21 2004/09/09 14:38:06 thimo Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /****************************************************************************/
diff -ru ug-orig/dom/std/Makefile.am ug-patched/dom/std/Makefile.am
--- ug-orig/dom/std/Makefile.am	2004-11-02 17:28:03.000000000 +0100
+++ ug-patched/dom/std/Makefile.am	2009-04-29 14:30:36.000000000 +0200
@@ -1,8 +1,10 @@
-# $Id: Makefile.am,v 1.4 2004/11/02 16:28:03 thimo Exp $
+# $Id: Makefile.am 8348 2009-04-29 12:30:36Z sander $
 
 SOURCES = std_domain.c std_parallel.c std_domain.h std_internal.h 
 
 EXTRALIBS = ../../low/liblow.la ../../dev/libdevices.la
+EXTRALIBS2D = ../../low/liblow2.la
+EXTRALIBS3D = ../../low/liblow3.la
 if BUILD2D
   LIB_2D = libdomS2.la
 if PARALLEL
@@ -21,14 +23,14 @@
   LIB_3D =
 endif
 
-lib_LTLIBRARIES = $(LIB_2D) $(LIB_3D)
+noinst_LTLIBRARIES = $(LIB_2D) $(LIB_3D)
 
 include_HEADERS = std_domain.h
 
 libdomS2_la_SOURCES = $(SOURCES) domains2d.c
 libdomS2_la_CPPFLAGS = $(UG_2DFLAGS)
-libdomS2_la_LIBADD = $(PLIBS2) $(EXTRALIBS) 
+libdomS2_la_LIBADD = $(PLIBS2) $(EXTRALIBS) $(EXTRALIBS2D)
 
-libdomS3_la_SOURCES = $(SOURCES) repair.c domains3d.c
+libdomS3_la_SOURCES = $(SOURCES) domains3d.c
 libdomS3_la_CPPFLAGS = $(UG_3DFLAGS)
-libdomS3_la_LIBADD = $(PLIBS3) $(EXTRALIBS) 
+libdomS3_la_LIBADD = $(PLIBS3) $(EXTRALIBS) $(EXTRALIBS3D)
diff -ru ug-orig/dom/std/Makefile.std ug-patched/dom/std/Makefile.std
--- ug-orig/dom/std/Makefile.std	1998-06-28 22:52:04.000000000 +0200
+++ ug-patched/dom/std/Makefile.std	2007-04-24 16:02:10.000000000 +0200
@@ -10,7 +10,7 @@
 # include configuration and all makefile macro definitions
 include ../../ug.conf
 
-OBJECTS = std_domain.o domains$(DIM)d.o std_parallel.o repair.o
+OBJECTS = std_domain.o domains$(DIM)d.o std_parallel.o
 
 # local C compiler flags
 LCFLAGS = -I../../include
Nur in ug-orig/dom/std: repair.c.
diff -ru ug-orig/dom/std/std_domain.c ug-patched/dom/std/std_domain.c
--- ug-orig/dom/std/std_domain.c	2006-06-02 18:11:18.000000000 +0200
+++ ug-patched/dom/std/std_domain.c	2009-11-30 17:42:02.000000000 +0100
@@ -141,7 +141,7 @@
 /* RCS string */
 static char
 RCS_ID
-("$Header: /home/cvsroot/UG/ug/dom/std/std_domain.c,v 1.114 2006/06/02 16:11:18 sander Exp $",
+("$Header$",
 UG_RCS_STRING);
 
 /****************************************************************************/
@@ -150,1478 +150,8 @@
 /*                                                                          */
 /****************************************************************************/
 
-static INT BndPointGlobal (BNDP * aBndP, DOUBLE * global);
-static INT PatchGlobal (PATCH * p, DOUBLE * lambda, DOUBLE * global);
-
-/* Marc specials */
-
-#define MAX_LEN		200
-#ifdef __THREEDIM__
-#define PRISM_MOD
-#endif
-
-static char theLine[MAX_LEN + 1];
-static INT nCorners, nBndP, nElem, nPPatch, nLPatch, nTPatch, nPri, nFound;
-static INT Marc_Extended;
-
-static int
-ExpandLine (char *theLine)
-{
-  unsigned int i, j, k, l;
-
-  if (Marc_Extended)
-    {
-      i = 76;
-      j = 69;
-      for (l = 0; l < 3; l++)
-	{
-	  theLine[i] = ' ';
-	  i--;
-	  theLine[i] = theLine[j];
-	  i--;
-	  j--;
-	  theLine[i] = theLine[j];
-	  i--;
-	  j--;
-	  theLine[i] = 'e';
-	  i--;
-	  for (k = 0; k < 18; k++)
-	    {
-	      theLine[i] = theLine[j];
-	      i--;
-	      j--;
-	    }
-	}
-      theLine[i] = ' ';
-      /*printf("%s",theLine); */
-    }
-  else
-    {
-      i = 41;
-      j = 34;
-      for (l = 0; l < 3; l++)
-	{
-	  theLine[i] = ' ';
-	  i--;
-	  theLine[i] = theLine[j];
-	  i--;
-	  j--;
-	  theLine[i] = theLine[j];
-	  i--;
-	  j--;
-	  theLine[i] = 'e';
-	  i--;
-	  for (k = 0; k < 8; k++)
-	    {
-	      theLine[i] = theLine[j];
-	      i--;
-	      j--;
-	    }
-	}
-      theLine[i] = ' ';
-    }
-
-  for (i = 5; i < strlen (theLine); i++)
-    if (theLine[i] == '-')
-      if (theLine[i + 1] == 'e')
-	{
-	  theLine[i] = 'e';
-	  theLine[i + 1] = '-';
-	}
-
-  return (0);
-}
-
-static INT
-file_readline (FILE * f, char *key)
-{
-  INT len = strlen (key);
-
-  do
-    {
-      fgets (theLine, MAX_LEN, f);
-      if (strncmp (theLine, key, len) == 0)
-	return (0);
-    }
-  while (!feof (f));
-
-  return (1);
-}
-
-static INT
-file_elements (FILE * f)
-{
-  int id, n, c[8];
-
-  nElem = 0;
-  nPri = 0;
-  do
-    {
-      fgets (theLine, MAX_LEN, f);
-      /*printf("%s",theLine); */
-
-      if (strlen (theLine) < 3)
-	continue;
-
-      if (Marc_Extended == 0)
-	{
-	  theLine[66] = 0;
-	  theLine[65] = ' ';
-	  theLine[64] = theLine[54];
-	  theLine[63] = theLine[53];
-	  theLine[62] = theLine[52];
-	  theLine[61] = theLine[51];
-	  theLine[60] = theLine[50];
-	  theLine[59] = ' ';
-	  theLine[58] = theLine[49];
-	  theLine[57] = theLine[48];
-	  theLine[56] = theLine[47];
-	  theLine[55] = theLine[46];
-	  theLine[54] = theLine[45];
-	  theLine[53] = ' ';
-	  theLine[52] = theLine[44];
-	  theLine[51] = theLine[43];
-	  theLine[50] = theLine[42];
-	  theLine[49] = theLine[41];
-	  theLine[48] = theLine[40];
-	  theLine[47] = ' ';
-	  theLine[46] = theLine[39];
-	  theLine[45] = theLine[38];
-	  theLine[44] = theLine[37];
-	  theLine[43] = theLine[36];
-	  theLine[42] = theLine[35];
-	  theLine[41] = ' ';
-	  theLine[40] = theLine[34];
-	  theLine[39] = theLine[33];
-	  theLine[38] = theLine[32];
-	  theLine[37] = theLine[31];
-	  theLine[36] = theLine[30];
-	  theLine[35] = ' ';
-	  theLine[34] = theLine[29];
-	  theLine[33] = theLine[28];
-	  theLine[32] = theLine[27];
-	  theLine[31] = theLine[26];
-	  theLine[30] = theLine[25];
-	  theLine[29] = ' ';
-	  theLine[28] = theLine[24];
-	  theLine[27] = theLine[23];
-	  theLine[26] = theLine[22];
-	  theLine[25] = theLine[21];
-	  theLine[24] = theLine[20];
-	  theLine[23] = ' ';
-	  theLine[22] = theLine[19];
-	  theLine[21] = theLine[18];
-	  theLine[20] = theLine[17];
-	  theLine[19] = theLine[16];
-	  theLine[18] = theLine[15];
-	  theLine[17] = ' ';
-	  theLine[16] = theLine[14];
-	  theLine[15] = theLine[13];
-	  theLine[14] = theLine[12];
-	  theLine[13] = theLine[11];
-	  theLine[12] = theLine[10];
-	  theLine[11] = ' ';
-	  theLine[10] = theLine[9];
-	  theLine[9] = theLine[8];
-	  theLine[8] = theLine[7];
-	  theLine[7] = theLine[6];
-	  theLine[6] = theLine[5];
-	  theLine[5] = ' ';
-	  theLine[4] = theLine[4];
-	  theLine[3] = theLine[3];
-	  theLine[2] = theLine[2];
-	  theLine[1] = theLine[1];
-	  theLine[0] = theLine[0];
-	}
-
-      if (sscanf (theLine, "%d %d", &id, &n) != 2)
-	return (0);
-
-      if (sscanf (theLine, "%d %d %d %d %d %d %d %d %d %d",
-		  &id, &n, c, c + 1, c + 2, c + 3, c + 4, c + 5, c + 6,
-		  c + 7) != 3 + n)
-	return (0);
-
-
-      if (c[0] == c[1])
-	if (c[4] == c[5])
-	  nPri++;
-
-      nElem++;
-
-      /* printf("file_elem %d %d %d %d %d\n",id,n,c[0],c[1],c[2]);  */
-
-    }
-  while (!feof (f));
-
-  return (1);
-}
-
-static INT
-file_corners (FILE * f)
-{
-  int N, n, id, i;
-  double c[3];
-
-  fgets (theLine, MAX_LEN, f);
-
-  /* printf("%s",theLine);  */
-
-  if (Marc_Extended == 0)
-    {
-      theLine[12] = 0;
-      theLine[11] = ' ';
-      theLine[10] = theLine[9];
-      theLine[9] = theLine[8];
-      theLine[8] = theLine[7];
-      theLine[7] = theLine[6];
-      theLine[6] = theLine[5];
-      theLine[5] = ' ';
-      theLine[4] = theLine[4];
-      theLine[3] = theLine[3];
-      theLine[2] = theLine[2];
-      theLine[1] = theLine[1];
-      theLine[0] = theLine[0];
-    }
-
-  if (sscanf (theLine, "%d %d", &N, &n) != 2)
-    return (1);
-
-  nCorners = 0;
-  for (i = 0; i < n; i++)
-    {
-      fgets (theLine, MAX_LEN, f);
-
-      /* printf(" %d %s",i,theLine);  */
-
-      ExpandLine (theLine);
-
-      if (sscanf (theLine, "%d %lg %lg %lg", &id, c, c + 1, c + 2) != 1 + N)
-	return (0);
-      nCorners++;
-
-      /* printf("%d %f %f %f\n",id,c[0],c[1],c[2]); */
-    }
-
-  return (0);
-}
-
-static INT
-file_contact (FILE * f)
-{
-  int id, c;
-
-  /* fgets(theLine, MAX_LEN, f); */
-
-  nBndP = 0;
-  do
-    {
-      fgets (theLine, MAX_LEN, f);
-      if (sscanf (theLine, "%d %d", &id, &c) != 2)
-	return (0);
-      nBndP++;
-
-      /* printf("%d %d \n",id,c);  */
-
-    }
-  while (!feof (f));
-
-  UserWrite ("BVP: no contact\n");
-
-  return (0);
-}
-
-static INT
-file_triangles (FILE * f)
-{
-  int id, n, c[3];
-
-  nTPatch = 0;
-  do
-    {
-      fgets (theLine, MAX_LEN, f);
-      if (strlen (theLine) < 3)
-	continue;
-      if (sscanf (theLine, "%5d%5d%5d%5d%5d",
-		  &id, &n, c, c + 1, c + 2) != 2 + DIM)
-	return (0);
-      nTPatch++;
-
-      /*printf("%d %d %d %d %d\n",id,n,c[0],c[1],c[2]); */
-
-    }
-  while (!feof (f));
-
-  return (1);
-}
-
-static INT
-file_positions (FILE * f)
-{
-  int id;
-  double c[3];
-
-  fgets (theLine, MAX_LEN, f);
-
-  nPPatch = 0;
-  do
-    {
-      fgets (theLine, MAX_LEN, f);
-
-      ExpandLine (theLine);
-
-      if (sscanf (theLine, "%d %lg %lg %lg", &id, c, c + 1, c + 2) != 1 + DIM)
-	return (0);
-
-      nPPatch++;
-    }
-  while (!feof (f));
-
-  return (1);
-}
-
-static INT
-Marc_GetPosition (MESH * Mesh, INT i, DOUBLE * x)
-{
-  INT k;
-
-  if (i < nBndP)
-    {
-      M_BNDP *p = (M_BNDP *) Mesh->theBndPs[i];
-
-      for (k = 0; k < DIM; k++)
-	x[k] = p->pos[k];
-    }
-  else
-    for (k = 0; k < DIM; k++)
-      x[k] = Mesh->Position[i - nBndP][k];
-  /*printf("i %6d nBndP %d x %6.3f %6.3f %6.3f\n",i,nBndP,x[0],x[1],x[2]); */
-
-  return (0);
-}
-
-static INT
-file_elements_fill (FILE * f, HEAP * Heap, MESH * Mesh, INT MarkKey)
-{
-  int id, n, i, c[8], c0, c1, c2, c3, c4, c5, c6, c7;
-
-  nElem = 0;
-  nPri = 0;
-  nFound = 0;
-  do
-    {
-      fgets (theLine, MAX_LEN, f);
-      if (strlen (theLine) < 3)
-	continue;
-
-      if (Marc_Extended == 0)
-	{
-	  theLine[66] = 0;
-	  theLine[65] = ' ';
-	  theLine[64] = theLine[54];
-	  theLine[63] = theLine[53];
-	  theLine[62] = theLine[52];
-	  theLine[61] = theLine[51];
-	  theLine[60] = theLine[50];
-	  theLine[59] = ' ';
-	  theLine[58] = theLine[49];
-	  theLine[57] = theLine[48];
-	  theLine[56] = theLine[47];
-	  theLine[55] = theLine[46];
-	  theLine[54] = theLine[45];
-	  theLine[53] = ' ';
-	  theLine[52] = theLine[44];
-	  theLine[51] = theLine[43];
-	  theLine[50] = theLine[42];
-	  theLine[49] = theLine[41];
-	  theLine[48] = theLine[40];
-	  theLine[47] = ' ';
-	  theLine[46] = theLine[39];
-	  theLine[45] = theLine[38];
-	  theLine[44] = theLine[37];
-	  theLine[43] = theLine[36];
-	  theLine[42] = theLine[35];
-	  theLine[41] = ' ';
-	  theLine[40] = theLine[34];
-	  theLine[39] = theLine[33];
-	  theLine[38] = theLine[32];
-	  theLine[37] = theLine[31];
-	  theLine[36] = theLine[30];
-	  theLine[35] = ' ';
-	  theLine[34] = theLine[29];
-	  theLine[33] = theLine[28];
-	  theLine[32] = theLine[27];
-	  theLine[31] = theLine[26];
-	  theLine[30] = theLine[25];
-	  theLine[29] = ' ';
-	  theLine[28] = theLine[24];
-	  theLine[27] = theLine[23];
-	  theLine[26] = theLine[22];
-	  theLine[25] = theLine[21];
-	  theLine[24] = theLine[20];
-	  theLine[23] = ' ';
-	  theLine[22] = theLine[19];
-	  theLine[21] = theLine[18];
-	  theLine[20] = theLine[17];
-	  theLine[19] = theLine[16];
-	  theLine[18] = theLine[15];
-	  theLine[17] = ' ';
-	  theLine[16] = theLine[14];
-	  theLine[15] = theLine[13];
-	  theLine[14] = theLine[12];
-	  theLine[13] = theLine[11];
-	  theLine[12] = theLine[10];
-	  theLine[11] = ' ';
-	  theLine[10] = theLine[9];
-	  theLine[9] = theLine[8];
-	  theLine[8] = theLine[7];
-	  theLine[7] = theLine[6];
-	  theLine[6] = theLine[5];
-	  theLine[5] = ' ';
-	  theLine[4] = theLine[4];
-	  theLine[3] = theLine[3];
-	  theLine[2] = theLine[2];
-	  theLine[1] = theLine[1];
-	  theLine[0] = theLine[0];
-	}
-
-      if (sscanf (theLine, "%d %d", &id, &n) != 2)
-	return (0);
-
-      if (sscanf (theLine, "%d %d %d %d %d %d %d %d %d %d",
-		  &id, &n, &c0, &c1, &c2, &c3, &c4, &c5, &c6, &c7) != 3 + n)
-	return (0);
-
-      c[0] = c0;
-      c[1] = c1;
-      c[2] = c2;
-      c[3] = c3;
-      c[4] = c4;
-      c[5] = c5;
-      c[6] = c6;
-      c[7] = c7;
-
-      if (Mesh != NULL)
-	if (c[0] == c[1])
-	  {
-	    if (c[4] != c[5])
-	      return (1);
-	    Mesh->Element_corners[1][nElem] = 6;
-	    Mesh->Element_corner_ids[1][nElem][0] = c[0] - 1;
-	    Mesh->Element_corner_ids[1][nElem][1] = c[2] - 1;
-	    Mesh->Element_corner_ids[1][nElem][2] = c[3] - 1;
-	    Mesh->Element_corner_ids[1][nElem][3] = c[4] - 1;
-	    Mesh->Element_corner_ids[1][nElem][4] = c[6] - 1;
-	    Mesh->Element_corner_ids[1][nElem][5] = c[7] - 1;
-
-	    nPri++;
-
-#ifdef PRISM_MOD
-
-	    if ((nPri % 2) == 0)
-	      {
-		INT l, d[6];
-		DOUBLE_VECTOR pos;
-
-		for (l = 0; l < 6; l++)
-		  d[l] = Mesh->Element_corner_ids[1][nElem - 1][l];
-		c[0] = c[0] - 1;
-		c[1] = c[2] - 1;
-		c[2] = c[3] - 1;
-		c[3] = c[4] - 1;
-		c[4] = c[6] - 1;
-		c[5] = c[7] - 1;
-
-		Marc_GetPosition (Mesh, d[0], pos);
-		for (l = 0; l < DIM; l++)
-		  Mesh->Position[nCorners - nBndP][l] = 0.25 * pos[l];
-		Marc_GetPosition (Mesh, d[1], pos);
-		for (l = 0; l < DIM; l++)
-		  Mesh->Position[nCorners - nBndP][l] += 0.25 * pos[l];
-		Marc_GetPosition (Mesh, d[3], pos);
-		for (l = 0; l < DIM; l++)
-		  Mesh->Position[nCorners - nBndP][l] += 0.25 * pos[l];
-		Marc_GetPosition (Mesh, d[4], pos);
-		for (l = 0; l < DIM; l++)
-		  Mesh->Position[nCorners - nBndP][l] += 0.25 * pos[l];
-
-
-		IFDEBUG (dom, 2)
-		  assert (Mesh->Element_corners[1][nElem - 1] == 6);
-
-		for (l = 0; l < nElem; l++)
-		  if (Mesh->Element_corners[1][l] == 8)
-		    if (CheckPrisms (Mesh->Element_corner_ids[1][l],
-				     Mesh->Element_corner_ids[1][nElem -
-								 1][2],
-				     Mesh->Element_corner_ids[1][nElem -
-								 1][1],
-				     Mesh->Element_corner_ids[1][nElem][1],
-				     Mesh->Element_corner_ids[1][nElem -
-								 1][0]))
-		      nFound++;
-		assert (Mesh->Element_corner_ids[1][nElem - 1][0]
-			== Mesh->Element_corner_ids[1][nElem][0]);
-		assert (Mesh->Element_corner_ids[1][nElem - 1][3]
-			== Mesh->Element_corner_ids[1][nElem][3]);
-		assert (Mesh->Element_corner_ids[1][nElem - 1][1]
-			== Mesh->Element_corner_ids[1][nElem][2]);
-		assert (Mesh->Element_corner_ids[1][nElem - 1][4]
-			== Mesh->Element_corner_ids[1][nElem][5]);
-		ENDDEBUG nElem--;
-
-		Mesh->Element_corners[1][nElem] = 5;
-		Mesh->Element_corner_ids[1][nElem][0] = c[0];
-		Mesh->Element_corner_ids[1][nElem][1] = c[1];
-		Mesh->Element_corner_ids[1][nElem][2] = c[2];
-		Mesh->Element_corner_ids[1][nElem][3] = d[2];
-		Mesh->Element_corner_ids[1][nElem][4] = nCorners;
-		nElem++;
-		Mesh->Element_corners[1][nElem] = 5;
-		Mesh->Element_corner_ids[1][nElem][0] = d[0];
-		Mesh->Element_corner_ids[1][nElem][1] = d[2];
-		Mesh->Element_corner_ids[1][nElem][2] = d[5];
-		Mesh->Element_corner_ids[1][nElem][3] = d[3];
-		Mesh->Element_corner_ids[1][nElem][4] = nCorners;
-		nElem++;
-		Mesh->Element_corners[1][nElem] = 5;
-		Mesh->Element_corner_ids[1][nElem][0] = d[5];
-		Mesh->Element_corner_ids[1][nElem][1] = d[2];
-		Mesh->Element_corner_ids[1][nElem][2] = d[1];
-		Mesh->Element_corner_ids[1][nElem][3] = d[4];
-		Mesh->Element_corner_ids[1][nElem][4] = nCorners;
-		nElem++;
-		Mesh->Element_corners[1][nElem] = 5;
-		Mesh->Element_corner_ids[1][nElem][0] = c[0];
-		Mesh->Element_corner_ids[1][nElem][1] = c[3];
-		Mesh->Element_corner_ids[1][nElem][2] = c[4];
-		Mesh->Element_corner_ids[1][nElem][3] = c[1];
-		Mesh->Element_corner_ids[1][nElem][4] = nCorners;
-		nElem++;
-		Mesh->Element_corners[1][nElem] = 5;
-		Mesh->Element_corner_ids[1][nElem][0] = c[1];
-		Mesh->Element_corner_ids[1][nElem][1] = c[4];
-		Mesh->Element_corner_ids[1][nElem][2] = c[5];
-		Mesh->Element_corner_ids[1][nElem][3] = c[2];
-		Mesh->Element_corner_ids[1][nElem][4] = nCorners;
-		nElem++;
-		Mesh->Element_corners[1][nElem] = 4;
-		Mesh->Element_corner_ids[1][nElem][0] = d[3];
-		Mesh->Element_corner_ids[1][nElem][1] = d[5];
-		Mesh->Element_corner_ids[1][nElem][2] = d[4];
-		Mesh->Element_corner_ids[1][nElem][3] = nCorners;
-		nElem++;
-		Mesh->Element_corners[1][nElem] = 4;
-		Mesh->Element_corner_ids[1][nElem][0] = c[3];
-		Mesh->Element_corner_ids[1][nElem][1] = c[5];
-		Mesh->Element_corner_ids[1][nElem][2] = c[4];
-		Mesh->Element_corner_ids[1][nElem][3] = nCorners;
-
-		nCorners++;
-
-
-	      }
-#endif
-	  }
-	else
-	  {
-	    Mesh->Element_corners[1][nElem] = n + 1;
-	    for (i = 0; i <= n; i++)
-	      Mesh->Element_corner_ids[1][nElem][i] = c[i] - 1;
-	  }
-      nElem++;
-
-/*		printf("%d %d %d %d %d\n",id,n,c[0],c[1],c[2]); */
-
-    }
-  while (!feof (f));
-
-  return (1);
-}
-
-static INT
-file_corners_fill (FILE * f, HEAP * Heap, MESH * Mesh, INT MarkKey,
-		   DOUBLE * radius, DOUBLE * midpoint)
-{
-  int N, n, id, i, j;
-  double c[3], s;
-
-  fgets (theLine, MAX_LEN, f);
-  /* printf("%s",theLine); */
-
-  if (Marc_Extended == 0)
-    {
-      theLine[12] = 0;
-      theLine[11] = ' ';
-      theLine[10] = theLine[9];
-      theLine[9] = theLine[8];
-      theLine[8] = theLine[7];
-      theLine[7] = theLine[6];
-      theLine[6] = theLine[5];
-      theLine[5] = ' ';
-      theLine[4] = theLine[4];
-      theLine[3] = theLine[3];
-      theLine[2] = theLine[2];
-      theLine[1] = theLine[1];
-      theLine[0] = theLine[0];
-    }
-
-  if (sscanf (theLine, "%d %d", &N, &n) != 2)
-    return (1);
-
-  nCorners = n;
-
-  for (j = 0; j < 3; j++)
-    midpoint[j] = 0.0;
-
-  for (i = 0; i < n; i++)
-    {
-      fgets (theLine, MAX_LEN, f);
-
-      /* printf("in\n%s\n",theLine); */
-
-      ExpandLine (theLine);
-
-      if (sscanf (theLine, "%d %lg %lg %lg", &id, c, c + 1, c + 2) != 1 + N)
-	return (0);
-
-      if (i < nBndP)
-	for (j = 0; j < DIM; j++)
-	  midpoint[j] += c[j];
-
-      if (Mesh != NULL)
-	{
-	  if (i < nBndP)
-	    {
-	      M_BNDP *p = (M_BNDP *) Mesh->theBndPs[i];
-
-	      /* TODO remove  */
-	      M0_PATCH *patch = (M0_PATCH *) currBVP->patches[i];
-
-	      patch->type = MARC_0_PATCH_TYPE;
-	      patch->id = i;
-	      for (j = 0; j < DIM; j++)
-		patch->pos[j] = c[j];
-	      /*   */
-
-	      p->patch_id = i;
-	      for (j = 0; j < DIM; j++)
-		p->pos[j] = c[j];
-	    }
-	  else
-	    for (j = 0; j < 3; j++)
-	      Mesh->Position[i - nBndP][j] = c[j];
-	}
-      /* printf("%d %f %f %f\n",id,c[0],c[1],c[2]);  */
-    }
-  s = 1.0 / nBndP;
-  for (j = 0; j < DIM; j++)
-    midpoint[j] *= s;
-  if (Mesh != NULL)
-    {
-      *radius = 0.0;
-      for (i = 0; i < nBndP; i++)
-	{
-	  M_BNDP *p = (M_BNDP *) Mesh->theBndPs[i];
-
-	  for (j = 0; j < DIM; j++)
-	    *radius = MAX (*radius, fabs (midpoint[j] - p->pos[j]));
-	}
-    }
-  else
-    {
-      *radius = 0.0;
-      for (j = 0; j < DIM; j++)
-	*radius += ABS (midpoint[j]);
-    }
-
-  return (0);
-}
-
-static INT
-file_contact_fill (FILE * f, HEAP * Heap, MESH * Mesh, INT MarkKey)
-{
-  int id, c;
-
-  /* TODO: adapt for surface mesh */
-  return (0);
-
-/*	fgets(theLine, MAX_LEN, f); */
-
-  if (Mesh == NULL)
-    return (0);
-
-  nBndP = 0;
-  do
-    {
-      M_BNDP *p = (M_BNDP *) Mesh->theBndPs[nBndP];
-
-      fgets (theLine, MAX_LEN, f);
-      if (sscanf (theLine, "%d %d", &id, &c) != 2)
-	return (0);
-      nBndP++;
-
-      p->patch_id = nPPatch + c - 1;
-
-      /* printf("%d %d \n",id,c);  */
-
-    }
-  while (!feof (f));
-
-  UserWrite ("BVP: no contact\n");
-
-  return (0);
-}
-
-static INT
-file_triangles_fill (FILE * f, HEAP * Heap, MESH * Mesh, INT MarkKey)
-{
-  int id, n, i, c[3];
-
-  nTPatch = 0;
-  do
-    {
-      M2_PATCH *p = (M2_PATCH *) currBVP->patches[nPPatch + nTPatch];
-
-      fgets (theLine, MAX_LEN, f);
-      if (strlen (theLine) < 3)
-	continue;
-      if (sscanf (theLine, "%5d%5d%5d%5d%5d",
-		  &id, &n, c, c + 1, c + 2) != 2 + DIM)
-	return (0);
-
-      p->type = MARC_2_PATCH_TYPE;
-      p->c = n;
-      p->id = nTPatch + nPPatch;
-      for (i = 0; i < 3; i++)
-	p->p[i] = c[i] - 1;
-
-      nTPatch++;
-
-      /* printf("%d id %d %d %d %d %d\n",id,p->id,n,c[0],c[1],c[2]); */
-
-    }
-  while (!feof (f));
-
-  return (1);
-}
-
-static INT
-file_positions_fill (FILE * f, HEAP * Heap, MESH * Mesh, INT MarkKey)
-{
-  int id, j;
-  double c[3];
-  M0_PATCH *p;
-
-  /** \todo adapt for surface mesh */
-  return (0);
-
-  fgets (theLine, MAX_LEN, f);
-  nPPatch = 0;
-  do
-    {
-      fgets (theLine, MAX_LEN, f);
-
-      ExpandLine (theLine);
-
-      if (sscanf (theLine, "%d %lg %lg %lg", &id, c, c + 1, c + 2) != 1 + DIM)
-	return (0);
-
-      p = (M0_PATCH *) currBVP->patches[nPPatch];
-      p->type = MARC_0_PATCH_TYPE;
-      p->id = nPPatch;
-      for (j = 0; j < 3; j++)
-	p->pos[j] = c[j];
-
-      nPPatch++;
-
-      /* printf("%d %f %f %f nP %d\n",id,c[0],c[1],c[2],nPPatch); */
-
-    }
-  while (!feof (f));
-
-  return (1);
-}
-
-static INT
-Marc_Configure (INT argc, char **argv)
-{
-  STD_BVP *theBVP;
-  char BVPName[NAMESIZE];
-  INT i;
-  char name[NAMESIZE];
-
-  /* get BVP name */
-  if ((sscanf
-       (argv[0], expandfmt (CONCAT3 (" configure %", NAMELENSTR, "[ -~]")),
-	BVPName) != 1) || (strlen (BVPName) == 0))
-    {
-      for (i = 0; i < argc; i++)
-	if (argv[i][0] == 'b')
-	  if ((sscanf
-	       (argv[i], expandfmt (CONCAT3 ("b %", NAMELENSTR, "[ -~]")),
-		BVPName) == 1) && (strlen (BVPName) > 0))
-	    break;
-      if (i >= argc)
-	RETURN (1);
-    }
-  theBVP = (STD_BVP *) BVP_GetByName (BVPName);
-  if (theBVP == NULL)
-    RETURN (1);
-
-  for (i = 1; i < argc; i++)
-    {
-      if (argv[i][0] == 'm')
-	{
-	  if (sscanf (argv[i], "mesh %s", name) != 1)
-	    continue;
-	  strcpy (theBVP->mesh_file, name);
-	}
-      if (argv[i][0] == 'b')
-	{
-	  if (sscanf (argv[i], "bnd %s", name) != 1)
-	    continue;
-	  strcpy (theBVP->bnd_file, name);
-	}
-    }
-
-  return (0);
-}
-
-static BVP *
-Init_MarcBVP (STD_BVP * theBVP, HEAP * Heap, MESH * Mesh, INT MarkKey)
-{
-  FILE *stream;
-  INT i;
-
-  currBVP = theBVP;
-#ifdef ModelP
-  SetBVPType (theBVP->type);
-#endif
-  STD_BVP_NDOMPART (theBVP) = 1;
-  STD_BVP_NSUBDOM (theBVP) = 1;
-  STD_BVP_S2P_PTR (theBVP) = (INT *)
-    GetFreelistMemory (Heap, (1 + STD_BVP_NSUBDOM (theBVP)) * sizeof (INT));
-  if (STD_BVP_S2P_PTR (theBVP) == NULL)
-    return (NULL);
-  STD_BVP_S2P_PTR (theBVP)[0] = 0;
-  STD_BVP_S2P_PTR (theBVP)[1] = 0;
-
-#ifdef ModelP
-  if (me == 0)
-    {
-#endif
-
-      nPPatch = nLPatch = nTPatch = 0;
-
-      /* read numbers of objects */
-      stream = fileopen (theBVP->mesh_file, "r");
-      if (stream == NULL)
-	{
-	  PrintErrorMessage ('F', "Init_MarcBVP", "could not open file");
-	  REP_ERR_RETURN_PTR (NULL);
-	}
-      if (file_readline (stream, "extended"))
-	{
-	  Marc_Extended = 0;
-	  fclose (stream);
-	  stream = fileopen (theBVP->mesh_file, "r");
-	}
-      else
-	{
-	  Marc_Extended = 1;
-	}
-      if (file_readline (stream, "connectivity"))
-	{
-	  PrintErrorMessage ('F', "Init_MarcBVP",
-			     "could not read connectivity");
-	  REP_ERR_RETURN_PTR (NULL);
-	}
-      if (file_elements (stream))
-	{
-	  PrintErrorMessage ('F', "Init_MarcBVP", "could not read element");
-	  REP_ERR_RETURN_PTR (NULL);
-	}
-      if (file_corners (stream))
-	{
-	  PrintErrorMessage ('F', "Init_MarcBVP", "could not read corners");
-	  REP_ERR_RETURN_PTR (NULL);
-	}
-      if (file_readline (stream, "surface"))
-	{
-	  PrintErrorMessage ('F', "Init_MarcBVP", "could not read surface");
-	  REP_ERR_RETURN_PTR (NULL);
-	}
-      if (file_contact (stream))
-	{
-	  PrintErrorMessage ('F', "Init_MarcBVP", "could not read contact");
-	  REP_ERR_RETURN_PTR (NULL);
-	}
-      fclose (stream);
-      stream = fileopen (theBVP->bnd_file, "r");
-      if (stream == NULL)
-	{
-	  PrintErrorMessage ('F', "Init_MarcBVP", "could not open file");
-	  REP_ERR_RETURN_PTR (NULL);
-	}
-      if (file_readline (stream, "connectivity"))
-	{
-	  PrintErrorMessage ('F', "Init_MarcBVP",
-			     "could not store connectivity");
-	  REP_ERR_RETURN_PTR (NULL);
-	}
-      if (file_triangles (stream))
-	{
-	  PrintErrorMessage ('F', "Init_MarcBVP", "could not store surface");
-	  REP_ERR_RETURN_PTR (NULL);
-	}
-      if (file_positions (stream))
-	{
-	  PrintErrorMessage ('F', "Init_MarcBVP",
-			     "could not store positions");
-	  REP_ERR_RETURN_PTR (NULL);
-	}
-      fclose (stream);
-
-      PRINTDEBUG (dom, 1,
-		  ("A: nCorners %d nBndP %d nElem %d nPPatch %d nTPatch %d nPri %d\n",
-		   nCorners, nBndP, nElem, nPPatch, nTPatch, nPri));
-
-#ifdef PRISM_MOD
-      nPri = nPri / 2;
-      nElem += 5 * nPri;
-      nCorners += nPri;
-#endif
-
-      nPPatch = MAX (nPPatch, nBndP);
-
-#ifdef ModelP
-    }
-  Broadcast (&nCorners, sizeof (INT));
-  Broadcast (&nBndP, sizeof (INT));
-  Broadcast (&nElem, sizeof (INT));
-  Broadcast (&nPPatch, sizeof (INT));
-  Broadcast (&nTPatch, sizeof (INT));
-#endif
-
-  /* fill mesh and patch infos */
-  if (Mesh != NULL)
-    {
-      Mesh->mesh_status = MESHSTAT_MESH;
-      Mesh->nBndP = nBndP;
-      Mesh->theBndPs =
-	(BNDP **) GetTmpMem (Heap, nBndP * sizeof (M_BNDP *), MarkKey);
-      if (Mesh->theBndPs == NULL)
-	REP_ERR_RETURN_PTR (NULL);
-      for (i = 0; i < nBndP; i++)
-	{
-	  Mesh->theBndPs[i] =
-	    (BNDP *) GetFreelistMemory (Heap, sizeof (M_BNDP));
-	  if (Mesh->theBndPs[i] == NULL)
-	    REP_ERR_RETURN_PTR (NULL);
-	}
-      Mesh->nInnP = nCorners - nBndP;
-      Mesh->Position = (DOUBLE **)
-	GetTmpMem (Heap, (nCorners - nBndP) * sizeof (DOUBLE *), MarkKey);
-      if (nCorners > nBndP)
-	if (Mesh->Position == NULL)
-	  REP_ERR_RETURN_PTR (NULL);
-      for (i = 0; i < nCorners - nBndP; i++)
-	{
-	  Mesh->Position[i] = (DOUBLE *)
-	    GetTmpMem (Heap, 3 * sizeof (DOUBLE), MarkKey);
-	  if (Mesh->Position[i] == NULL)
-	    REP_ERR_RETURN_PTR (NULL);
-	}
-      Mesh->nSubDomains = 1;
-      Mesh->nSides = NULL;
-      Mesh->Side_corners = NULL;
-      Mesh->xy_Side = NULL;
-      Mesh->Side_corner_ids = NULL;
-      Mesh->nElements = (INT *)
-	GetTmpMem (Heap, (Mesh->nSubDomains + 1) * sizeof (INT), MarkKey);
-      Mesh->nElements[0] = 0;
-      Mesh->nElements[1] = nElem;
-      Mesh->Element_corners = (INT **)
-	GetTmpMem (Heap, (Mesh->nSubDomains + 1) * sizeof (INT), MarkKey);
-      Mesh->Element_corners[0] = NULL;
-      Mesh->Element_corners[1] = (INT *)
-	GetTmpMem (Heap, nElem * sizeof (INT), MarkKey);
-      for (i = 0; i < nElem; i++)
-	Mesh->Element_corners[1][i] = 8;
-      Mesh->Element_corner_ids = (INT ***)
-	GetTmpMem (Heap, (Mesh->nSubDomains + 1) * sizeof (INT **), MarkKey);
-      Mesh->Element_corner_ids[0] = NULL;
-      Mesh->Element_corner_ids[1] = (INT **)
-	GetTmpMem (Heap, nElem * sizeof (INT *), MarkKey);
-      for (i = 0; i < nElem; i++)
-	{
-	  Mesh->Element_corner_ids[1][i] = (INT *)
-	    GetTmpMem (Heap, Mesh->Element_corners[1][i] * sizeof (INT),
-		       MarkKey);
-	}
-      Mesh->nbElements = NULL;
-      Mesh->ElemSideOnBnd = NULL;
-
-      /* parallel part */
-      Mesh->VertexLevel = NULL;
-      Mesh->VertexPrio = NULL;
-      Mesh->ElementLevel = NULL;
-      Mesh->ElementPrio = NULL;
-    }
-  theBVP->patches = (PATCH **)
-    GetFreelistMemory (Heap, (nPPatch + nTPatch) * sizeof (PATCH *));
-  for (i = 0; i < nPPatch; i++)
-    {
-      M0_PATCH *patch =
-	(M0_PATCH *) GetFreelistMemory (Heap, sizeof (M0_PATCH));
-
-      patch->type = MARC_0_PATCH_TYPE;
-      patch->id = i;
-      theBVP->patches[i] = (PATCH *) patch;
-    }
-  for (i = nPPatch; i < nPPatch + nLPatch; i++)
-    theBVP->patches[i] = (PATCH *)
-      GetFreelistMemory (Heap, sizeof (M1_PATCH));
-  for (i = nPPatch + nLPatch; i < nPPatch + nLPatch + nTPatch; i++)
-    theBVP->patches[i] = (PATCH *)
-      GetFreelistMemory (Heap, sizeof (M2_PATCH));
-  currBVP->sideoffset = nPPatch + nLPatch;
-
-  PRINTDEBUG (dom, 1,
-	      ("B: nCorners %d nBndP %d nElem %d nPPatch %d nTPatch %d\n",
-	       nCorners, nBndP, nElem, nPPatch, nTPatch));
-
-#ifdef ModelP
-  if (me == 0)
-    {
-#endif
-
-      stream = fileopen (theBVP->bnd_file, "r");
-      if (stream == NULL)
-	REP_ERR_RETURN_PTR (NULL);
-
-      if (file_readline (stream, "connectivity"))
-	REP_ERR_RETURN_PTR (NULL);
-
-      if (file_triangles_fill (stream, Heap, Mesh, MarkKey))
-	REP_ERR_RETURN_PTR (NULL);
-
-      if (file_positions_fill (stream, Heap, Mesh, MarkKey))
-	REP_ERR_RETURN_PTR (NULL);
-
-      fclose (stream);
-
-      stream = fileopen (theBVP->mesh_file, "r");
-      if (stream == NULL)
-	REP_ERR_RETURN_PTR (NULL);
-
-      if (file_readline (stream, "coordinates"))
-	REP_ERR_RETURN_PTR (NULL);
-
-      if (file_corners_fill (stream, Heap, Mesh, MarkKey,
-			     &(theBVP->radius), theBVP->MidPoint))
-	REP_ERR_RETURN_PTR (NULL);
-
-      fclose (stream);
-
-      stream = fileopen (theBVP->mesh_file, "r");
-      if (stream == NULL)
-	REP_ERR_RETURN_PTR (NULL);
-
-      if (file_readline (stream, "connectivity"))
-	REP_ERR_RETURN_PTR (NULL);
-
-      if (file_elements_fill (stream, Heap, Mesh, MarkKey))
-	REP_ERR_RETURN_PTR (NULL);
-
-      if (file_readline (stream, "surface"))
-	{
-	  PrintErrorMessage ('F', "Init_MarcBVP", "could not read surface");
-	  REP_ERR_RETURN_PTR (NULL);
-	}
-      if (file_contact_fill (stream, Heap, Mesh, MarkKey))
-	REP_ERR_RETURN_PTR (NULL);
-
-      fclose (stream);
-
-      /*
-         #ifdef __THREEDIM__
-         if (Mesh != NULL)
-         RepairMesh(Heap,MarkKey,Mesh);
-         #endif
-       */
-
-#ifdef ModelP
-    }
-  for (i = 0; i < nPPatch; i++)
-    Broadcast (theBVP->patches[i], sizeof (M0_PATCH));
-  for (i = nPPatch; i < nPPatch + nLPatch; i++)
-    Broadcast (theBVP->patches[i], sizeof (M1_PATCH));
-  for (i = nPPatch + nLPatch; i < nPPatch + nLPatch + nTPatch; i++)
-    Broadcast (theBVP->patches[i], sizeof (M2_PATCH));
-  Broadcast (&(theBVP->radius), sizeof (DOUBLE));
-  Broadcast (theBVP->MidPoint, DIM * sizeof (DOUBLE));
-#endif
-
-  STD_BVP_NDOMPART (theBVP) = 1;
-  STD_BVP_NSUBDOM (theBVP) = 1;
-  STD_BVP_S2P_PTR (theBVP) = (INT *)
-    GetFreelistMemory (Heap, (1 + STD_BVP_NSUBDOM (theBVP)) * sizeof (INT));
-  if (STD_BVP_S2P_PTR (theBVP) == NULL)
-    REP_ERR_RETURN_PTR (NULL);
-  STD_BVP_S2P_PTR (theBVP)[0] = 0;
-  STD_BVP_S2P_PTR (theBVP)[1] = 0;
-
-
-  PRINTDEBUG (dom, 1,
-	      ("C: nCorners %d nBndP %d nElem %d nPPatch %d nTPatch %d nFound %d\n",
-	       nCorners, nBndP, nElem, nPPatch, nTPatch, nFound));
-
-  return ((BVP *) theBVP);
-}
-
-static INT
-M_BNDP_Global (BNDP * bp, DOUBLE * global)
-{
-  M_BNDP *p = (M_BNDP *) bp;
-  INT j;
-
-  for (j = 0; j < DIM; j++)
-    global[j] = p->pos[j];
-
-  return (0);
-}
-
-static INT
-M_BNDP_Move (BNDP * aBndP, const DOUBLE global[])
-{
-  printf ("not implemented line %d\n", __LINE__);
-
-  return (1);
-}
-
-static INT
-M_BNDP_BndCond (BNDP * theBndP, INT * n, INT i,
-		DOUBLE * in, DOUBLE * value, INT * type)
-{
-  printf ("not implemented line %d\n", __LINE__);
-
-  return (1);
-}
-
-static INT
-M_BNDP_BndPDesc (BNDP * theBndP, INT * move, INT * part)
-{
-  *move = 0;
-  *part = 0;
-
-  return (0);
-}
-
-static INT
-M_BNDP_BndEDesc (BNDP * theBndP0, BNDP * theBndP1, INT * part)
-{
-  *part = 0;
-
-  return (0);
-}
-
-static BNDS *
-M_BNDP_CreateBndS (HEAP * Heap, BNDP ** theBndP, INT n)
-{
-  M_BNDS *p = (M_BNDS *) GetFreelistMemory (Heap, M_BNDS_NSIZE (n));
-  INT i, j;
-
-  for (i = 0; i < n; i++)
-    {
-      M_BNDP *b = (M_BNDP *) theBndP[i];
-      p->p[i].patch_id = b->patch_id;
-      for (j = 0; j < DIM; j++)
-	p->p[i].pos[j] = b->pos[j];
-    }
-  p->n = n;
-
-  return ((BNDS *) p);
-}
-
-#ifdef __THREEDIM__
-/*#define CYLINDER */
-#define BENCHMARK
-#endif
-
-static BNDP *
-M_BNDP_CreateBndP (HEAP * Heap, BNDP * theBndP0,
-		   BNDP * theBndP1, DOUBLE lcoord)
-{
-  M_BNDP *p0 = (M_BNDP *) theBndP0;
-  M_BNDP *p1 = (M_BNDP *) theBndP1;
-  M_BNDP *p = (M_BNDP *) GetFreelistMemory (Heap, sizeof (M_BNDP));
-  INT j;
-
-  ASSERT (p != NULL);
-
-  for (j = 0; j < DIM; j++)
-    p->pos[j] = (1.0 - lcoord) * p0->pos[j] + lcoord * p1->pos[j];
-#ifdef CYLINDER
-  {
-    DOUBLE r0 = p0->pos[0] * p0->pos[0] + p0->pos[1] * p0->pos[1];
-    DOUBLE r1 = p1->pos[0] * p1->pos[0] + p1->pos[1] * p1->pos[1];
-
-    if ((r1 > 0.01) && (ABS (r1 - r0) < 0.01))
-      {
-	DOUBLE r = p->pos[0] * p->pos[0] + p->pos[1] * p->pos[1];
-	DOUBLE s = sqrt (r1 / r);
-
-	p->pos[0] *= s;
-	p->pos[1] *= s;
-      }
-  }
-#endif
-#ifdef BENCHMARK
-  {
-    DOUBLE r0 =
-      (p0->pos[0] - 10) * (p0->pos[0] - 10) + p0->pos[1] * p0->pos[1];
-    DOUBLE r1 =
-      (p1->pos[0] - 10) * (p1->pos[0] - 10) + p1->pos[1] * p1->pos[1];
-
-    if ((r1 > 0.01) && (ABS (r1 - r0) < 0.01))
-      {
-	DOUBLE r =
-	  (p->pos[0] - 10) * (p->pos[0] - 10) + p->pos[1] * p->pos[1];
-	DOUBLE s = sqrt (r1 / r);
-
-	p->pos[0] = 10 + s * (p->pos[0] - 10);
-	p->pos[1] *= s;
-      }
-  }
-#endif
-
-  return ((BNDP *) p);
-}
-
-static INT
-M_BNDP_Dispose (HEAP * Heap, BNDP * theBndP)
-{
-  return (PutFreelistMemory (Heap, theBndP, sizeof (M_BNDP)));
-}
-
-static INT
-M_BNDP_SaveBndP (BNDP * theBndP)
-{
-  M_BNDP *p = (M_BNDP *) theBndP;
-  INT j;
-  int iList[1];
-  double dList[DIM];
-
-  iList[0] = p->patch_id;
-  if (Bio_Write_mint (1, iList))
-    return (1);
-
-  for (j = 0; j < DIM; j++)
-    dList[j] = p->pos[j];
-  if (Bio_Write_mdouble (DIM, dList))
-    return (1);
-
-  return (0);
-}
-
-static INT
-M_BNDP_SaveInsertedBndP (BNDP * theBndP, char *data, INT max_data_size)
-{
-  printf ("not implemented line %d\n", __LINE__);
-
-  return (1);
-}
-
-static BNDP *
-M_BNDP_LoadBndP (BVP * theBVP, HEAP * Heap)
-{
-  M_BNDP *p = (M_BNDP *) GetFreelistMemory (Heap, sizeof (M_BNDP));
-  INT j;
-  int iList[1];
-  double dList[DIM];
-
-  if (Bio_Read_mint (1, iList))
-    return (NULL);
-  p->patch_id = iList[0];
-  if (Bio_Read_mdouble (DIM, dList))
-    return (NULL);
-
-  for (j = 0; j < DIM; j++)
-    p->pos[j] = dList[j];
-
-  return ((BNDP *) p);
-}
-
-static INT
-M_BNDS_Global (BNDS * theBndS, DOUBLE * local, DOUBLE * global)
-{
-  M_BNDS *p = (M_BNDS *) theBndS;
-  INT i;
-
-#ifdef __TWODIM__
-  for (i = 0; i < DIM; i++)
-    global[i] = (1.0 - local[0]) * p->p[0].pos[i] + local[0] * p->p[1].pos[i];
-#endif
-#ifdef __THREEDIM__
-  if (p->n == 4)
-    for (i = 0; i < DIM; i++)
-      global[i] = (1.0 - local[0]) * (1.0 - local[1]) * p->p[0].pos[i]
-    + local[0] * (1.0 - local[1]) * p->p[1].pos[i]
-    + local[0] * local[1] * p->p[2].pos[i]
-    + (1.0 - local[0]) * local[1] * p->p[3].pos[i];
-  else
-if (p->n == 3)
-  for (i = 0; i < DIM; i++)
-    global[i] = (1.0 - local[0] - local[1]) * p->p[0].pos[i]
-    + local[0] * p->p[1].pos[i] + local[1] * p->p[2].pos[i];
-#endif
-
-#ifdef CYLINDER
-  {
-    DOUBLE r[4];
-    INT flag = 1;
-
-    if (p->n != 4)
-      return (0);
-    for (i = 0; i < p->n; i++)
-      {
-	r[i] =
-	  p->p[i].pos[0] * p->p[i].pos[0] + p->p[i].pos[1] * p->p[i].pos[1];
-	if (i == 0)
-	  if (r[0] < 0.01)
-	    flag = 0;
-	if (i > 0)
-	  if (ABS (r[i] - r[0]) > 0.01)
-	    flag = 0;
-      }
-    if (flag == 0)
-      {
-	flag = 1;
-	for (i = 1; i < p->n; i++)
-	  if (ABS (p->p[i].pos[2] - p->p[0].pos[2]) > 0.01)
-	    flag = 0;
-      }
-    if (flag)
-      {
-	DOUBLE q = global[0] * global[0] + global[1] * global[1];
-
-	if (q > 0.000001)
-	  {
-	    DOUBLE s = sqrt (0.25 * (r[0] + r[1] + r[2] + r[3]) / q);
-
-	    global[0] *= s;
-	    global[1] *= s;
-	  }
-      }
-  }
-#endif
-#ifdef BENCHMARK
-  {
-    DOUBLE r[4];
-    INT flag = 1;
-
-    if (p->n != 4)
-      return (0);
-    for (i = 0; i < p->n; i++)
-      {
-	r[i] = (p->p[i].pos[0] - 10) * (p->p[i].pos[0] - 10)
-	  + p->p[i].pos[1] * p->p[i].pos[1];
-
-	if (i == 0)
-	  {
-	    if (r[0] < 0.99)
-	      flag = 0;
-	    if (r[0] > 1.01)
-	      flag = 0;
-	  }
-	if (i > 0)
-	  if (ABS (r[i] - r[0]) > 0.01)
-	    flag = 0;
-      }
-    if (flag)
-      {
-	DOUBLE q = (global[0] - 10) *(global[0] - 10) +global[1] * global[1];
-
-	if (q > 0.000001)
-	  {
-	    DOUBLE s = sqrt (0.25 * (r[0] + r[1] + r[2] + r[3]) / q);
-
-	    global[0] = 10 + s * (global[0] - 10);
-	    global[1] *= s;
-	  }
-      }
-  }
-#endif
-
-  return (0);
-}
-
-static INT
-M_BNDS_BndCond (BNDS * theBndS, DOUBLE * local,
-		DOUBLE * in, DOUBLE * value, INT * type)
-{
-  M_BNDS *p = (M_BNDS *) theBndS;
-
-  ASSERT (p != NULL);
-
-  if (currBVP->GeneralBndCond != NULL)
-    {
-      DOUBLE_VECTOR global;
-      INT i;
-      M2_PATCH *patch = (M2_PATCH *) currBVP->patches[p->patch_id];
-
-      type[0] = patch->c;
-      M_BNDS_Global (theBndS, local, global);
-
-      if (in == NULL)
-	return ((*(currBVP->GeneralBndCond))
-		(NULL, NULL, global, value, type));
-
-      for (i = 0; i < DIM; i++)
-	in[i] = global[i];
-
-      return ((*(currBVP->GeneralBndCond)) (NULL, NULL, in, value, type));
-    }
-
-  printf ("not implemented line %d\n", __LINE__);
-
-  return (1);
-}
-
-static INT
-M_BNDS_BndSDesc (BNDS * theBndS, INT * id, INT * nbid, INT * part)
-{
-  *id = 1;
-  *nbid = 0;
-  *part = 0;
-
-  return (0);
-}
-
-static BNDP *
-M_BNDS_CreateBndP (HEAP * Heap, BNDS * theBndS, DOUBLE * local)
-{
-  M_BNDS *ps = (M_BNDS *) theBndS;
-  M_BNDP *p = (M_BNDP *) GetFreelistMemory (Heap, sizeof (M_BNDP));
-
-  ASSERT (ps != NULL);
-/*	ASSERT(ps->n == 4); */
-  ASSERT (p != NULL);
-
-  M_BNDS_Global (theBndS, local, p->pos);
-  p->patch_id = ps->patch_id;
-
-  return ((BNDP *) p);
-}
-
-static INT
-M_BNDS_Dispose (HEAP * Heap, BNDS * theBndS)
-{
-  return (PutFreelistMemory (Heap, theBndS, M_BNDS_SIZE (theBndS)));
-}
-
+static INT BndPointGlobal (const BNDP * aBndP, DOUBLE * global);
+static INT PatchGlobal (const PATCH * p, DOUBLE * lambda, DOUBLE * global);
 
 /****************************************************************************/
 /** \brief Create a new PROBLEM structure
@@ -1645,7 +175,7 @@
 /****************************************************************************/
 
 void *
-NS_DIM_PREFIX CreateProblem (char *domain, char *name, int id, ConfigProcPtr config,
+NS_DIM_PREFIX CreateProblem (const char *domain, const char *name, int id, ConfigProcPtr config,
                              int numOfCoefficients, CoeffProcPtr coeffs[],
                              int numOfUserFct, UserProcPtr userfct[])
 {
@@ -1728,7 +258,7 @@
 /****************************************************************************/
 
 void * NS_DIM_PREFIX
-CreateBoundaryCondition (char *name, INT id, BndCondProcPtr theBndCond,
+CreateBoundaryCondition (const char *name, INT id, BndCondProcPtr theBndCond,
 			 void *Data)
 {
   BOUNDARY_CONDITION *newBndCond;
@@ -1904,13 +434,34 @@
 /****************************************************************************/
 
 DOMAIN *NS_DIM_PREFIX
-GetDomain (char *name)
+GetDomain (const char *name)
 {
   return ((DOMAIN *)
 	  SearchEnv (name, "/Domains", theDomainDirID, theDomainDirID));
 }
 
 /****************************************************************************/
+/** \brief Remove a domain structure
+ *
+ * @param  name - name of the domain
+ *
+ * This function searches the environment for a domain with the name `name`
+ * and removes it.
+ *
+*/
+/****************************************************************************/
+
+void NS_DIM_PREFIX
+RemoveDomain (const char *name)
+{
+    ENVITEM* d = SearchEnv (name, "/Domains", theDomainDirID, theDomainDirID);
+    if (d!=0) {
+        d->v.locked = FALSE;
+        RemoveEnvDir(d);
+    }
+}
+
+/****************************************************************************/
 /** \brief Create a new BOUNDARY_SEGMENT 
  *
  * @param  name - name of the boundary segment
@@ -1938,7 +489,7 @@
 void *NS_DIM_PREFIX
 CreateBoundarySegment (const char *name,
 		       INT left, INT right, INT id, enum BoundaryType type, INT res,
-		       INT * point, const DOUBLE * alpha, const DOUBLE * beta,
+		       const INT * point, const DOUBLE * alpha, const DOUBLE * beta,
 		       BndSegFuncPtr BndSegFunc, void *data)
 {
   BOUNDARY_SEGMENT *newSegment;
@@ -2053,7 +604,7 @@
 /****************************************************************************/
 
 void *NS_DIM_PREFIX
-CreateBoundarySegment2D (char *name, int left, int right,
+CreateBoundarySegment2D (const char *name, int left, int right,
 			 int id, int from, int to, int res, DOUBLE alpha,
 			 DOUBLE beta, BndSegFuncPtr BndSegFunc, void *data)
 {
@@ -2090,16 +641,16 @@
 */
 /****************************************************************************/
 
-LINEAR_SEGMENT *NS_DIM_PREFIX
-CreateLinearSegment (char *name,
+void *NS_DIM_PREFIX
+CreateLinearSegment (const char *name,
 		     INT left, INT right, INT id,
-		     INT n, INT * point,
-		     DOUBLE x[MAX_CORNERS_OF_LINEAR_PATCH][DIM_OF_BND])
+		     INT n, const INT * point,
+		     DOUBLE x[CORNERS_OF_BND_SEG][DIM])
 {
   LINEAR_SEGMENT *newSegment;
   INT i, k;
 
-  if (n > MAX_CORNERS_OF_LINEAR_PATCH)
+  if (n > CORNERS_OF_BND_SEG)
     return (NULL);
 
   /* allocate the boundary segment */
@@ -2117,13 +668,31 @@
   for (i = 0; i < n; i++)
     {
       newSegment->points[i] = point[i];
-      for (k = 0; k < DIM_OF_BND; k++)
+      for (k = 0; k < DIM; k++)
 	newSegment->x[i][k] = x[i][k];
     }
 
   return (newSegment);
 }
 
+UINT NS_DIM_PREFIX GetBoundarySegmentId(BNDS* boundarySegment)
+{
+    BND_PS *ps;
+    PATCH *patch;
+
+    ps = (BND_PS *) boundarySegment;
+    patch = currBVP->patches[ps->patch_id];
+    if (patch == NULL) {
+        PrintErrorMessageF ('E', "GetBoundarySegmentId", "invalid argument");
+        return 0;
+    }
+
+    /* The ids in the patch data structure are consecutive but they
+       start at currBVP->sideoffset instead of zero. */
+    return PATCH_ID(patch) - currBVP->sideoffset;
+}
+        
+
 static LINEAR_SEGMENT *
 GetNextLinearSegment (LINEAR_SEGMENT * theBSeg)
 {
@@ -2153,48 +722,6 @@
 
 
 BVP *NS_DIM_PREFIX
-Create_MarcBVP (char *BVPName, BndCondProcPtr theBndCond,
-		int numOfCoeffFct, CoeffProcPtr coeffs[],
-		int numOfUserFct, UserProcPtr userfct[])
-{
-  STD_BVP *theBVP;
-  INT i, n;
-
-  /* change to /BVP directory */
-  if (ChangeEnvDir ("/BVP") == NULL)
-    return (NULL);
-
-  /* allocate new domain structure */
-  n = (numOfCoeffFct + numOfUserFct - 1) * sizeof (void *);
-  theBVP =
-    (STD_BVP *) MakeEnvItem (BVPName, theBVPDirID, sizeof (STD_BVP) + n);
-  if (theBVP == NULL)
-    return (NULL);
-  if (ChangeEnvDir (BVPName) == NULL)
-    return (NULL);
-
-  theBVP->numOfCoeffFct = numOfCoeffFct;
-  theBVP->numOfUserFct = numOfUserFct;
-  for (i = 0; i < numOfCoeffFct; i++)
-    theBVP->CU_ProcPtr[i] = (void *) (coeffs[i]);
-  for (i = 0; i < numOfUserFct; i++)
-    theBVP->CU_ProcPtr[i + numOfCoeffFct] = (void *) (userfct[i]);
-
-  STD_BVP_S2P_PTR (theBVP) = NULL;
-
-  theBVP->Domain = NULL;
-  theBVP->Problem = NULL;
-  theBVP->ConfigProc = Marc_Configure;
-  theBVP->GeneralBndCond = theBndCond;
-
-  theBVP->type = BVP_MARC;
-
-  UserWriteF ("BVP %s installed.\n", BVPName);
-
-  return ((BVP *) theBVP);
-}
-
-BVP *NS_DIM_PREFIX
 CreateBoundaryValueProblem (const char *BVPName, BndCondProcPtr theBndCond,
 			    int numOfCoeffFct, CoeffProcPtr coeffs[],
 			    int numOfUserFct, UserProcPtr userfct[])
@@ -2229,8 +756,6 @@
   theBVP->ConfigProc = STD_BVP_Configure;
   theBVP->GeneralBndCond = theBndCond;
 
-  theBVP->type = BVP_STANDARD;
-
   UserWriteF ("BVP %s installed.\n", BVPName);
 
   return ((BVP *) theBVP);
@@ -2250,7 +775,7 @@
 *//****************************************************************************/
 
 BVP *NS_DIM_PREFIX
-CreateBVP (char *BVPName, char *DomainName, char *ProblemName)
+CreateBVP (const char *BVPName, const char *DomainName, const char *ProblemName)
 {
   STD_BVP *theBVP;
   DOMAIN *theDomain;
@@ -2295,8 +820,6 @@
   theBVP->ConfigProc = theProblem->ConfigProblem;
   theBVP->GeneralBndCond = NULL;
 
-  theBVP->type = BVP_STANDARD;
-
   UserWriteF ("BVP %s installed.\n", BVPName);
 
   return ((BVP *) theBVP);
@@ -2353,7 +876,7 @@
 }
 
 BVP *NS_DIM_PREFIX
-CreateBVP_Problem (char *BVPName, char *DomainName, char *ProblemName)
+CreateBVP_Problem (const char *BVPName, const char *DomainName, const char *ProblemName)
 {
   STD_BVP *theBVP;
   DOMAIN *theDomain;
@@ -2398,8 +921,6 @@
   theBVP->ConfigProc = Problem_Configure;
   theBVP->GeneralBndCond = NULL;
 
-  theBVP->type = BVP_STANDARD;
-
   UserWriteF ("BVP %s installed.\n", BVPName);
 
   return ((BVP *) theBVP);
@@ -2451,6 +972,7 @@
 {
   switch (PATCH_TYPE (p))
     {
+    case LINEAR_PATCH_TYPE:
     case PARAMETRIC_PATCH_TYPE:
       return (PATCH_ID (p));
     case POINT_PATCH_TYPE:
@@ -2461,6 +983,7 @@
 #endif
     }
 
+  assert(0);
   return (-1);
 }
 
@@ -2553,7 +1076,12 @@
 	      ps->local[j][1] = 0.0;
 	      break;
 	    case 2:
-	      ps->local[j][0] = 0.0;
+              /* This coordinate depends on whether we're looking at a triangle or a quadrilateral */
+              ps->local[j][0] = (LINEAR_PATCH_N(pp)==3) ? 0.0 : 1.0;
+              ps->local[j][1] = 1.0;
+	      break;
+            case 3:
+              ps->local[j][0] = 0.0;
 	      ps->local[j][1] = 1.0;
 	      break;
 #endif
@@ -2591,8 +1119,118 @@
   return (0);
 }
 
+#ifdef __THREEDIM__
+/** \brief Add a line between two vertices to the boundary data structure
+
+\param i, j  The line goes from vertex i to vertex j
+\param corners Array with pointers to all vertices
+*/
+static INT
+CreateLine(INT i, INT j, HEAP *Heap, PATCH *thePatch, PATCH **corners, PATCH **lines, PATCH **sides, 
+           INT *nlines, INT *err)
+{
+    INT k, n, m;
+    INT freePatches;
+
+    k = 0;
+    for (n = 0; n < POINT_PATCH_N (corners[i]); n++)
+        for (m = 0; m < POINT_PATCH_N (corners[j]); m++)
+	    if (POINT_PATCH_PID (corners[i], n) ==
+		POINT_PATCH_PID (corners[j], m))
+                k++;
+    
+    assert(k>=2);
+    
+    thePatch =
+        (PATCH *) GetFreelistMemory (Heap, sizeof (LINE_PATCH)
+                                     + (k -
+                                        1) * sizeof (struct line_on_patch));
+    if (thePatch == NULL)
+        return (NULL);
+    PATCH_TYPE (thePatch) = LINE_PATCH_TYPE;
+    PATCH_ID (thePatch) = *nlines;
+    LINE_PATCH_C0 (thePatch) = i;
+    LINE_PATCH_C1 (thePatch) = j;
+    k = 0;
+    freePatches = 0;
+    for (n = 0; n < POINT_PATCH_N (corners[i]); n++)
+        for (m = 0; m < POINT_PATCH_N (corners[j]); m++)
+	    if (POINT_PATCH_PID (corners[i], n) ==
+		POINT_PATCH_PID (corners[j], m))
+                {
+                    LINE_PATCH_PID (thePatch, k) =
+                        POINT_PATCH_PID (corners[i], n);
+                    LINE_PATCH_CID0 (thePatch, k) =
+                        POINT_PATCH_CID (corners[i], n);
+                    LINE_PATCH_CID1 (thePatch, k) =
+                        POINT_PATCH_CID (corners[j], m);
+                    if (PATCH_IS_FREE (sides[LINE_PATCH_PID (thePatch, k)]))
+                        freePatches++;
+                    k++;
+                }
+    LINE_PATCH_N (thePatch) = k;
+    
+    for (n = 0; n < LINE_PATCH_N (thePatch); n++)
+        PRINTDEBUG (dom, 1, (" pid %d cid %d %d",
+                             LINE_PATCH_PID (thePatch, n),
+                             LINE_PATCH_CID0 (thePatch, n),
+                             LINE_PATCH_CID1 (thePatch, n)));
+    PRINTDEBUG (dom, 1, ("\n"));
+    
+    IFDEBUG (dom, 10) if (k == 2)
+        {
+	    INT o0, o1, s0, s1;
+            
+	    s0 = LINE_PATCH_PID (thePatch, 0);
+	    s1 = LINE_PATCH_PID (thePatch, 1);
+	    o0 =
+                (LINE_PATCH_CID0 (thePatch, 0) ==
+                 ((LINE_PATCH_CID1 (thePatch, 0) + 1) % (2 * DIM_OF_BND)));
+	    o1 =
+                (LINE_PATCH_CID0 (thePatch, 1) ==
+                 ((LINE_PATCH_CID1 (thePatch, 1) + 1) % (2 * DIM_OF_BND)));
+	    if (o0 != o1)
+                {
+                    if ((PARAM_PATCH_LEFT (sides[s0]) !=
+                         PARAM_PATCH_LEFT (sides[s1]))
+                        || ((PARAM_PATCH_RIGHT (sides[s0]) !=
+                             PARAM_PATCH_RIGHT (sides[s1]))))
+                        {
+                            PRINTDEBUG (dom, 0, ("patch %d and patch %d:"
+                                                 "orientation not maches\n", s0, s1));
+                            (*err)++;
+                        }
+                }
+	    else
+                {
+                    if ((PARAM_PATCH_LEFT (sides[s0]) !=
+                         PARAM_PATCH_RIGHT (sides[s1]))
+                        || ((PARAM_PATCH_RIGHT (sides[s0]) !=
+                             PARAM_PATCH_LEFT (sides[s1]))))
+                        {
+                            PRINTDEBUG (dom, 0, ("patch %d and patch %d:"
+                                                 "orientation not maches\n", s0, s1));
+                            (*err)++;
+                        }
+                }
+        }
+    ENDDEBUG if (freePatches == k)
+        PATCH_STATE (thePatch) = PATCH_FREE;
+    else if (freePatches == 0)
+        PATCH_STATE (thePatch) = PATCH_FIXED;
+    else
+        PATCH_STATE (thePatch) = PATCH_BND_OF_FREE;
+    lines[(*nlines)++] = thePatch;
+    PRINTDEBUG (dom, 1, ("lines id %d type %d n %d\n",
+                         PATCH_ID (thePatch), PATCH_TYPE (thePatch),
+                         LINE_PATCH_N (thePatch)));
+
+
+}
+#endif
+
 BVP *NS_DIM_PREFIX
-BVP_Init (char *name, HEAP * Heap, MESH * Mesh, INT MarkKey)
+BVP_Init (const char *name, HEAP * Heap, MESH * Mesh, INT MarkKey)
 {
   STD_BVP *theBVP;
   DOMAIN *theDomain;
@@ -2601,22 +1239,18 @@
   LINEAR_SEGMENT *theLinSegment;
   BOUNDARY_CONDITION *theBndCond;
   PATCH **corners, **sides, *thePatch;
-  INT i, j, n, m, maxSubDomains, ncorners, nlines, nsides, free;
+  unsigned short* segmentsPerPoint, *freeSegmentsPerPoint, *cornerCounters;
+  INT i, j, n, m, maxSubDomains, ncorners, nlines, nsides;
 #	ifdef __THREEDIM__
   PATCH **lines;
   INT k, err;
+  INT nn;
 #	endif
 
   theBVP = (STD_BVP *) BVP_GetByName (name);
   if (theBVP == NULL)
     return (NULL);
   currBVP = theBVP;
-#ifdef ModelP
-  SetBVPType (theBVP->type);
-#endif
-
-  if (theBVP->type == BVP_MARC)
-    return (Init_MarcBVP (theBVP, Heap, Mesh, MarkKey));
 
   theDomain = theBVP->Domain;
   if (theDomain == NULL)
@@ -2739,70 +1373,89 @@
   if (corners == NULL)
     return (NULL);
   theBVP->ncorners = ncorners;
-  for (i = 0; i < ncorners; i++)
-    {
-      m = 0;
-      /* count parameter patchs */
-      for (j = 0; j < nsides; j++)
-	{
-	  if (PATCH_TYPE (sides[j]) == LINEAR_PATCH_TYPE)
-	    {
-	      for (n = 0; n < LINEAR_PATCH_N (sides[j]); n++)
-		if (LINEAR_PATCH_POINTS (sides[j], n) == i)
-		  m++;
-	    }
-	  else if (PATCH_TYPE (sides[j]) == PARAMETRIC_PATCH_TYPE)
-	    {
-	      for (n = 0; n < 2 * DIM_OF_BND; n++)
-		if (PARAM_PATCH_POINTS (sides[j], n) == i)
-		  m++;
-	    }
-	}
+
+  /* precompute the number of segments at each point patch */
+  segmentsPerPoint = (unsigned short*)calloc(ncorners,sizeof(unsigned short));
+  freeSegmentsPerPoint = (unsigned short*)calloc(ncorners,sizeof(unsigned short));
+
+  for (j = 0; j < nsides; j++) {
+
+      if (PATCH_TYPE (sides[j]) == LINEAR_PATCH_TYPE) {
+          for (n = 0; n < LINEAR_PATCH_N (sides[j]); n++)
+              segmentsPerPoint[LINEAR_PATCH_POINTS (sides[j], n)]++;
+
+          if (PATCH_IS_FREE(sides[j]))
+              for (n = 0; n < LINEAR_PATCH_N (sides[j]); n++)
+                  freeSegmentsPerPoint[LINEAR_PATCH_POINTS (sides[j], n)]++;
+
+      } else if (PATCH_TYPE (sides[j]) == PARAMETRIC_PATCH_TYPE) {
+          for (n = 0; n < 2 * DIM_OF_BND; n++)
+              if (PARAM_PATCH_POINTS (sides[j], n) >= 0) /* Entry may be -1 for triangular faces */
+                  segmentsPerPoint[PARAM_PATCH_POINTS (sides[j], n)]++;
+
+          if (PATCH_IS_FREE(sides[j]))
+              for (n = 0; n < 2 * DIM_OF_BND; n++)
+              if (PARAM_PATCH_POINTS (sides[j], n) >= 0) /* Entry may be -1 for triangular faces */
+                  freeSegmentsPerPoint[PARAM_PATCH_POINTS (sides[j], n)]++;
+
+      }
+
+  }
+
+  /* Allocate point patches */
+  for (i = 0; i < ncorners; i++) {
+
+      m = segmentsPerPoint[i];
+      
       thePatch =
-	(PATCH *) GetFreelistMemory (Heap, sizeof (POINT_PATCH)
-				     + (m -
-					1) * sizeof (struct point_on_patch));
+          (PATCH *) GetFreelistMemory (Heap, sizeof (POINT_PATCH)
+                                       + (m-1) * sizeof (struct point_on_patch));
       if (thePatch == NULL)
-	return (NULL);
+          return (NULL);
+
       PATCH_TYPE (thePatch) = POINT_PATCH_TYPE;
       PATCH_ID (thePatch) = i;
-      m = 0;
-      free = 0;
-      for (j = 0; j < nsides; j++)
-	{
+      
+      POINT_PATCH_N (thePatch) = m;
+      corners[i] = thePatch;
+
+  }
+
+  cornerCounters = (unsigned short*)calloc(ncorners,sizeof(unsigned short));
+
+  for (j = 0; j < nsides; j++)
+      {
 	  if (PATCH_TYPE (sides[j]) == LINEAR_PATCH_TYPE)
-	    {
-	      for (n = 0; n < LINEAR_PATCH_N (sides[j]); n++)
-		if (LINEAR_PATCH_POINTS (sides[j], n) == i)
-		  {
-		    POINT_PATCH_PID (thePatch, m) = j;
-		    POINT_PATCH_CID (thePatch, m++) = n;
-		    if (PATCH_IS_FREE (sides[j]))
-		      free++;
-		  }
-	    }
+              {
+                  for (n = 0; n < LINEAR_PATCH_N (sides[j]); n++) 
+                      {
+                          i = LINEAR_PATCH_POINTS (sides[j], n);
+                          POINT_PATCH_PID (corners[i], cornerCounters[i]) = j;
+                          POINT_PATCH_CID (corners[i], cornerCounters[i]++) = n;
+                      }
+              }
 	  else if (PATCH_TYPE (sides[j]) == PARAMETRIC_PATCH_TYPE)
-	    {
-	      for (n = 0; n < 2 * DIM_OF_BND; n++)
-		if (PARAM_PATCH_POINTS (sides[j], n) == i)
-		  {
-		    POINT_PATCH_PID (thePatch, m) = j;
-		    POINT_PATCH_CID (thePatch, m++) = n;
-		    if (PATCH_IS_FREE (sides[j]))
-		      free++;
-		  }
-	    }
-	}
-      if (free == m)
+              {
+                  for (n = 0; n < 2 * DIM_OF_BND; n++)
+                      {
+                          i = PARAM_PATCH_POINTS (sides[j], n);
+                          if (i>=0 && i<ncorners) {
+                              POINT_PATCH_PID (corners[i], cornerCounters[i]) = j;
+                              POINT_PATCH_CID (corners[i], cornerCounters[i]++) = n;
+                          }
+                      }
+              }
+      }
+
+  for (i = 0; i < ncorners; i++) {
+      /* Shouldn't the 'thePatch' be replaced 'corners[i]' in this loop?  OS */
+      if (freeSegmentsPerPoint[i] == cornerCounters[i])
 	PATCH_STATE (thePatch) = PATCH_FREE;
-      else if (free == 0)
+      else if (freeSegmentsPerPoint[i] == 0)
 	PATCH_STATE (thePatch) = PATCH_FIXED;
       else
 	PATCH_STATE (thePatch) = PATCH_BND_OF_FREE;
 
-      for (j = 0; j < nsides; j++)
-	POINT_PATCH_N (thePatch) = m;
-      corners[i] = thePatch;
       PRINTDEBUG (dom, 1, ("corners id %d type %d n %d\n",
 			   PATCH_ID (thePatch), PATCH_TYPE (thePatch),
 			   POINT_PATCH_N (thePatch)));
@@ -2812,111 +1465,72 @@
 			     POINT_PATCH_CID (thePatch, j)));
     }
 
+  /* Return memory that will not be used anymore */
+  free(segmentsPerPoint);
+  free(freeSegmentsPerPoint);
+  free(cornerCounters);
+
   /* create line patches */
   nlines = 0;
 #ifdef __THREEDIM__
+  /* The maximum number of boundary lines is equal to the number of
+     boundary faces (nsides) times the max number of lines per face (=4)
+     divided by two. */
   lines =
-    (PATCH **) GetTmpMem (Heap, ncorners * ncorners * sizeof (PATCH *),
+    (PATCH **) GetTmpMem (Heap, nsides * 2 * sizeof (PATCH *),
 			  MarkKey);
   if (lines == NULL)
     return (NULL);
   err = 0;
-  for (i = 0; i < ncorners; i++)
-    for (j = i + 1; j < ncorners; j++)
-      {
-	k = 0;
-	for (n = 0; n < POINT_PATCH_N (corners[i]); n++)
-	  for (m = 0; m < POINT_PATCH_N (corners[j]); m++)
-	    if (POINT_PATCH_PID (corners[i], n) ==
-		POINT_PATCH_PID (corners[j], m))
-	      k++;
-	if (k < 2)
-	  /* points share one patch only and ly on opposite corners of this patch */
-	  continue;
-	thePatch =
-	  (PATCH *) GetFreelistMemory (Heap, sizeof (LINE_PATCH)
-				       + (k -
-					  1) * sizeof (struct line_on_patch));
-	if (thePatch == NULL)
-	  return (NULL);
-	PATCH_TYPE (thePatch) = LINE_PATCH_TYPE;
-	PATCH_ID (thePatch) = nlines;
-	LINE_PATCH_C0 (thePatch) = i;
-	LINE_PATCH_C1 (thePatch) = j;
-	k = 0;
-	free = 0;
-	for (n = 0; n < POINT_PATCH_N (corners[i]); n++)
-	  for (m = 0; m < POINT_PATCH_N (corners[j]); m++)
-	    if (POINT_PATCH_PID (corners[i], n) ==
-		POINT_PATCH_PID (corners[j], m))
-	      {
-		LINE_PATCH_PID (thePatch, k) =
-		  POINT_PATCH_PID (corners[i], n);
-		LINE_PATCH_CID0 (thePatch, k) =
-		  POINT_PATCH_CID (corners[i], n);
-		LINE_PATCH_CID1 (thePatch, k) =
-		  POINT_PATCH_CID (corners[j], m);
-		if (PATCH_IS_FREE (sides[LINE_PATCH_PID (thePatch, k)]))
-		  free++;
-		k++;
-	      }
-	LINE_PATCH_N (thePatch) = k;
-
-	for (n = 0; n < LINE_PATCH_N (thePatch); n++)
-	  PRINTDEBUG (dom, 1, (" pid %d cid %d %d",
-			       LINE_PATCH_PID (thePatch, n),
-			       LINE_PATCH_CID0 (thePatch, n),
-			       LINE_PATCH_CID1 (thePatch, n)));
-	PRINTDEBUG (dom, 1, ("\n"));
 
-	IFDEBUG (dom, 10) if (k == 2)
-	  {
-	    INT o0, o1, s0, s1;
+  /* We create the set of all boundary lines by looping over the sides
+     and for each side loop over the edges of this side.  That way, we
+     meet each boundary line twice.  Now, assuming that the sides are
+     properly oriented we get each line once as (a,b) and once as (b,a).
+     We then just ignore the one where the first vertex has a higher
+     number than the second one.
+  */
+  for (int s=0; s<nsides; s++) {
+
+      if (PATCH_TYPE (sides[s]) == LINEAR_PATCH_TYPE) {
+
+      for (nn = 0; nn < LINEAR_PATCH_N (sides[s]); nn++) 
+          {
+              i = LINEAR_PATCH_POINTS (sides[s], nn);
+              j = LINEAR_PATCH_POINTS (sides[s], (nn+1)%LINEAR_PATCH_N(sides[s]));
+
+              if (j>i)
+                      /* Insert the line into the boundary data structure */
+                  CreateLine(i, j, Heap, thePatch, corners, lines, sides, &nlines, &err);
+
+          }
+
+      } else if (PATCH_TYPE (sides[s]) == PARAMETRIC_PATCH_TYPE) {
+
+          /* Handle edges of parametric patches */
+
+          /* Determine whether the boundary segment is a triangle or a quadrilateral.
+             We assume that it is a triangle if the fourth vertex is invalid, and
+             a quadrilateral otherwise.  This is the best we can do.
+          */
+
+          int cornersOfParametricPatch = (PARAM_PATCH_POINTS (sides[s], 3) < 0 || PARAM_PATCH_POINTS (sides[s], 3) > ncorners) ? 3 : 4;
+
+          for (nn = 0; nn < cornersOfParametricPatch; nn++) 
+              {
+                  i = PARAM_PATCH_POINTS (sides[s], nn);
+                  j = PARAM_PATCH_POINTS (sides[s], (nn+1)%cornersOfParametricPatch);
+                  
+                  if (j>i)
+                      /* Insert the line into the boundary data structure */
+                      CreateLine(i, j, Heap, thePatch, corners, lines, sides, &nlines, &err);
+
+              }
+          
+      } else
+          UserWrite("Error: unknown PATCH_TYPE found for a boundary side!\n");
 
-	    s0 = LINE_PATCH_PID (thePatch, 0);
-	    s1 = LINE_PATCH_PID (thePatch, 1);
-	    o0 =
-	      (LINE_PATCH_CID0 (thePatch, 0) ==
-	       ((LINE_PATCH_CID1 (thePatch, 0) + 1) % (2 * DIM_OF_BND)));
-	    o1 =
-	      (LINE_PATCH_CID0 (thePatch, 1) ==
-	       ((LINE_PATCH_CID1 (thePatch, 1) + 1) % (2 * DIM_OF_BND)));
-	    if (o0 != o1)
-	      {
-		if ((PARAM_PATCH_LEFT (sides[s0]) !=
-		     PARAM_PATCH_LEFT (sides[s1]))
-		    || ((PARAM_PATCH_RIGHT (sides[s0]) !=
-			 PARAM_PATCH_RIGHT (sides[s1]))))
-		  {
-		    PRINTDEBUG (dom, 0, ("patch %d and patch %d:"
-					 "orientation not maches\n", s0, s1));
-		    err++;
-		  }
-	      }
-	    else
-	      {
-		if ((PARAM_PATCH_LEFT (sides[s0]) !=
-		     PARAM_PATCH_RIGHT (sides[s1]))
-		    || ((PARAM_PATCH_RIGHT (sides[s0]) !=
-			 PARAM_PATCH_LEFT (sides[s1]))))
-		  {
-		    PRINTDEBUG (dom, 0, ("patch %d and patch %d:"
-					 "orientation not maches\n", s0, s1));
-		    err++;
-		  }
-	      }
-	  }
-	ENDDEBUG if (free == k)
-	  PATCH_STATE (thePatch) = PATCH_FREE;
-	else if (free == 0)
-	  PATCH_STATE (thePatch) = PATCH_FIXED;
-	else
-	  PATCH_STATE (thePatch) = PATCH_BND_OF_FREE;
-	lines[nlines++] = thePatch;
-	PRINTDEBUG (dom, 1, ("lines id %d type %d n %d\n",
-			     PATCH_ID (thePatch), PATCH_TYPE (thePatch),
-			     LINE_PATCH_N (thePatch)));
-      }
+  }
   ASSERT (err == 0);
 #endif
 
@@ -3016,9 +1630,21 @@
 }
 
 /* domain interface function: for description see domain.h */
+/** \todo This implementation leaks memory.  A BVP points to
+    a set of patches which have to be properly deallocated as
+    well.
+*/
 INT NS_DIM_PREFIX
 BVP_Dispose (BVP * theBVP)
 {
+    /* Unlock the item so it can be deleted from the environment tree */
+    ((ENVITEM*)theBVP)->d.locked = 0;
+
+    if (ChangeEnvDir("/BVP")==NULL)
+        return (1);
+    if (RemoveEnvItem((ENVITEM *)theBVP))
+        return (1);
+	
   return (0);
 }
 
@@ -3167,6 +1793,7 @@
   return (cnt);
 }
 
+#ifdef __THREEDIM__
 static INT
 GetCommonPatchId (PATCH * p0, PATCH * p1, INT k)
 {
@@ -3182,7 +1809,6 @@
   return (-1);
 }
 
-#ifdef __THREEDIM__
 static INT
 GetCommonLinePatchId (PATCH * p0, PATCH * p1)
 {
@@ -4555,7 +3181,7 @@
 /****************************************************************************/
 
 static INT
-PatchGlobal (PATCH * p, DOUBLE * lambda, DOUBLE * global)
+PatchGlobal (const PATCH * p, DOUBLE * lambda, DOUBLE * global)
 {
   if (PATCH_TYPE (p) == PARAMETRIC_PATCH_TYPE)
     return ((*PARAM_PATCH_BS (p)) (PARAM_PATCH_BSD (p), lambda, global));
@@ -4568,15 +3194,24 @@
 	+ lambda[0] * LINEAR_PATCH_POS (p, 1)[1];
 #endif
 #ifdef __THREEDIM__
-      global[0] = (1 - lambda[0] - lambda[1]) * LINEAR_PATCH_POS (p, 0)[0]
-	+ lambda[0] * LINEAR_PATCH_POS (p, 1)[0]
-	+ lambda[1] * LINEAR_PATCH_POS (p, 2)[0];
-      global[1] = (1 - lambda[0] - lambda[1]) * LINEAR_PATCH_POS (p, 0)[1]
-	+ lambda[0] * LINEAR_PATCH_POS (p, 1)[1]
-	+ lambda[1] * LINEAR_PATCH_POS (p, 2)[1];
-      global[2] = (1 - lambda[0] - lambda[1]) * LINEAR_PATCH_POS (p, 0)[2]
-	+ lambda[0] * LINEAR_PATCH_POS (p, 1)[2]
-	+ lambda[1] * LINEAR_PATCH_POS (p, 2)[2];
+
+      if (LINEAR_PATCH_N(p) ==3) {
+          /* Linear interpolation for a triangle boundary segment */
+          int i;
+          for (i=0; i<3; i++)
+              global[i] = (1 - lambda[0] - lambda[1]) * LINEAR_PATCH_POS (p, 0)[i]
+                  + lambda[0] * LINEAR_PATCH_POS (p, 1)[i]
+                  + lambda[1] * LINEAR_PATCH_POS (p, 2)[i];
+
+      } else {
+          /* Bilinear interpolation for a quadrilateral boundary segment */
+          int i;
+          for (i=0; i<3; i++)
+              global[i] = LINEAR_PATCH_POS (p, 0)[i] 
+                  + lambda[0]*(LINEAR_PATCH_POS (p, 1)[i] - LINEAR_PATCH_POS (p, 0)[i]) 
+                  + lambda[1]*(LINEAR_PATCH_POS (p, 3)[i] - LINEAR_PATCH_POS (p, 0)[i]) 
+                  + lambda[0]*lambda[1]*(LINEAR_PATCH_POS (p, 0)[i]+LINEAR_PATCH_POS (p, 2)[i]-LINEAR_PATCH_POS (p, 1)[i]-LINEAR_PATCH_POS (p, 3)[i]);
+      }
 #endif
       return (0);
     }
@@ -4620,7 +3255,7 @@
       break;
     case 4:
       for (i = 0; i < DIM; i++)
-	global[0] = (1.0 - local[0]) * (1.0 - local[1]) * pos[0][i]
+	global[i] = (1.0 - local[0]) * (1.0 - local[1]) * pos[0][i]
 	+ local[0] * (1.0 - local[1]) * pos[1][i]
 	+ local[0] * local[1] * pos[2][i]
 	+ (1.0 - local[0]) * local[1] * pos[3][i];
@@ -4684,8 +3319,6 @@
   if (p == NULL)
     return (1);
 
-  IF_MARC (aBndS) return (M_BNDS_Global (aBndS, local, global));
-
   PRINTDEBUG (dom, 1, (" Bnds global loc %f pid %d\n",
 		       local[0], PATCH_ID (p)));
 
@@ -4743,8 +3376,6 @@
   if (ps == NULL)
     return (1);
 
-  IF_MARC (aBndS) return (M_BNDS_BndCond (aBndS, local, in, value, type));
-
   p = currBVP->patches[ps->patch_id];
 
   PRINTDEBUG (dom, 1, (" BndCond %d %x\n", PATCH_TYPE (p), p));
@@ -4805,8 +3436,6 @@
   PATCH *p;
   INT left, right;
 
-  IF_MARC (theBndS) return (M_BNDS_BndSDesc (theBndS, id, nbid, part));
-
   ps = (BND_PS *) theBndS;
   p = currBVP->patches[ps->patch_id];
 
@@ -4861,8 +3490,6 @@
   if (aBndS == NULL)
     return (NULL);
 
-  IF_MARC (aBndS) return (M_BNDS_CreateBndP (Heap, aBndS, local));
-
   ps = (BND_PS *) aBndS;
   p = currBVP->patches[ps->patch_id];
 
@@ -4901,7 +3528,7 @@
 /****************************************************************************/
 
 static INT
-BndPointGlobal (BNDP * aBndP, DOUBLE * global)
+BndPointGlobal (const BNDP * aBndP, DOUBLE * global)
 {
   BND_PS *ps;
   PATCH *p, *s;
@@ -4920,39 +3547,41 @@
     case LINEAR_PATCH_TYPE:
       return (PatchGlobal (p, ps->local[0], global));
     case POINT_PATCH_TYPE:
+
       s = currBVP->patches[POINT_PATCH_PID (p, 0)];
+
       PRINTDEBUG (dom, 1, (" bndp n %d %d loc %f %f gl \n",
 			   POINT_PATCH_N (p),
 			   POINT_PATCH_PID (p, 0),
 			   ps->local[0][0], ps->local[0][1]));
-      if ((*PARAM_PATCH_BS (s)) (PARAM_PATCH_BSD (s), ps->local[0], global))
-	REP_ERR_RETURN (1);
-      PRINTDEBUG (dom, 1, (" bndp n %d %d loc %f %f gl %f %f %f\n",
-			   POINT_PATCH_N (p),
-			   POINT_PATCH_PID (p, 0),
-			   ps->local[0][0],
-			   ps->local[0][1], global[0], global[1], global[2]));
+
+          PatchGlobal(s, ps->local[0], global);
+
       for (j = 1; j < POINT_PATCH_N (p); j++)
 	{
 	  s = currBVP->patches[POINT_PATCH_PID (p, j)];
-	  if ((*PARAM_PATCH_BS (s))
-	      (PARAM_PATCH_BSD (s), ps->local[j], pglobal))
-	    REP_ERR_RETURN (1);
-	  PRINTDEBUG (dom, 1, (" bndp    j %d %d loc %f %f gl %f %f %f\n", j,
+
+          if (PatchGlobal(s, ps->local[j], pglobal))
+              REP_ERR_RETURN (1);
+
+        PRINTDEBUG (dom,1, (" bndp    j %d %d loc %f %f gl %f %f %f\n", j,
 			       POINT_PATCH_PID (p, j),
 			       ps->local[j][0],
 			       ps->local[j][1],
-			       pglobal[0], pglobal[1], pglobal[2]));
+                             pglobal[0], pglobal[1], pglobal[2]));
 	  for (k = 0; k < DIM; k++)
 	    if (ABS (pglobal[k] - global[k]) > SMALL_DIFF)
 	        REP_ERR_RETURN (1);
 	}
+
       return (0);
 #ifdef __THREEDIM__
     case LINE_PATCH_TYPE:
       s = currBVP->patches[LINE_PATCH_PID (p, 0)];
-      if ((*PARAM_PATCH_BS (s)) (PARAM_PATCH_BSD (s), ps->local[0], global))
-	REP_ERR_RETURN (1);
+
+      if (PatchGlobal(s, ps->local[0], global))
+          REP_ERR_RETURN (1);
+
       PRINTDEBUG (dom, 1, (" bndp    n %d %d loc %f %f gl %f %f %f\n",
 			   POINT_PATCH_N (p),
 			   LINE_PATCH_PID (p, 0),
@@ -4961,9 +3590,10 @@
       for (j = 1; j < LINE_PATCH_N (p); j++)
 	{
 	  s = currBVP->patches[LINE_PATCH_PID (p, j)];
-	  if ((*PARAM_PATCH_BS (s))
-	      (PARAM_PATCH_BSD (s), ps->local[j], pglobal))
-	    return (1);
+
+          if (PatchGlobal(s, ps->local[j], pglobal))
+              REP_ERR_RETURN (1);
+
 	  PRINTDEBUG (dom, 1, (" bndp    j %d %d loc %f %f gl %f %f %f\n", j,
 			       LINE_PATCH_PID (p, j),
 			       ps->local[j][0],
@@ -4988,8 +3618,6 @@
   DOUBLE *pos;
   INT i;
 
-  IF_MARC (aBndP) return (M_BNDP_Global (aBndP, global));
-
   if (!PATCH_IS_FIXED (currBVP->patches[ps->patch_id]))
     {
       /* copy globals */
@@ -5009,8 +3637,6 @@
   BND_PS *ps;
   PATCH *p;
 
-  IF_MARC (theBndP) return (M_BNDP_BndPDesc (theBndP, move, part));
-
   ps = (BND_PS *) theBndP;
   p = STD_BVP_PATCH (currBVP, ps->patch_id);
 
@@ -5061,8 +3687,6 @@
   if ((bp0 == NULL) || (bp1 == NULL))
     REP_ERR_RETURN (1);
 
-  IF_MARC (aBndP0) return (M_BNDP_BndEDesc (aBndP0, aBndP1, part));
-
   /* default part is 0 */
   *part = 0;
 
@@ -5113,8 +3737,6 @@
   INT k;
 #	endif
 
-  IF_MARC (aBndP[0]) return (M_BNDP_CreateBndS (Heap, aBndP, n));
-
   PRINTDEBUG (dom, 1, ("Create BNDS:\n"));
   for (i = 0; i < n; i++)
     {
@@ -5232,8 +3854,6 @@
   if ((bp0 == NULL) || (bp1 == NULL))
     return (NULL);
 
-  IF_MARC (aBndP0) return (M_BNDP_CreateBndP (Heap, aBndP0, aBndP1, lcoord));
-
   p0 = currBVP->patches[bp0->patch_id];
   p1 = currBVP->patches[bp1->patch_id];
 
@@ -5381,9 +4001,6 @@
   if (bp == NULL)
     return (1);
 
-  IF_MARC (theBndP)
-    return (M_BNDP_SaveInsertedBndP (theBndP, data, max_data_size));
-
   pid = bp->patch_id;
   p = currBVP->patches[pid];
 
@@ -5438,8 +4055,6 @@
   if (ps == NULL)
     return (1);
 
-  IF_MARC (aBndP) return (M_BNDP_BndCond (aBndP, n, i, in, value, type));
-
   p = currBVP->patches[ps->patch_id];
 
   switch (PATCH_TYPE (p))
@@ -5539,8 +4154,6 @@
   if (theBndP == NULL)
     return (0);
 
-  IF_MARC (theBndP) return (M_BNDP_Dispose (Heap, theBndP));
-
   ps = (BND_PS *) theBndP;
   if (!PATCH_IS_FIXED (currBVP->patches[ps->patch_id]))
     if (PutFreelistMemory (Heap, BND_DATA (ps), DIM * sizeof (DOUBLE)))
@@ -5557,8 +4170,6 @@
   if (theBndS == NULL)
     return (0);
 
-  IF_MARC (theBndS) return (M_BNDS_Dispose (Heap, theBndS));
-
   ps = (BND_PS *) theBndS;
   if (!PATCH_IS_FIXED (currBVP->patches[ps->patch_id]))
     if (PutFreelistMemory (Heap, BND_DATA (ps), BND_N (ps) * sizeof (BNDP *)))
@@ -5568,7 +4179,7 @@
 
 /* the following interface functions are not available in std_domain.c */
 INT NS_DIM_PREFIX
-BVP_Save (BVP * theBVP, char *name, char *mgname, HEAP * theHeap, INT argc,
+BVP_Save (BVP * theBVP, const char *name, const char *mgname, HEAP * theHeap, INT argc,
 	  char **argv)
 {
   UserWrite ("ERROR: std domain cannot be saved\n");
@@ -5576,7 +4187,7 @@
 }
 
 BVP *NS_DIM_PREFIX
-BVP_Load (char *name, INT argc, char **argv)
+BVP_Load (const char *name, INT argc, char **argv)
 {
   return (NULL);
 }
@@ -5590,8 +4201,6 @@
   int iList[2];
   double dList[DIM];
 
-  IF_MARC (BndP) return (M_BNDP_SaveBndP (BndP));
-
   iList[0] = BND_PATCH_ID (BndP);
   iList[1] = BND_N (BndP);
   if (Bio_Write_mint (2, iList))
@@ -5620,9 +4229,6 @@
 }
 
 
-#define IO_MARC
-
-
 INT NS_DIM_PREFIX
 BNDP_SaveBndP_Ext (BNDP * BndP)
 {
@@ -5631,22 +4237,6 @@
   int iList[2];
   double dList[DIM - 1];
 
-#ifdef IO_MARC
-  {
-    M_BNDP *p = (M_BNDP *) BndP;
-
-    iList[0] = p->patch_id;
-    if (Bio_Write_mint (1, iList))
-      return (1);
-
-    for (j = 0; j < DIM; j++)
-      dList[j] = p->pos[j];
-    if (Bio_Write_mdouble (DIM, dList))
-      return (1);
-    return (0);
-  }
-#endif
-
   /* TODO: save free boundary points */
   iList[0] = BND_PATCH_ID (BndP);
   iList[1] = BND_N (BndP);
@@ -5684,9 +4274,6 @@
   int iList[2];
   double dList[DIM];
 
-  if (((STD_BVP *) theBVP)->type == BVP_MARC)
-    return (M_BNDP_LoadBndP (theBVP, Heap));
-
   if (Bio_Read_mint (2, iList))
     return (NULL);
   pid = iList[0];
@@ -5732,23 +4319,6 @@
   int iList[2];
   double dList[DIM - 1];
 
-#ifdef IO_MARC
-  {
-    M_BNDP *p = (M_BNDP *) malloc (sizeof (M_BNDP));
-
-    if (Bio_Read_mint (1, iList))
-      return (NULL);
-    p->patch_id = iList[0];
-    if (Bio_Read_mdouble (DIM, dList))
-      return (NULL);
-
-    for (j = 0; j < DIM; j++)
-      p->pos[j] = dList[j];
-
-    return ((BNDP *) p);
-  }
-#endif
-
   if (Bio_Read_mint (2, iList))
     return (NULL);
   pid = iList[0];
@@ -5769,7 +4339,7 @@
 }
 
 INT NS_DIM_PREFIX
-ReadAndPrintArgvPosition (char *name, INT argc, char **argv, DOUBLE * pos)
+ReadAndPrintArgvPosition (const char *name, INT argc, char **argv, DOUBLE * pos)
 {
   INT i;
   char option[OPTIONLEN];
diff -ru ug-orig/dom/std/std_domain.h ug-patched/dom/std/std_domain.h
--- ug-orig/dom/std/std_domain.h	2006-05-08 14:21:44.000000000 +0200
+++ ug-patched/dom/std/std_domain.h	2009-04-29 15:11:55.000000000 +0200
@@ -31,7 +31,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/dom/std/std_domain.h,v 1.34 2006/05/08 12:21:44 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -100,42 +100,49 @@
                                                                  DOUBLE radius, INT segments, 
                                                                  INT corners, INT Convex);
 
+void RemoveDomain(const char* name);
+
 void   *CreateBoundarySegment       (const char *name, INT left, INT right,
                                                  INT id, enum BoundaryType type, INT res,
-                                                 INT *point, 
+                                                 const INT *point, 
                                      const DOUBLE *alpha, const DOUBLE *beta, 
                                                  BndSegFuncPtr BndSegFunc, 
                                                  void *data);
 
-void   *CreateBoundarySegment2D     (char *name, int left, int right, 
+void   *CreateBoundarySegment2D     (const char *name, int left, int right, 
                                                  int id, int from, int to, int res,
                                                  DOUBLE alpha, DOUBLE beta, 
                                                  BndSegFuncPtr BndSegFunc, 
                                                  void *data);
 
+void *CreateLinearSegment (const char *name,
+                           INT left, INT right,INT id,
+                           INT n, const INT *point, 
+                           DOUBLE x[CORNERS_OF_BND_SEG][DIM]);
+
+/** \brief Access the id of the segment (used by DUNE) */
+UINT GetBoundarySegmentId(BNDS* boundarySegment);
+
 /* problem definition */
-void                    *CreateProblem                       (char *domain, char *name, 
+void                    *CreateProblem                       (const char *domain, const char *name, 
                                                                  int id, ConfigProcPtr config, 
                                                                  int numOfCoefficients, 
                                                                  CoeffProcPtr coeffs[], 
                                                                  int numOfUserFct, 
                                                                  UserProcPtr userfct[]);
 
-void *CreateBoundaryCondition (char *name, INT id, 
+void *CreateBoundaryCondition (const char *name, INT id, 
                                              BndCondProcPtr theBndCond, 
                                              void *Data);
 
 BVP   *CreateBoundaryValueProblem (const char *BVPname, BndCondProcPtr theBndCond,
                                                                    int numOfCoeffFct, CoeffProcPtr coeffs[],
                                                                    int numOfUserFct, UserProcPtr userfct[]);
-BVP       *CreateBVP                              (char *BVP, char *Domain, char *Problem);
+BVP       *CreateBVP              (const char *BVP, const char *Domain, const char *Problem);
 const char *GetBVP_DomainName     (const BVP *aBVP);
 const char *GetBVP_ProblemName    (const BVP *aBVP);
-BVP   *Create_MarcBVP             (char *BVPname, BndCondProcPtr theBndCond,
-                                                                   int numOfCoeffFct, CoeffProcPtr coeffs[],
-                                                                   int numOfUserFct, UserProcPtr userfct[]);
 
-BVP *CreateBVP_Problem (char *BVPName, char *DomainName, char *ProblemName);
+BVP *CreateBVP_Problem (const char *BVPName, const char *DomainName, const char *ProblemName);
 
 END_UGDIM_NAMESPACE
 
diff -ru ug-orig/dom/std/std_internal.h ug-patched/dom/std/std_internal.h
--- ug-orig/dom/std/std_internal.h	2006-05-08 14:21:44.000000000 +0200
+++ ug-patched/dom/std/std_internal.h	2008-03-10 09:50:51.000000000 +0100
@@ -26,16 +26,12 @@
 
 typedef DOUBLE COORD_BND_VECTOR[DIM_OF_BND];
 
-enum {BVP_STANDARD, 
-      BVP_MARC};
-
 enum PatchType {POINT_PATCH_TYPE,
+#ifdef __THREEDIM__
                 LINE_PATCH_TYPE,
+#endif
                 LINEAR_PATCH_TYPE,
-                PARAMETRIC_PATCH_TYPE,
-                MARC_0_PATCH_TYPE,
-                MARC_1_PATCH_TYPE,
-                MARC_2_PATCH_TYPE};
+                PARAMETRIC_PATCH_TYPE};
 
 /** @name  Macros for DOMAIN_PART_INFO */
 /*@{*/
@@ -62,9 +58,6 @@
 
 /** @name Macros for STD_BVP */
 /*@{*/
-#define MAX_CORNERS_OF_LINEAR_PATCH      DIM
-
-
 #define STD_BVP_NAME(p)                                 ENVITEM_NAME(p)
 
 #define STD_BVP_DOMAIN(p)                               ((p)->Domain)
@@ -128,9 +121,9 @@
 
 /** @name Macros for patches */
 /*@{*/
-#define PATCH_FIXED                             0
-#define PATCH_BND_OF_FREE               1
-#define PATCH_FREE                              2
+enum {PATCH_FIXED,
+      PATCH_BND_OF_FREE,
+      PATCH_FREE};
 
 #define PATCH_TYPE(p)           (p)->ge.type
 #define PATCH_STATE(p)          (p)->ge.state
@@ -169,8 +162,6 @@
 #define M_BNDS_NSIZE(n)         (((n)-1)*sizeof(M_BNDP)+sizeof(M_BNDS))
 #define M_BNDS_SIZE(p)          M_BNDS_NSIZE(((M_BNDS *)(p))->n)
 
-#define IF_MARC(p) \
-    if (PATCH_TYPE(currBVP->patches[BND_PATCH_ID(p)]) >= MARC_0_PATCH_TYPE)
 /*@}*/
 
 /****************************************************************************/
@@ -277,10 +268,10 @@
     INT n;
 
     /** \brief  Numbers of the vertices (ID)*/
-    INT points[MAX_CORNERS_OF_LINEAR_PATCH];
+    INT points[CORNERS_OF_BND_SEG];
 
     /** \brief  Coordinates  */
-    DOUBLE x[MAX_CORNERS_OF_LINEAR_PATCH][DIM_OF_BND];
+    DOUBLE x[CORNERS_OF_BND_SEG][DIM];
 };
 
 /****************************************************************************/
@@ -379,9 +370,6 @@
     /** \brief Fields for environment directory */
     NS_PREFIX ENVDIR d;
     
-    /* init */
-    INT type; 
-
     /** \brief Domain pointer                      */
     struct domain *Domain;
 
@@ -557,10 +545,10 @@
     INT corners;
 
     /** \brief Ids of points */
-    INT points[MAX_CORNERS_OF_LINEAR_PATCH];
+    INT points[CORNERS_OF_BND_SEG];
 
     /** \brief Position */
-    DOUBLE pos[MAX_CORNERS_OF_LINEAR_PATCH][DIM];
+    DOUBLE pos[CORNERS_OF_BND_SEG][DIM];
 };
     /** \brief ???
      *
@@ -609,66 +597,6 @@
      *
      * \todo Please doc me! 
      */
-struct marc_0_patch {
-
-    /** \brief Patch type                           */
-    enum PatchType type;
-
-    /** \brief Fixed/bnd of free/free               */
-    INT state;
-    
-    /** \brief Unique id used for load/store        */
-    INT id;
-
-    /** \brief Position                             */
-    DOUBLE pos[3];
-};
-
-    /** \brief ???
-     *
-     * \todo Please doc me! 
-     */
-struct marc_1_patch {
-
-    /** \brief Patch type                           */
-    enum PatchType type;
-    
-    /** \brief Fixed/bnd of free/free               */
-    INT state;
-
-    /** \brief Unique id used for load/store        */
-    INT id;
-    
-    /** \brief Line between two points              */
-    INT p[2];
-};
-
-    /** \brief ???
-     *
-     * \todo Please doc me! 
-     */
-struct marc_2_patch {
-
-    /** \brief Patch type                           */
-    enum PatchType type;
-    
-    /** \brief Fixed/bnd of free/free               */
-    INT state;
-    
-    /** \brief Unique id used for load/store        */
-    INT id;
-    
-    /** \brief Bnd cond                             */
-    INT c;
-    
-    /** \brief Triangle of three points             */
-    INT p[3];
-};
-
-    /** \brief ???
-     *
-     * \todo Please doc me! 
-     */
 union patch {
         struct generic_patch   ge;
         struct point_patch     po;
@@ -677,9 +605,6 @@
     #ifdef __THREEDIM__
         struct line_patch      li;
         #endif
-        struct marc_0_patch    m0;
-        struct marc_1_patch    m1;
-        struct marc_2_patch    m2;
 } ;
 
     /** \brief ???
@@ -700,34 +625,6 @@
     /** \brief Parameter range                      */
     COORD_BND_VECTOR local[1];
 };
-    /** \brief ???
-     *
-     * \todo Please doc me! 
-     */
-struct marc_bndp {
-
-    /** \brief Associated patch                     */
-    INT patch_id;
-
-    /** \brief Position                             */
-    DOUBLE pos[3];
-};
-
-    /** \brief ???
-     *
-     * \todo Please doc me! 
-     */
-struct marc_bnds {
-
-    /** \brief associated patch */
-    INT patch_id;
-
-    /** \brief number of corners */
-    INT n;
-
-    /** \brief corners */
-    struct marc_bndp p[1];
-};
 
 /*----------- typedef for structs ------------------------------------------*/
 
@@ -745,12 +642,7 @@
 typedef struct line_patch               LINE_PATCH;
 typedef struct linear_patch             LINEAR_PATCH;
 typedef struct parameter_patch          PARAMETER_PATCH;
-typedef struct marc_0_patch             M0_PATCH;
-typedef struct marc_1_patch             M1_PATCH;
-typedef struct marc_2_patch             M2_PATCH;
 typedef struct bnd_ps                   BND_PS;
-typedef struct marc_bndp                M_BNDP;
-typedef struct marc_bnds                M_BNDS;
 
 /****************************************************************************/
 /*                                                                          */
@@ -764,24 +656,13 @@
 /*                                                                          */
 /****************************************************************************/
 
-# ifdef __THREEDIM__
-INT RepairMesh (NS_PREFIX HEAP *Heap, INT MarkKey, MESH *mesh);
-INT CheckPrisms (INT *corner, INT n0, INT n1 , INT n2, INT n3);
-# endif
-void SetBVPType(INT type);
-
-DOMAIN *GetDomain                           (char *name);
-
-LINEAR_SEGMENT *CreateLinearSegment (char *name,
-                                     INT left, INT right,INT id,
-                                     INT n, INT *point, 
-                                     DOUBLE x[MAX_CORNERS_OF_LINEAR_PATCH][DIM_OF_BND]);
+DOMAIN *GetDomain                           (const char *name);
 
 /* BVP definition */
 INT   STD_BVP_Configure           (INT argc, char **argv);
 
 /* scanning of coordinates */
-INT   ReadAndPrintArgvPosition    (char *name, INT argc, char **argv, DOUBLE *pos);
+INT   ReadAndPrintArgvPosition    (const char *name, INT argc, char **argv, DOUBLE *pos);
 
 END_UGDIM_NAMESPACE
 
diff -ru ug-orig/dom/std/std_parallel.c ug-patched/dom/std/std_parallel.c
--- ug-orig/dom/std/std_parallel.c	2006-07-25 10:46:49.000000000 +0200
+++ ug-patched/dom/std/std_parallel.c	2008-12-19 11:15:14.000000000 +0100
@@ -28,6 +28,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stddef.h>
 #include <stdio.h>
@@ -52,7 +53,14 @@
 /* domain module */
 #include "std_internal.h"
 
-USING_UG_NAMESPACES
+#include "namespace.h"
+
+USING_UGDIM_NAMESPACE
+USING_UG_NAMESPACE
+
+#ifdef ModelP
+USING_PPIF_NAMESPACE
+#endif
 
 /****************************************************************************/
 /*																			*/
@@ -83,10 +91,8 @@
 /*																			*/
 /****************************************************************************/
 
-static INT BVP_type = BVP_STANDARD;
-
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/dom/std/std_parallel.c,v 1.12 2006/07/25 08:46:49 sander Exp $",UG_RCS_STRING); 
+static char RCS_ID("$Header$",UG_RCS_STRING); 
 
 /****************************************************************************/
 /*																			*/
@@ -94,11 +100,6 @@
 /*																			*/
 /****************************************************************************/
 
-void NS_DIM_PREFIX SetBVPType(INT type)
-{
-    BVP_type = type;
-}
-
 void NS_DIM_PREFIX DomInitParallel (INT TypeBndP, INT TypeBndS)
 {
 }
@@ -107,121 +108,10 @@
 {    
 }
 
-static void M_BElementXferBndS (BNDS **bnds, int n, int proc, int prio)
-{
-    INT size,i,size0;
-
-	size = CEIL(sizeof(INT));
-	for (i=0; i<n; i++)	  
-	  if (bnds[i] != NULL) 
-		{
-		  size0 = M_BNDS_SIZE(bnds[i]);
-		  size += CEIL(size0) + CEIL(sizeof(INT));
-
-			PRINTDEBUG(dom,2,("BElementXferBndS(): Xfer  me %x "
-				"%d pid %d n %d size %d\n",
-				me,bnds[i],BND_PATCH_ID(bnds[i]),
-				(int)(((M_BNDS *)(bnds[i]))->n),size0));
-
-		}
-
-	DDD_XferAddData(size,DDD_DOMAIN_DATA);
-}
-
-static void M_BElementGatherBndS (BNDS **bnds, int n, int cnt, char *data)
-{
-    INT size,i;
-
-	for (i=0; i<n; i++)	  
-	  if (bnds[i] != NULL) 
-		{
-		  size = M_BNDS_SIZE(bnds[i]);
-
-		  PRINTDEBUG(dom,2,("BElementGatherBndS(): %d  "
-							"me %d %x pid %d n %d size %d\n",i,
-							me,bnds[i],BND_PATCH_ID(bnds[i]),
-							(int)(((M_BNDS *)(bnds[i]))->n),size));
-
-
-		  memcpy(data,&i,sizeof(INT));
-		  data += CEIL(sizeof(INT));
-		  memcpy(data,bnds[i],size);
-		  data += CEIL(size);
-		}
-	i = -1;
-	memcpy(data,&i,sizeof(INT));
-}
-
-static void M_BElementScatterBndS (BNDS **bnds, int n, int cnt, char *data)
-{
-    INT size,i;
-	BNDS *bs;
-
-	memcpy(&i,data,sizeof(INT));
-	while (i != -1)
-	  {
-		data += CEIL(sizeof(INT));
-		bs = (BNDS *) data;
-		size = M_BNDS_SIZE(bs);
-
-		PRINTDEBUG(dom,1,("BElementScatterBndS(): %d me %d\n",i,size));
-
-		if (bnds[i] == NULL)
-		  {
-			bs = (BNDS *) memmgr_AllocOMEM((size_t)size,TypeBndS,0,0);
-			memcpy(bs,data,size);
-			bnds[i] = bs;
-		  }
-		data += CEIL(size);
-		memcpy(&i,data,sizeof(INT));
-	  }
-}
-
-static void M_BVertexXferBndP (BNDP *bndp, int proc, int prio)
-{
-    INT size;
-
-	size = sizeof(M_BNDP);
-
-	PRINTDEBUG(dom,2,("BVertexXferBndP():  me %x %d pid %d n %d size %d\n",
-					  me,bndp,BND_PATCH_ID(bndp),BND_N(bndp),BND_SIZE(bndp)));
-
-	DDD_XferAddData(size,DDD_DOMAIN_DATA);
-}
-
-static void M_BVertexGatherBndP (BNDP *bndp, int cnt, char *data)
-{
-	PRINTDEBUG(dom,2,("BVertexGatherBnd():  me %d pid %d "
-		"n %d size %d cnt %d\n",
-		me,BND_PATCH_ID(bndp),
-		BND_N(bndp),BND_SIZE(bndp),cnt));
-
-    ASSERT(cnt == sizeof(M_BNDP));
-
-	memcpy(data,bndp,cnt);
-}
-
-static void M_BVertexScatterBndP (BNDP **bndp, int cnt, char *data)
-{
-	if (*bndp == NULL)
-	  {
-		*bndp = (BNDP *) memmgr_AllocOMEM((size_t)cnt,TypeBndP,0,0);
-		memcpy(*bndp,data,cnt);
-		PRINTDEBUG(dom,2,("BVertexScatterBndP():  me %d pid "
-			"%d n %d size %d cnt %d\n",
-			me,BND_PATCH_ID(*bndp),
-			BND_N(*bndp),BND_SIZE(*bndp),cnt));
-	  }
-}
-
 void NS_DIM_PREFIX BElementXferBndS (BNDS **bnds, int n, int proc, int prio)
 {
     INT size,i,size0;
 
-	if (BVP_type == BVP_MARC) {
-	    M_BElementXferBndS(bnds,n,proc,prio);
-		return;
-	}
 	size = CEIL(sizeof(INT));
 	for (i=0; i<n; i++)	  
 	  if (bnds[i] != NULL) 
@@ -243,10 +133,6 @@
 {
     INT size,i;
 
-	if (BVP_type == BVP_MARC) {
-	    M_BElementGatherBndS(bnds,n,cnt,data);
-		return;
-	}
 	for (i=0; i<n; i++)	  
 	  if (bnds[i] != NULL) 
 		{
@@ -272,10 +158,6 @@
     INT size,i;
 	BNDS *bs;
 
-	if (BVP_type == BVP_MARC) {
-	    M_BElementScatterBndS(bnds,n,cnt,data);
-		return;
-	}
 	memcpy(&i,data,sizeof(INT));
 	while (i != -1)
 	  {
@@ -300,10 +182,6 @@
 {
     INT size;
 
-	if (BVP_type == BVP_MARC) {
-	    M_BVertexXferBndP(bndp,proc,prio);
-		return;
-	}
 	size = BND_SIZE(bndp);
 
 	PRINTDEBUG(dom,1,("BVertexXferBndP():  me %x %d pid %d n %d size %d\n",
@@ -314,10 +192,6 @@
 
 void NS_DIM_PREFIX BVertexGatherBndP (BNDP *bndp, int cnt, char *data)
 {
-	if (BVP_type == BVP_MARC) {
-	    M_BVertexGatherBndP(bndp,cnt,data);
-		return;
-	}
 	PRINTDEBUG(dom,1,("BVertexGatherBnd():  me %d pid %d "
 		"n %d size %d cnt %d\n",
 		me,BND_PATCH_ID(bndp),
@@ -331,10 +205,6 @@
 
 void NS_DIM_PREFIX BVertexScatterBndP (BNDP **bndp, int cnt, char *data)
 {
-	if (BVP_type == BVP_MARC) {
-	    M_BVertexScatterBndP(bndp,cnt,data);
-		return;
-	}
 	if (*bndp == NULL)
 	  {
 		*bndp = (BNDS *) memmgr_AllocOMEM((size_t)cnt,TypeBndP,0,0);
Nur in ug-orig/dom: switch.h.
diff -ru ug-orig/gcc.opts ug-patched/gcc.opts
--- ug-orig/gcc.opts	2004-09-02 14:22:03.000000000 +0200
+++ ug-patched/gcc.opts	2004-09-02 14:22:17.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: gcc.opts,v 1.1 2004/09/02 12:22:03 thimo Exp $
+# $Id: gcc.opts 7772 2004-09-02 12:22:17Z thimo $
 
 # options for gcc/g++
 # remember to run ./autogen.sh after changing these values!
diff -ru ug-orig/gm/algebra.c ug-patched/gm/algebra.c
--- ug-orig/gm/algebra.c	2006-06-14 09:51:37.000000000 +0200
+++ ug-patched/gm/algebra.c	2009-04-29 14:30:36.000000000 +0200
@@ -52,6 +52,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <assert.h>
 #include <math.h>
 #include <stdio.h>
@@ -299,7 +300,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/algebra.c,v 1.171 2006/06/14 07:51:37 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
@@ -497,8 +498,8 @@
 
 BLOCKVECTOR *NS_DIM_PREFIX FindBV( const GRID *grid, const BV_DESC *bvd, const BV_DESC_FORMAT *bvdf )
 {
-	register BLOCKVECTOR *bv;
-	register BLOCKNUMBER nr;
+	BLOCKVECTOR *bv;
+	BLOCKNUMBER nr;
 	BV_DESC copy_bvd = *bvd;
 
 	/* initialize the search with the topmost blockvector in the grid */
@@ -709,6 +710,13 @@
 	SETVNEW(pv,1);
 	/* SETPRIO(pv,PrioMaster); */
 
+#ifdef FOR_DUNE
+        /** \todo This line is a hack.  It is used to implement face ids for Dune.
+            As soon as the face data structure is available the id should be stored
+            there.  Then this code can be removed again. */
+        pv->id = (theGrid->mg->vectorIdCounter)++;
+#endif
+
     #ifdef __BLOCK_VECTOR_DESC__ 
 	BVD_INIT( &VBVD( pv ) );
     #endif
@@ -1328,7 +1336,7 @@
 
 static void FreeBVList (GRID *grid, BLOCKVECTOR *bv)
 {
-	register BLOCKVECTOR *bv_h;
+	BLOCKVECTOR *bv_h;
 
 	if ( bv == NULL )
 		return;
@@ -3438,7 +3446,7 @@
 */										
 /****************************************************************************/
 
-static INT CheckVector (const FORMAT *fmt, const INT s2p[], GEOM_OBJECT *theObject, char *ObjectString, 
+static INT CheckVector (const FORMAT *fmt, const INT s2p[], GEOM_OBJECT *theObject, const char *ObjectString, 
 		VECTOR *theVector, INT VectorObjType, INT side)
 {
 	GEOM_OBJECT *VecObject;
@@ -4439,7 +4447,7 @@
 	PRINTDEBUG(gm,1,("\n" PFMT "PropagateNextVectorClasses(): 1. communication\n",me))
    	/* exchange VNCLASS of vectors */
 	DDD_IFAExchange(BorderVectorSymmIF,GRID_ATTR(theGrid),sizeof(INT),
-				  Gather_VectorVNClass, Scatter_VectorVNClass);
+                    Gather_VectorVNClass, Scatter_VectorVNClass);
     #endif
 
 	if (PropagateNextVectorClass(theGrid,3)) REP_ERR_RETURN(1);
@@ -4811,7 +4819,7 @@
 */										
 /****************************************************************************/
 
-FIND_CUT * NS_DIM_PREFIX CreateFindCutProc (char *name, FindCutProcPtr FindCutProc)
+FIND_CUT * NS_DIM_PREFIX CreateFindCutProc (const char *name, FindCutProcPtr FindCutProc)
 {
 	FIND_CUT *newFindCut;
 
@@ -4839,7 +4847,7 @@
 */										
 /****************************************************************************/
 
-ALG_DEP * NS_DIM_PREFIX CreateAlgebraicDependency (char *name, DependencyProcPtr DependencyProc)
+ALG_DEP * NS_DIM_PREFIX CreateAlgebraicDependency (const char *name, DependencyProcPtr DependencyProc)
 {
 	ALG_DEP *newAlgDep;
 
@@ -6856,9 +6864,9 @@
 static INT CreateBVPlane( BLOCKVECTOR **bv_plane, const BV_DESC *bvd_plane, const BV_DESC_FORMAT *bvdf, VECTOR **v, INT stripes, INT vectors_per_stripe, GRID *grid )
 {
 	BLOCKVECTOR *bv;
-	register BLOCKVECTOR *prev;
-	register INT i, j;
-	register VECTOR *pred_v;
+	BLOCKVECTOR *prev;
+	INT i, j;
+	VECTOR *pred_v;
 
 	(void)CreateBlockvector( grid, bv_plane );
 	if ( *bv_plane == NULL )
@@ -7252,7 +7260,7 @@
 #ifdef __BLOCK_VECTOR_DESC__ 
 	BLOCKVECTOR *bv;
 	INT ret;
-	register VECTOR *v, *end_v;
+	VECTOR *v, *end_v;
 	
 	if ( GFIRSTBV( grid ) != NULL )
 		FreeAllBV( grid );
@@ -7335,7 +7343,7 @@
 {
 	VECTOR *v, *vpred, *end_v, **v0, **v1, **vi;
 	BLOCKVECTOR *bv0, *bv1, *bvi;
-	register INT index, interface, nr_0, nr_1, nr_i;
+	INT index, interface, nr_0, nr_1, nr_i;
 	VECTOR *pred_first_vec;
 
     #ifndef __BLOCK_VECTOR_DESC__ 
diff -ru ug-orig/gm/algebra.h ug-patched/gm/algebra.h
--- ug-orig/gm/algebra.h	2006-06-02 18:12:47.000000000 +0200
+++ ug-patched/gm/algebra.h	2007-04-17 16:02:22.000000000 +0200
@@ -38,7 +38,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/algebra.h,v 1.37 2006/06/02 16:12:47 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -74,9 +74,9 @@
 };
 
 #define GET_MATRIX(v,w,m)                                                   \
-{ register MATRIX *theMatrix0;                                              \
-  register VECTOR *theVector0 = (v);                                        \
-  register VECTOR *theVector1 = (w);                                        \
+{ MATRIX *theMatrix0;                                                       \
+  VECTOR *theVector0 = (v);                                                 \
+  VECTOR *theVector1 = (w);                                                 \
   (m) = NULL;                                                               \
   if (theVector0 == theVector1) (m) = VSTART(theVector0);                   \
   else if (VINDEX(theVector0) > VINDEX(theVector1)) {                       \
Nur in ug-orig/gm: CVS.
Nur in ug-orig/gm: .cvsignore.
diff -ru ug-orig/gm/cw.c ug-patched/gm/cw.c
--- ug-orig/gm/cw.c	2005-07-18 15:42:57.000000000 +0200
+++ ug-patched/gm/cw.c	2008-12-19 11:02:55.000000000 +0100
@@ -17,6 +17,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 
@@ -74,7 +75,7 @@
 /** \brief Description of a control word predefines */
 typedef struct {
     INT used;	        /**< Used this entry					*/
-    char *name;        /**< Name string						*/
+    const char *name;        /**< Name string						*/
     INT control_word_id;	/**< Index in control_words			*/
     UINT offset_in_object ; 	/**< Where in object is it ?			*/
     INT objt_used;				/**< Bitwise object ID */
@@ -83,7 +84,7 @@
 /** \brief Description of a control entry predefines */
 typedef struct {
     INT used;                /**< Used this entry					*/
-    char *name;	             /**< Name string						*/
+    const char *name;	             /**< Name string						*/
     INT control_word;        /**< Index of corresp. controlword	*/
     INT control_entry_id;    /**< Index in control_entries 		*/
     INT offset_in_word;      /**< Shift in control word			*/
@@ -236,7 +237,7 @@
 static CE_USAGE ce_usage[MAX_CONTROL_ENTRIES];
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/cw.c,v 1.48 2005/07/18 13:42:57 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /** \brief Print all control entries of an objects control word
diff -ru ug-orig/gm/cw.h ug-patched/gm/cw.h
--- ug-orig/gm/cw.h	2006-05-08 14:29:56.000000000 +0200
+++ ug-patched/gm/cw.h	2008-03-10 09:51:35.000000000 +0100
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/cw.h,v 1.11 2006/05/08 12:29:56 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -50,7 +50,7 @@
     INT used;
 
     /** \brief name string */
-    char *name;
+    const char *name;
 
     /** \brief where in object is it ? */
     UINT offset_in_object;
@@ -70,7 +70,7 @@
     INT used;
 
     /** \brief name string */
-    char *name;
+    const char *name;
 
     /** \brief pointer to corresponding control word */
     INT control_word;
diff -ru ug-orig/gm/dlmgr.c ug-patched/gm/dlmgr.c
--- ug-orig/gm/dlmgr.c	2006-06-02 17:36:28.000000000 +0200
+++ ug-patched/gm/dlmgr.c	2006-06-02 17:38:35.000000000 +0200
@@ -47,7 +47,7 @@
 #include "ppif_namespace.h"
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/dlmgr.c,v 1.12 2006/06/02 15:36:28 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 USING_UG_NAMESPACES
 USING_PPIF_NAMESPACE
diff -ru ug-orig/gm/dlmgr.h ug-patched/gm/dlmgr.h
--- ug-orig/gm/dlmgr.h	2006-05-08 14:29:56.000000000 +0200
+++ ug-patched/gm/dlmgr.h	2006-05-08 14:31:31.000000000 +0200
@@ -36,7 +36,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/dlmgr.h,v 1.23 2006/05/08 12:29:56 sander Exp $
+$Header$
 */
 
 #ifndef __DLMGR_H__
diff -ru ug-orig/gm/dlmgr.t ug-patched/gm/dlmgr.t
--- ug-orig/gm/dlmgr.t	2007-10-16 14:46:53.000000000 +0200
+++ ug-patched/gm/dlmgr.t	2006-05-08 14:31:31.000000000 +0200
@@ -255,7 +255,7 @@
 
 		IFDEBUG(gm,2) 
 			printf("%d: GRID_LINK_" STR(OTYPE) "():" STR(OTYPE) 
-				" has listpart=%d for prio=%d obj=%p\n",me,listpart,Prio,Object);
+				" has listpart=%d for prio=%d obj=%x\n",me,listpart,Prio,Object);
 			fflush(stdout);
 		ENDDEBUG 
 
@@ -439,7 +439,7 @@
 	{
 		IFDEBUG(gm,2)
 		printf(PFMT " GRID_LINKX_" STR(OTYPE) "():" STR(OTYPE) 
-			" calling GRID_LINK_" STR(OTYPE) "(): Object=%p After=%p \n",me,Object,After);
+			" calling GRID_LINK_" STR(OTYPE) "(): Object=%x After=%x \n",me,Object,After);
 		ENDDEBUG
 
 		CAT(GRID_LINK_,OTYPE) (Grid,Object,Prio);
@@ -462,7 +462,7 @@
 
 	IFDEBUG(gm,2) 
 		printf("%d: GRID_LINKX_" STR(OTYPE) "():" STR(OTYPE) 
-			" has listpart=%d for prio=%d obj=%p\n",me,listpart,Prio,Object);
+			" has listpart=%d for prio=%d obj=%x\n",me,listpart,Prio,Object);
 		fflush(stdout);
 	ENDDEBUG 
 
@@ -601,7 +601,7 @@
 {
 	if (prios==2)
 	{
-		printf (PFMT "  fg=%p fg=%p fm=%p lm=%p\n",me,
+		printf (PFMT "  fg=%x fg=%x fm=%x lm=%x\n",me,
 			CAT(LISTPART_FIRST,OTYPE(Grid,0)),
 			CAT(LISTPART_LAST,OTYPE(Grid,0)),
 			CAT(LISTPART_FIRST,OTYPE(Grid,1)),
@@ -609,7 +609,7 @@
 	}
 	else
 	{
-		printf (PFMT "  fg=%p fg=%p fb=%p lb=%p fm=%p lm=%p\n",me,
+		printf (PFMT "  fg=%x fg=%x fb=%x lb=%x fm=%x lm=%x\n",me,
 			CAT(LISTPART_FIRST,OTYPE(Grid,0)),
 			CAT(LISTPART_LAST,OTYPE(Grid,0)),
 			CAT(LISTPART_FIRST,OTYPE(Grid,1)),
diff -ru ug-orig/gm/elements.c ug-patched/gm/elements.c
--- ug-orig/gm/elements.c	2005-01-26 14:18:58.000000000 +0100
+++ ug-patched/gm/elements.c	2008-12-19 11:02:55.000000000 +0100
@@ -18,6 +18,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <assert.h>
 
 #include "general.h"
@@ -192,7 +193,7 @@
 #endif
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/elements.c,v 1.38 2005/01/26 13:18:58 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /** \brief Compute index fields for a given element type
diff -ru ug-orig/gm/elements.h ug-patched/gm/elements.h
--- ug-orig/gm/elements.h	2006-05-08 14:29:56.000000000 +0200
+++ ug-patched/gm/elements.h	2006-05-08 14:31:31.000000000 +0200
@@ -23,7 +23,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/elements.h,v 1.15 2006/05/08 12:29:56 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/gm/enrol.c ug-patched/gm/enrol.c
--- ug-orig/gm/enrol.c	2004-07-21 11:18:35.000000000 +0200
+++ ug-patched/gm/enrol.c	2008-12-19 11:02:55.000000000 +0100
@@ -37,6 +37,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stddef.h>
 #include <stdio.h>
@@ -97,7 +98,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/enrol.c,v 1.23 2004/07/21 09:18:35 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*D
diff -ru ug-orig/gm/enrol.h ug-patched/gm/enrol.h
--- ug-orig/gm/enrol.h	2006-05-08 14:29:56.000000000 +0200
+++ ug-patched/gm/enrol.h	2006-05-08 14:31:31.000000000 +0200
@@ -24,7 +24,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/enrol.h,v 1.12 2006/05/08 12:29:56 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/gm/er.c ug-patched/gm/er.c
--- ug-orig/gm/er.c	2005-07-18 10:19:27.000000000 +0200
+++ ug-patched/gm/er.c	2009-04-29 15:11:55.000000000 +0200
@@ -58,6 +58,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 
 /* low */
@@ -157,8 +158,11 @@
 #else
 #define PD_ERR(l,x,e)			/* no debug */
 #define PD(x)					/* no debug */
+#ifdef PrintDebug
+#undef PrintDebug
 #define PrintDebug              printf
 #endif
+#endif
 
 /****************************************************************************/
 /*																			*/
@@ -242,7 +246,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/er.c,v 1.19 2005/07/18 08:19:27 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/gm/er.h ug-patched/gm/er.h
--- ug-orig/gm/er.h	2006-05-08 14:29:56.000000000 +0200
+++ ug-patched/gm/er.h	2006-05-08 14:31:31.000000000 +0200
@@ -23,7 +23,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/er.h,v 1.7 2006/05/08 12:29:56 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/gm/evalproc.c ug-patched/gm/evalproc.c
--- ug-orig/gm/evalproc.c	2006-06-02 17:36:29.000000000 +0200
+++ ug-patched/gm/evalproc.c	2006-06-02 17:38:35.000000000 +0200
@@ -98,7 +98,7 @@
 static struct Coubling_CoeffProc_Name Couple_for_ElemVector;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/evalproc.c,v 1.25 2006/06/02 15:36:29 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/gm/evm.c ug-patched/gm/evm.c
--- ug-orig/gm/evm.c	2007-11-19 19:48:21.000000000 +0100
+++ ug-patched/gm/evm.c	2008-12-19 11:02:55.000000000 +0100
@@ -26,6 +26,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <math.h>
 #include <assert.h>
 #include <stdlib.h>
@@ -84,7 +85,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/evm.c,v 1.30 2007/11/19 18:48:21 dmitriy Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -1615,8 +1616,8 @@
 
 INT  NS_DIM_PREFIX Yams (INT n, DOUBLE *sol, DOUBLE *mat, DOUBLE *rhs)
 {
-    register DOUBLE dinv,piv,sum;
-    register INT i,j,k;
+    DOUBLE dinv,piv,sum;
+    INT i,j,k;
 	DOUBLE *ipv=mat+(n*n);
 
 	if (rhs==NULL)
diff -ru ug-orig/gm/evm.h ug-patched/gm/evm.h
--- ug-orig/gm/evm.h	2006-06-02 18:12:47.000000000 +0200
+++ ug-patched/gm/evm.h	2006-06-02 18:15:49.000000000 +0200
@@ -23,7 +23,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/evm.h,v 1.40 2006/06/02 16:12:47 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/gm/GenerateRules.c ug-patched/gm/GenerateRules.c
--- ug-orig/gm/GenerateRules.c	1997-07-18 16:58:56.000000000 +0200
+++ ug-patched/gm/GenerateRules.c	2008-12-19 11:02:55.000000000 +0100
@@ -14,6 +14,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -112,7 +113,7 @@
 	};
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/GenerateRules.c,v 1.3 1997/07/18 14:58:56 birken Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/gm/GenerateRules.h ug-patched/gm/GenerateRules.h
--- ug-orig/gm/GenerateRules.h	2004-01-21 11:16:10.000000000 +0100
+++ ug-patched/gm/GenerateRules.h	2003-09-16 17:08:55.000000000 +0200
@@ -20,7 +20,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/GenerateRules.h,v 1.3 2004/01/21 10:16:10 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
Nur in ug-orig/gm/gg2: CVS.
Nur in ug-orig/gm/gg2: .cvsignore.
diff -ru ug-orig/gm/gg2/ggaccel.c ug-patched/gm/gg2/ggaccel.c
--- ug-orig/gm/gg2/ggaccel.c	2004-07-21 11:18:38.000000000 +0200
+++ ug-patched/gm/gg2/ggaccel.c	2008-12-19 11:02:55.000000000 +0100
@@ -20,6 +20,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include  <stdlib.h>
 #include  "ggaccel.h"
 #include  "misc.h"
@@ -70,7 +71,7 @@
 static GG_PARAM *myPars;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/gg2/ggaccel.c,v 1.20 2004/07/21 09:18:38 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 static INT QuObj; 
 static INT ScObj; 
diff -ru ug-orig/gm/gg2/ggaccel.h ug-patched/gm/gg2/ggaccel.h
--- ug-orig/gm/gg2/ggaccel.h	2006-05-08 14:29:57.000000000 +0200
+++ ug-patched/gm/gg2/ggaccel.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/gg2/ggaccel.h,v 1.9 2006/05/08 12:29:57 sander Exp $
+$Header$
 */
 
 
diff -ru ug-orig/gm/gg2/ggmain.c ug-patched/gm/gg2/ggmain.c
--- ug-orig/gm/gg2/ggmain.c	2006-06-02 18:13:12.000000000 +0200
+++ ug-patched/gm/gg2/ggmain.c	2006-06-02 18:15:34.000000000 +0200
@@ -176,7 +176,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/gg2/ggmain.c,v 1.67 2006/06/02 16:13:12 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 static INT IflObj; 
 static INT FlObj; 
diff -ru ug-orig/gm/gg2/ggmain.h ug-patched/gm/gg2/ggmain.h
--- ug-orig/gm/gg2/ggmain.h	2006-05-08 14:29:57.000000000 +0200
+++ ug-patched/gm/gg2/ggmain.h	2006-05-08 14:31:31.000000000 +0200
@@ -27,7 +27,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/gg2/ggmain.h,v 1.13 2006/05/08 12:29:57 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/gm/gg2/ggm.c ug-patched/gm/gg2/ggm.c
--- ug-orig/gm/gg2/ggm.c	2005-07-06 11:51:20.000000000 +0200
+++ ug-patched/gm/gg2/ggm.c	2008-12-19 11:02:55.000000000 +0100
@@ -26,6 +26,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -80,7 +81,7 @@
 static INT FcObj;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/gg2/ggm.c,v 1.24 2005/07/06 09:51:20 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
diff -ru ug-orig/gm/gg2/ggm.h ug-patched/gm/gg2/ggm.h
--- ug-orig/gm/gg2/ggm.h	2006-05-08 14:29:57.000000000 +0200
+++ ug-patched/gm/gg2/ggm.h	2006-05-08 14:31:31.000000000 +0200
@@ -24,7 +24,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/gg2/ggm.h,v 1.16 2006/05/08 12:29:57 sander Exp $
+$Header$
 */
 
 
diff -ru ug-orig/gm/gg2/Makefile.am ug-patched/gm/gg2/Makefile.am
--- ug-orig/gm/gg2/Makefile.am	2004-09-02 14:22:10.000000000 +0200
+++ ug-patched/gm/gg2/Makefile.am	2007-02-14 21:27:52.000000000 +0100
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.1 2004/09/02 12:22:10 thimo Exp $
+# $Id: Makefile.am 8267 2007-02-14 20:27:52Z christi $
 
 if BUILD2D
   LIB_2D = libgg2.la
@@ -7,7 +7,7 @@
 endif
 
 # should be installed
-lib_LTLIBRARIES = $(LIB_2D)
+noinst_LTLIBRARIES = $(LIB_2D)
 
 libgg2_la_SOURCES = ggmain.c ggaccel.c ggm.c ggaccel.h ggmain.h ggm.h
 libgg2_la_CPPFLAGS = $(UG_2DFLAGS)
Nur in ug-orig/gm/gg3: CVS.
Nur in ug-orig/gm/gg3: .cvsignore.
diff -ru ug-orig/gm/gg3/gg3d.c ug-patched/gm/gg3/gg3d.c
--- ug-orig/gm/gg3/gg3d.c	2005-07-04 17:54:00.000000000 +0200
+++ ug-patched/gm/gg3/gg3d.c	2008-12-19 11:02:55.000000000 +0100
@@ -25,6 +25,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -112,7 +113,7 @@
 										(C)[2][2] = (A)[2][0]*(B)[0][2]+(A)[2][1]*(B)[1][2]+(A)[2][2]*(B)[2][2];}
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/gg3/gg3d.c,v 1.32 2005/07/04 15:54:00 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
diff -ru ug-orig/gm/gg3/gg3d.h ug-patched/gm/gg3/gg3d.h
--- ug-orig/gm/gg3/gg3d.h	2006-05-08 14:29:58.000000000 +0200
+++ ug-patched/gm/gg3/gg3d.h	2006-05-08 14:31:31.000000000 +0200
@@ -26,7 +26,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/gg3/gg3d.h,v 1.13 2006/05/08 12:29:58 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/gm/gg3/gginterface.h ug-patched/gm/gg3/gginterface.h
--- ug-orig/gm/gg3/gginterface.h	2004-01-21 11:16:11.000000000 +0100
+++ ug-patched/gm/gg3/gginterface.h	2003-09-16 17:08:55.000000000 +0200
@@ -23,7 +23,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/gg3/gginterface.h,v 1.10 2004/01/21 10:16:11 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/gm/gg3/Makefile.am ug-patched/gm/gg3/Makefile.am
--- ug-orig/gm/gg3/Makefile.am	2004-09-02 14:22:10.000000000 +0200
+++ ug-patched/gm/gg3/Makefile.am	2007-02-14 21:27:52.000000000 +0100
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.1 2004/09/02 12:22:10 thimo Exp $
+# $Id: Makefile.am 8267 2007-02-14 20:27:52Z christi $
 
 if BUILD3D
   LIB_3D = libgg3.la
@@ -7,7 +7,7 @@
 endif
 
 # this lib should be directly installed
-lib_LTLIBRARIES = libgg3.la
+noinst_LTLIBRARIES = libgg3.la
 
 libgg3_la_SOURCES = gg3d.c gg3d.h gginterface.h
 libgg3_la_CPPFLAGS = $(UG_3DFLAGS)
Nur in ug-patched/gm/gg3: netgen.
diff -ru ug-orig/gm/gmcheck.c ug-patched/gm/gmcheck.c
--- ug-orig/gm/gmcheck.c	2006-07-12 14:55:48.000000000 +0200
+++ ug-patched/gm/gmcheck.c	2008-12-19 11:02:55.000000000 +0100
@@ -31,6 +31,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stddef.h>
 #include <stdio.h>
@@ -111,7 +112,7 @@
 static DOUBLE hghost_overlap = 1.0;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/gmcheck.c,v 1.51 2006/07/12 12:55:48 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 REP_ERR_FILE;
 
diff -ru ug-orig/gm/gm.h ug-patched/gm/gm.h
--- ug-orig/gm/gm.h	2008-02-01 13:57:04.000000000 +0100
+++ ug-patched/gm/gm.h	2009-10-08 16:19:56.000000000 +0200
@@ -34,7 +34,7 @@
 /******************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/gm.h,v 1.252 2008/02/01 12:57:04 lampe Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -340,6 +340,9 @@
      PRISM_ROTATE_RGHT = 11,
      PRISM_QUADSECT_HEXPRI0 = 14,
      PRISM_RED_HEX = 15,
+     PRISM_BISECT_0_1,  /* No explicit numbers.  Maybe they are not necessary? */
+     PRISM_BISECT_0_2,
+     PRISM_BISECT_0_3,
      
      HEX_BISECT_0_1 = 5,
      HEX_BISECT_0_2 = 6,
@@ -364,7 +367,7 @@
                     };
 
     /** \brief Values for node types (relative to the father element of the vertex) */
-    enum {CORNER_NODE,
+enum NodeType {CORNER_NODE,
           MID_NODE,
           SIDE_NODE,
           CENTER_NODE,
@@ -609,7 +612,7 @@
 
 #ifdef ModelP
     /** \todo Please doc me! */
-    DDD_HEADER ddd;
+    NS_DIM_PREFIX DDD_HEADER ddd;
 #endif
         
     /** \brief double linked list of vectors                */
@@ -618,6 +621,14 @@
     /** \brief ordering of unknowns                                 */
     UINT index;
 
+#ifdef FOR_DUNE
+    /** \brief A unique and persistent, but not necessarily consecutive index 
+        \todo This line is a hack.  It is used to implement face ids for Dune.
+        As soon as the face data structure is available the id should be stored
+        there.  Then this code can be removed again. */
+    INT id;
+#endif
+
     /** \brief used bitwise to skip unknowns                */
     UINT skip;
 
@@ -719,9 +730,6 @@
     /** \brief Unique id used for load/store */
     INT id;
 
-	/** \brief extra field for miscellanea */
-	INT extra;
-
     /** \brief Vertex position                                              */
     DOUBLE x[DIM];
 
@@ -771,15 +779,12 @@
     /** \brief Unique id used for load/store */
     INT id;
 
-	/** \brief extra field for miscellanea */
-	INT extra;
-
     /** \brief Vertex position */
     DOUBLE x[DIM];
 
     /** \brief Local coordinates in father element  */
     DOUBLE xi[DIM];
-
+        
 #ifdef FOR_DUNE
     /* When UG is used as part of the DUNE numerics system we need
        a few more indices per node */
@@ -837,9 +842,6 @@
     /** \brief Unique id used for load/store                */
     INT id;
 
-	/** \brief extra field for miscellanea */
-	INT extra;
-
 #ifdef FOR_DUNE
     /* When UG is used as part of the DUNE numerics system we need
        a few more indices per node */
@@ -918,6 +920,9 @@
     /** \brief An index hat is unique and consecutive on the grid surface.
         Controlled by DUNE */
     int leafIndex;
+
+    /** \brief A unique and persistent, but not necessarily consecutive index */
+    INT id;
 #endif
 
 #ifdef EDGE_WITH_DDDHDR
@@ -945,9 +950,6 @@
     /** \brief unique id used for load/store        */
     INT id;
 
-	/** \brief extra field for miscellanea */
-	INT extra;
-
     /** \brief additional flags for elements        */
     UINT  flag;
 
@@ -994,7 +996,9 @@
 
 };
 
-/** \brief A triangle element in a 2d grid */
+/** \brief A triangle element in a 2d grid 
+    \implements generic_element
+*/
 struct triangle {
 
     /** \brief Object identification, various flags */
@@ -1003,15 +1007,12 @@
     /** \brief Unique id used for load/store */
     INT id;
 
-	/** \brief extra field for miscellanea */
-	INT extra;
-
     /** \brief Additional flags for elements */
     UINT  flag;
 
     /** \brief Even more property bits */
     INT  property;
-
+        
 #ifdef FOR_DUNE
     /* When UG is used as part of the DUNE numerics system we need
        a few more indices per element */
@@ -1081,7 +1082,9 @@
     void *data;
 };
 
-/** \brief A quadrilateral element in a 2d grid */
+/** \brief A quadrilateral element in a 2d grid
+    \implements generic_element
+*/
 struct quadrilateral {
 
     /** \brief object identification, various flags */
@@ -1090,9 +1093,6 @@
     /** \brief unique id used for load/store                */
     INT id;
 
-	/** \brief extra field for miscellanea */
-	INT extra;
-
     /** \brief additional flags for elements                */
     UINT flag;
 
@@ -1169,7 +1169,9 @@
     void *data;
 };
 
-/** \brief A tetrahedral element in a 3d grid */
+/** \brief A tetrahedral element in a 3d grid
+    \implements generic_element
+*/
 struct tetrahedron {
 
     /** \brief object identification, various flags */
@@ -1178,15 +1180,12 @@
     /** \brief Unique id used for load/store */
     INT id;
 
-	/** \brief extra field for miscellanea */
-	INT extra;
-
     /** \brief Additional flags */
     UINT  flag;
 
     /** \brief Even more flags */
     INT  property;
-
+        
 #ifdef FOR_DUNE
     /* When UG is used as part of the DUNE numerics system we need
        a few more indices per element */
@@ -1262,7 +1261,9 @@
     void *data;
 };
 
-/** \brief A pyramid element in a 3d grid */
+/** \brief A pyramid element in a 3d grid
+    \implements generic_element
+*/
 struct pyramid {
 
     /** \brief object identification, various flags */
@@ -1271,15 +1272,12 @@
     /** \brief Unique id used for load/store */
     INT id;
 
-	/** \brief extra field for miscellanea */
-	INT extra;
-
     /** \brief Additional flags for elements */
     UINT  flag;
 
     /** \brief Even more flags */
     INT  property;
-
+        
 #ifdef FOR_DUNE
     /* When UG is used as part of the DUNE numerics system we need
        a few more indices per element */
@@ -1353,7 +1351,9 @@
     void *data;
 };
 
-/** \brief A prism element in a 3d grid */
+/** \brief A prism element in a 3d grid
+    \implements generic_element
+*/
 struct prism {
 
     /** \brief object identification, various flags */
@@ -1362,15 +1362,12 @@
     /** \brief Unique id used for load/store */
     INT id;
 
-	/** \brief extra field for miscellanea */
-	INT extra;
-
     /** \brief Additional flags for this element */
     UINT flag;
 
     /** \brief Even more flags */
     INT property;
-
+        
 #ifdef FOR_DUNE
     /* When UG is used as part of the DUNE numerics system we need
        a few more indices per element */
@@ -1445,7 +1442,9 @@
     void *data;
 };
 
-/** \brief A hexahedral element in a 3d grid */
+/** \brief A hexahedral element in a 3d grid
+    \implements generic_element
+*/
 struct hexahedron {
 
     /** \brief object identification, various flags */
@@ -1454,15 +1453,12 @@
     /** \brief Unique id used for load/store */
     INT id;
 
-	/** \brief extra field for miscellanea */
-	INT extra;
-	
     /** \brief Additional flags for this element */
     UINT  flag;
 
     /** \brief Even more flags */
     INT  property;
-
+        
 #ifdef FOR_DUNE
     /* When UG is used as part of the DUNE numerics system we need
        a few more indices per element */
@@ -1600,19 +1596,19 @@
     INT level;
 
     /** \brief Number of vertices */
-    INT nVert[NS_PREFIX MAX_PRIOS];
+    INT nVert[NS_DIM_PREFIX MAX_PRIOS];
 
     /** \brief Number of nodes on this grid level */
-    INT nNode[NS_PREFIX MAX_PRIOS];
+    INT nNode[NS_DIM_PREFIX MAX_PRIOS];
 
     /** \brief Number of elements on this grid level */
-    INT nElem[NS_PREFIX MAX_PRIOS];
+    INT nElem[NS_DIM_PREFIX MAX_PRIOS];
 
     /** \brief Number of edges on this grid level */
     INT nEdge;
 
     /** \brief Number of vectors on this grid level */
-    INT nVector[NS_PREFIX MAX_PRIOS];
+    INT nVector[NS_DIM_PREFIX MAX_PRIOS];
 
     /** \brief Number of connections on this grid level */
     INT nCon;
@@ -1624,14 +1620,14 @@
     DATA_STATUS data_status;        /* memory management for vectors|matrix */
                                     /* status for consistent and collect    */
         /* pointers */
-        union  element *elements[NS_PREFIX ELEMENT_LISTPARTS]; /* pointer to first element*/
-        union  element *lastelement[NS_PREFIX ELEMENT_LISTPARTS];/*pointer to last element*/
-        union  vertex *vertices[NS_PREFIX VERTEX_LISTPARTS];      /* pointer to first vertex      */
-        union  vertex *lastvertex[NS_PREFIX VERTEX_LISTPARTS];/* pointer to last vertex   */
-        struct node *firstNode[NS_PREFIX NODE_LISTPARTS]; /* pointer to first node                */
-        struct node *lastNode[NS_PREFIX NODE_LISTPARTS];  /* pointer to last node                 */
-        VECTOR *firstVector[NS_PREFIX VECTOR_LISTPARTS];  /* pointer to first vector              */
-        VECTOR *lastVector[NS_PREFIX VECTOR_LISTPARTS];   /* pointer to last vector               */
+        union  element *elements[NS_DIM_PREFIX ELEMENT_LISTPARTS]; /* pointer to first element*/
+        union  element *lastelement[NS_DIM_PREFIX ELEMENT_LISTPARTS];/*pointer to last element*/
+        union  vertex *vertices[NS_DIM_PREFIX VERTEX_LISTPARTS];      /* pointer to first vertex      */
+        union  vertex *lastvertex[NS_DIM_PREFIX VERTEX_LISTPARTS];/* pointer to last vertex   */
+        struct node *firstNode[NS_DIM_PREFIX NODE_LISTPARTS]; /* pointer to first node                */
+        struct node *lastNode[NS_DIM_PREFIX NODE_LISTPARTS];  /* pointer to last node                 */
+        VECTOR *firstVector[NS_DIM_PREFIX VECTOR_LISTPARTS];  /* pointer to first vector              */
+        VECTOR *lastVector[NS_DIM_PREFIX VECTOR_LISTPARTS];   /* pointer to last vector               */
     
     /** \brief Pointer to the first blockvector
 
@@ -1674,6 +1670,17 @@
     /** \brief count objects in that multigrid              */
     INT elemIdCounter;
 
+#ifdef FOR_DUNE
+    /** \brief count objects in that multigrid              */
+    INT edgeIdCounter;
+
+    /** \brief Count vector objects in that multigrid
+        \todo This line is a hack.  It is used to implement face ids for Dune.
+        As soon as the face data structure is available the id should be stored
+        there.  Then this code can be removed again. */
+    INT vectorIdCounter;
+#endif
+
     /** \brief depth of the element tree                    */
     INT topLevel;
 
@@ -2591,7 +2598,7 @@
 
 #define OBJ_SHIFT                                       28
 #define OBJ_LEN                                         4
-#define OBJT(p)                                         CW_READ_STATIC(p,OBJ_,GENERAL_)
+#define OBJT(p)                                         (enum GM_OBJECTS)CW_READ_STATIC(p,OBJ_,GENERAL_)
 #define SETOBJT(p,n)                            CW_WRITE_STATIC(p,OBJ_,GENERAL_,n)
 #define OBJT_MAX                                        (POW2(OBJ_LEN)-1)
 
@@ -2620,8 +2627,6 @@
 #define CTRL(p)         (*((UINT *)(p)))
 #define ID(p)           (((INT *)(p))[1])
 
-#define EXTRA(p)        (((INT *)(p))[2])
-
 /****************************************************************************/
 /*                                                                                                                                                      */
 /* macros for vertices                                                                                                          */
@@ -2843,8 +2848,8 @@
 
 /* control word offsets */
 #define ELEMENT_OFFSET                                  0
-#define FLAG_OFFSET                                     3
-#define PROPERTY_OFFSET                                 4
+#define FLAG_OFFSET                                             2
+#define PROPERTY_OFFSET                                 3
 
 /* macros for control word */
 #define ECLASS_SHIFT                                    8
@@ -3252,6 +3257,9 @@
 #define EDATA_DEF_IN_GRID(p)   (GFORMAT(p)->elementdata)
 #define NDATA_DEF_IN_GRID(p)   (GFORMAT(p)->nodedata)
 
+#define GRID_ATTR(g) ((unsigned char) (GLEVEL(g)+32))
+#define ATTR_TO_GLEVEL(i) (i-32)
+
 /****************************************************************************/
 /*                                                                          */
 /* macros for multigrids                                                    */
@@ -3457,10 +3465,10 @@
                             INT optimizedIE, INT insertMesh);
 MULTIGRID *OpenMGFromDataFile(MULTIGRID *theMG, INT number, char *type, 
                               char *DataFileName, NS_PREFIX MEM heapSize);
-MULTIGRID       *LoadMultiGrid  (char *MultigridName, char *name, char *type, 
-                                                         char *BndValProblem, char *format, 
-                                                         unsigned long heapSize,INT force,INT optimizedIE, INT autosave);
-INT             SaveMultiGrid (MULTIGRID *theMG, char *name, char *type, char *comment, INT autosave, INT rename);
+MULTIGRID       *LoadMultiGrid  (const char *MultigridName, const char *name, const char *type, 
+                                 const char *BndValProblem, const char *format, 
+                                 unsigned long heapSize,INT force,INT optimizedIE, INT autosave);
+INT             SaveMultiGrid (MULTIGRID *theMG, const char *name, const char *type, const char *comment, INT autosave, INT rename);
 INT         DisposeGrid             (GRID *theGrid);
 INT             DisposeMultiGrid                (MULTIGRID *theMG);
 INT         DisposeAMGLevels        (MULTIGRID *theMG);
@@ -3554,8 +3562,8 @@
                                                                          VECTOR **vec);
 
 /* searching */
-NODE            *FindNodeFromId                 (GRID *theGrid, INT id);
-NODE            *FindNodeFromPosition   (GRID *theGrid, DOUBLE *pos, DOUBLE *tol);
+NODE            *FindNodeFromId                 (const GRID *theGrid, INT id);
+NODE            *FindNodeFromPosition   (const GRID *theGrid, const DOUBLE *pos, const DOUBLE *tol);
 VECTOR          *FindVectorFromPosition (GRID *theGrid, DOUBLE *pos, DOUBLE *tol);
 VECTOR      *FindVectorFromIndex    (GRID *theGrid, INT index);
 ELEMENT         *FindElementFromId              (GRID *theGrid, INT id);
@@ -3568,36 +3576,36 @@
 
 /* list */
 void            ListMultiGridHeader     (const INT longformat);
-void            ListMultiGrid                   (MULTIGRID *theMG, const INT isCurrent, const INT longformat);
-INT         MultiGridStatus         (MULTIGRID *theMG, INT gridflag, INT greenflag, INT lbflag, INT verbose);
+void            ListMultiGrid           (const MULTIGRID *theMG, const INT isCurrent, const INT longformat);
+INT         MultiGridStatus             (const MULTIGRID *theMG, INT gridflag, INT greenflag, INT lbflag, INT verbose);
 void            ListGrids                               (const MULTIGRID *theMG);
-void            ListNode                                (MULTIGRID *theMG, NODE *theNode,               INT dataopt, INT bopt, INT nbopt, INT vopt);
+void            ListNode                                (const MULTIGRID *theMG, const NODE *theNode, INT dataopt, INT bopt, INT nbopt, INT vopt);
 void            ListNodeSelection               (MULTIGRID *theMG,                                              INT dataopt, INT bopt, INT nbopt, INT vopt);
 void            ListNodeRange                   (MULTIGRID *theMG, INT from, INT to,    INT idopt, INT dataopt, INT bopt, INT nbopt, INT vopt);
-void            ListElement                     (MULTIGRID *theMG, ELEMENT *theElement, INT dataopt, INT bopt, INT nbopt, INT vopt);
-void            ListElementSelection    (MULTIGRID *theMG,                                              INT dataopt, INT bopt, INT nbopt, INT vopt);
-void            ListElementRange                (MULTIGRID *theMG, INT from, INT to,    INT idopt, INT dataopt, INT bopt, INT nbopt, INT vopt, INT lopt);
-void            ListVector                              (MULTIGRID *theMG, VECTOR *theVector,   INT matrixopt, INT dataopt, INT modifiers);
-void            ListVectorSelection     (MULTIGRID *theMG,                                              INT matrixopt, INT dataopt, INT modifiers);
-void            ListVectorOfElementSelection(MULTIGRID *theMG,                                  INT matrixopt, INT dataopt, INT modifiers);
-void            ListVectorRange                 (MULTIGRID *theMG, INT fl, INT tl, INT from, INT to, INT idopt, INT matrixopt, INT dataopt, INT datatypes, INT modifiers);
+void            ListElement                     (const MULTIGRID *theMG, const ELEMENT *theElement, INT dataopt, INT bopt, INT nbopt, INT vopt);
+void            ListElementSelection    (const MULTIGRID *theMG, INT dataopt, INT bopt, INT nbopt, INT vopt);
+void            ListElementRange                (const MULTIGRID *theMG, INT from, INT to,    INT idopt, INT dataopt, INT bopt, INT nbopt, INT vopt, INT lopt);
+void            ListVector                      (const MULTIGRID *theMG, const VECTOR *theVector, INT matrixopt, INT dataopt, INT modifiers);
+void            ListVectorSelection     (const MULTIGRID *theMG, INT matrixopt, INT dataopt, INT modifiers);
+void            ListVectorOfElementSelection(const MULTIGRID *theMG, INT matrixopt, INT dataopt, INT modifiers);
+void            ListVectorRange                 (const MULTIGRID *theMG, INT fl, INT tl, INT from, INT to, INT idopt, INT matrixopt, INT dataopt, INT datatypes, INT modifiers);
 
 /* query */
-LINK            *GetLink                                (NODE *from, NODE *to);
-EDGE            *GetSonEdge                             (EDGE *theEdge);
-INT                     GetSonEdges                             (EDGE *theEdge, EDGE *SonEdges[MAX_SON_EDGES]);
-EDGE            *GetFatherEdge                  (EDGE *theEdge);
+LINK            *GetLink                                (const NODE *from, const NODE *to);
+EDGE            *GetSonEdge                             (const EDGE *theEdge);
+INT                     GetSonEdges                             (const EDGE *theEdge, EDGE *SonEdges[MAX_SON_EDGES]);
+EDGE            *GetFatherEdge                  (const EDGE *theEdge);
 #ifdef __THREEDIM__
 EDGE            *FatherEdge                             (NODE **SideNodes, INT ncorners, NODE **Nodes, EDGE *theEdge);
 #endif
-EDGE            *GetEdge                                (NODE *from, NODE *to);
+EDGE            *GetEdge                                (const NODE *from, const NODE *to);
 INT             GetSons                                 (const ELEMENT *theElement, ELEMENT *SonList[MAX_SONS]);
 #ifdef ModelP
 INT             GetAllSons                              (const ELEMENT *theElement, ELEMENT *SonList[MAX_SONS]);
 #endif
 INT             VectorPosition                  (const VECTOR *theVector, DOUBLE *position);
 INT             VectorInElement                 (ELEMENT *theElement, VECTOR *theVector);
-INT             MinMaxAngle                     (ELEMENT *theElement, DOUBLE *amin, DOUBLE *amax);
+INT             MinMaxAngle                     (const ELEMENT *theElement, DOUBLE *amin, DOUBLE *amax);
 
 /* check */
 #ifndef ModelP
@@ -3613,9 +3621,9 @@
 INT             AddNodeToSelection              (MULTIGRID *theMG, NODE *theNode);
 INT             IsNodeSelected                  (MULTIGRID *theMG, NODE *theNode);
 INT             AddElementToSelection   (MULTIGRID *theMG, ELEMENT *theElement);
-INT             IsElementSelected               (MULTIGRID *theMG, ELEMENT *theElement);
+INT             IsElementSelected               (const MULTIGRID *theMG, const ELEMENT *theElement);
 INT             AddVectorToSelection    (MULTIGRID *theMG, VECTOR *theVector);
-INT             IsVectorSelected                (MULTIGRID *theMG, VECTOR *theVector);
+INT             IsVectorSelected                (const MULTIGRID *theMG, const VECTOR *theVector);
 INT             RemoveNodeFromSelection (MULTIGRID *theMG, NODE *theNode);
 INT             RemoveElementFromSelection(MULTIGRID *theMG, ELEMENT *theElement);
 INT             RemoveVectorFromSelection(MULTIGRID *theMG, VECTOR *theVector);
@@ -3635,8 +3643,8 @@
 NS_PREFIX BLOCK_DESC      *GetMGUDBlockDescriptor (NS_PREFIX BLOCK_ID id);
 
 /* ordering of degrees of freedom */
-ALG_DEP         *CreateAlgebraicDependency              (char *name, DependencyProcPtr DependencyProc);
-FIND_CUT        *CreateFindCutProc                              (char *name, FindCutProcPtr FindCutProc);
+ALG_DEP         *CreateAlgebraicDependency              (const char *name, DependencyProcPtr DependencyProc);
+FIND_CUT        *CreateFindCutProc                              (const char *name, FindCutProcPtr FindCutProc);
 INT                     LexOrderVectorsInGrid                   (GRID *theGrid, INT mode, const INT *order, const INT *sign, INT which, INT SpecSkipVecs, INT AlsoOrderMatrices);
 INT             OrderVectors                                    (MULTIGRID *theMG, INT levels, INT mode, INT PutSkipFirst, INT SkipPat, const char *dependency, const char *dep_options, const char *findcut);
 INT                     ShellOrderVectors                               (GRID *theGrid, VECTOR *seed);
@@ -3675,10 +3683,6 @@
 /** \todo remove the following functions after the code will never need any debugging */
 char *PrintElementInfo (ELEMENT *theElement,INT full);
 
-/** \todo  This is a static function in standard UG.  Dune calls it at the
-   moment, so I made it nonstatic. */
-INT SetEdgeAndNodeSubdomainFromElements (GRID *theGrid);
-
 END_UGDIM_NAMESPACE
 
 #endif
diff -ru ug-orig/gm/initgm.c ug-patched/gm/initgm.c
--- ug-orig/gm/initgm.c	2005-06-14 18:01:22.000000000 +0200
+++ ug-patched/gm/initgm.c	2008-12-19 11:02:55.000000000 +0100
@@ -27,6 +27,7 @@
 /****************************************************************************/
 
 /* ANSI-C includes */
+#include "config.h"
 #include <stdio.h>
 
 /* low module */
@@ -66,7 +67,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/initgm.c,v 1.23 2005/06/14 16:01:22 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*
diff -ru ug-orig/gm/initgm.h ug-patched/gm/initgm.h
--- ug-orig/gm/initgm.h	2006-05-08 14:29:57.000000000 +0200
+++ ug-patched/gm/initgm.h	2006-05-08 14:31:31.000000000 +0200
@@ -27,7 +27,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/initgm.h,v 1.10 2006/05/08 12:29:57 sander Exp $
+$Header$
 */
 
 #ifndef __INITGM__
diff -ru ug-orig/gm/Makefile.am ug-patched/gm/Makefile.am
--- ug-orig/gm/Makefile.am	2004-10-15 16:22:28.000000000 +0200
+++ ug-patched/gm/Makefile.am	2007-02-14 21:27:52.000000000 +0100
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.2 2004/10/15 14:22:28 thimo Exp $
+# $Id: Makefile.am 8267 2007-02-14 20:27:52Z christi $
 
 SUBDIRS = gg2 gg3
 
@@ -36,8 +36,8 @@
 
 libug_gm2_la_SOURCES = $(SOURCES)
 libug_gm2_la_CPPFLAGS = $(UG_2DFLAGS)
-libug_gm2_la_LIBADD = gg2/libgg2.la
+libug_gm2_la_LIBADD = gg2/libgg2.la ../low/liblow2.la
 
 libug_gm3_la_SOURCES = $(SOURCES)
 libug_gm3_la_CPPFLAGS = $(UG_3DFLAGS)
-libug_gm3_la_LIBADD = gg3/libgg3.la
+libug_gm3_la_LIBADD = gg3/libgg3.la ../low/liblow3.la
diff -ru ug-orig/gm/mgheapmgr.c ug-patched/gm/mgheapmgr.c
--- ug-orig/gm/mgheapmgr.c	2004-07-21 11:18:36.000000000 +0200
+++ ug-patched/gm/mgheapmgr.c	2008-12-19 11:02:55.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include "general.h"
 #include "compiler.h"
 #include "heaps.h"
@@ -71,7 +72,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/mgheapmgr.c,v 1.8 2004/07/21 09:18:36 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/gm/mgheapmgr.h ug-patched/gm/mgheapmgr.h
--- ug-orig/gm/mgheapmgr.h	2006-05-08 14:29:57.000000000 +0200
+++ ug-patched/gm/mgheapmgr.h	2006-05-08 14:31:31.000000000 +0200
@@ -23,7 +23,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/mgheapmgr.h,v 1.6 2006/05/08 12:29:57 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/gm/mgio.c ug-patched/gm/mgio.c
--- ug-orig/gm/mgio.c	2006-06-02 18:13:11.000000000 +0200
+++ ug-patched/gm/mgio.c	2006-06-02 18:15:34.000000000 +0200
@@ -127,7 +127,7 @@
 
 #ifdef __MGIO_USE_IN_UG__
 
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/mgio.c,v 1.65 2006/06/02 16:13:11 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 #endif
 
diff -ru ug-orig/gm/mgio.h ug-patched/gm/mgio.h
--- ug-orig/gm/mgio.h	2006-05-08 14:29:57.000000000 +0200
+++ ug-patched/gm/mgio.h	2006-05-08 14:31:31.000000000 +0200
@@ -24,7 +24,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/mgio.h,v 1.51 2006/05/08 12:29:57 sander Exp $
+$Header$
 */
 
 /* switch */
diff -ru ug-orig/gm/pargm.h ug-patched/gm/pargm.h
--- ug-orig/gm/pargm.h	2007-12-07 19:45:03.000000000 +0100
+++ ug-patched/gm/pargm.h	2009-04-29 14:30:36.000000000 +0200
@@ -26,7 +26,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/pargm.h,v 1.48 2007/12/07 18:45:03 lampe Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -38,6 +38,7 @@
 #ifndef __PARGM_H__
 #define __PARGM_H__
 
+#include "ugtypes.h"
 
 #ifdef ModelP
 #include "ppif.h"
@@ -45,9 +46,8 @@
 #endif
 
 #include "namespace.h"
-#include "ppif_namespace.h"
 
-START_UG_NAMESPACE
+START_UGDIM_NAMESPACE
 
 /****************************************************************************/
 /*                                                                                                                                                      */
@@ -161,13 +161,6 @@
                                                 GID((NODE *)(x)) : -1)))
 #endif
 
-/*
-#define CDBG(x,y)       if (GETGID(x)==0x25000d) {y}
-*/
-#define CDBG(x,y)
-
-
-
 #else   /* not ModelP */
 
 /* define number of priorities for objects */
@@ -184,9 +177,7 @@
 enum {VECTOR_LISTPARTS = 1};
 enum {VERTEX_LISTPARTS = 1};
 
-/* define mapping from object priority to position in linked list */
-
-/* define mapping from object priority to position in linked list */
+/** \brief define mapping from object priority to position in linked list */
 #define PRIO2LISTPART(listtype,prio) 0
 
 /* define mapping from position in linked list to object priority */
@@ -195,14 +186,8 @@
 /* define mapping from position in linked list to object priority */
 #define PRIO2INDEX(prio)  0
 
-#define CDBG(x,y)
-
 #endif
 
-#define GRID_ATTR(g) ((unsigned char) (GLEVEL(g)+32))
-#define ATTR_TO_GLEVEL(i) (i-32)
-
-
 /*
         printing of IDs via printf()
 
@@ -223,14 +208,14 @@
 
 #ifdef ModelP
 
-#define ID_FMT      "%ld/%016llx"
-#define ID_FFMT     "%9ld/%016llx"
+#define ID_FMT      "%ld/%08x"
+#define ID_FFMT     "%9ld/%08x"
 #define ID_PRT(x)   ((long)ID(x)),GID(x)
-#define ID_FMTE     "%ld/%016llx/%d"
-#define ID_FFMTE    "%9ld/%016llx/%02d"
+#define ID_FMTE     "%ld/%08x/%d"
+#define ID_FFMTE    "%9ld/%08x/%02d"
 #define ID_PRTE(x)  ((long)ID(x)),GID(x),PRIO(x)
-#define ID_FMTX     "%d/%ld/%016llx/%d"
-#define ID_FFMTX    "%x/%9ld/%016llx/%02d"
+#define ID_FMTX     "%d/%ld/%08x/%d"
+#define ID_FFMTX    "%x/%9ld/%08x/%02d"
 #define ID_PRTX(x)  KeyForObject((KEY_OBJECT *)x),((long)ID(x)),GID(x),PRIO(x)
 
 #define VID_FMT     ID_FMT
@@ -265,23 +250,23 @@
 #define VINDEX_PRTX(x) KeyForObject((KEY_OBJECT *)x),((long)VINDEX(x)),GID(x),PRIO(x)
 
 #ifndef EDGE_WITH_DDDHDR
-#define EDID_FMT     "%016llx"
+#define EDID_FMT     "%08x"
 #define EDID_FFMT    EDID_FMT
 #define EDID_PRT(x)  (x)
-#define EDID_FMTE    "%016llx"
+#define EDID_FMTE    "%08x"
 #define EDID_FFMTE   EDID_FMTE
 #define EDID_PRTE(x) (x)
-#define EDID_FMTX    "%016llx"
+#define EDID_FMTX    "%08x"
 #define EDID_FFMTX   EDID_FMTX
 #define EDID_PRTX(x) (x)
 #else 
-#define EDID_FMT     "%016llx"
+#define EDID_FMT     "%08x"
 #define EDID_FFMT    EDID_FMT
 #define EDID_PRT(x)  GID(x)
-#define EDID_FMTE    "%016llx/%d"
+#define EDID_FMTE    "%08x/%d"
 #define EDID_FFMTE   EDID_FMTE
 #define EDID_PRTE(x) GID(x),PRIO(x)
-#define EDID_FMTX    "%x/%016llx/%d"
+#define EDID_FMTX    "%x/%08x/%d"
 #define EDID_FFMTX   EDID_FMTX
 #define EDID_PRTX(x) x,GID(x),PRIO(x)
 #endif
@@ -336,13 +321,13 @@
 #define VINDEX_FFMTX   ID_FFMTX
 #define VINDEX_PRTX(x) VINDEX_PRT(x)
 
-#define EDID_FMT     "%016llx"
+#define EDID_FMT     "%08x"
 #define EDID_FFMT    EDID_FMT
 #define EDID_PRT(x)  (x)
-#define EDID_FMTE    "%016llx"
+#define EDID_FMTE    "%08x"
 #define EDID_FFMTE   EDID_FMTE
 #define EDID_PRTE(x) (x)
-#define EDID_FMTX    "%016llx"
+#define EDID_FMTX    "%08x"
 #define EDID_FFMTX   EDID_FMTX
 #define EDID_PRTX(x) (x)
 
@@ -413,7 +398,6 @@
 #define UG_GlobalSumNDOUBLE(x,y)
 #define UG_GlobalMaxNDOUBLE(x,y)
 #define UG_GlobalMinNDOUBLE(x,y)
-#define UG_GlobalMaxGID(x) x
 #endif
 
 
@@ -443,9 +427,8 @@
 void   UG_GlobalSumNDOUBLE (INT n, DOUBLE *x);
 void   UG_GlobalMaxNDOUBLE (INT n, DOUBLE *x);
 void   UG_GlobalMinNDOUBLE (INT n, DOUBLE *x);
-DDD_GID UG_GlobalMaxGID    (DDD_GID x);
 #endif
 
-END_NAMESPACE
+END_UGDIM_NAMESPACE
 
 #endif /* __PARGM_H__ */
diff -ru ug-orig/gm/refine.c ug-patched/gm/refine.c
--- ug-orig/gm/refine.c	2007-10-16 14:46:53.000000000 +0200
+++ ug-patched/gm/refine.c	2008-12-19 11:02:55.000000000 +0100
@@ -56,6 +56,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <assert.h>
 #include <math.h>
 #include <stdio.h>
@@ -113,9 +114,9 @@
 /* defines in the following order                                           */
 /*                                                                          */
 /*    compile time constants defining static data size (i.e. arrays)        */
-/*		  other constants													*/
-/*		  macros															*/
-/*																			*/
+/*    other constants                                                       */
+/*    macros                                                                */
+/*                                                                          */
 /****************************************************************************/
 
 /* undefine if overlap should be only updated where needed */
@@ -264,9 +265,8 @@
 		}
 /*@}*/
 
-/** \todo delete special debug */
+/** \todo delete special debug
 static ELEMENT *debugelem=NULL;
-/*
 #define PRINTELEMID(id)                                                      \
 		if (ID(theElement)==(id) && (id)!=10120)                             \
 		{                                                                    \
@@ -359,22 +359,47 @@
 /*																			*/
 /****************************************************************************/
 
-static int rFlag=GM_REFINE_TRULY_LOCAL; /* type of refine                   */
-static int hFlag=0;						/* refine with hanging nodes?		*/
-static int fifoFlag=0;					/* use fifo? 0=no 1=yes				*/
-static int first;						/* fifo loop counter 				*/
-static ELEMENT *fifo_first=NULL;		/* first element in fifo work list	*/
-static ELEMENT *fifo_last=NULL;			/* last element in fifo	work list	*/
-static ELEMENT *fifo_insertfirst=NULL;	/* first element in fifo insertlist */
-static ELEMENT *fifo_insertlast=NULL;	/* last element in fifo insertlist	*/
-static ELEMENT *firstElement=NULL;		/* first element to consider for    */
-										/* next loop						*/
-static INT No_Green_Update;				/* counter for green refinements	*/
-										/* need not to be updated			*/
-static INT Green_Marks;					/* green refined element counter	*/
-static INT refine_seq = 0;				/* 0/1: do/do not parallel part		*/
-static INT fifoloop = 0;				/* counter for FIFO loops			*/
-static INT total_adapted = 0;           /* count of adapted elements        */
+/** \brief type of refinement                   */
+static int rFlag=GM_REFINE_TRULY_LOCAL;
+
+/** \brief refine with hanging nodes?		*/
+static int hFlag=0;
+
+/** \brief use fifo? 0=no 1=yes				*/
+static int fifoFlag=0;
+
+/** \brief fifo loop counter 				*/
+static int first;
+
+/** \brief first element in fifo work list	*/
+static ELEMENT *fifo_first=NULL;
+
+/** \brief last element in fifo	work list	*/
+static ELEMENT *fifo_last=NULL;
+
+/** \brief first element in fifo insertlist */
+static ELEMENT *fifo_insertfirst=NULL;
+
+/** \brief last element in fifo insertlist	*/
+static ELEMENT *fifo_insertlast=NULL;
+
+/** \brief first element to consider for next loop   */
+static ELEMENT *firstElement=NULL;
+
+/** \brief Counter for green refinements doesn't need to be updated */
+static INT No_Green_Update;
+
+/** \brief green refined element counter	*/
+static INT Green_Marks;
+
+/** \brief 0/1: do/do not parallel part		*/
+static INT refine_seq = 0;
+
+/** \brief counter for FIFO loops			*/
+static INT fifoloop = 0;
+
+/** \brief count of adapted elements        */
+static INT total_adapted = 0;
 
 #ifdef STAT_OUT
 /* timing variables */
@@ -383,6 +408,7 @@
 static int algebra_timer;
 #endif
 
+#ifdef TET_RULESET
 /* determine number of edge from reduced (i.e. restricted to one side) edgepattern */
 /* if there are two edges marked for bisection, if not deliver -1. If the edge-    */
 /* is not reduced (i.e. marked edges lying on more than one side) deliver -2       */
@@ -399,11 +425,12 @@
 
 /* the indices of the edges of each side */
 static INT  CondensedEdgeOfSide[4] = {0x07,0x32,0x2C,0x19};
+#endif
 
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/refine.c,v 1.206 2007/10/16 12:46:53 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -411,8 +438,9 @@
 /*																			*/
 /****************************************************************************/
 
+#ifdef ModelP
 static void CheckConsistency (MULTIGRID *theMG, INT level ,INT debugstart, INT gmlevel, int *check);
-
+#endif
 
 /****************************************************************************/
 /** \brief Fill refineinfo structure
@@ -2798,13 +2826,16 @@
 		}
 			
 		if (flag) continue;
+
+		/* preserve regular refinement marks */
+		if (hFlag==0 && SonList[0]==NULL) continue;
 	
 		/* remove refinement */
 		SETMARK(theElement,NO_REFINEMENT);
 		SETMARKCLASS(theElement,NO_CLASS);
 		SETCOARSEN(theElement,1);
 	}
-	/** \todo delete special debug */ PRINTELEMID(-1);
+	/** \todo delete/ special debug */ PRINTELEMID(-1);
 #ifdef __PERIODIC_BOUNDARY__
 	#ifdef ModelP
 	PRINTDEBUG(gm,1,("\n" PFMT "exchange USED flag for restrict marks\n",me));
@@ -3154,7 +3185,8 @@
 		if (SONNODE(theNode)==NULL)
 		{
 			SONNODE(theNode) = CreateSonNode(theGrid,theNode);
-			if (SONNODE(theNode)==NULL) RETURN(GM_FATAL);
+			if (SONNODE(theNode)==NULL) 
+                            RETURN(GM_FATAL);
 			#ifdef IDENT_ONLY_NEW
 			SETNEW_NIDENT(SONNODE(theNode),1);
 			#endif
@@ -3217,7 +3249,8 @@
 			if (MidNodes[i] == NULL)
 			{
 				MidNodes[i] = CreateMidNode(theGrid,theElement,NULL,i);
-				if (MidNodes[i]==NULL) RETURN(GM_FATAL);
+				if (MidNodes[i]==NULL) 
+                                    RETURN(GM_FATAL);
 				#ifdef IDENT_ONLY_NEW
 				SETNEW_NIDENT(MidNodes[i],1);
 				#endif
@@ -3335,11 +3368,9 @@
 			{
 
 				/* allocate the sidenode */
-				if ((SideNodes[i] = CreateSideNode(theGrid,theElement,NULL,i)) 
-					== NULL) 
-				{
-					RETURN(GM_FATAL);
-				}
+				if ((SideNodes[i] = CreateSideNode(theGrid,theElement,NULL,i)) == NULL) 
+                                    RETURN(GM_FATAL);
+
                 #ifdef IDENT_ONLY_NEW
 				SETNEW_NIDENT(SideNodes[i],1);
 				#endif
@@ -3504,36 +3535,22 @@
 
 struct compare_record
 { 
-	ELEMENT *elem; 		 /* element to connect 					 */
-	INT side;			 /* side of elem to connect 			 */
-	INT nodes;		     /* number of nodes of side 			 */
-	NODE *nodeptr[4]; 	 /* pointer of nodes in descending order */
-};
-typedef struct compare_record COMPARE_RECORD;
-
-
-/****************************************************************************/
-/*
-   GetSonSideNodes - 
-
-   SYNOPSIS:
-   INT GetSonSideNodes (ELEMENT *theElement, INT side, INT *nodes, NODE *SideNodes[MAX_SIDE_NODES], INT ioflag));
+    /** \brief Element to connect */
+    ELEMENT *elem;
 
-   PARAMETERS:
-.  theElement
-.  side
-.  nodes
-.  SideNodes[MAX_SIDE_NODES]
-.  ioflag
+    /** \brief Side of element to connect */
+    INT side;
+    
+    /** \brief Number of nodes of side */
+    INT nodes;
 
-   DESCRIPTION:
+    /** \brief Number of nodes in descending order */
+    NODE *nodeptr[4];
+};
+typedef struct compare_record COMPARE_RECORD;
 
-   \return <ul>
-   INT 
-*/
-/****************************************************************************/
 
-INT NS_DIM_PREFIX GetSonSideNodes (ELEMENT *theElement, INT side, INT *nodes, 
+INT NS_DIM_PREFIX GetSonSideNodes (const ELEMENT *theElement, INT side, INT *nodes, 
 					 NODE *SideNodes[MAX_SIDE_NODES], INT ioflag)
 {
 	INT i,ncorners,nedges;
@@ -3671,6 +3688,8 @@
 \param[out] SonSides Output element side numbers
 \param[in] NeedSons If this is false, the correct list of sons is expected to be
   provided in SonList.  If not it is recomputed.
+\param[in] ioflag An obsolete debugging flag
+\param[in] useRefineClass 
 
   For a given side of an element, this routine computes all element sides
   on the next finer grid level which are topological sons of the input
@@ -3678,9 +3697,13 @@
 */
 /****************************************************************************/
 
-INT NS_DIM_PREFIX Get_Sons_of_ElementSide (ELEMENT *theElement, INT side, INT *Sons_of_Side,
-							 ELEMENT *SonList[MAX_SONS], INT *SonSides, 
-							 INT NeedSons, INT ioflag)
+INT NS_DIM_PREFIX Get_Sons_of_ElementSide (const ELEMENT *theElement, INT side, INT *Sons_of_Side,
+                                           ELEMENT *SonList[MAX_SONS], INT *SonSides, 
+                                           INT NeedSons, INT ioflag
+#ifdef FOR_DUNE
+                                           , INT useRefineClass
+#endif
+                                           )
 {
 	INT i,j,nsons;
         enum MarkClass markclass;
@@ -3708,7 +3731,18 @@
 	markclass = RED_CLASS;
 	#endif
 	#ifdef __THREEDIM__
-	markclass = (enum MarkClass)MARKCLASS(theElement);
+        /* The following line used to read: markclass = (enum MarkClass) MARKCLASS(theElement);
+           This works well within the UG grid refinement context.  However, now I want to use this
+           method within the DUNE UGGridLeafIntersectionIterator.  The problem is that the user
+           may have randomly marked elements before calling the iterator.  In that case the
+           mark classes may not be set the way this method expects it.  Hence we allow the option
+           to use REFINECLASS instead.  To be absolutely certain we don't break existing code
+           we keep the old behaviour as the default.*/
+        #ifdef FOR_DUNE
+	markclass = (enum MarkClass) ((useRefineClass) ? REFINECLASS(theElement) : MARKCLASS(theElement));
+        #else
+        markclass = (enum MarkClass) MARKCLASS(theElement);
+        #endif
 	#endif
 
         /** \todo quick fix */
@@ -4999,7 +5033,7 @@
 							INT node,k;
 							/*INT maxedge=-1;*/
 							#ifdef ModelP
-							DDD_GID maxid = 0;
+							unsigned int maxid = 0;
 							#else
 							INT maxid = -1;
 							#endif
@@ -5791,7 +5825,8 @@
 	GRID *UpGrid;
 	
 	UpGrid = UPGRID(theGrid);
-	if (UpGrid==NULL) RETURN(GM_FATAL);
+	if (UpGrid==NULL) 
+            RETURN(GM_FATAL);
 
 	REFINE_GRID_LIST(1,MYMG(theGrid),GLEVEL(theGrid),("AdaptGrid(%d):\n",GLEVEL(theGrid)),"");
 
@@ -5864,14 +5899,16 @@
 
 			if (hFlag==0 && MARKCLASS(theElement)!=RED_CLASS)
 			{
+				/* remove copy marks */
 				SETMARK(theElement,NO_REFINEMENT);
 				SETMARKCLASS(theElement,NO_CLASS);
-				continue; 
+/*				continue;  */
 			}
 
 			REFINE_ELEMENT_LIST(1,theElement,"REFINING element: ");
 
-			if (UnrefineElement(UpGrid,theElement))				RETURN(GM_FATAL);
+			if (UnrefineElement(UpGrid,theElement))
+                            RETURN(GM_FATAL);
 
 			#ifdef ModelP
 			/* dispose hghost elements with EFATHER==NULL */
@@ -5891,7 +5928,8 @@
 
 			if (EMASTER(theElement))
 			{
-				if (UpdateContext(UpGrid,theElement,theContext)!=0)	RETURN(GM_FATAL);
+				if (UpdateContext(UpGrid,theElement,theContext)!=0) 
+                                    RETURN(GM_FATAL);
 
 				REFINE_CONTEXT_LIST(2,theContext);
 
@@ -5901,7 +5939,8 @@
 
 				/* is something to do ? */
 				if (MARKED(theElement))
-					if (RefineElement(UpGrid,theElement,theContext))	RETURN(GM_FATAL);
+					if (RefineElement(UpGrid,theElement,theContext))
+                                            RETURN(GM_FATAL);
 			}
 
 			/* refine and refineclass flag */
@@ -6013,7 +6052,8 @@
 	DDD_ObjMgrBegin();
 	#endif
 	if (level<toplevel || newlevel)
-		if (AdaptLocalGrid(theGrid,nadapted)!=GM_OK)				RETURN(GM_FATAL);
+		if (AdaptLocalGrid(theGrid,nadapted)!=GM_OK) 
+                    RETURN(GM_FATAL);
 	#ifdef DDDOBJMGR
 	DDD_ObjMgrEnd();
 	#endif
@@ -6445,7 +6485,6 @@
 	#endif
 
 	#ifdef __PERIODIC_BOUNDARY__
-if (1)
 	if (MG_MakePeriodicMarksConsistent(theMG)) REP_ERR_RETURN(1);
 	#endif
 	
@@ -6626,7 +6665,6 @@
 		}
 		#endif
 #ifdef __PERIODIC_BOUNDARY__
-if (1)
 		/* initialize USED flag on next lower grid level */
 		if (InitializePeriodicFlags(GRID_ON_LEVEL(theMG,level-1)))
 			RETURN(GM_ERROR);
@@ -6732,7 +6770,8 @@
 #endif
 		if (newlevel)
 		{
-			if (CreateNewLevel(theMG,0)==NULL) RETURN(GM_FATAL);
+			if (CreateNewLevel(theMG,0)==NULL) 
+                            RETURN(GM_FATAL);
 			FinerGrid = GRID_ON_LEVEL(theMG,toplevel+1);
 		}
 		
@@ -6748,9 +6787,11 @@
 
 		if (level<toplevel || newlevel)
 			#ifndef ModelP
-			if (AdaptGrid(theGrid,&nadapted)!=GM_OK)							RETURN(GM_FATAL);
+			if (AdaptGrid(theGrid,&nadapted)!=GM_OK)
+                            RETURN(GM_FATAL);
 			#else
-			if (AdaptGrid(theGrid,toplevel,level,newlevel,&nadapted)!=GM_OK)	RETURN(GM_FATAL);
+			if (AdaptGrid(theGrid,toplevel,level,newlevel,&nadapted)!=GM_OK)
+                            RETURN(GM_FATAL);
 			#endif
 
 		SUM_TIMER(gridadapt_timer)
@@ -6767,7 +6808,8 @@
 			#ifndef DYNAMIC_MEMORY_ALLOCMODEL
 			/* now rebuild connections in neighborhood of elements which have EBUILDCON set */
 			/* This flag has been set either by GridDisposeConnection or by CreateElement	*/
-			if (GridCreateConnection(FinerGrid)) RETURN(GM_FATAL);
+			if (GridCreateConnection(FinerGrid)) 
+                            RETURN(GM_FATAL);
 			#endif
 			
 			/* and compute the vector classes on the new (or changed) level */
diff -ru ug-orig/gm/refine.h ug-patched/gm/refine.h
--- ug-orig/gm/refine.h	2006-06-02 18:12:47.000000000 +0200
+++ ug-patched/gm/refine.h	2007-06-01 13:51:44.000000000 +0200
@@ -24,7 +24,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/refine.h,v 1.29 2006/06/02 16:12:47 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -257,9 +257,19 @@
 /*                                                                                                                                                      */
 /****************************************************************************/
 
-INT     Set_Get_Sons_of_ElementSideProc                 (Get_Sons_of_ElementSideProcPtr Proc);
-INT     GetSonSideNodes                                                 (ELEMENT *theElement, INT side, INT *nodes, NODE *SideNodes[MAX_SIDE_NODES], INT ioflag);
-INT             Get_Sons_of_ElementSide                                 (ELEMENT *theElement, INT side, INT *Sons_of_Side, ELEMENT *SonList[MAX_SONS], INT *SonSides, INT NeedSons, INT ioflag);
+INT     GetSonSideNodes                                                 (const ELEMENT *theElement, INT side, INT *nodes, NODE *SideNodes[MAX_SIDE_NODES], INT ioflag);
+INT Get_Sons_of_ElementSide(const ELEMENT *theElement, 
+                            INT side, 
+                            INT *Sons_of_Side, 
+                            ELEMENT *SonList[MAX_SONS], 
+                            INT *SonSides, 
+                            INT NeedSons, 
+                            INT ioflag
+#ifdef FOR_DUNE 
+                            /* Only used by Dune.  And default parameters are only allowed in C++ */
+                            , INT useRefineClass=0
+#endif
+                            );
 INT     Connect_Sons_of_ElementSide                     (GRID *theGrid, ELEMENT *theElement, INT side, INT Sons_of_Side, ELEMENT **Sons_of_Side_List, INT *SonSides, INT ioflag);
 INT             Refinement_Changes                                              (ELEMENT *theElement);
 
diff -ru ug-orig/gm/rm.c ug-patched/gm/rm.c
--- ug-orig/gm/rm.c	2008-10-30 13:29:06.000000000 +0100
+++ ug-patched/gm/rm.c	2007-05-29 09:19:06.000000000 +0200
@@ -128,9 +128,6 @@
 static REFRULE Empty_Rule = 
                       {-1,-1,NO_CLASS,-1,{-1,-1,-1,-1},-1, 
 				       {{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}}, 
-					   {{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-					    {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-					    {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 					   {{-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1}, 
 					    {-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1}, 
 					    {-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1}, 
@@ -142,9 +139,6 @@
 			   {TRIANGLE,T_NOREF,NO_CLASS,0,
 				{0,0,0,0},0,
 				{{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}},
-				{{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1},
 				 {-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1},
 				 {-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1},
@@ -154,9 +148,6 @@
 			   {TRIANGLE,T_COPY,RED_CLASS|GREEN_CLASS,1,
 				{0,0,0,0},0,
 				{{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}},
-				{{4,0,1,-1},{4,1,2,-1},{4,2,0,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{TRIANGLE,{0,1,2,-1},{FO+0,FO+1,FO+2,-1},0},
 				 {-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1},
 				 {-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1},
@@ -166,9 +157,6 @@
 			   {TRIANGLE,T_RED,RED_CLASS|GREEN_CLASS|SWITCH_CLASS,4,
 				{1,1,1,0},(1<<3)-1,
 				{{0,1},{1,2},{0,2},{-1,-1},{-1,-1}},
-				{{3,0,3,0},{3,3,1,0},{3,1,4,0},{3,4,2,0},
-				 {3,2,5,0},{3,5,0,2},{1,3,4,0},{1,4,5,0},
-				 {1,5,3,0},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{TRIANGLE,{0,3,5,-1},{FO+0, 3,FO+2,-1},0},
 				 {TRIANGLE,{3,1,4,-1},{FO+0,FO+1, 3,-1},0},
 				 {TRIANGLE,{4,2,5,-1},{ FO+1,FO+2,3,-1},0},
@@ -179,9 +167,6 @@
 			   {TRIANGLE,T_BISECT_1_0,RED_CLASS|GREEN_CLASS,2,
 				{1,0,0,0},1,
 				{{0,1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}},
-				{{3,0,3,-1},{3,3,1,-1},{ 1, 3, 2,-1},{4,1,2,-1},
-				 {4,2,0,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{TRIANGLE,{0,3,2,-1},{FO+0, 1,FO+2,-1},0},
 				 {TRIANGLE,{3,1,2,-1},{FO+0,FO+1, 0,-1},0},
 				 {-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1},
@@ -191,9 +176,6 @@
 			   {TRIANGLE,T_BISECT_1_1,RED_CLASS|GREEN_CLASS,2,
 				{0,1,0,0},1<<1,
 				{{-1,-1},{0,2},{-1,-1},{-1,-1},{-1,-1}},
-				{{3,1,4,-1},{3,4,2,-1},{ 1, 4, 0,-1},{4,0,1,-1},
-				 {4,2,0,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{TRIANGLE,{0,1,4,-1},{FO+0,FO+1, 1,-1},0},
 				 {TRIANGLE,{0,4,2,-1},{ 0,FO+1,FO+2,-1},0},
 				 {-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1},
@@ -203,9 +185,6 @@
 			   {TRIANGLE,T_BISECT_1_2,RED_CLASS|GREEN_CLASS,2,
 				{0,0,1,0},1<<2,
 				{{-1,-1},{-1,-1},{0,2},{-1,-1},{-1,-1}},
-				{{3,2,5,-1},{3,5,0,-1},{ 1, 5, 1,-1},{4,0,1,-1},
-				 {4,1,2,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{TRIANGLE,{0,1,5,-1},{FO+0, 1,FO+2,-1},0},
 				 {TRIANGLE,{5,1,2,-1},{ 0,FO+1,FO+2,-1},0},
 				 {-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1},
@@ -216,9 +195,6 @@
 			   {TRIANGLE,T_BISECT_2_T1_2,RED_CLASS|GREEN_CLASS,3,
 				{1,1,0,0},(1<<2)-1,
 				{{0,1},{1,2},{-1,-1},{-1,-1},{-1,-1}},
-				{{1,3,2,-1},{1,3,4,-1},{ 3, 0, 3,-1},{ 3, 3, 1,-1},
-				 {3,1,4,-1},{3,4,2,-1},{4,0,2,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{TRIANGLE,{0,3,2,-1},{FO+0, 2,FO+2,-1},0},
 				 {TRIANGLE,{3,1,4,-1},{FO+0,FO+1, 2,-1},0},
 				 {TRIANGLE,{3,4,2,-1},{ 1,FO+1, 0,-1},0},
@@ -228,9 +204,6 @@
 			   {TRIANGLE,T_BISECT_2_T1_0,RED_CLASS|GREEN_CLASS,3,
 				{0,1,1,0},6,
 				{{-1,-1},{0,2},{1,2},{-1,-1},{-1,-1}},
-				{{1,0,4,-1},{1,4,5,-1},{4,0,1,-1},{3,1,4,-1},
-				 {3,4,2,-1},{3,2,5,-1},{3,5,0,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{TRIANGLE,{0,1,4,-1},{FO+0,FO+1, 1,-1},0},
 				 {TRIANGLE,{0,4,5,-1},{ 0, 2,FO+2,-1},0},
 				 {TRIANGLE,{5,4,2,-1},{ 1,FO+1,FO+2,-1},0},
@@ -240,9 +213,6 @@
 			   {TRIANGLE,T_BISECT_2_T1_1,RED_CLASS|GREEN_CLASS,3,
 				{1,0,1,0},5,
 				{{0,1},{-1,-1},{1,2},{-1,-1},{-1,-1}},
-				{{1,3,5,-1},{1,1,5,-1},{3,0,3,-1},{3,3,1,-1},
-				 {4,1,2,-1},{3,2,5,-1},{3,5,0,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{TRIANGLE,{0,3,5,-1},{FO+0, 1,FO+2,-1},0},
 				 {TRIANGLE,{3,1,5,-1},{FO+0, 2, 0,-1},0},
 				 {TRIANGLE,{5,1,2,-1},{ 1,FO+1,FO+2,-1},0},
@@ -252,9 +222,6 @@
 			   {TRIANGLE,T_BISECT_2_T2_1,RED_CLASS|GREEN_CLASS,3,
 				{1,0,1,0},5,
 				{{0,1},{-1,-1},{0,2},{-1,-1},{-1,-1}},
-				{{1,3,5,-1},{1,3,2,-1},{3,0,3,-1},{3,3,1,-1},
-				 {4,1,2,-1},{3,2,5,-1},{3,5,0,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{TRIANGLE,{0,3,5,-1},{FO+0, 1,FO+2,-1},0},
 				 {TRIANGLE,{5,3,2,-1},{ 0, 2,FO+2,-1},0},
 				 {TRIANGLE,{3,1,2,-1},{FO+0,FO+1, 1,-1},0},
@@ -264,9 +231,6 @@
 			   {TRIANGLE,T_BISECT_2_T2_2,RED_CLASS|GREEN_CLASS,3,
 				{1,1,0,0},3,
 				{{0,1},{0,2},{-1,-1},{-1,-1},{-1,-1}},
-				{{1,3,4,-1},{1,4,0,-1},{3,0,3,-1},{3,3,1,-1},
-				 {3,1,4,-1},{3,4,2,-1},{4,2,0,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{TRIANGLE,{0,3,4,-1},{FO+0, 1, 2,-1},0},
 				 {TRIANGLE,{3,1,4,-1},{FO+0,FO+1, 0,-1},0},
 				 {TRIANGLE,{0,4,2,-1},{ 0,FO+1,FO+2,-1},0},
@@ -276,9 +240,6 @@
 			   {TRIANGLE,T_BISECT_2_T2_0,RED_CLASS|GREEN_CLASS,3,
 				{0,1,1,0},6,
 				{{-1,-1},{1,2},{0,2},{-1,-1},{-1,-1}},
-				{{1,4,5,-1},{1,5,1,-1},{4,0,1,-1},{3,1,4,-1},
-				 {3,4,2,-1},{3,2,5,-1},{3,5,0,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{TRIANGLE,{0,1,5,-1},{FO+0, 1,FO+2,-1},0},
 				 {TRIANGLE,{5,1,4,-1},{ 0,FO+1, 2,-1},0},
 				 {TRIANGLE,{5,4,2,-1},{ 1,FO+1,FO+2,-1},0},
@@ -288,9 +249,6 @@
 			   {TRIANGLE,T_BISECT_2_Q_0,RED_CLASS|GREEN_CLASS,2,
 				{0,1,1,0},6,
 				{{-1,-1},{0,2},{0,3},{-1,-1},{-1,-1}},
-				{{1,4,5,-1},{4,0,1,-1},{3,1,4,-1},{3,4,2,-1},
-				 {3,2,5,-1},{3,5,0,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{QUADRILATERAL,{0,1,4,5},{FO+0,FO+1, 1,FO+2},0},
 				 {TRIANGLE,{5,4,2,-1},{ 0,FO+1,FO+2,-1},0},
 				 {-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1},
@@ -300,9 +258,6 @@
 			   {TRIANGLE,T_BISECT_2_Q_1,RED_CLASS|GREEN_CLASS,2,
 				{1,0,1,0},5,
 				{{0,1},{-1,-1},{0,2},{-1,-1},{-1,-1}},
-				{{1,3,5,-1},{3,0,3,-1},{3,3,1,-1},{4,1,2,-1},
-				 {3,2,5,-1},{3,5,0,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{TRIANGLE,{0,3,5,-1},{FO+0, 1,FO+2,-1},0},
 				 {QUADRILATERAL,{3,1,2,5},{FO+0,FO+1,FO+2, 0},0},
 				 {-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1},
@@ -312,9 +267,6 @@
 			   {TRIANGLE,T_BISECT_2_Q_2,RED_CLASS|GREEN_CLASS,2,
 				{1,1,0,0},3,
 				{{0,1},{0,2},{-1,-1},{-1,-1},{-1,-1}},
-				{{1,3,4,-1},{3,0,3,-1},{3,3,1,-1},{3,1,4,-1},
-				 {3,4,2,-1},{4,2,0,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{QUADRILATERAL,{0,3,4,2},{FO+0, 1,FO+1,FO+2},0},
 				 {TRIANGLE,{3,1,4,-1},{FO+0,FO+1, 0,-1},0},
 				 {-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1},
@@ -324,9 +276,6 @@
 			   {TRIANGLE,T_BISECT_3_0,RED_CLASS|GREEN_CLASS,4,
 				{1,1,1,0},7,
 				{{0,1},{3,2},{0,2},{-1,-1},{-1,-1}},
-				{{1,3,4,-1},{1,3,2,-1},{1,3,5,-1},{3,0,3,-1},
-				 {3,3,1,-1},{3,1,4,-1},{3,4,2,-1},{3,2,5,-1},
-				 {3,5,0,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{TRIANGLE,{0,3,5,-1},{FO+0, 1,FO+2,-1},0},
 				 {TRIANGLE,{5,3,2,-1},{ 0, 2,FO+2,-1},0},
 				 {TRIANGLE,{3,4,2,-1},{ 3,FO+1, 1,-1},0},
@@ -336,9 +285,6 @@
 			   {TRIANGLE,T_BISECT_3_1,RED_CLASS|GREEN_CLASS,4,
 				{1,1,1,0},7,
 				{{0,1},{0,2},{1,2},{-1,-1},{-1,-1}},
-				{{1,4,0,-1},{1,4,3,-1},{1,4,5,-1},{3,0,3,-1},
-				 {3,3,1,-1},{3,1,4,-1},{3,4,2,-1},{3,2,5,-1},
-				 {3,5,0,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{TRIANGLE,{0,3,4,-1},{FO+0, 3, 1,-1},0},
 				 {TRIANGLE,{0,4,5,-1},{ 0, 2,FO+2,-1},0},
 				 {TRIANGLE,{5,4,2,-1},{ 1,FO+1,FO+2,-1},0},
@@ -348,9 +294,6 @@
 			   {TRIANGLE,T_BISECT_3_2,RED_CLASS|GREEN_CLASS,4,
 				{1,1,1,0},7,
 				{{0,1},{2,2},{1,2},{-1,-1},{-1,-1}},
-				{{1,5,3,-1},{1,5,1,-1},{1,5,4,-1},{3,0,3,-1},
-				 {3,3,1,-1},{3,1,4,-1},{3,4,2,-1},{3,2,5,-1},
-				 {3,5,0,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{TRIANGLE,{0,3,5,-1},{FO+0, 1,FO+2,-1},0},
 				 {TRIANGLE,{3,1,5,-1},{FO+0, 2, 0,-1},0},
 				 {TRIANGLE,{5,1,4,-1},{ 1,FO+1, 3,-1},0},
@@ -365,9 +308,6 @@
 		  	   {QUADRILATERAL,Q_NOREF,NO_CLASS,0,
 				{0,0,0,0},0,
 				{{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}},
-				{{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1},
 				 {-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1},
 				 {-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1},
@@ -377,9 +317,6 @@
 		  	   {QUADRILATERAL,Q_COPY,RED_CLASS|GREEN_CLASS,1,
 				{0,0,0,0},0,
 				{{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}},
-				{{4,0,1,-1},{4,1,2,-1},{4,2,3,-1},{4,3,0,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{QUADRILATERAL,{0,1,2,3},{FO+0,FO+1,FO+2,FO+3},-1},
 				 {-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1},
 				 {-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1},
@@ -389,9 +326,6 @@
 		  	   {QUADRILATERAL,Q_RED,RED_CLASS|GREEN_CLASS|SWITCH_CLASS,4,
 				{1,1,1,1,1},(1<<5)-1,
 				{{0,1},{1,2},{2,3},{3,0},{0,2}},
-				{{3,0,4,-1},{3,4,1,-1},{3,1,5,-1},{3,5,2,-1},
-				 {3,2,6,-1},{3,6,3,-1},{3,3,7,-1},{3,7,0,-1},
-				 {1,4,8,-1},{1,5,8,-1},{1,6,8,-1},{1,7,8,-1}},
 				{{QUADRILATERAL,{0,4,8,7},{FO+0, 1, 3,FO+3},-1},
 				 {QUADRILATERAL,{4,1,5,8},{FO+0,FO+1, 2, 0},-1},
 				 {QUADRILATERAL,{8,5,2,6},{ 1,FO+1,FO+2, 3},-1},
@@ -401,9 +335,6 @@
 		  	   {QUADRILATERAL,Q_CLOSE_1_0,RED_CLASS|GREEN_CLASS,3,
 				{1,1,0,0,1},3+16,
 				{{0,1},{1,2},{-1,-1},{-1,-1},{0,2}},
-				{{1,4,8,-1},{1,5,8,-1},{1,3,8,-1},{3,0,4,-1},
-				 {3,4,1,-1},{3,1,5,-1},{3,5,2,-1},{4,2,3,-1},
-				 {4,3,0,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{QUADRILATERAL,{0,4,8,3},{FO+0, 1, 2,FO+3},-1},
 				 {QUADRILATERAL,{4,1,5,8},{FO+0,FO+1, 2, 0},-1},
 				 {QUADRILATERAL,{8,5,2,3},{ 1,FO+1,FO+2, 0},-1},
@@ -413,9 +344,6 @@
 		  	   {QUADRILATERAL,Q_CLOSE_1_1,RED_CLASS|GREEN_CLASS,3,
 				{0,1,1,0,1},6+16,
 				{{-1,-1},{0,2},{1,3},{-1,-1},{0,3}},
-				{{1,0,8,-1},{1,5,8,-1},{1,6,8,-1},{4,0,1,-1},
-				 {3,1,5,-1},{3,5,2,-1},{3,2,6,-1},{3,6,3,-1},
-				 {4,3,0,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{QUADRILATERAL,{0,1,5,8},{FO+0,FO+1, 1, 2},-1},
 				 {QUADRILATERAL,{8,5,2,6},{ 0,FO+1,FO+2, 2},-1},
 				 {QUADRILATERAL,{0,8,6,3},{ 0, 1,FO+2,FO+3},-1},
@@ -425,9 +353,6 @@
 		  	   {QUADRILATERAL,Q_CLOSE_1_2,RED_CLASS|GREEN_CLASS,3,
 				{0,0,1,1,1},12+16,
 				{{-1,-1},{-1,-1},{1,3},{0,3},{0,2}},
-				{{1,1,8,-1},{1,6,8,-1},{1,7,8,-1},{4,0,1,-1},
-				 {4,1,2,-1},{3,2,6,-1},{3,6,3,-1},{3,3,7,-1},
-				 {3,7,0,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{QUADRILATERAL,{0,1,8,7},{FO+0, 1, 2,FO+3},-1},
 				 {QUADRILATERAL,{8,1,2,6},{ 0,FO+1,FO+2, 2},-1},
 				 {QUADRILATERAL,{7,8,6,3},{ 0, 1,FO+2,FO+3},-1},
@@ -437,9 +362,6 @@
 		  	   {QUADRILATERAL,Q_CLOSE_1_3,RED_CLASS|GREEN_CLASS,3,
 				{1,0,0,1,1},9+16,
 				{{0,1},{-1,-1},{-1,-1},{0,3},{0,2}},
-				{{1,4,8,-1},{1,2,8,-1},{1,7,8,-1},{3,0,4,-1},
-				 {3,4,1,-1},{4,1,2,-1},{4,2,3,-1},{3,3,7,-1},
-				 {3,7,0,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{QUADRILATERAL,{0,4,8,7},{FO+0, 1, 2,FO+3},-1},
 				 {QUADRILATERAL,{4,1,2,8},{FO+0,FO+1, 2, 0},-1},
 				 {QUADRILATERAL,{7,8,2,3},{ 0, 1,FO+2,FO+3},-1},
@@ -449,9 +371,6 @@
 		  	   {QUADRILATERAL,Q_BLUE_0,RED_CLASS|GREEN_CLASS,2,
 				{1,0,1,0,0},5,
 				{{0,1},{-1,-1},{0,2},{-1,-1},{-1,-1}},
-				{{1,4,6,-1},{3,0,4,-1},{3,4,1,-1},{4,1,2,-1},
-				 {3,2,6,-1},{3,6,3,-1},{4,3,0,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{QUADRILATERAL,{0,4,6,3},{FO+0, 1,FO+2,FO+3},-1},
 				 {QUADRILATERAL,{4,1,2,6},{FO+0,FO+1,FO+2, 0},-1},
 				 {-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1},
@@ -461,9 +380,6 @@
 		  	   {QUADRILATERAL,Q_BLUE_1,RED_CLASS|GREEN_CLASS,2,
 				{0,1,0,1,0},10,
 				{{-1,-1},{0,2},{-1,-1},{0,3},{-1,-1}},
-				{{1,5,7,-1},{4,0,1,-1},{3,1,5,-1},{3,5,2,-1},
-				 {4,2,3,-1},{3,3,7,-1},{3,7,0,-1},{-1,-1,-1,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{QUADRILATERAL,{0,1,5,7},{FO+0,FO+1, 1,FO+3},-1},
 				 {QUADRILATERAL,{7,5,2,3},{ 0,FO+1,FO+2,FO+3},-1},
 				 {-1,{-1,-1,-1,-1},{-1,-1,-1,-1},-1},
@@ -473,9 +389,6 @@
 		  	   {QUADRILATERAL,Q_CLOSE_2_0,RED_CLASS|GREEN_CLASS,3,
 				{1,0,0,0,1},1+16,
 				{{0,1},{-1,-1},{-1,-1},{-1,-1},{0,2}},
-				{{1,4,8,-1},{1,2,8,-1},{1,3,8,-1},{3,0,4,-1},
-				 {3,4,1,-1},{4,1,2,-1},{4,2,3,-1},{4,3,0,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{QUADRILATERAL,{0,4,8,3},{FO+0, 1, 2,FO+3},-1},
 				 {QUADRILATERAL,{4,1,2,8},{FO+0,FO+1, 2, 0},-1},
 				 {TRIANGLE,{8,2,3,-1},{ 1,FO+2, 0,-1},-1},
@@ -485,9 +398,6 @@
 		  	   {QUADRILATERAL,Q_CLOSE_2_1,RED_CLASS|GREEN_CLASS,3,
 				{0,1,0,0,1},2+16,
 				{{-1,-1},{0,2},{-1,-1},{-1,-1},{0,3}},
-				{{1,0,8,-1},{1,5,8,-1},{1,3,8,-1},{4,0,1,-1},
-				 {3,1,5,-1},{3,5,2,-1},{4,2,3,-1},{4,3,0,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{QUADRILATERAL,{0,1,5,8},{FO+0,FO+1, 1, 2},-1},
 				 {QUADRILATERAL,{8,5,2,3},{ 0,FO+1,FO+2, 2},-1},
 				 {TRIANGLE,{0,8,3,-1},{ 0, 1,FO+3,-1},-1},
@@ -497,9 +407,6 @@
 		  	   {QUADRILATERAL,Q_CLOSE_2_2,RED_CLASS|GREEN_CLASS,3,
 				{0,0,1,0,1},4+16,
 				{{-1,-1},{-1,-1},{1,3},{-1,-1},{0,2}},
-				{{1,0,8,-1},{1,1,8,-1},{1,6,8,-1},{4,0,1,-1},
-				 {4,1,2,-1},{3,2,6,-1},{3,6,3,-1},{4,3,0,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{TRIANGLE,{0,1,8,-1},{FO+0, 1, 2,-1},-1},
 				 {QUADRILATERAL,{8,1,2,6},{ 0,FO+1,FO+2, 2},-1},
 				 {QUADRILATERAL,{0,8,6,3},{ 0, 1,FO+2,FO+3},-1},
@@ -509,9 +416,6 @@
 		  	   {QUADRILATERAL,Q_CLOSE_2_3,RED_CLASS|GREEN_CLASS,3,
 				{0,0,0,1,1},8+16,
 				{{-1,-1},{-1,-1},{-1,-1},{0,3},{0,2}},
-				{{1,1,8,-1},{1,2,8,-1},{1,7,8,-1},{4,0,1,-1},
-				 {4,1,2,-1},{4,2,3,-1},{3,3,7,-1},{3,7,0,-1},
-				 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{QUADRILATERAL,{0,1,8,7},{FO+0, 1, 2,FO+3},-1},
 			 	 {TRIANGLE,{1,2,8,-1},{FO+1, 2, 0,-1},-1},
 				 {QUADRILATERAL,{7,8,2,3},{ 0, 1,FO+2,FO+3},-1},
@@ -521,9 +425,6 @@
 		  	   {QUADRILATERAL,Q_CLOSE_3_0,RED_CLASS|GREEN_CLASS,4,
 				{0,1,1,1,0},14,
 				{{-1,-1},{0,2},{1,2},{0,3},{-1,-1}},
-				{{1,7,5,-1},{1,5,6,-1},{1,6,7,-1},{4,0,1,-1},
-				 {3,1,5,-1},{3,5,2,-1},{3,2,6,-1},{3,6,3,-1},
-				 {3,3,7,-1},{3,7,0,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{QUADRILATERAL,{0,1,5,7},{FO+0,FO+1, 1,FO+3},-1},
 			 	 {TRIANGLE,{7,5,6,-1},{ 0, 2, 3,-1},-1},
 				 {TRIANGLE,{5,2,6,-1},{FO+1,FO+2, 1,-1},-1},
@@ -533,9 +434,6 @@
 		  	   {QUADRILATERAL,Q_CLOSE_3_1,RED_CLASS|GREEN_CLASS,4,
 				{1,0,1,1,0},13,
 				{{0,1},{-1,-1},{1,2},{0,2},{-1,-1}},
-				{{1,7,4,-1},{1,4,6,-1},{1,6,7,-1},{3,0,4,-1},
-				 {3,4,1,-1},{4,1,2,-1},{3,2,6,-1},{3,6,3,-1},
-				 {3,3,7,-1},{3,7,0,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 			 	{{TRIANGLE,{0,4,7,-1},{FO+0, 1,FO+3,-1},-1},
 			 	 {TRIANGLE,{7,4,6,-1},{ 0, 3, 2,-1},-1},
 				 {TRIANGLE,{7,6,3,-1},{ 1,FO+2,FO+3,-1},-1},
@@ -545,9 +443,6 @@
 		  	   {QUADRILATERAL,Q_CLOSE_3_2,RED_CLASS|GREEN_CLASS,4,
 				{1,1,0,1,0},11,
 				{{0,1},{2,2},{-1,-1},{0,2},{-1,-1}},
-				{{1,7,4,-1},{1,4,5,-1},{1,5,7,-1},{3,0,4,-1},
-				 {3,4,1,-1},{3,1,5,-1},{3,5,2,-1},{4,2,3,-1},
-				 {3,3,7,-1},{3,7,0,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 			 	{{TRIANGLE,{0,4,7,-1},{FO+0, 1,FO+3,-1},-1},
 			 	 {TRIANGLE,{4,5,7,-1},{ 2, 3, 0,-1},-1},
 				 {TRIANGLE,{4,1,5,-1},{FO+0,FO+1, 1,-1},-1},
@@ -557,9 +452,6 @@
 		  	   {QUADRILATERAL,Q_CLOSE_3_3,RED_CLASS|GREEN_CLASS,4,
 				{1,1,1,0,0},7,
 				{{0,1},{2,2},{0,2},{-1,-1},{-1,-1}},
-				{{1,6,4,-1},{1,4,5,-1},{1,5,6,-1},{3,0,4,-1},
-				 {3,4,1,-1},{3,1,5,-1},{3,5,2,-1},{3,2,6,-1},
-				 {3,6,3,-1},{4,3,0,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}},
 				{{QUADRILATERAL,{0,4,6,3},{FO+0, 1,FO+2,FO+3},-1},
 			 	 {TRIANGLE,{4,5,6,-1},{ 2, 3, 0,-1},-1},
 			 	 {TRIANGLE,{4,1,5,-1},{FO+0,FO+1, 1,-1},-1},
@@ -572,6 +464,7 @@
 #ifdef __THREEDIM__
 
 static INT theBFRRDirID;      /* env type for BestFullRefRule       */
+static INT theBFRRVarID;
 
 static REFRULE Empty_Rule = 
                       {-1,-1,NO_CLASS,-1,
@@ -580,20 +473,6 @@
 						 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 						 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 						 {-1,-1}},  
-						{{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-						 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-						 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-						 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-						 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-						 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-						 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-						 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-						 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-						 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-						 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-						 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-						 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-						 {-1,-1,-1,-1},{-1,-1,-1,-1}}, 
 						{{-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}, 
 						 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}, 
 						 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}, 
@@ -618,20 +497,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1}},  
-			{{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,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-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1}}, 
 			{{TETRAHEDRON,{ 0, 1, 2, 3,-1,-1,-1,-1},{FO+0,FO+1,FO+2,FO+3,-1,-1},-1}, 
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}, 
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}, 
@@ -688,23 +539,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1}},  
 
-			 /* new edges */
-			 /* TODO: not complete, since not needed any more */
-			{{ 3, 0, 5,-1},{ 3, 5, 1,-1},{ 3, 1, 6,-1},{ 3, 6, 2,-1}, 
-			 { 3, 2, 7,-1},{ 4, 1, 4,-1},{ 4, 2, 4,-1},{ 4, 3, 4,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1}}, 
-
 			 /* sons */
 			{{TETRAHEDRON,{0,4,6,7,-1,-1,-1,-1},{FO+0,4,FO+2,FO+3,-1,-1},0x0}, 
 			 {TETRAHEDRON,{4,5,8,1,-1,-1,-1,-1},{5,FO+1,FO+3,FO+0,-1,-1},
@@ -736,23 +570,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1}},  
 
-			 /* new edges */
-			 /** \todo not complete, since not needed any more */
-			{{ 3, 0, 5,-1},{ 3, 5, 1,-1},{ 3, 1, 6,-1},{ 3, 6, 2,-1}, 
-			 { 3, 2, 7,-1},{ 4, 1, 4,-1},{ 4, 2, 4,-1},{ 4, 3, 4,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1}}, 
-
 			 /* sons */
 			{{TETRAHEDRON,{5,6,9,2,-1,-1,-1,-1},{4,FO+2,FO+1,FO+0,-1,-1},0x0}, 
 			 {TETRAHEDRON,{4,5,8,1,-1,-1,-1,-1},{5,FO+1,FO+3,FO+0,-1,-1},
@@ -784,23 +601,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1}},  
 
-			 /* new edges */
-			 /* TODO: not complete, since not needed any more */
-			{{ 3, 0, 5,-1},{ 3, 5, 1,-1},{ 3, 1, 6,-1},{ 3, 6, 2,-1}, 
-			 { 3, 2, 7,-1},{ 4, 1, 4,-1},{ 4, 2, 4,-1},{ 4, 3, 4,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1}}, 
-
 			 /* sons */
 			{{TETRAHEDRON,{7,8,9,3,-1,-1,-1,-1},{4,FO+1,FO+2,FO+3,-1,-1},0x0}, 
 			 {TETRAHEDRON,{4,5,8,1,-1,-1,-1,-1},{5,FO+1,FO+3,FO+0,-1,-1},
@@ -832,23 +632,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1}},  
 
-			 /* new edges */
-			 /** \todo not complete, since not needed any more */
-			{{ 3, 0, 5,-1},{ 3, 5, 1,-1},{ 3, 1, 6,-1},{ 3, 6, 2,-1}, 
-			 { 3, 2, 7,-1},{ 4, 1, 4,-1},{ 4, 2, 4,-1},{ 4, 3, 4,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1}}, 
-
 			 /* sons */
 			{{HEXAHEDRON,{4,1,5,10,13,8,11,14},{FO+0,FO+3,FO+1,1,2,3},0x0}, 
 			 {HEXAHEDRON,{5,2,6,10,11,9,12,14},{FO+0,FO+1,FO+2,2,0,3},0x0},
@@ -876,20 +659,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1}},  
-			{{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,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1,-1}},  
 
-			 /* new edges */
-			 /* TODO: not complete, since not needed any more */
-			{{ 3, 0, 5,-1},{ 3, 5, 1,-1},{ 3, 1, 6,-1},{ 3, 6, 2,-1}, 
-			 { 3, 2, 7,-1},{ 4, 1, 4,-1},{ 4, 2, 4,-1},{ 4, 3, 4,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1}}, 
-
 			 /* sons */
 			{{PYRAMID,{ 0, 5, 13, 8, 9,-1,-1,-1},{FO+0,FO+1,4,7,FO+4,-1},-1}, 
 			 {PYRAMID,{5,1,6,13,10,-1,-1,-1},{FO+0,FO+1,FO+2,5,4,-1},
@@ -996,23 +734,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1}},  
 
-			 /* new edges */
-			 /** \todo not complete, since not needed any more */
-			{{ 3, 0, 5,-1},{ 3, 5, 1,-1},{ 3, 1, 6,-1},{ 3, 6, 2,-1}, 
-			 { 3, 2, 7,-1},{ 4, 1, 4,-1},{ 4, 2, 4,-1},{ 4, 3, 4,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1}}, 
-
 			 /* sons */
 			{{PYRAMID,{ 0, 5, 7, 3, 4,-1,-1,-1},{FO+0,FO+1,1,FO+3,FO+4,-1},-1}, 
 			 {PYRAMID,{5,1,2,7,4,-1,-1,-1},{FO+0,FO+1,FO+2,FO+3,0,-1},
@@ -1038,23 +759,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1}},  
 
-			 /* new edges */
-			 /** \todo not complete, since not needed any more */
-			{{ 3, 0, 5,-1},{ 3, 5, 1,-1},{ 3, 1, 6,-1},{ 3, 6, 2,-1}, 
-			 { 3, 2, 7,-1},{ 4, 1, 4,-1},{ 4, 2, 4,-1},{ 4, 3, 4,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1}}, 
-
 			 /* sons */
 			{{PYRAMID,{ 0, 1, 6, 8, 4,-1,-1,-1},{FO+0,FO+1,FO+2,1,FO+4,-1},-1}, 
 			 {PYRAMID,{8,6,2,3,4,-1,-1,-1},{FO+0,0,FO+2,FO+3,FO+4,-1},
@@ -1082,20 +786,6 @@
 			 {-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}, 
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}, 
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}, 
@@ -1153,23 +829,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
 			 {-1,-1}},  
 
-			 /* new edges */
-			 /** \todo not complete, since not needed any more */
-			{{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1}}, 
-
 			 /* sons */
 			{{PRISM,{0,6,8,9,16,18,-1,-1},{FO+0,FO+1,2,FO+3,4,-1},-1}, 
 			 {PRISM,{6,1,7,16,10,17,-1,-1},{FO+0,FO+1,FO+2,2,5,-1},
@@ -1202,23 +861,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
 			 {-1,-1}},  
 
-			 /* new edges */
-			 /** \todo not complete, since not needed any more */
-			{{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1}}, 
-
 			 /* sons */
 			{{PRISM,{0,6,8,3,12,14,-1,-1},{FO+0,FO+1,2,FO+3,FO+4,-1},-1}, 
 			 {PRISM,{6,1,7,12,4,13,-1,-1},{FO+0,FO+1,FO+2,2,FO+4,-1},
@@ -1236,34 +878,17 @@
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}, 
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}}},
 
-	/* PRI_bisect_0_1 */
+	/* PRI_BISECT_0_1 */
 		  {PRISM,4,RED_CLASS|SWITCH_CLASS,2,
 			{1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0},
 			1 + 1<<6, 
 
 			 /* sonandnode */
-			{{0,1},{1,1},{0,2},{0,3},{1,4},{2,5}, 
-			 {4,4},{5,5},{4,5},{-1,-1},{0,4},{1,5},{0,5}, 
+			{{0,1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
+			 {0,4},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
 			 {-1,-1}},  
 
-			 /* new edges */
-			 /** \todo not complete, since not needed any more */
-			{{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1}}, 
-
 			 /* sons */
 			{{PRISM,{0,6,2,3,12,5,-1,-1},{FO+0,FO+1,1,FO+3,FO+4,-1},-1}, 
 			 {PRISM,{6,1,2,12,4,5,-1,-1},{FO+0,FO+1,FO+2,0,FO+4,-1},
@@ -1279,34 +904,17 @@
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}, 
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}}},
 
-	/* PRI_bisect_0_2 */
+	/* PRI_BISECT_0_2 */
 		  {PRISM,5,RED_CLASS|SWITCH_CLASS,2,
 			{0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0},
 			1<<1 + 1<<7, 
 
 			 /* sonandnode */
-			{{0,1},{1,1},{0,2},{0,3},{1,4},{2,5}, 
-			 {4,4},{5,5},{4,5},{-1,-1},{0,4},{1,5},{0,5}, 
+			{{-1,-1},{0,1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
+			 {-1,-1},{0,4},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
 			 {-1,-1}},  
 
-			 /* new edges */
-			 /** \todo not complete, since not needed any more */
-			{{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1}}, 
-
 			 /* sons */
 			{{PRISM,{0,7,2,3,13,5,-1,-1},{FO+0,1,FO+2,FO+3,FO+4,-1},-1}, 
 			 {PRISM,{0,1,7,3,4,13,-1,-1},{FO+0,FO+1,FO+2,0,FO+4,-1},
@@ -1322,34 +930,17 @@
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}, 
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}}},
 
-	/* PRI_bisect_0_3 */
+	/* PRI_BISECT_0_3 */
 		  {PRISM,6,RED_CLASS|SWITCH_CLASS,2,
 			{0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0},
 			1<<2 + 1<<8,
 
 			 /* sonandnode */
-			{{0,1},{1,1},{0,2},{0,3},{1,4},{2,5}, 
-			 {4,4},{5,5},{4,5},{-1,-1},{0,4},{1,5},{0,5}, 
+			{{-1,-1},{-1,-1},{0,2},{-1,-1},{-1,-1},{-1,-1}, 
+			 {-1,-1},{-1,-1},{0,5},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
 			 {-1,-1}},  
 
-			 /* new edges */
-			 /** \todo not complete, since not needed any more */
-			{{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1}}, 
-
 			 /* sons */
 			{{PRISM,{0,1,8,3,4,14,-1,-1},{FO+0,FO+1,1,FO+3,FO+4,-1},-1}, 
 			 {PRISM,{8,1,2,14,4,5,-1,-1},{FO+0,0,FO+2,FO+3,FO+4,-1},
@@ -1365,7 +956,7 @@
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}, 
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}}},
 
-	/* PRI_bisect_1_2 */
+	/* PRI_BISECT_1_2 */
 		  {PRISM,7,RED_CLASS|SWITCH_CLASS,2,
 			{0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0},
 			1<<3 + 1<<4 + 1<<5,
@@ -1376,23 +967,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
 			 {-1,-1}},  
 
-			 /* new edges */
-			 /** \todo not complete, since not needed any more */
-			{{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1}}, 
-
 			 /* sons */
 			{{PRISM,{0,1,2,9,10,11,-1,-1},{FO+0,FO+1,FO+2,FO+3,1,-1},-1}, 
 			 {PRISM,{9,10,11,3,4,5,-1,-1},{0,FO+1,FO+2,FO+3,FO+4,-1},
@@ -1408,7 +982,7 @@
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}, 
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}}},
 
-	/* PRI_bisect_hex_0 */
+	/* PRI_BISECT_HEX0 */
 		  {PRISM,8,RED_CLASS|SWITCH_CLASS,2,
 			{1,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0},
 			1+1<<2+1<<6+1<<8, 
@@ -1419,23 +993,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
 			 {-1,-1}},  
 
-			 /* new edges */
-			 /** \todo not complete, since not needed any more */
-			{{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},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_1 */
+	/* PRI_BISECT_HEX1 */
 		  {PRISM,9,RED_CLASS|SWITCH_CLASS,2,
 			{0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0},
 			1<<1+1<<2+1<<7+1<<8, 
@@ -1462,23 +1019,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
 			 {-1,-1}},  
 
-			 /* new edges */
-			 /** \todo not complete, since not needed any more */
-			{{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1}}, 
-
 			 /* sons */
 			{{HEXAHEDRON,{0,1,7,8,3,4,13,14},{FO+0,FO+1,FO+2,1,FO+3,FO+4},-1}, 
 			 {PRISM,{7,8,2,13,14,5,-1,-1},{FO+0,0,FO+2,FO+3,FO+4,-1},
@@ -1494,7 +1034,7 @@
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}, 
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}}},
 
-	/* PRI_bisect_hex_2 */
+	/* PRI_BISECT_HEX2 */
 		  {PRISM,10,RED_CLASS|SWITCH_CLASS,2,
 			{1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0},
 			1+1<<1+1<<6+1<<7, 
@@ -1505,23 +1045,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
 			 {-1,-1}},  
 
-			 /* new edges */
-			 /** \todo not complete, since not needed any more */
-			{{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1}}, 
-
 			 /* sons */
 			{{HEXAHEDRON,{6,7,2,0,12,13,5,3},{FO+0,1,FO+2,FO+3,FO+1,FO+4},-1}, 
 			 {PRISM,{6,1,7,12,4,13,-1,-1},{FO+0,FO+1,FO+2,0,FO+4,-1},
@@ -1548,23 +1071,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
 			 {-1,-1}},  
 
-			 /* new edges */
-			 /** \todo not complete, since not needed any more */
-			{{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1}}, 
-
 			 /* sons */
             {{HEXAHEDRON,{ 0, 6,15,8,3,12,19,14},{FO+0,FO+1,1,2,FO+3,FO+4},-1},
 		 	 {HEXAHEDRON,{ 6, 1, 7,15,12,4,13,19},{FO+0,FO+1,FO+2,2,0,FO+4},
@@ -1588,20 +1094,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1}},  
-			{{ 4, 0, 1,-1},{ 4, 1, 2,-1},{ 4, 2, 0,-1},{ 4, 0, 3,-1}, 
-			 { 4, 1, 4,-1},{ 4, 2, 5,-1},{ 4, 3, 4,-1},{ 4, 4, 5,-1}, 
-			 { 4, 5, 3,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,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{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1},{-1,-1,-1,-1}, 
-			 {-1,-1,-1,-1},{-1,-1,-1,-1}}, 
 			{{PRISM,{ 2, 0, 1, 5, 3, 4,-1,-1},{FO+0,FO+3,FO+1,FO+2,FO+4,-1},-1}, 
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}, 
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}, 
@@ -1649,7 +1127,7 @@
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}, 
 			 {-1,{-1,-1,-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1,-1,-1},-1}}},
 
-	/* PRI_quadsect_hexpri0 */
+	/* PRI_QUADSECT_HEXPRI0 */
 		  {PRISM,14,RED_CLASS,4,
 			{1,1,0,1,1,1,1,1,0,0,1,1,0,0,0,0,0,0,0},
                          3 + 1<<3 + 1<<4 + 1<<5 + 1<<6 + 1<<7 + 1<<10 + 1<<11,
@@ -1658,20 +1136,6 @@
 			 {3,5},{3,6},{-1,-1},{-1,-1},{0,5},{0,6},
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1}},  
-			{{ 4, 0, 1,-1},{ 4, 1, 2,-1},{ 4, 2, 0,-1},{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1}, 
@@ -1768,27 +1204,6 @@
 			{4,5},{5,6},{6,7},{7,4},
 			{0,2},{0,5},{1,6},{2,7},{0,7},{4,6},{0,6}},
 
-			/* new edges */
-		   {{3, 0, 8,-1},{3, 8, 1,-1},{3, 1, 9,-1},{3, 9, 2,-1},
-			{3, 2,10,-1},{3,10, 3,-1},{3, 3,11,-1},{3,11, 0,-1},
-			{2, 8,20, 0},{2, 9,20, 0},{2,10,20, 0},{2,11,20, 0},
-
-			{3, 0,12,-1},{2, 8,21, 1},{3, 1,13,-1},{2, 9,22, 2},
-			{3, 2,14,-1},{2,10,23, 3},{3, 3,15,-1},{2,11,24, 4},
-			{1,20,26,-1},
-
-			{2,12,21, 1},{2,21,13, 1},{2,13,22, 2},{2,22,14, 2},
-			{2,14,23, 3},{2,23,15, 3},{2,15,24, 4},{2,24,12, 4},
-			{1,21,26,-1},{1,22,26,-1},{1,23,26,-1},{1,24,26,-1},
-
-			{3,12, 4,-1},{2,21,16, 1},{3,13, 5,-1},{2,22,17, 2},
-			{3,14, 6,-1},{2,23,18, 3},{3,15, 7,-1},{2,24,19, 4},
-			{1,26,25,-1},
-
-			{3, 4,16,-1},{3,16, 5,-1},{3, 5,17,-1},{3,17, 6,-1},
-			{3, 6,18,-1},{3,18, 7,-1},{3, 7,19,-1},{3,19, 4,-1},
-			{2,16,25, 5},{2,17,25, 5},{2,18,25, 5},{2,19,25, 5}},
-
 			/* sons */
 		   {{HEXAHEDRON,{ 0, 8,20,11,12,21,26,24},{FO+0,FO+1, 1, 3,FO+4, 4},-1},
 		 	{HEXAHEDRON,{ 8, 1, 9,20,21,13,22,26},{FO+0,FO+1,FO+2, 2, 0, 5},
@@ -1822,27 +1237,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1}},  
 
-			/* new edges */
-		   {{3, 0, 8,-1},{3, 8, 1,-1},{3, 1, 9,-1},{3, 9, 2,-1},
-			{3, 2,10,-1},{3,10, 3,-1},{3, 3,11,-1},{3,11, 0,-1},
-			{2, 8,20, 0},{2, 9,20, 0},{2,10,20, 0},{2,11,20, 0},
-
-			{3, 0,12,-1},{2, 8,21, 1},{3, 1,13,-1},{2, 9,22, 2},
-			{3, 2,14,-1},{2,10,23, 3},{3, 3,15,-1},{2,11,24, 4},
-			{1,20,26,-1},
-
-			{2,12,21, 1},{2,21,13, 1},{2,13,22, 2},{2,22,14, 2},
-			{2,14,23, 3},{2,23,15, 3},{2,15,24, 4},{2,24,12, 4},
-			{1,21,26,-1},{1,22,26,-1},{1,23,26,-1},{1,24,26,-1},
-
-			{3,12, 4,-1},{2,21,16, 1},{3,13, 5,-1},{2,22,17, 2},
-			{3,14, 6,-1},{2,23,18, 3},{3,15, 7,-1},{2,24,19, 4},
-			{1,26,25,-1},
-
-			{3, 4,16,-1},{3,16, 5,-1},{3, 5,17,-1},{3,17, 6,-1},
-			{3, 6,18,-1},{3,18, 7,-1},{3, 7,19,-1},{3,19, 4,-1},
-			{2,16,25, 5},{2,17,25, 5},{2,18,25, 5},{2,19,25, 5}},
-
 			/* sons */
 		   {{HEXAHEDRON,{ 0, 8,10,3,4,16,18,7},{FO+0,FO+1, 1,FO+3,FO+4,FO+5},-1},
 		 	{HEXAHEDRON,{ 8, 1, 2,10,16,5,6,18},{FO+0,FO+1,FO+2,FO+3, 0,FO+5},
@@ -1869,27 +1263,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1}},  
 
-			/* new edges */
-		   {{3, 0, 8,-1},{3, 8, 1,-1},{3, 1, 9,-1},{3, 9, 2,-1},
-			{3, 2,10,-1},{3,10, 3,-1},{3, 3,11,-1},{3,11, 0,-1},
-			{2, 8,20, 0},{2, 9,20, 0},{2,10,20, 0},{2,11,20, 0},
-
-			{3, 0,12,-1},{2, 8,21, 1},{3, 1,13,-1},{2, 9,22, 2},
-			{3, 2,14,-1},{2,10,23, 3},{3, 3,15,-1},{2,11,24, 4},
-			{1,20,26,-1},
-
-			{2,12,21, 1},{2,21,13, 1},{2,13,22, 2},{2,22,14, 2},
-			{2,14,23, 3},{2,23,15, 3},{2,15,24, 4},{2,24,12, 4},
-			{1,21,26,-1},{1,22,26,-1},{1,23,26,-1},{1,24,26,-1},
-
-			{3,12, 4,-1},{2,21,16, 1},{3,13, 5,-1},{2,22,17, 2},
-			{3,14, 6,-1},{2,23,18, 3},{3,15, 7,-1},{2,24,19, 4},
-			{1,26,25,-1},
-
-			{3, 4,16,-1},{3,16, 5,-1},{3, 5,17,-1},{3,17, 6,-1},
-			{3, 6,18,-1},{3,18, 7,-1},{3, 7,19,-1},{3,19, 4,-1},
-			{2,16,25, 5},{2,17,25, 5},{2,18,25, 5},{2,19,25, 5}},
-
 			/* sons */
 		   {{HEXAHEDRON,{ 0, 1,9,11,4,5,17,19},{FO+0,FO+1,FO+2,1,FO+4,FO+5},-1},
 		 	{HEXAHEDRON,{ 11, 9, 2,3,19,17,6,7},{FO+0,0,FO+2,FO+3,FO+4,FO+5},
@@ -1916,27 +1289,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1}},  
 
-			/* new edges */
-		   {{3, 0, 8,-1},{3, 8, 1,-1},{3, 1, 9,-1},{3, 9, 2,-1},
-			{3, 2,10,-1},{3,10, 3,-1},{3, 3,11,-1},{3,11, 0,-1},
-			{2, 8,20, 0},{2, 9,20, 0},{2,10,20, 0},{2,11,20, 0},
-
-			{3, 0,12,-1},{2, 8,21, 1},{3, 1,13,-1},{2, 9,22, 2},
-			{3, 2,14,-1},{2,10,23, 3},{3, 3,15,-1},{2,11,24, 4},
-			{1,20,26,-1},
-
-			{2,12,21, 1},{2,21,13, 1},{2,13,22, 2},{2,22,14, 2},
-			{2,14,23, 3},{2,23,15, 3},{2,15,24, 4},{2,24,12, 4},
-			{1,21,26,-1},{1,22,26,-1},{1,23,26,-1},{1,24,26,-1},
-
-			{3,12, 4,-1},{2,21,16, 1},{3,13, 5,-1},{2,22,17, 2},
-			{3,14, 6,-1},{2,23,18, 3},{3,15, 7,-1},{2,24,19, 4},
-			{1,26,25,-1},
-
-			{3, 4,16,-1},{3,16, 5,-1},{3, 5,17,-1},{3,17, 6,-1},
-			{3, 6,18,-1},{3,18, 7,-1},{3, 7,19,-1},{3,19, 4,-1},
-			{2,16,25, 5},{2,17,25, 5},{2,18,25, 5},{2,19,25, 5}},
-
 			/* sons */
 		   {{HEXAHEDRON,{ 0, 1,2,3,12,13,14,15},{FO+0,FO+1,FO+2,FO+3,FO+4,1},-1},
 		 	{HEXAHEDRON,{ 12,13,14,15,4,5,6,7},{0,FO+1,FO+2,FO+3,FO+4,FO+5},
@@ -1963,27 +1315,6 @@
 			{0,5},{1,6},{2,7},{0,7},
 			{0,2},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{0,6},{-1,-1}},
 
-			/* new edges */
-		   {{3, 0, 8,-1},{3, 8, 1,-1},{3, 1, 9,-1},{3, 9, 2,-1},
-			{3, 2,10,-1},{3,10, 3,-1},{3, 3,11,-1},{3,11, 0,-1},
-			{2, 8,20, 0},{2, 9,20, 0},{2,10,20, 0},{2,11,20, 0},
-
-			{3, 0,12,-1},{2, 8,21, 1},{3, 1,13,-1},{2, 9,22, 2},
-			{3, 2,14,-1},{2,10,23, 3},{3, 3,15,-1},{2,11,24, 4},
-			{1,20,26,-1},
-
-			{2,12,21, 1},{2,21,13, 1},{2,13,22, 2},{2,22,14, 2},
-			{2,14,23, 3},{2,23,15, 3},{2,15,24, 4},{2,24,12, 4},
-			{1,21,26,-1},{1,22,26,-1},{1,23,26,-1},{1,24,26,-1},
-
-			{3,12, 4,-1},{2,21,16, 1},{3,13, 5,-1},{2,22,17, 2},
-			{3,14, 6,-1},{2,23,18, 3},{3,15, 7,-1},{2,24,19, 4},
-			{1,26,25,-1},
-
-			{3, 4,16,-1},{3,16, 5,-1},{3, 5,17,-1},{3,17, 6,-1},
-			{3, 6,18,-1},{3,18, 7,-1},{3, 7,19,-1},{3,19, 4,-1},
-			{2,16,25, 5},{2,17,25, 5},{2,18,25, 5},{2,19,25, 5}},
-
 			/* sons */
 		   {{HEXAHEDRON,{ 0, 8,20,11,4,16,25,19},{FO+0,FO+1,1,3,FO+4,FO+5},-1},
 		 	{HEXAHEDRON,{ 8, 1, 9,20,16,5,17,25},{FO+0,FO+1,FO+2,2,0,FO+5},
@@ -2012,27 +1343,6 @@
 			{3,5},{-1,-1},{3,6},{-1,-1},
 			{-1,-1},{0,5},{-1,-1},{0,6},{-1,-1},{-1,-1},{-1,-1}},
 
-			/* new edges */
-		   {{3, 0, 8,-1},{3, 8, 1,-1},{3, 1, 9,-1},{3, 9, 2,-1},
-			{3, 2,10,-1},{3,10, 3,-1},{3, 3,11,-1},{3,11, 0,-1},
-			{2, 8,20, 0},{2, 9,20, 0},{2,10,20, 0},{2,11,20, 0},
-
-			{3, 0,12,-1},{2, 8,21, 1},{3, 1,13,-1},{2, 9,22, 2},
-			{3, 2,14,-1},{2,10,23, 3},{3, 3,15,-1},{2,11,24, 4},
-			{1,20,26,-1},
-
-			{2,12,21, 1},{2,21,13, 1},{2,13,22, 2},{2,22,14, 2},
-			{2,14,23, 3},{2,23,15, 3},{2,15,24, 4},{2,24,12, 4},
-			{1,21,26,-1},{1,22,26,-1},{1,23,26,-1},{1,24,26,-1},
-
-			{3,12, 4,-1},{2,21,16, 1},{3,13, 5,-1},{2,22,17, 2},
-			{3,14, 6,-1},{2,23,18, 3},{3,15, 7,-1},{2,24,19, 4},
-			{1,26,25,-1},
-
-			{3, 4,16,-1},{3,16, 5,-1},{3, 5,17,-1},{3,17, 6,-1},
-			{3, 6,18,-1},{3,18, 7,-1},{3, 7,19,-1},{3,19, 4,-1},
-			{2,16,25, 5},{2,17,25, 5},{2,18,25, 5},{2,19,25, 5}},
-
 			/* sons */
 		   {{HEXAHEDRON,{ 0, 8,10,3,12,21,23,15},{FO+0,FO+1,1,FO+3,FO+4,3},-1},
 		 	{HEXAHEDRON,{ 8, 1, 2,10,21,13,14,23},{FO+0,FO+1,FO+2,FO+3,0,2},
@@ -2061,27 +1371,6 @@
 			{-1,-1},{3,6},{-1,-1},{3,7},
 			{-1,-1},{-1,-1},{0,6},{-1,-1},{0,7},{-1,-1},{-1,-1}},
 
-			/* new edges */
-		   {{3, 0, 8,-1},{3, 8, 1,-1},{3, 1, 9,-1},{3, 9, 2,-1},
-			{3, 2,10,-1},{3,10, 3,-1},{3, 3,11,-1},{3,11, 0,-1},
-			{2, 8,20, 0},{2, 9,20, 0},{2,10,20, 0},{2,11,20, 0},
-
-			{3, 0,12,-1},{2, 8,21, 1},{3, 1,13,-1},{2, 9,22, 2},
-			{3, 2,14,-1},{2,10,23, 3},{3, 3,15,-1},{2,11,24, 4},
-			{1,20,26,-1},
-
-			{2,12,21, 1},{2,21,13, 1},{2,13,22, 2},{2,22,14, 2},
-			{2,14,23, 3},{2,23,15, 3},{2,15,24, 4},{2,24,12, 4},
-			{1,21,26,-1},{1,22,26,-1},{1,23,26,-1},{1,24,26,-1},
-
-			{3,12, 4,-1},{2,21,16, 1},{3,13, 5,-1},{2,22,17, 2},
-			{3,14, 6,-1},{2,23,18, 3},{3,15, 7,-1},{2,24,19, 4},
-			{1,26,25,-1},
-
-			{3, 4,16,-1},{3,16, 5,-1},{3, 5,17,-1},{3,17, 6,-1},
-			{3, 6,18,-1},{3,18, 7,-1},{3, 7,19,-1},{3,19, 4,-1},
-			{2,16,25, 5},{2,17,25, 5},{2,18,25, 5},{2,19,25, 5}},
-
 			/* sons */
 		   {{HEXAHEDRON,{ 0, 1,9,11,12,13,22,24},{FO+0,FO+1,FO+2,1,FO+4,3},-1},
 			{HEXAHEDRON,{ 11, 9, 2,3,24,22,14,15},{FO+0,0,FO+2,FO+3,FO+4,2},
@@ -2109,27 +1398,6 @@
 			 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}, 
 			 {-1,-1}},  
 
-			/* new edges */
-		   {{3, 0, 8,-1},{3, 8, 1,-1},{3, 1, 9,-1},{3, 9, 2,-1},
-			{3, 2,10,-1},{3,10, 3,-1},{3, 3,11,-1},{3,11, 0,-1},
-			{2, 8,20, 0},{2, 9,20, 0},{2,10,20, 0},{2,11,20, 0},
-
-			{3, 0,12,-1},{2, 8,21, 1},{3, 1,13,-1},{2, 9,22, 2},
-			{3, 2,14,-1},{2,10,23, 3},{3, 3,15,-1},{2,11,24, 4},
-			{1,20,26,-1},
-
-			{2,12,21, 1},{2,21,13, 1},{2,13,22, 2},{2,22,14, 2},
-			{2,14,23, 3},{2,23,15, 3},{2,15,24, 4},{2,24,12, 4},
-			{1,21,26,-1},{1,22,26,-1},{1,23,26,-1},{1,24,26,-1},
-
-			{3,12, 4,-1},{2,21,16, 1},{3,13, 5,-1},{2,22,17, 2},
-			{3,14, 6,-1},{2,23,18, 3},{3,15, 7,-1},{2,24,19, 4},
-			{1,26,25,-1},
-
-			{3, 4,16,-1},{3,16, 5,-1},{3, 5,17,-1},{3,17, 6,-1},
-			{3, 6,18,-1},{3,18, 7,-1},{3, 7,19,-1},{3,19, 4,-1},
-			{2,16,25, 5},{2,17,25, 5},{2,18,25, 5},{2,19,25, 5}},
-
 			/* sons */
 		   {{PRISM,{0,4,8,3,7,10,-1,-1},{FO+1,FO+4,1,FO+0,FO+3,-1},-1},
 		 	 {PRISM,{ 4, 5, 8,7,6,10,-1,-1},{FO+1,FO+5,2,0,FO+3,-1},
@@ -2157,27 +1425,6 @@
 			{0,0},{-1,-1},{0,0},{-1,-1},
 			{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}},
 
-			/* new edges */
-		   {{3, 0, 8,-1},{3, 8, 1,-1},{3, 1, 9,-1},{3, 9, 2,-1},
-			{3, 2,10,-1},{3,10, 3,-1},{3, 3,11,-1},{3,11, 0,-1},
-			{2, 8,20, 0},{2, 9,20, 0},{2,10,20, 0},{2,11,20, 0},
-
-			{3, 0,12,-1},{2, 8,21, 1},{3, 1,13,-1},{2, 9,22, 2},
-			{3, 2,14,-1},{2,10,23, 3},{3, 3,15,-1},{2,11,24, 4},
-			{1,20,26,-1},
-
-			{2,12,21, 1},{2,21,13, 1},{2,13,22, 2},{2,22,14, 2},
-			{2,14,23, 3},{2,23,15, 3},{2,15,24, 4},{2,24,12, 4},
-			{1,21,26,-1},{1,22,26,-1},{1,23,26,-1},{1,24,26,-1},
-
-			{3,12, 4,-1},{2,21,16, 1},{3,13, 5,-1},{2,22,17, 2},
-			{3,14, 6,-1},{2,23,18, 3},{3,15, 7,-1},{2,24,19, 4},
-			{1,26,25,-1},
-
-			{3, 4,16,-1},{3,16, 5,-1},{3, 5,17,-1},{3,17, 6,-1},
-			{3, 6,18,-1},{3,18, 7,-1},{3, 7,19,-1},{3,19, 4,-1},
-			{2,16,25, 5},{2,17,25, 5},{2,18,25, 5},{2,19,25, 5}},
-
 			/* sons */
 		   {
 			{PRISM,{ 4, 16,0,7,18,3,-1,-1},{FO+1,FO+5,1,FO+4,FO+3,-1},-1},
@@ -2204,27 +1451,6 @@
 			{-1,-1},{-1,-1},{-1,-1},{0,7},
 			{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}},
 
-			/* new edges */
-		   {{3, 0, 8,-1},{3, 8, 1,-1},{3, 1, 9,-1},{3, 9, 2,-1},
-			{3, 2,10,-1},{3,10, 3,-1},{3, 3,11,-1},{3,11, 0,-1},
-			{2, 8,20, 0},{2, 9,20, 0},{2,10,20, 0},{2,11,20, 0},
-
-			{3, 0,12,-1},{2, 8,21, 1},{3, 1,13,-1},{2, 9,22, 2},
-			{3, 2,14,-1},{2,10,23, 3},{3, 3,15,-1},{2,11,24, 4},
-			{1,20,26,-1},
-
-			{2,12,21, 1},{2,21,13, 1},{2,13,22, 2},{2,22,14, 2},
-			{2,14,23, 3},{2,23,15, 3},{2,15,24, 4},{2,24,12, 4},
-			{1,21,26,-1},{1,22,26,-1},{1,23,26,-1},{1,24,26,-1},
-
-			{3,12, 4,-1},{2,21,16, 1},{3,13, 5,-1},{2,22,17, 2},
-			{3,14, 6,-1},{2,23,18, 3},{3,15, 7,-1},{2,24,19, 4},
-			{1,26,25,-1},
-
-			{3, 4,16,-1},{3,16, 5,-1},{3, 5,17,-1},{3,17, 6,-1},
-			{3, 6,18,-1},{3,18, 7,-1},{3, 7,19,-1},{3,19, 4,-1},
-			{2,16,25, 5},{2,17,25, 5},{2,18,25, 5},{2,19,25, 5}},
-
 			/* sons */
 		   {
 			{HEXAHEDRON,{ 0, 1, 2,11, 4, 5, 6,19},{FO+0,FO+1,FO+2,1,FO+4,FO+5},-1},
@@ -2251,27 +1477,6 @@
 			{0,4},{-1,-1},{-1,-1},{-1,-1},
 			{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1}},
 
-			/* new edges */
-		   {{3, 0, 8,-1},{3, 8, 1,-1},{3, 1, 9,-1},{3, 9, 2,-1},
-			{3, 2,10,-1},{3,10, 3,-1},{3, 3,11,-1},{3,11, 0,-1},
-			{2, 8,20, 0},{2, 9,20, 0},{2,10,20, 0},{2,11,20, 0},
-
-			{3, 0,12,-1},{2, 8,21, 1},{3, 1,13,-1},{2, 9,22, 2},
-			{3, 2,14,-1},{2,10,23, 3},{3, 3,15,-1},{2,11,24, 4},
-			{1,20,26,-1},
-
-			{2,12,21, 1},{2,21,13, 1},{2,13,22, 2},{2,22,14, 2},
-			{2,14,23, 3},{2,23,15, 3},{2,15,24, 4},{2,24,12, 4},
-			{1,21,26,-1},{1,22,26,-1},{1,23,26,-1},{1,24,26,-1},
-
-			{3,12, 4,-1},{2,21,16, 1},{3,13, 5,-1},{2,22,17, 2},
-			{3,14, 6,-1},{2,23,18, 3},{3,15, 7,-1},{2,24,19, 4},
-			{1,26,25,-1},
-
-			{3, 4,16,-1},{3,16, 5,-1},{3, 5,17,-1},{3,17, 6,-1},
-			{3, 6,18,-1},{3,18, 7,-1},{3, 7,19,-1},{3,19, 4,-1},
-			{2,16,25, 5},{2,17,25, 5},{2,18,25, 5},{2,19,25, 5}},
-
 			/* sons */
 		   {
 			{HEXAHEDRON,{ 8, 1, 2, 3,16, 5, 6, 7},{FO+0,FO+1,FO+2,FO+3,1,FO+5},-1},
@@ -2291,7 +1496,7 @@
 #endif
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/rm.c,v 1.87 2008/10/30 12:29:06 dmitriy Exp $",UG_RCS_STRING) ;
+static char RCS_ID("$Header$",UG_RCS_STRING) ;
 
 /****************************************************************************/
 /*                                                                          */
@@ -3011,120 +2216,6 @@
 }
 #endif /* __THREEDIM__ */
 
-#ifdef WITH_DEGENERATED_ELEM
-
-/****************************************************************************/
-/** \brief MarkForRefinementDegenerated - mark a degenerated element for refinement
-
- \param elem - element to be refined
- \param rule - type of refinement mark
-
-   This function marks a degenerated element for refinement. If the element
-   is not degenerated, the function returns 0 and does nothing. Degenerated
-   elements are refined in a special way and they cannot be the closure
-   elements. For this, they are processed separatedly.
-
-   \return <ul>
-   <li> 0 if this is not a degenerated element </li>
-   <li> -1 if the element is degenerated and processed by this function </li>
-   <li> a positive value on an error </li>
-   </ul>
-*/
-/****************************************************************************/
-INT NS_DIM_PREFIX MarkForRefinementDegenerated (ELEMENT * elem, enum RefinementRule rule)
-{
-#ifdef __TWODIM__
-    INT start_ind, n_co;
-    
-    if (! ElemIsDegenerated (elem, &start_ind))
-        return 0; /* this is a normal element, it is not processed here */
-    
-    switch (n_co = TAG (elem))
-    {
-        case (TRIANGLE):
-            switch (rule)
-            {
-                case COARSE:
-                    SETCOARSEN (elem, 1);
-                    SETMARK (elem, NO_REFINEMENT);
-                    SETMARKCLASS (elem, 0);
-                    break;
-                    
-                case NO_REFINEMENT:
-                    SETMARK (elem, NO_REFINEMENT);
-                    SETMARKCLASS (elem, 0);
-                    break;
-                
-                case COPY:
-                    SETMARK (elem, T_COPY);
-                    SETMARKCLASS (elem, RED_CLASS);
-                    break;
-                
-                case RED:
-                    start_ind = (start_ind + 2) % n_co; /* start_ind = the degener. side */
-                    switch (start_ind)
-                    {
-                        case 0: SETMARK (elem, T_BISECT_2_Q_0); break;
-                        case 1: SETMARK (elem, T_BISECT_2_Q_1); break;
-                        case 2: SETMARK (elem, T_BISECT_2_Q_2); break;
-                        default: return __LINE__;
-                    }
-                    SETMARKCLASS (elem, RED_CLASS);
-                    break;
-                
-                default:
-                    return __LINE__;
-            }
-            break;
-
-        case (QUADRILATERAL):
-            switch (rule)
-            {
-                case COARSE:
-                    SETCOARSEN (elem, 1);
-                    SETMARKCLASS (elem, 0);
-                    SETMARK (elem, NO_REFINEMENT);
-                    break;
-
-                case NO_REFINEMENT:
-                    SETMARK (elem, NO_REFINEMENT);
-                    SETMARKCLASS (elem, 0);
-                    break;
-                
-                case COPY:
-                    SETMARK (elem, Q_COPY);
-                    SETMARKCLASS (elem, RED_CLASS);
-                    break;
-                
-                case RED:
-                    start_ind = (start_ind + 1) % n_co; /* start_ind = the degener. side */
-                    switch (start_ind)
-                    {
-                        case 0: SETMARK (elem, Q_BLUE_1); break;
-                        case 1: SETMARK (elem, Q_BLUE_0); break;
-                        default: return __LINE__;
-                    }
-                    SETMARKCLASS (elem, RED_CLASS);
-                    break;
-                
-                default:
-                    return __LINE__;
-            }
-            break;
-
-        default:
-            return __LINE__;
-    }
-    
-    return -1;
-#else
-    
-    return 0; /* not implemented yet */
-    
-#endif /* __TWODIM__ */
-}
-
-#endif
 
 /****************************************************************************/
 /** \brief Mark an element for refinement
@@ -3143,10 +2234,6 @@
 
 INT NS_DIM_PREFIX MarkForRefinement (ELEMENT *theElement, enum RefinementRule rule, INT side)
 {
-    #ifdef WITH_DEGENERATED_ELEM
-    INT i;
-    #endif
-    
 	if (theElement == NULL) return(0);
 	#ifdef ModelP
 	if (EGHOST(theElement)) return(0);
@@ -3161,320 +2248,340 @@
     PRINTDEBUG(gm,4,(PFMT "MarkForRefinement() e=" EID_FMTX "rule=%d\n",
 			me,EID_PRTX(theElement),rule))
 			
-    #ifdef WITH_DEGENERATED_ELEM
-    if ((i = MarkForRefinementDegenerated (theElement, rule)) != 0)
-        return (i > 0)? GM_ERROR : GM_OK;
-    #endif
-    
 	/* choose dimension */
-    #ifdef __TWODIM__
-    /* 2D case */
-    switch (TAG(theElement))
-    {
-        case (TRIANGLE):
-            switch (rule)
-            {
-                case COARSE:
-                    SETCOARSEN(theElement,1);
-                    SETMARK(theElement,NO_REFINEMENT);
-                    SETMARKCLASS(theElement,0);
-                    break;
-                    
-                case NO_REFINEMENT:
-                    SETMARK(theElement,NO_REFINEMENT);
-                    SETMARKCLASS(theElement,0);
-                    break;
-                
-                case COPY:
-                    SETMARK(theElement,T_COPY);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                
-                case RED:
-                    SETMARK(theElement,T_RED);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                
-                /* TODO: these marks must be introduced first
-                case BISECTION_3:
-                    if (side<0) return (GM_ERROR);
-                    SETMARK(theElement,TRI_BISECT_3+side%3);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                
-                case BISECTION_1:
-                    if (side<0) return (GM_ERROR);
-                    SETMARK(theElement,TRI_BISECT_1+side%3);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                
-                case BISECTION_2_Q:
-                    if (side<0) return (GM_ERROR);
-                    SETMARK(theElement,TRI_BISECT_2_Q+side%3);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                
-                case BISECTION_2_T1:
-                    if (side<0) return (GM_ERROR);
-                    SETMARK(theElement,TRI_BISECT_2_T1+side%3);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                
-                case BISECTION_2_T2:
-                    if (side<0) return (GM_ERROR);
-                    SETMARK(theElement,TRI_BISECT_2_T2+side%3);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                */
-                
-                default:
-                    return(GM_ERROR);
-            }
-            break;
-
-        case (QUADRILATERAL):
-            switch (rule)
-            {
-                case COARSE:
-                    SETCOARSEN(theElement,1);
-                    SETMARKCLASS(theElement,0);
-                    SETMARK(theElement,NO_REFINEMENT);
-                    break;
-
-                case NO_REFINEMENT:
-                    SETMARK(theElement,NO_REFINEMENT);
-                    SETMARKCLASS(theElement,0);
-                    break;
-                
-                case COPY:
-                    SETMARK(theElement,Q_COPY);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                
-                case RED:
-                    SETMARK(theElement,Q_RED);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                
-                /* TODO: these mark must be introduced first */
-                case BLUE:
-                    if (side<0) return (GM_ERROR);
-                    if (side%2 == 0)
-                        SETMARK(theElement,Q_BLUE_0);
-                    else
-                        SETMARK(theElement,Q_BLUE_1);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                
-                default:
-                    return(GM_ERROR);
-            }
-            break;
+	switch (DIM)
+	{
+		#ifdef __TWODIM__
+		/* 2D case */
+		case (2):
 
-        default:
-            return(GM_ERROR);
-    }
-    #endif /* __TWODIM__ */
+			switch (TAG(theElement))
+			{
+				case (TRIANGLE):
+					switch (rule)
+					{
+						case COARSE:
+							SETCOARSEN(theElement,1);
+							SETMARK(theElement,NO_REFINEMENT);
+							SETMARKCLASS(theElement,0);
+							break;
+							
+						case NO_REFINEMENT:
+							SETMARK(theElement,NO_REFINEMENT);
+							SETMARKCLASS(theElement,0);
+							break;
+						
+						case COPY:
+							SETMARK(theElement,T_COPY);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						
+						case RED:
+							SETMARK(theElement,T_RED);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						
+						/* TODO: these marks must be introduced first
+						case BISECTION_3:
+							if (side<0) return (GM_ERROR);
+							SETMARK(theElement,TRI_BISECT_3+side%3);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						
+						case BISECTION_1:
+							if (side<0) return (GM_ERROR);
+							SETMARK(theElement,TRI_BISECT_1+side%3);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						
+						case BISECTION_2_Q:
+							if (side<0) return (GM_ERROR);
+							SETMARK(theElement,TRI_BISECT_2_Q+side%3);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						
+						case BISECTION_2_T1:
+							if (side<0) return (GM_ERROR);
+							SETMARK(theElement,TRI_BISECT_2_T1+side%3);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						
+						case BISECTION_2_T2:
+							if (side<0) return (GM_ERROR);
+							SETMARK(theElement,TRI_BISECT_2_T2+side%3);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						*/
+						
+						default:
+							return(GM_ERROR);
+					}
+					break;
+
+				case (QUADRILATERAL):
+					switch (rule)
+					{
+						case COARSE:
+							SETCOARSEN(theElement,1);
+							SETMARKCLASS(theElement,0);
+							SETMARK(theElement,NO_REFINEMENT);
+							break;
+
+						case NO_REFINEMENT:
+							SETMARK(theElement,NO_REFINEMENT);
+							SETMARKCLASS(theElement,0);
+							break;
+						
+						case COPY:
+							SETMARK(theElement,Q_COPY);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						
+						case RED:
+							SETMARK(theElement,Q_RED);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						
+						/* TODO: these mark must be introduced first */
+						case BLUE:
+							if (side<0) return (GM_ERROR);
+							if (side%2 == 0)
+								SETMARK(theElement,Q_BLUE_0);
+							else
+								SETMARK(theElement,Q_BLUE_1);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						
+						default:
+							return(GM_ERROR);
+					}
+					break;
 
-    #ifdef __THREEDIM__
-    /* 3D case */
-    switch (TAG(theElement))
-    {
-        case (TETRAHEDRON):
-            switch(rule)
-            {
-                case (COARSE):
-                    SETMARK(theElement,NO_REFINEMENT);
-                    SETMARKCLASS(theElement,0);
-                    SETCOARSEN(theElement,1);
-                    break;
-                case (NO_REFINEMENT):
-                    SETMARK(theElement,NO_REFINEMENT);
-                    SETMARKCLASS(theElement,0);
-                    break;
-                case (COPY):
-                    SETMARK(theElement,TET_COPY);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (RED):
-                    SETMARK(theElement,(*theFullRefRule)(theElement));
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
+				default:
+					return(GM_ERROR);
+			}
+			break;
+			#endif /* __TWODIM__ */
+
+
+		#ifdef __THREEDIM__
+		/* 3D case */
+		case (3):
+			switch (TAG(theElement))
+			{
+				case (TETRAHEDRON):
+					switch(rule)
+					{
+						case (COARSE):
+							SETMARK(theElement,NO_REFINEMENT);
+							SETMARKCLASS(theElement,0);
+							SETCOARSEN(theElement,1);
+							break;
+						case (NO_REFINEMENT):
+							SETMARK(theElement,NO_REFINEMENT);
+							SETMARKCLASS(theElement,0);
+							break;
+						case (COPY):
+							SETMARK(theElement,TET_COPY);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (RED):
+							SETMARK(theElement,(*theFullRefRule)(theElement));
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
 #ifndef TET_RULESET
-                case (TETRA_RED_HEX):
-                    SETMARK(theElement,TET_RED_HEX);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
+						case (TETRA_RED_HEX):
+							SETMARK(theElement,TET_RED_HEX);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
 #endif
-                default:
-                    return(GM_ERROR);
-            }
-            break;
-
-        case (PYRAMID):
-            switch(rule)
-            {
-                case (COARSE):
-                    SETMARK(theElement,NO_REFINEMENT);
-                    SETMARKCLASS(theElement,0);
-                    SETCOARSEN(theElement,1);
-                    break;
-                case (NO_REFINEMENT):
-                    SETMARK(theElement,NO_REFINEMENT);
-                    SETMARKCLASS(theElement,0);
-                    break;
-                case (COPY):
-                    SETMARK(theElement,PYR_COPY);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (RED):
-                    SETMARK(theElement,PYR_RED);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                default:
-                    return(GM_ERROR);
-            }
-            break;
-
-        case (PRISM):
-            switch(rule)
-            {
-                case (COARSE):
-                    SETMARK(theElement,NO_REFINEMENT);
-                    SETMARKCLASS(theElement,0);
-                    SETCOARSEN(theElement,1);
-                    break;
-                case (NO_REFINEMENT):
-                    SETMARK(theElement,NO_REFINEMENT);
-                    SETMARKCLASS(theElement,0);
-                    break;
-                case (COPY):
-                    SETMARK(theElement,PRI_COPY);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (RED):
-                    SETMARKCLASS(theElement,RED_CLASS);
-
-                    #ifdef __ANISOTROPIC__
-                    {
-                        INT newrule;
-
-                        if (GetRule_AnisotropicRed(theElement,&newrule))
-                        {
-                            SETMARK(theElement,newrule);
-                            break;
-                        }
-                    }
-                    #endif
-
-                    SETMARK(theElement,PRI_RED);
-                    break;
-                case (PRISM_BISECT_1_2):
-                    SETMARK(theElement,PRI_BISECT_1_2);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (PRISM_QUADSECT):
-                    SETMARK(theElement,PRI_QUADSECT);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (PRISM_BISECT_HEX0):
-                    SETMARK(theElement,PRI_BISECT_HEX0);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (PRISM_BISECT_HEX1):
-                    SETMARK(theElement,PRI_BISECT_HEX1);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (PRISM_BISECT_HEX2):
-                    SETMARK(theElement,PRI_BISECT_HEX2);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (PRISM_ROTATE_LEFT):
-                    SETMARK(theElement,PRI_ROT_L);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (PRISM_ROTATE_RGHT):
-                    SETMARK(theElement,PRI_ROT_R);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (PRISM_QUADSECT_HEXPRI0):
-                    SETMARK(theElement,PRI_QUADSECT_HEXPRI0);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                default:
-                    return(GM_ERROR);
-            }
-            break;
-
-        case (HEXAHEDRON):
-            switch(rule)
-            {
-                case (COARSE):
-                    SETMARK(theElement,NO_REFINEMENT);
-                    SETMARKCLASS(theElement,0);
-                    SETCOARSEN(theElement,1);
-                    break;
-                case (NO_REFINEMENT):
-                    SETMARK(theElement,NO_REFINEMENT);
-                    SETMARKCLASS(theElement,0);
-                    break;
-                case (COPY):
-                    SETMARK(theElement,HEXA_COPY);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (RED):
-                    SETMARK(theElement,HEXA_RED);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (HEX_BISECT_0_1):
-                    SETMARK(theElement,HEXA_BISECT_0_1);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (HEX_BISECT_0_2):
-                    SETMARK(theElement,HEXA_BISECT_0_2);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (HEX_BISECT_0_3):
-                    SETMARK(theElement,HEXA_BISECT_0_3);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (HEX_TRISECT_0):
-                    SETMARK(theElement,HEXA_TRISECT_0);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (HEX_TRISECT_5):
-                    SETMARK(theElement,HEXA_TRISECT_5);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (HEX_QUADSECT_0):
-                    SETMARK(theElement,HEXA_QUADSECT_0);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (HEX_QUADSECT_1):
-                    SETMARK(theElement,HEXA_QUADSECT_1);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (HEX_QUADSECT_2):
-                    SETMARK(theElement,HEXA_QUADSECT_2);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (HEX_BISECT_HEXPRI0):
-                    SETMARK(theElement,HEXA_BISECT_HEXPRI0);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                case (HEX_BISECT_HEXPRI1):
-                    SETMARK(theElement,HEXA_BISECT_HEXPRI1);
-                    SETMARKCLASS(theElement,RED_CLASS);
-                    break;
-                default:
-                    return(GM_ERROR);
-            }
-            break;
+						default:
+							return(GM_ERROR);
+					}
+					break;
+
+				case (PYRAMID):
+					switch(rule)
+					{
+						case (COARSE):
+							SETMARK(theElement,NO_REFINEMENT);
+							SETMARKCLASS(theElement,0);
+							SETCOARSEN(theElement,1);
+							break;
+						case (NO_REFINEMENT):
+							SETMARK(theElement,NO_REFINEMENT);
+							SETMARKCLASS(theElement,0);
+							break;
+						case (COPY):
+							SETMARK(theElement,PYR_COPY);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (RED):
+							SETMARK(theElement,PYR_RED);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						default:
+							return(GM_ERROR);
+					}
+					break;
+
+				case (PRISM):
+					switch(rule)
+					{
+						case (COARSE):
+							SETMARK(theElement,NO_REFINEMENT);
+							SETMARKCLASS(theElement,0);
+							SETCOARSEN(theElement,1);
+							break;
+						case (NO_REFINEMENT):
+							SETMARK(theElement,NO_REFINEMENT);
+							SETMARKCLASS(theElement,0);
+							break;
+						case (COPY):
+							SETMARK(theElement,PRI_COPY);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (RED):
+							SETMARKCLASS(theElement,RED_CLASS);
+
+							#ifdef __ANISOTROPIC__
+							{
+								INT newrule;
+
+								if (GetRule_AnisotropicRed(theElement,&newrule))
+								{
+									SETMARK(theElement,newrule);
+									break;
+								}
+							}
+							#endif
+
+							SETMARK(theElement,PRI_RED);
+							break;
+						case (PRISM_BISECT_1_2):
+							SETMARK(theElement,PRI_BISECT_1_2);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (PRISM_QUADSECT):
+							SETMARK(theElement,PRI_QUADSECT);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (PRISM_BISECT_HEX0):
+							SETMARK(theElement,PRI_BISECT_HEX0);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (PRISM_BISECT_HEX1):
+							SETMARK(theElement,PRI_BISECT_HEX1);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (PRISM_BISECT_HEX2):
+							SETMARK(theElement,PRI_BISECT_HEX2);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (PRISM_ROTATE_LEFT):
+							SETMARK(theElement,PRI_ROT_L);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (PRISM_ROTATE_RGHT):
+							SETMARK(theElement,PRI_ROT_R);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (PRISM_QUADSECT_HEXPRI0):
+							SETMARK(theElement,PRI_QUADSECT_HEXPRI0);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (PRISM_BISECT_0_1):
+							SETMARK(theElement,PRI_BISECT_0_1);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (PRISM_BISECT_0_2):
+							SETMARK(theElement,PRI_BISECT_0_2);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (PRISM_BISECT_0_3):
+							SETMARK(theElement,PRI_BISECT_0_3);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+
+						default:
+							return(GM_ERROR);
+					}
+					break;
+
+				case (HEXAHEDRON):
+					switch(rule)
+					{
+						case (COARSE):
+							SETMARK(theElement,NO_REFINEMENT);
+							SETMARKCLASS(theElement,0);
+							SETCOARSEN(theElement,1);
+							break;
+						case (NO_REFINEMENT):
+							SETMARK(theElement,NO_REFINEMENT);
+							SETMARKCLASS(theElement,0);
+							break;
+						case (COPY):
+							SETMARK(theElement,HEXA_COPY);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (RED):
+							SETMARK(theElement,HEXA_RED);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (HEX_BISECT_0_1):
+							SETMARK(theElement,HEXA_BISECT_0_1);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (HEX_BISECT_0_2):
+							SETMARK(theElement,HEXA_BISECT_0_2);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (HEX_BISECT_0_3):
+							SETMARK(theElement,HEXA_BISECT_0_3);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (HEX_TRISECT_0):
+							SETMARK(theElement,HEXA_TRISECT_0);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (HEX_TRISECT_5):
+							SETMARK(theElement,HEXA_TRISECT_5);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (HEX_QUADSECT_0):
+							SETMARK(theElement,HEXA_QUADSECT_0);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (HEX_QUADSECT_1):
+							SETMARK(theElement,HEXA_QUADSECT_1);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (HEX_QUADSECT_2):
+							SETMARK(theElement,HEXA_QUADSECT_2);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (HEX_BISECT_HEXPRI0):
+							SETMARK(theElement,HEXA_BISECT_HEXPRI0);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						case (HEX_BISECT_HEXPRI1):
+							SETMARK(theElement,HEXA_BISECT_HEXPRI1);
+							SETMARKCLASS(theElement,RED_CLASS);
+							break;
+						default:
+							return(GM_ERROR);
+					}
+					break;
 
-        default:
-            return(GM_ERROR);
-    }
-    #endif /* __THREEDIM__ */
+				default:
+					return(GM_ERROR);
+			}
+			break;
+			#endif /* __THREEDIM__ */
+
+		default:
+			return(GM_ERROR);
+	}
 
 	return(GM_OK);
 }
@@ -3563,18 +2670,11 @@
 
 INT NS_DIM_PREFIX Patterns2Rules(ELEMENT *theElement, INT pattern)
 {
-    #ifdef WITH_DEGENERATED_ELEM
-    /* Do not change the element's mark if it has the same pattern: */
-    if (MARK (theElement) >= 0
-        && MARK2PAT (theElement, MARK (theElement)) == pattern)
-        return MARK (theElement);
-    #endif
-    
 	#ifdef __TWODIM__
 		switch (TAG(theElement)) {
 			case (TRIANGLE):
 				switch (pattern) {
-					/* TODO: 0 can mean T_COPY OR T_NOREF */
+                                    /** \todo 0 can mean T_COPY OR T_NOREF */
 					case (0): return(T_NOREF);
 					case (1): return(T_BISECT_1_0);
 					case (2): return(T_BISECT_1_1);
@@ -3699,8 +2799,22 @@
 						return(PRI_RED);
 					case (455):
 						return(PRI_QUADSECT);
+                                        case 56:
+                                                return PRI_BISECT_1_2;
+                                        case 65:
+                                                return PRI_BISECT_0_1;
+                                        case 130:
+                                                return PRI_BISECT_0_2;
+                                        case 260:
+                                                return PRI_BISECT_0_3;
+                                        case 325:
+                                            return PRI_BISECT_HEX0;
+                                        case 195:
+                                            return PRI_BISECT_HEX1;
+                                        case 390:
+                                            return PRI_BISECT_HEX2;
 					default:
-						PrintErrorMessage('E',"Patterns2Rules","no mapping for PRISM and this pattern!");
+                                            PrintErrorMessageF('E',"Patterns2Rules","no mapping for PRISM and pattern %d!", pattern);
 						#ifndef __ANISOTROPIC__
 						assert(0);
 						#endif
@@ -3877,34 +2991,6 @@
     return(0);
 }
 
-
-/****************************************************************************/
-/*
-   PrintEdgeData - 
-
-   SYNOPSIS:
-   static INT PrintEdgeData (struct edgedata theEdgeData);
-
-   PARAMETERS:
- \param theEdgeData
-
-   DESCRIPTION:
-
-   \return
-   INT
-*/
-/****************************************************************************/
-
-static INT PrintEdgeData (struct edgedata theEdgeData)
-{
-	UserWriteF("typ=%d from=%2d to=%2d side=%2d",(int)theEdgeData.type
-							   ,(int)theEdgeData.from
-							   ,(int)theEdgeData.to
-							   ,(int)theEdgeData.side);
-	return(0);	
-}
-
-
 /****************************************************************************/
 /*
    PrintSonData - 
@@ -4102,12 +3188,6 @@
 	for (i=0; i<16; i++)
 	{
 		if (fscanf(stream," %d %d %d %d",&type,&from,&to,&side)!=4) return (1);
-		theRule->edges[i].type = type;
-		if (from == 10) from = 14;
-		theRule->edges[i].from = from;
-		if (to == 10) to = 14;
-		theRule->edges[i].to   = to;
-		theRule->edges[i].side = side;
 	}
 	
 	/* MAX_SONS = 12 for tetrahedra */
@@ -4705,9 +3785,9 @@
 	RefRules[PYRAMID] = PyramidRules; 
 
 	/************************************************************************/
-	/*																		*/
-	/*  init refinement rules from for pyramids                         	*/
-	/*																		*/
+	/*                                                                      */
+	/*  init refinement rules for prisms                                    */
+	/*                                                                      */
 	/************************************************************************/
 
 	nRules = MAX_PRI_RULES;
@@ -4756,38 +3836,40 @@
 	if (ChangeEnvDir("/best full refrule")==NULL)
 		return(__LINE__);
 
-	newFRR = (FULLREFRULE *) MakeEnvItem("shortestie",theBFRRDirID,sizeof(FULLREFRULE));
+        theBFRRVarID = GetNewEnvVarID();
+
+	newFRR = (FULLREFRULE *) MakeEnvItem("shortestie",theBFRRVarID,sizeof(FULLREFRULE));
 	if (newFRR==NULL)
 		return(__LINE__);
 	newFRR->theFullRefRule = ShortestInteriorEdge;
 	
-	newFRR = (FULLREFRULE *) MakeEnvItem("maxper",theBFRRDirID,sizeof(FULLREFRULE));
+	newFRR = (FULLREFRULE *) MakeEnvItem("maxper",theBFRRVarID,sizeof(FULLREFRULE));
 	if (newFRR==NULL)
 		return(__LINE__);
 	newFRR->theFullRefRule = MaxPerpendicular;
 	
-	newFRR = (FULLREFRULE *) MakeEnvItem("mra",theBFRRDirID,sizeof(FULLREFRULE));
+	newFRR = (FULLREFRULE *) MakeEnvItem("mra",theBFRRVarID,sizeof(FULLREFRULE));
 	if (newFRR==NULL)
 		return(__LINE__);
 	newFRR->theFullRefRule = MaxRightAngle;
 	
-	newFRR = (FULLREFRULE *) MakeEnvItem("maxarea",theBFRRDirID,sizeof(FULLREFRULE));
+	newFRR = (FULLREFRULE *) MakeEnvItem("maxarea",theBFRRVarID,sizeof(FULLREFRULE));
 	if (newFRR==NULL)
 		return(__LINE__);
 	newFRR->theFullRefRule = MaxArea;
 
 #ifdef __ALLRULES__
-	newFRR = (FULLREFRULE *) MakeEnvItem("minangle",theBFRRDirID,sizeof(FULLREFRULE));
+	newFRR = (FULLREFRULE *) MakeEnvItem("minangle",theBFRRVarID,sizeof(FULLREFRULE));
 	if (newFRR==NULL)
 		return(__LINE__);
 	newFRR->theFullRefRule = MinimalSideAngle;
 	
-	newFRR = (FULLREFRULE *) MakeEnvItem("bestm",theBFRRDirID,sizeof(FULLREFRULE));
+	newFRR = (FULLREFRULE *) MakeEnvItem("bestm",theBFRRVarID,sizeof(FULLREFRULE));
 	if (newFRR==NULL)
 		return(__LINE__);
 	newFRR->theFullRefRule = BestLaplaceMMatrix;
 	
-	newFRR = (FULLREFRULE *) MakeEnvItem("minentry",theBFRRDirID,sizeof(FULLREFRULE));
+	newFRR = (FULLREFRULE *) MakeEnvItem("minentry",theBFRRVarID,sizeof(FULLREFRULE));
 	if (newFRR==NULL)
 		return(__LINE__);
 	newFRR->theFullRefRule = MinimalSideEntry;
@@ -4871,7 +3953,7 @@
 
 	/* get storage for Pattern2Rule */
 	nPatterns = 17; /* there are 2^3 different patterns */
-	/* TODO: delete all concerning Pattern2Rule */
+	/** \todo delete all concerning Pattern2Rule */
 	Pattern2Rule[TRIANGLE] = (SHORT *) malloc(nPatterns*sizeof(SHORT));
 	if (Pattern2Rule[TRIANGLE]==NULL)
 	{
@@ -4905,7 +3987,7 @@
 
 	/* get storage for Pattern2Rule */
 	nPatterns = 32; /* there are 2^5 different patterns */
-	/* TODO: delete all concerning Pattern2Rule */
+	/** \todo delete all concerning Pattern2Rule */
 	Pattern2Rule[QUADRILATERAL] = (SHORT *) malloc(nPatterns*sizeof(SHORT));
 	if (Pattern2Rule[QUADRILATERAL]==NULL)
 	{
diff -ru ug-orig/gm/rm.h ug-patched/gm/rm.h
--- ug-orig/gm/rm.h	2006-11-13 10:34:16.000000000 +0100
+++ ug-patched/gm/rm.h	2007-05-29 09:18:14.000000000 +0200
@@ -23,7 +23,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/rm.h,v 1.46 2006/11/13 09:34:16 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -35,7 +35,6 @@
 #ifndef __RULEMANAGER__
 #define __RULEMANAGER__
 
-#include "compiler.h"
 #include "gm.h"
 #include "refine.h"
 
@@ -56,11 +55,11 @@
 /* Declaration of TET_RULESET has been moved to config.h */
 /* uncomment this if you want to use the full rule set for tetrahedra */
 
-/* defines for edge types */
-#define INNER_EDGE          1
-#define SIDE_EDGE           2
-#define HALF_FATHER_EDGE    3
-#define FATHER_EDGE         4
+/** \brief Defines for edge types */
+enum {INNER_EDGE        = 1,
+      SIDE_EDGE         = 2,
+      HALF_FATHER_EDGE  = 3,
+      FATHER_EDGE       = 4};
 
 #define NEXTSIDEMASKHEX         0x00000007
 #define NEXTSIDEHEX(i,n)        (((i) & (NEXTSIDEMASKHEX<<(3*(n))))>>(3*(n)))
@@ -134,43 +133,43 @@
 #define MARKED(e)               (MARK(e)!=NO_REFINEMENT)
 #define LEAFELEM(e)                     (!IS_REFINED(e))
 
-/* indices of rules in rule array */
-#define T_NOREF                         0
-#define T_COPY                  1
-#define T_RED                           2
-#define T_BISECT_1_0            3
-#define T_BISECT_1_1            4
-#define T_BISECT_1_2            5
-#define T_BISECT_2_T1_0         7
-#define T_BISECT_2_T1_1         8
-#define T_BISECT_2_T1_2         6
-#define T_BISECT_2_T2_0         11
-#define T_BISECT_2_T2_1         9
-#define T_BISECT_2_T2_2         10
-#define T_BISECT_2_Q_0          12
-#define T_BISECT_2_Q_1          13
-#define T_BISECT_2_Q_2          14
-#define T_BISECT_3_0            15
-#define T_BISECT_3_1            16
-#define T_BISECT_3_2            17
-
-#define Q_NOREF                         0
-#define Q_COPY                          1
-#define Q_RED                           2
-#define Q_CLOSE_1_0                     3
-#define Q_CLOSE_1_1                     4
-#define Q_CLOSE_1_2                     5
-#define Q_CLOSE_1_3                     6
-#define Q_BLUE_0                        7
-#define Q_BLUE_1                        8
-#define Q_CLOSE_2_0                     9
-#define Q_CLOSE_2_1                     10
-#define Q_CLOSE_2_2                     11
-#define Q_CLOSE_2_3                     12
-#define Q_CLOSE_3_0                     13
-#define Q_CLOSE_3_1                     14
-#define Q_CLOSE_3_2                     15
-#define Q_CLOSE_3_3                     16
+/** \brief Indices of rules in rule array */
+enum {T_NOREF               = 0,
+      T_COPY                = 1,
+      T_RED                 = 2,
+      T_BISECT_1_0          = 3,
+      T_BISECT_1_1          = 4,
+      T_BISECT_1_2          = 5,
+      T_BISECT_2_T1_0       = 7,
+      T_BISECT_2_T1_1       = 8,
+      T_BISECT_2_T1_2       = 6,
+      T_BISECT_2_T2_0       = 11,
+      T_BISECT_2_T2_1       = 9,
+      T_BISECT_2_T2_2       = 10,
+      T_BISECT_2_Q_0        = 12,
+      T_BISECT_2_Q_1        = 13,
+      T_BISECT_2_Q_2        = 14,
+      T_BISECT_3_0          = 15,
+      T_BISECT_3_1          = 16,
+      T_BISECT_3_2          = 17};
+
+enum {Q_NOREF,
+      Q_COPY,
+      Q_RED,
+      Q_CLOSE_1_0,
+      Q_CLOSE_1_1,
+      Q_CLOSE_1_2,
+      Q_CLOSE_1_3,
+      Q_BLUE_0,
+      Q_BLUE_1,
+      Q_CLOSE_2_0,
+      Q_CLOSE_2_1,
+      Q_CLOSE_2_2,
+      Q_CLOSE_2_3,
+      Q_CLOSE_3_0,
+      Q_CLOSE_3_1,
+      Q_CLOSE_3_2,
+      Q_CLOSE_3_3};
 
 #define TET_COPY                        1
 #ifdef TET_RULESET
@@ -194,33 +193,38 @@
 #define TET_RED_HEX                     5
 #endif
 
-#define PYR_COPY                        1
-#define PYR_RED                         2
-
-#define PRI_COPY                        1
-#define PRI_RED                         2
-#define PRI_QUADSECT            3
-#define PRI_BISECT_1_2      7
-#define PRI_BISECT_HEX0         8
-#define PRI_BISECT_HEX1         9
-#define PRI_BISECT_HEX2         10
-#define PRI_RED_HEX                     11
-#define PRI_ROT_L                       12
-#define PRI_ROT_R                       13
-#define PRI_QUADSECT_HEXPRI0 14
-
-#define HEXA_COPY                       1
-#define HEXA_RED                        2
-#define HEXA_BISECT_0_1     3
-#define HEXA_BISECT_0_2     4
-#define HEXA_BISECT_0_3     5
-#define HEXA_QUADSECT_0     6
-#define HEXA_QUADSECT_1     7
-#define HEXA_QUADSECT_2     8
-#define HEXA_TRISECT_0      9
-#define HEXA_TRISECT_5      10
-#define HEXA_BISECT_HEXPRI0 11
-#define HEXA_BISECT_HEXPRI1 12
+enum {PYR_COPY       = 1,
+      PYR_RED        = 2,
+      PYR_BISECT_0_1 = 3,
+      PYR_BISECT_0_2 = 4};
+
+enum {PRI_COPY             = 1,
+      PRI_RED              = 2,
+      PRI_QUADSECT         = 3,
+      PRI_BISECT_0_1       = 4,
+      PRI_BISECT_0_2       = 5,
+      PRI_BISECT_0_3       = 6,
+      PRI_BISECT_1_2       = 7,
+      PRI_BISECT_HEX0      = 8,
+      PRI_BISECT_HEX1      = 9,
+      PRI_BISECT_HEX2      = 10,
+      PRI_RED_HEX          = 11,
+      PRI_ROT_L            = 12,
+      PRI_ROT_R            = 13,
+      PRI_QUADSECT_HEXPRI0 = 14};
+
+enum {HEXA_COPY           = 1,
+      HEXA_RED            = 2,
+      HEXA_BISECT_0_1     = 3,
+      HEXA_BISECT_0_2     = 4,
+      HEXA_BISECT_0_3     = 5,
+      HEXA_QUADSECT_0     = 6,
+      HEXA_QUADSECT_1     = 7,
+      HEXA_QUADSECT_2     = 8,
+      HEXA_TRISECT_0      = 9,
+      HEXA_TRISECT_5      = 10,
+      HEXA_BISECT_HEXPRI0 = 11,
+      HEXA_BISECT_HEXPRI1 = 12};
 
 
 /****************************************************************************/
@@ -229,29 +233,15 @@
 /*                                                                                                                                                      */
 /****************************************************************************/
 
-/* Hacks for HITACHI SR2201 will be eliminated as soon as the HITACHI
-   compiler bug is removed */
-
 #define TAG_OF_RULE(r)              ((r)->tag)
 #define MARK_OF_RULE(r)             ((r)->mark)
-#ifdef __SR2201__
-#define CLASS_OF_RULE(r)            ((*(r)).rclass)
-#define NSONS_OF_RULE(r)            ((*(r)).nsons)
-#define SON_OF_RULE(r,s)            (&((*(r)).sons[(s)]))
-#else
 #define CLASS_OF_RULE(r)            ((r)->rclass)
 #define NSONS_OF_RULE(r)            ((r)->nsons)
 #define SON_OF_RULE(r,s)            (&((r)->sons[(s)]))
-#endif
 #define PATTERN_OF_RULE(r,i)            ((r)->pattern[(i)])
 #define PAT_OF_RULE(r)                          ((r)->pat)
 #define SON_OF_NODE_OF_RULE(r,n)        ((r)->sonandnode[(n)][0])
 #define SONNODE_OF_NODE_OF_RULE(r,n)((r)->sonandnode[(n)][0])
-#define EDGE_OF_RULE(r,e)                       (&((r)->edges[(e)]))
-#define EDGE_TYPE_OF_RULE(r,e)          ((r)->edges[(e)].type)
-#define EDGE_FROM_OF_RULE(r,e)          ((r)->edges[(e)].from)
-#define EDGE_TO_OF_RULE(r,e)            ((r)->edges[(e)].to)
-#define EDGE_SIDE_OF_RULE(r,e)          ((r)->edges[(e)].side)
 #define SON_TAG_OF_RULE(r,s)            ((r)->sons[(s)].tag)
 #define SON_TAG(s)                                      ((s)->tag)
 #define SON_CORNER_OF_RULE(r,s,n)       ((r)->sons[(s)].corners[(n)])
@@ -290,31 +280,14 @@
 typedef INT (*FULLREFRULEPTR) (ELEMENT *);
 
 typedef struct {
-        INT type;                              /* one of the variable types above          */
-        INT locked;                            /* may not be changed or deleted            */
-        union envitem *next;
-        union envitem *previous;               /* double linked list of environment items  */
-        char name[NS_PREFIX NAMESIZE];                   /* name of that item (view)                 */
+    /** \brief Fields for environment list variable */
+    NS_PREFIX ENVVAR v;
 
         /* full ref rule spezific stuff */
         FULLREFRULEPTR theFullRefRule;         /* the best full refrule                    */
 
 } FULLREFRULE;
 
-/* 
-   edge type  : 1 = inner edge of the father
-                2 = inner edge of one side (3D only)
-                3 = half an edge of the father element
-                4 = edge of the father itself
-*/
-
-struct edgedata{
-        SHORT type;                /* interior edge of the tetra or only of one side        */
-        SHORT from;                /* indices of the first endpoint (0..9 for t)            */
-        SHORT to;                  /* indices of the second endpoint (4..9 for t)           */
-        SHORT side;                /* side, for which edge is interior, if type 2 (3D only) */
-};
-
 struct sondata{
         SHORT  tag;                              /* which element type is the son                           */
         SHORT  corners[MAX_CORNERS_OF_ELEM_DIM]; /* corners of the son                                  */
@@ -333,12 +306,10 @@
         INT                 pat;                                /* bitwise format of pattern               */
         SHORT           sonandnode[MAX_NEW_CORNERS_DIM][2]; /* for each new node the number of the son */
                                                                                                         /* and the local node number of the node   */
-        struct edgedata edges[MAX_NEW_EDGES_DIM];
         struct sondata  sons[MAX_SONS_DIM];
 };
 
 typedef struct sondata SONDATA;
-typedef struct edgedata EDGEDATA;
 typedef struct refrule REFRULE;
 
 
Nur in ug-orig/gm: shapes2d.c.
Nur in ug-orig/gm: shapes2d.h.
Nur in ug-orig/gm: shapes3d.c.
Nur in ug-orig/gm: shapes3d.h.
diff -ru ug-orig/gm/shapes.c ug-patched/gm/shapes.c
--- ug-orig/gm/shapes.c	2008-10-30 13:29:06.000000000 +0100
+++ ug-patched/gm/shapes.c	2008-12-19 11:02:55.000000000 +0100
@@ -26,6 +26,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <math.h>
 #include <assert.h>
 #include <stddef.h>
@@ -141,7 +142,7 @@
 #endif
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/shapes.c,v 1.44 2008/10/30 12:29:06 dmitriy Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
@@ -1202,23 +1203,6 @@
 	INT i;
 	
 	V_DIM_SUBTRACT(EvalPoint,Corners[0],diff);
-
-#ifdef WITH_DEGENERATED_ELEM
-	
-#ifdef __TWODIM__
-	V_DIM_EUKLIDNORM_OF_DIFF (Corners[1], Corners[0], s);
-	V_DIM_EUKLIDNORM_OF_DIFF (Corners[n-1], Corners[0], IMdet);
-	if (IMdet / s <= DEGENERATED_SIZE)
-	{ /* This is a denenerated element, i.e. a segment: */
-		LocalCoord [1] = 0;
-		V_DIM_SUBTRACT (Corners[1], Corners[0], tmp);
-		LocalCoord [0] = V_DIM_SCAL_PROD (diff, tmp) / s;
-		return 0;
-	}
-#endif /* __TWODIM__ */
-
-#endif /* WITH_DEGENERATED_ELEM */
-	
 	if (n == DIM+1)
 	  {
 		TRANSFORMATION(DIM+1,Corners,LocalCoord,M);
diff -ru ug-orig/gm/shapes.h ug-patched/gm/shapes.h
--- ug-orig/gm/shapes.h	2006-05-08 14:29:57.000000000 +0200
+++ ug-patched/gm/shapes.h	2007-01-14 17:21:35.000000000 +0100
@@ -24,7 +24,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/shapes.h,v 1.37 2006/05/08 12:29:57 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -132,8 +132,7 @@
 #define CORNER_COORDINATES(e,n,x)                               \
  {if (TAG((e))==TRIANGLE)                                       \
                  CORNER_COORDINATES_TRIANGLE((e),(n),(x))       \
-  else if (TAG((e))==QUADRILATERAL)                             \
-                 CORNER_COORDINATES_QUADRILATERAL((e),(n),(x))}
+  else           CORNER_COORDINATES_QUADRILATERAL((e),(n),(x))}
 
 #define COPY_CORNER_COORDINATES(e,n,x)                          \
  {if (TAG((e))==TRIANGLE)                                       \
@@ -201,7 +200,7 @@
 
 #define TRANSFORMATION_2D(n,x,local,M)                                      \
  {if ((n) == 3)      {TRANSFORMATION_OF_TRIANGLE((x),(M));}              \
-  else if ((n) == 4) {TRANSFORMATION_OF_QUADRILATERAL((x),(local),(M));} }
+  else TRANSFORMATION_OF_QUADRILATERAL((x),(local),(M)); }
 
 #define SIDE_NORMAL_2D(n,i,x,normal)                 \
    { DOUBLE s; DOUBLE_VECTOR y;                   \
@@ -318,7 +317,7 @@
   {if (TAG((e))==TETRAHEDRON)     CORNER_COORDINATES_TETRAHEDRON((e),(n),(x))\
    else if (TAG((e))==PYRAMID)    CORNER_COORDINATES_PYRAMID((e),(n),(x))    \
    else if (TAG((e))==PRISM)      CORNER_COORDINATES_PRISM((e),(n),(x))      \
-   else if (TAG((e))==HEXAHEDRON) CORNER_COORDINATES_HEXAHEDRON((e),(n),(x))}
+   else CORNER_COORDINATES_HEXAHEDRON((e),(n),(x))}
  
 #define COPY_CORNER_COORDINATES(e,n,x)                                     \
   {if (TAG((e))==TETRAHEDRON)     COPY_COORDINATES_TETRAHEDRON((e),(n),(x))\
@@ -595,7 +594,7 @@
  {if ((n) == 4)      {TRANSFORMATION_OF_TETRAHEDRON((x),(M));}          \
   else if ((n) == 5) {TRANSFORMATION_OF_PYRAMID((x),(local),(M));}      \
   else if ((n) == 6) {TRANSFORMATION_OF_PRISM((x),(local),(M));}        \
-  else if ((n) == 8) {TRANSFORMATION_OF_HEXAHEDRON((x),(local),(M));}}
+  else TRANSFORMATION_OF_HEXAHEDRON((x),(local),(M));}
 
 #define SIDE_NORMAL_3D(n,i,x,normal)                                \
   { DOUBLE s; DOUBLE_VECTOR a,b;                                 \
Nur in ug-orig/gm: simplex.c.
Nur in ug-orig/gm: simplex.h.
diff -ru ug-orig/gm/smooth.c ug-patched/gm/smooth.c
--- ug-orig/gm/smooth.c	2005-07-18 15:42:57.000000000 +0200
+++ ug-patched/gm/smooth.c	2008-12-19 11:02:55.000000000 +0100
@@ -24,6 +24,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <math.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -69,7 +70,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/smooth.c,v 1.37 2005/07/18 13:42:57 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /** \brief Calculate displacement of the center point along one local coordinate
diff -ru ug-orig/gm/ugio.c ug-patched/gm/ugio.c
--- ug-orig/gm/ugio.c	2005-08-08 10:48:25.000000000 +0200
+++ ug-patched/gm/ugio.c	2009-04-29 15:11:55.000000000 +0200
@@ -31,6 +31,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -159,7 +160,7 @@
 static int proc_list_size = -1;				/* hold the computed value for PROCLISTSIZE; initialized with crazy dummy */
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/ugio.c,v 1.214 2005/08/08 08:48:25 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -169,24 +170,6 @@
 
 static INT WriteElementParInfo (GRID *theGrid, ELEMENT *theElement, MGIO_PARINFO *pinfo);
 
-/****************************************************************************/
-/*D
-   RenumberMultiGrid - Recalculate ids in the current order
-
-   SYNOPSIS:
-   INT RenumberMultiGrid (MULTIGRID *theMG);
-
-   PARAMETERS:
-.  theMG - structure to renumber
-
-   DESCRIPTION:
-   This function recalculates ids in the current order.
-
-   RETURN VALUE:
-   INT
-.n   0 if ok
-D*/
-/****************************************************************************/
 
 /************************************************************************************/
 /*     																				*/
@@ -267,29 +250,6 @@
 	return (0);
 }
 
-/****************************************************************************/
-/*D
-	SaveMultiGrid - Save complete multigrid structure in a text file
-	
-	SYNOPSIS:
-	INT SaveMultiGrid (MULTIGRID *theMG, char *name, char *comment);
-	
-	PARAMETERS:
-	.  theMG - pointer to multigrid
-	.  name - name of the text file
-	.  comment - to be included at beginning of file
-	
-	DESCRIPTION:
-	This function saves the grid on level 0 to a text file.
-	The text file can be used in a script to load the grid.
-	
-	RETURN VALUE:
-	INT
-	.n    0 if ok
-	.n    >0 if error occured.
-	D*/
-/****************************************************************************/
-
 static INT SaveSurfaceGrid  (MULTIGRID *theMG, FILE *stream)
 {
 	NODE *theNode;
@@ -380,7 +340,7 @@
 	return(GM_OK);
 }
 
-static INT SaveMultiGrid_SCR (MULTIGRID *theMG, char *name, char *comment)
+static INT SaveMultiGrid_SCR (MULTIGRID *theMG, const char *name, const char *comment)
 {
 	FILE *stream;
 	GRID *theGrid;
@@ -389,7 +349,7 @@
 	VERTEX *theVertex;
 	DOUBLE *global;
 	time_t Time;
-	char *fmt;
+	const char *fmt;
 	char buffer[BUFFERSIZE];
 	BVP_DESC theBVPDesc;
 	INT i,id,move,part;
@@ -687,6 +647,17 @@
 	return(error);
 }
 
+/****************************************************************************/
+/** \brief Recalculate ids in the current order
+
+\param theMG - structure to renumber
+
+   This function recalculates ids in the current order.
+
+   \return 0 if ok
+*/
+/****************************************************************************/
+
 INT NS_DIM_PREFIX RenumberMultiGrid (MULTIGRID *theMG, INT *nboe, INT *nioe, INT *nbov, INT *niov, NODE ***vid_n, INT *foid, INT *non, INT MarkKey)
 {
 	NODE *theNode;
@@ -1308,7 +1279,7 @@
 }
 #endif
 
-static INT SaveMultiGrid_SPF (MULTIGRID *theMG, char *name, char *type, char *comment, INT autosave, INT rename)
+static INT SaveMultiGrid_SPF (MULTIGRID *theMG, const char *name, const char *type, const char *comment, INT autosave, INT rename)
 {
 	GRID *theGrid;
 	NODE *theNode;
@@ -1732,7 +1703,24 @@
 	return (0);
 }
 
-INT NS_DIM_PREFIX SaveMultiGrid (MULTIGRID *theMG, char *name, char *type, char *comment, INT autosave, INT rename)
+/****************************************************************************/
+/** \brief Save complete multigrid structure in a text file
+	
+ \param theMG - pointer to multigrid
+ \param name - name of the text file
+ \param comment - to be included at beginning of file
+	
+ This function saves the grid on level 0 to a text file.
+ The text file can be used in a script to load the grid.
+	
+ \return <ul>
+ <li> 0 if ok </li>
+ <li> >0 if error occured </li>
+ </ul>
+*/
+/****************************************************************************/
+
+INT NS_DIM_PREFIX SaveMultiGrid (MULTIGRID *theMG, const char *name, const char *type, const char *comment, INT autosave, INT rename)
 {
 	/* check name convention */
 	if (name==NULL || strcmp(name+strlen(name)-4,".scr")!=0)
@@ -1746,31 +1734,6 @@
 	return (0);
 }
 
-/****************************************************************************/
-/*
-LoadMultiGrid - Load complete multigrid structure from a text file
-
-SYNOPSIS:
-MULTIGRID *LoadMultiGrid (char *MultigridName, char *FileName, 
-char *BVPName, char *format, unsigned long heapSize);
-
-PARAMETERS:
-.  MultigridName - Name of the new 'MULTIGRID' structure in memory.
-.  FileName - Name of the file to be read.
-.  BVPName - `Name` of the BVP used for the 'MULTIGRID'.
-.  format - `Name` of the 'FORMAT' to be used for the 'MULTIGRID'.
-.  heapSize - Size of the heap in bytes that will be allocated for the 'MULTIGRID'.
-
-DESCRIPTION:
-This function can read grid files produced with the 'SaveMultiGrid' function.
-
-RETURN VALUE:
-INT
-.n    NULL if an error occured
-.n    else pointer to new 'MULTIGRID'
-*/
-/****************************************************************************/
-
 static INT Evaluate_pinfo (GRID *theGrid, ELEMENT *theElement, MGIO_PARINFO *pinfo)
 {
 	INT			i,j,s,prio,where,oldwhere,old;
@@ -2755,7 +2718,32 @@
 }
 #endif
 	
-MULTIGRID * NS_DIM_PREFIX LoadMultiGrid (char *MultigridName, char *name, char *type, char *BVPName, char *format, unsigned long heapSize, INT force, INT optimizedIE, INT autosave)
+/****************************************************************************/
+/** \brief  Load complete multigrid structure from a text file
+
+\param MultigridName - Name of the new 'MULTIGRID' structure in memory.
+\param FileName - Name of the file to be read.
+\param BVPName - `Name` of the BVP used for the 'MULTIGRID'.
+\param format - `Name` of the 'FORMAT' to be used for the 'MULTIGRID'.
+\param heapSize - Size of the heap in bytes that will be allocated for the 'MULTIGRID'.
+
+This function can read grid files produced with the 'SaveMultiGrid' function.
+
+\return
+  NULL if an error occured else a pointer to new 'MULTIGRID'
+*/
+/****************************************************************************/
+
+
+MULTIGRID * NS_DIM_PREFIX LoadMultiGrid (const char *MultigridName, 
+                                         const char *name, 
+                                         const char *type, 
+                                         const char *BVPName, 
+                                         const char *format, 
+                                         unsigned long heapSize, 
+                                         INT force, 
+                                         INT optimizedIE, 
+                                         INT autosave)
 /* Documentation of the intended programm flow resp. communication requirements.
    Functions introducing a global communication (all processors without any exception)
    are:
diff -ru ug-orig/gm/ugio.h ug-patched/gm/ugio.h
--- ug-orig/gm/ugio.h	2006-05-08 14:29:57.000000000 +0200
+++ ug-patched/gm/ugio.h	2006-05-08 14:31:31.000000000 +0200
@@ -24,7 +24,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/ugio.h,v 1.9 2006/05/08 12:29:57 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
Nur in ug-orig/gm: ugm2d.c.
Nur in ug-orig/gm: ugm2d.h.
Nur in ug-orig/gm: ugm3d.c.
Nur in ug-orig/gm: ugm3d.h.
diff -ru ug-orig/gm/ugm.c ug-patched/gm/ugm.c
--- ug-orig/gm/ugm.c	2008-10-30 13:29:06.000000000 +0100
+++ ug-patched/gm/ugm.c	2009-11-20 14:57:11.000000000 +0100
@@ -36,6 +36,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stddef.h>
 #include <stdio.h>
@@ -105,7 +106,7 @@
 /* local refinement hack */
 #undef _SCHALE_X_ 
 
-/* macro for controlling debugging output by conditions on objects */
+/** \brief macro for controlling debugging output by conditions on objects */
 #define UGM_CDBG(x,y)   
 
 /****************************************************************************/
@@ -132,9 +133,11 @@
 /*                                                                          */
 /****************************************************************************/
 
-static char buffer[4*256];			/* general purpose text buffer			*/
+/** \brief General purpose text buffer */
+static char buffer[4*256];
 
-static VIRT_HEAP_MGMT *theGenMGUDM; /* general user data space management	*/
+/** \brief General user data space management	*/
+static VIRT_HEAP_MGMT *theGenMGUDM;
 
 static INT theMGDirID;				/* env var ID for the multigrids		*/
 static INT theMGRootDirID; 			/* env dir ID for the multigrids		*/
@@ -146,7 +149,7 @@
 static DOUBLE InvMeshSize;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/gm/ugm.c,v 1.380 2008/10/30 12:29:06 dmitriy Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 REP_ERR_FILE;
 
@@ -976,24 +979,6 @@
 	return(theNode);	
 }
 
-
-/****************************************************************************/
-/*
-   GetSideNode - 
-
-   SYNOPSIS:
-   NODE *GetSideNode (ELEMENT *theElement, INT side);
-
-   PARAMETERS:
- * @param   theElement
- * @param   side
-
-   DESCRIPTION:
-
-   @return
-*/
-/****************************************************************************/
-
 static NODE *GetSideNodeX (const ELEMENT *theElement, INT side, INT n, 
 						   NODE **MidNodes)
 {
@@ -1233,18 +1218,6 @@
 	return(theNode);
 }
 
-/****************************************************************************/
-/** \brief ???
-   PARAMETERS:
- * @param   theElement
- * @param   theNode
-
-   DESCRIPTION:
-
-   @return ???
-*/
-/****************************************************************************/
-
 static int CountSideNodes (ELEMENT *e)
 {
 	int i,side;
@@ -1935,7 +1908,7 @@
 </ul> */
 /****************************************************************************/
 
-EDGE * NS_DIM_PREFIX GetSonEdge (EDGE *theEdge)
+EDGE * NS_DIM_PREFIX GetSonEdge (const EDGE *theEdge)
 {
 	EDGE *SonEdge=NULL;
 	NODE *Node0,*Node1,*SonNode0,*SonNode1;
@@ -1954,8 +1927,7 @@
 
 
 /****************************************************************************/
-/** \brief
-   GetSonEdges - Return pointer to son edges if it exists
+/** \brief Return pointer to son edges if it exists
 
  * @param   theEdge - edge for which son is searched
  * @param   SonEdges - array of pointers will be filled with son edges
@@ -1967,7 +1939,7 @@
 </ul> */
 /****************************************************************************/
 
-INT  NS_DIM_PREFIX GetSonEdges (EDGE *theEdge, EDGE *SonEdges[MAX_SON_EDGES])
+INT  NS_DIM_PREFIX GetSonEdges (const EDGE *theEdge, EDGE *SonEdges[MAX_SON_EDGES])
 {
 	INT nedges;
 	NODE *Node0,*Node1,*SonNode0,*SonNode1,*MidNode;
@@ -2017,8 +1989,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   GetFatherEdge - Return pointer to father edge if it exists
+/** \brief Return pointer to father edge if it exists
 
  * @param   theEdge - edge for which father is searched
 
@@ -2030,7 +2001,7 @@
 </ul> */
 /****************************************************************************/
 
-EDGE * NS_DIM_PREFIX GetFatherEdge (EDGE *theEdge)
+EDGE * NS_DIM_PREFIX GetFatherEdge (const EDGE *theEdge)
 {
 	NODE *theNode0 = NBNODE(LINK0(theEdge));
 	NODE *theNode1 = NBNODE(LINK1(theEdge));
@@ -2076,17 +2047,14 @@
 			return(NULL);
 	}
 
-	/* one case not considered */
-	assert(0);
-	
-	return NULL;	/* in case NDEBUG defined */
+        /* No father available */
+	return NULL;
 }
 
 #ifdef __THREEDIM__
 
 /****************************************************************************/
-/** \brief
-   FatherEdge - Return pointer to father edge if it exists
+/** \brief Return pointer to father edge if it exists
 
  * @param   SideNodes - nodes of the side
  * @param   ncorners - number of sidenodes
@@ -2225,8 +2193,7 @@
 #endif
 
 /****************************************************************************/
-/** \brief
-   GetEdge - Return pointer to edge if it exists
+/** \brief Return pointer to edge if it exists
 
  * @param   from - starting node of edge
  * @param   to - end node of edge
@@ -2239,7 +2206,7 @@
 </ul> */
 /****************************************************************************/
 
-EDGE * NS_DIM_PREFIX GetEdge (NODE *from, NODE *to)
+EDGE * NS_DIM_PREFIX GetEdge (const NODE *from, const NODE *to)
 {
 	LINK *pl;
 
@@ -2253,8 +2220,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   CreateEdge - Return pointer to a new edge structure
+/** \brief Return pointer to a new edge structure
 
  * @param   theGrid - grid where vertex should be inserted 
  * @param   theElement - pointer to element
@@ -2317,6 +2283,10 @@
 	SETOBJT(link1,LIOBJ);
 	#endif
 	SETLOFFSET(link1,1);
+
+#ifdef FOR_DUNE
+        pe->id = (theGrid->mg->edgeIdCounter)++;
+#endif
 	
 	SETLEVEL(pe,GLEVEL(theGrid));
 	#if (defined ModelP) && (defined __THREEDIM__)
@@ -2530,8 +2500,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   GetLink - Return pointer to link if it exists
+/** \brief Return pointer to link if it exists
 
  * @param   from - starting node of link
  * @param   to - end node of link
@@ -2544,7 +2513,7 @@
 </ul> */
 /****************************************************************************/
 
-LINK *GetLink (NODE *from, NODE *to)
+LINK *GetLink (const NODE *from, const NODE *to)
 {
 	LINK *pl;
 	
@@ -2558,8 +2527,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   CreateElement - Return a pointer to  a new element structure
+/** \brief Return a pointer to  a new element structure
 
  * @param   theGrid - grid structure to extend
  * @param   tag - the element type 
@@ -2709,8 +2677,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   CreateSonElementSide - creates the element sides of son elements
+/** \brief Creates the element sides of son elements
 
  * @param   theGrid - grid for which to create
  * @param   theElement - pointer to a boundary element 
@@ -2824,8 +2791,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   CreateNewLevel - Return pointer to new grid structure
+/** \brief Return pointer to new grid structure
 
  * @param   theMG - multigrid structure
 
@@ -2903,8 +2869,7 @@
 
 
 /****************************************************************************/
-/** \brief
-   CreateNewLevelAMG - Create new amg level
+/** \brief Create new amg level
 
  * @param   theMG - multigrid structure
 
@@ -2963,8 +2928,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   MakeMGItem - Create a multigrid environment item 
+/** \brief Create a multigrid environment item 
 
  * @param   name - name of the multigrid
 
@@ -3063,8 +3027,7 @@
    
 
 /****************************************************************************/
-/** \brief
-   GetMultigrid - Find the multigrid environment item with name
+/** \brief Find the multigrid environment item with name
 
  * @param   name - name of the multigrid to find
 
@@ -3084,10 +3047,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   GetFirstMultigrid - Return a pointer to the first multigrid 
-
- * @param   void
+/** \brief Return a pointer to the first multigrid 
 
    This function returns a pointer to the first multigrid in the /Multigrids 
    directory.
@@ -3150,8 +3110,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   CreateMultiGrid - Return a pointer to new multigrid structure
+/** \brief Return a pointer to new multigrid structure
 
  * @param   MultigridName - name of multigrid
  * @param   domain - name of domain description from environment
@@ -3275,6 +3234,14 @@
 	theMG->vertIdCounter = 0;
 	theMG->nodeIdCounter = 0;
 	theMG->elemIdCounter = 0;
+#ifdef FOR_DUNE
+        theMG->edgeIdCounter = 0;
+        /** \brief Count vector objects in that multigrid
+            \todo This line is a hack.  It is used to implement face ids for Dune.
+            As soon as the face data structure is available the id should be stored
+            there.  Then this code can be removed again. */
+        theMG->vectorIdCounter = 0;
+#endif
 	theMG->topLevel = -1;
 	theMG->bottomLevel = 0;
 	MG_BVP(theMG) = theBVP;
@@ -3562,8 +3529,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   DisposeVertex - Remove vertex from the data structure
+/** \brief Remove vertex from the data structure
 
  * @param   theGrid - grid to remove from
  * @param   theVertex - vertex to remove
@@ -3601,8 +3567,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   DisposeElement - Remove element from the data structure
+/** \brief Remove element from the data structure
 
  * @param   theGrid - grid to remove from
  * @param   theElement - element to remove
@@ -3904,10 +3869,6 @@
 				}
 				else
 				{
-					#ifdef ModelP
-					/* TODO: sidevector case must be tested */
-					assert(0);
-					#endif
 					if (!FindNeighborElement (theElement,i,&theNeighbor,&j))
 						RETURN (1);
 					VOBJECT(theVector) = (GEOM_OBJECT *)theNeighbor;
@@ -3968,8 +3929,7 @@
 #endif
 
 /****************************************************************************/
-/** \brief
-   Collapse - construct coarse grid from surface
+/** \brief Construct coarse grid from surface
 
  * @param   theMG - multigrid to collapse
 
@@ -4130,8 +4090,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   DisposeTopLevel - Remove top level grid from multigrid  structure
+/** \brief Remove top level grid from multigrid  structure
 
  * @param   theMG - multigrid to remove from
 
@@ -4181,8 +4140,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   DisposeGrid - dispose top level grid 
+/** \brief Dispose top level grid 
 
  * @param   theGrid - grid to be removed
 
@@ -4242,8 +4200,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   DisposeAMGLevel - dispose bottom AMG level 
+/** \brief Dispose bottom AMG level 
 
  * @param   theMG - multigrid to remove from
 
@@ -4302,8 +4259,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   DisposeAMGLevels - dispose all AMG level 
+/** \brief Dispose all AMG level 
 
  * @param   theMG - multigrid to remove from
 
@@ -4491,8 +4447,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   OrderNodesInGrid - reorder double linked 'NODE' list 
+/** \brief Reorder double linked 'NODE' list 
 
  * @param   theGrid - grid to order
  * @param   order - precedence of coordinate directions
@@ -4604,8 +4559,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   PutAtEndOfList - reorder a given set of elements and put them first in the list
+/** \brief Reorder a given set of elements and put them first in the list
 
  * @param   theGrid - elements are part of that level (not checked)
  * @param   cnt - number of elements in list
@@ -4668,8 +4622,7 @@
 }
 
 /****************************************************************************/
-/** \brief
- *     Determine neighbor and side of neighbor that goes back to element
+/** \brief Determine neighbor and side of neighbor that goes back to element
  *
  * @param   theElement - considered element
  * @param   Side - side of that element
@@ -4751,8 +4704,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   InsertBoundaryNode - Insert a boundary node 
+/** \brief Insert a boundary node 
 
  * @param   theGrid - grid structure
  * @param   bndp - boundary point descriptor
@@ -4817,8 +4769,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   DeleteNode - Delete a node
+/** \brief Delete a node
 
  * @param   theGrid - grid structure
  * @param   theNode - node to delete
@@ -4867,8 +4818,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   DeleteNodeWithID - Delete the node with id 
+/** \brief Delete the node with id 
 
  * @param   theGrid - grid structure
  * @param   id - id of node to delete
@@ -4897,8 +4847,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   FindFather - Find the new father element
+/** \brief Find the new father element
 
  * @param   theVertex -
 
@@ -4939,8 +4888,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   RecreateBNDSofNode - searche the boundary sides and recreate the corresponding BNDS
+/** \brief Search the boundary sides and recreate the corresponding BNDS
 
  * @param   theMG - multigrid structure
  * @param   theNode - node with new BNDP
@@ -5021,8 +4969,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   MoveBndMidNode - set new position for a midnode on a boundary
+/** \brief Set new position for a midnode on a boundary
 
  * @param   theMG - pointer to multigrid
  * @param   theVertex - vertex to move
@@ -5130,8 +5077,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   MoveMidNode - set new position for a midnode
+/** \brief Set new position for a midnode
 
  * @param   theMG - pointer to multigrid
  * @param   theNode - node to move
@@ -5220,8 +5166,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   MoveCenterNode - set new position for a centernode
+/** \brief Set new position for a centernode
 
  * @param   theMG - pointer to multigrid
  * @param   theNode - node to move
@@ -5285,8 +5230,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   MoveSideNode - set new position for a sidenode
+/** \brief Set new position for a sidenode
 
  * @param   theMG - pointer to multigrid
  * @param   theNode - node to move
@@ -5388,8 +5332,7 @@
 #endif
 
 /****************************************************************************/
-/** \brief
-   MoveNode - Let user enter a new position for an inner node
+/** \brief Let user enter a new position for an inner node
 
  * @param   theMG - pointer to multigrid
  * @param   theNode - node to move
@@ -5476,8 +5419,7 @@
 }
 
 /****************************************************************************/
-/** \brief
- *    Assign new local and global coords to a vertex
+/** \brief Assign new local and global coords to a vertex
 
  * @param   theMG - pointer to multigrid
  * @param   vert - vertex to move
@@ -5507,8 +5449,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   MoveFreeBoundaryVertex - move a vertex on a free boundary
+/** \brief Move a vertex on a free boundary
 
  * @param   theMG - pointer to multigrid
  * @param   vert - vertex to move
@@ -5552,8 +5493,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   FinishMovingFreeBoundaryVertices - finish moving of free boundary vertices
+/** \brief Finish moving of free boundary vertices
 
  * @param   theMG - pointer to multigrid
 
@@ -5604,8 +5544,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   GetMidNodeParam - Get local position of a midnode on an edge
+/** \brief Get local position of a midnode on an edge
 
  * @param   theNode - midnode 
  * @param   lambda  - local coordinate of midnode w.r.t. the edge
@@ -5693,191 +5632,25 @@
 
 #ifdef __TWODIM__
 
-#ifdef WITH_DEGENERATED_ELEM
-
-/****************************************************************************/
-/** \brief
-   ElemVertDegenerated - Check whether these vertices belong to a degenerated element.
 
- * @param   n - number of the vertices
- * @param   vertex - array of the vertices
- * @param   start_ind - to write the starting index of the proper vertex ordering
- 
-  This function checks whether the given vertices describe a degenerate
-  element. If all the vertices are located at different geometric positions
-  (i.e. this is no degenerate element), the function returns 0. If there are
-  vertices with equal geometric positions, the function checks whether this
-  is a proper degenerate element. If so, the function returns -1 and initializes
-  (* start_ind) with the index of the starting index of the proper ordering
-  of the vertices. In all the other cases, the function returns a positive value.
-  Note that this is the 2D version of the function.
-  
-  Unlike for the normal elements, we assume for the degenerate elements that
-  the nodes of degenerated elements are ordered in the input. This ordering
-  should correspond to the run over the sides of the element, i.e. for every
-  'i', '(vertex[i], vertex[(i+1)%n])' should be a side of the element. This
-  should be valid in the input. By setting '* start_ind', this function
-  induces the 'proper ordering' in which '(vertex[0], vertex[1])' is
-  a non-degenerated side.
-
-   @return <ul>
-   <li>   0 for normal (non-degenerated) elements </li>
-   <li>   -1 for the proper degenerated elements </li>	 
-   <li>   a positive value in all the other cases </li>	 
-   </ul>
-*/
 /****************************************************************************/
+/** \todo Please doc me!
 
-INT NS_DIM_PREFIX ElemVertDegenerated (INT n, VERTEX * * vertex, INT * start_ind)
-{
-    INT i, j;
-    DOUBLE dist, min_dist, max_dist, dist_0;
-    
-    V_DIM_EUKLIDNORM_OF_DIFF (CVECT (vertex [0]), CVECT (vertex [1]), dist_0);
-    min_dist = max_dist = dist_0;
-    for (i = 0; i < n; i++)
-        for (j = i + 1; j < n; j++)
-            {
-                V_DIM_EUKLIDNORM_OF_DIFF (CVECT (vertex [i]), CVECT (vertex [j]), dist);
-                if (dist > max_dist) max_dist = dist;
-                else if (dist < min_dist) min_dist = dist;
-            };
-    
-    if (max_dist <= SMALL_C) return __LINE__; /* this is an illegal set of points */
-    if (min_dist > DEGENERATED_SIZE * max_dist) return 0; /* this is not a degenerated element */
-    
-    if (n == 3)
-    { /* This is a degenerated triangle. */
-        if (dist_0 > DEGENERATED_SIZE * max_dist)
-        {
-            V_DIM_EUKLIDNORM_OF_DIFF (CVECT (vertex [1]), CVECT (vertex [2]), dist);
-            *start_ind = (dist > DEGENERATED_SIZE * max_dist)? 0 : 2;
-        }
-        else *start_ind = 1;
-    }
-    else if (n == 4)
-    { /* This may be a degenerated quadrilateral. */
-        if (dist_0 > DEGENERATED_SIZE * max_dist)
-            *start_ind = i = 0;
-        else
-        {
-            *start_ind = i = 1;
-            V_DIM_EUKLIDNORM_OF_DIFF (CVECT (vertex [1]), CVECT (vertex [2]), dist);
-            if (dist <= DEGENERATED_SIZE * max_dist) return __LINE__; /* illegal set of points */
-        }
-        
-        V_DIM_EUKLIDNORM_OF_DIFF (CVECT (vertex [i+1]), CVECT (vertex [i+2]), dist);
-        if (dist > DEGENERATED_SIZE * max_dist) return __LINE__; /* illegal set of points */
-        
-        if (i == 0)
-        {
-            V_DIM_EUKLIDNORM_OF_DIFF (CVECT (vertex [3]), CVECT (vertex [0]), dist);
-            if (dist > DEGENERATED_SIZE * max_dist) return __LINE__; /* illegal set of points */
-        }
-    }
-    else return __LINE__; /* too many points */
-    
-    return -1;
-}
-
-/****************************************************************************/
-/** \brief
-   ElemIsDegenerated - Check whether this element is degenerated.
-
- * @param   elem - the element
- * @param   start_ind - to write the starting index of the proper vertex ordering
- 
-  This function checks whether the given element is degenerated by
-  calling ElemVertDegenerated.
+   CheckOrientation - 
 
-   @return <ul>
-   <li>   0 for normal (non-degenerated) elements </li>
-   <li>   non-zero for the proper degenerated elements </li>	 
-   </ul>
-*/
-/****************************************************************************/
-INT NS_DIM_PREFIX ElemIsDegenerated (ELEMENT * elem, INT * start_ind)
-{
-    INT i, n_co;
-    VERTEX * vert [MAX_CORNERS_OF_ELEM];
-    
-    n_co = TAG (elem);
-    for (i = 0; i < n_co; i++)
-        vert [i] = MYVERTEX (CORNER (elem, i));
-    if (ElemVertDegenerated (n_co, vert, start_ind) == -1)
-        return 1;
-    return 0;
-}
+   SYNOPSIS:
+   INT CheckOrientation (INT n, VERTEX **vertices);
 
-/****************************************************************************/
-/** \brief
-   GetDegElemAssNodes - Check whether this element is degenerated.
+   
+ * @param   n
+ * @param   vertices
 
- * @param   elem - the element
- * @param   side_1 - one of the non-degenerated sides
- * @param   side_2 - the another non-degenerated side
- * @param   ass_nd - array of MAX_CORNERS_OF_ELEM entries for the corner associations
- 
-  This function checks whether the given element is degenerated. If so
-  it initializes 'side_1', 'side_2' and 'ass_nd'. Then 'ass_nd [i]' is
-  set to the index of the corner that has the same geometric position
-  as the corner #i.
+   DESCRIPTION:
 
-   @return <ul>
-   <li>   0 for normal (non-degenerated) elements </li>
-   <li>   non-zero for the proper degenerated elements </li>	 
-   </ul>
+   @return
+   INT
 */
 /****************************************************************************/
-INT NS_DIM_PREFIX GetDegElemAssNodes (ELEMENT * elem, INT * side_1, INT * side_2, INT * ass_nd)
-{
-	INT start_ind, n_co;
-	
-	if (! ElemIsDegenerated (elem, &start_ind))
-		return 0;
-	
-	switch (n_co = TAG (elem))
-	{
-	case 3: /* a "degenerated triangle" */
-		*side_1 = start_ind; *side_2 = (start_ind + 1) % 3;
-		ass_nd [start_ind] = (start_ind + 2) % 3;
-		ass_nd [(start_ind + 1) % 3] = (start_ind + 1) % 3; /* the same node */
-		ass_nd [(start_ind + 2) % 3] = start_ind;
-		break;
-	
-	case 4: /* a "degenerated quadrilateral" */
-		*side_1 = start_ind; *side_2 = (start_ind + 2) % 4;
-		ass_nd [start_ind] = (start_ind + 3) % 4;
-		ass_nd [(start_ind + 1) % 4] = (start_ind + 2) % 4;
-		ass_nd [(start_ind + 2) % 4] = (start_ind + 1) % 4;
-		ass_nd [(start_ind + 3) % 4] = start_ind;
-		break;
-	
-	default:
-		return 0;
-	}
-	
-	return 1;
-}
-
-#endif
-
-/****************************************************************************/
-/** \brief
-   CheckOrientation - Check whether the sequence of the vertices describes to a convex polygon
-
- * @param   n - number of the vertices
- * @param   vertices - array of the vertices
-
-   This function checks whether the vertices listed in the array describe
-   a convex polygon and their order corresponds to the clockwise
-   run over the sides of this polygon. This function works only in 2D. 
-
-   @return <ul>
-   <li>   0 if both these conditions are true </li>
-   <li>   non-zero either for the improper ordering of the vertices OR if the polygon is non-convex </li>	 
-</ul> */
-/****************************************************************************/
 
 INT  NS_DIM_PREFIX CheckOrientation (INT n, VERTEX **vertices)
 {
@@ -6265,7 +6038,7 @@
 			{
 				/*only in this case  problems like Attention !!! Node has more than ELEMS_OF_NODE_MAX !!iare possible*/
 				
-    			while(  (MGNDELEMBLKENTRY(theMG,cornerID[IndexOfDivPart],Index) != NULL) && (MGNDELEMPTRARRAY(theMG) != NULL) )
+                       while( (MGNDELEMPTRARRAY(theMG) != NULL) && (MGNDELEMBLKENTRY(theMG,cornerID[IndexOfDivPart],Index) != NULL) )
     			{
         			Index++;
 					helpIndex = Index - merkeIndex;
@@ -6483,8 +6256,7 @@
 
 
 /****************************************************************************/
-/** \brief
-   InsertElement - Insert an element
+/** \brief Insert an element
 
  * @param   theGrid - grid structure
  * @param   n
@@ -6556,7 +6328,7 @@
 			tag = HEXAHEDRON;
 			break;
 		default:
-			PrintErrorMessage('E',"InsertElement","only tetrahedrons, pyramids and hexahedrons are allowed in the 3D coarse grid");
+			PrintErrorMessage('E',"InsertElement","only tetrahedra, prisms, pyramids, and hexahedra are allowed in the 3D coarse grid");
 			return(NULL);
 	}
     #endif
@@ -6570,25 +6342,6 @@
 	}
 
     #ifdef __TWODIM__
-    #ifdef WITH_DEGENERATED_ELEM
-    if ((i = ElemVertDegenerated (n, Vertex, &k)) != 0)
-    { /* This may be a degenerated element: */
-        if (i > 0)
-        {
-            PrintErrorMessageF ('E', "InsertElement",
-			 "Illegal degenerated element: ElemIsDegenerated returned %d", (int) i);
-            return NULL;
-        }
-        /* Shift the vertices and the nodes: */
-        while (k-- != 0)
-            for (i = 1; i < n; i++)
-            {
-                SWAP_IJ (Node, i - 1, i, theNode);
-                SWAP_IJ (Vertex, i - 1, i, theVertex);
-            }
-    }
-    else
-    #endif
 	/* find orientation */
 	if (!CheckOrientation(n,Vertex))
 	{
@@ -6695,6 +6448,7 @@
 	}
       /**********************************************************************/
 	  /* here begins the revised(03/97) part of InsertElement ...	        */
+	  /* documentation see ftp://ftp.ica3.uni-stuttgart.de/pub/text/dirk.   */
 	  /*                                                                    */
 	if (ElemList == NULL)
 	{
@@ -6835,8 +6589,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   InsertElementFromIDs - Insert element with node ids
+/** \brief Insert element with node ids
 
  * @param   theGrid - grid structure
  * @param   n - number of nodes in node id list
@@ -6904,8 +6657,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   DeleteElement - Delete an element 
+/** \brief Delete an element 
 
  * @param   theMG - multigrid structure
  * @param   theElement - element to delete
@@ -7001,8 +6753,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   InsertMesh - Insert a mesh described by the domain
+/** \brief Insert a mesh described by the domain
 
  * @param   theMG - multigrid structure
  * @param   theMesh - mesh structure
@@ -7129,17 +6880,6 @@
                 for (l=0; l<SIDES_OF_REF(n); l++) ElemSideOnBnd[l] = (theMesh->ElemSideOnBnd[j][k]&(1<<l));
 				theElement = InsertElement (theGrid,n,Nodes,NULL,NULL,ElemSideOnBnd);
 			}
-			if (theElement==NULL)
-			{
-                PrintErrorMessageF ('E', "InsertMesh", "Could not insert an element with %d corners at", n);
-				for (l=0; l<n; l++)
-#ifdef __TWODIM__
-					PrintErrorMessageF ('E', "InsertMesh", "%d: (%lg, %lg)", l, XC(MYVERTEX(Nodes[l])), YC(MYVERTEX(Nodes[l])));
-#else
-					PrintErrorMessageF ('E', "InsertMesh", "%d: (%lg, %lg, %lg)", l, XC(MYVERTEX(Nodes[l])), YC(MYVERTEX(Nodes[l])), ZC(MYVERTEX(Nodes[l])));
-#endif
-                return(GM_ERROR);
-			};
 			SETSUBDOMAIN(theElement,j);
 		}
 
@@ -7147,8 +6887,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   FindNodeFromId - Find a node with given id
+/** \brief Find a node with given id
 
  * @param   theGrid - grid level to search.
 
@@ -7160,7 +6899,7 @@
 </ul> */
 /****************************************************************************/
 
-NODE * NS_DIM_PREFIX FindNodeFromId (GRID *theGrid, INT id)
+NODE * NS_DIM_PREFIX FindNodeFromId (const GRID *theGrid, INT id)
 {
 	NODE *theNode;
 	
@@ -7172,8 +6911,7 @@
 
 
 /****************************************************************************/
-/** \brief
-   FindNodeFromPosition - Find node from position
+/** \brief Find node from position
 
  * @param   theGrid - grid level to search
  * @param   pos - given position
@@ -7187,7 +6925,7 @@
 </ul> */
 /****************************************************************************/
 
-NODE * NS_DIM_PREFIX FindNodeFromPosition (GRID *theGrid, DOUBLE *pos, DOUBLE *tol)
+NODE * NS_DIM_PREFIX FindNodeFromPosition (const GRID *theGrid, const DOUBLE *pos, const DOUBLE *tol)
 {
 	NODE *theNode;
 	int i,found;
@@ -7204,8 +6942,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   FindVectorFromPosition - Find vector from position
+/** \brief Find vector from position
 
  * @param   theGrid - grid level to search
  * @param   pos - given position
@@ -7238,8 +6975,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   FindVectorFromIndex - Find vector from Index
+/** \brief Find vector from Index
 
  * @param   theGrid - grid level to search
  * @param   index - given index
@@ -7264,8 +7000,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   FindElementFromId - Find element with id 
+/** \brief Find element with id 
 
  * @param   theGrid - grid level to search
  * @param   id - id to search 
@@ -7291,8 +7026,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   PointInElement - Determine whether point is contained in element
+/** \brief Determine whether point is contained in element
 
  * @param   x - coordinates of given point
  * @param   theElement - element to scan
@@ -7366,8 +7100,7 @@
 
 
 /****************************************************************************/
-/** \brief
-   PointOnSide - Determine whether point is on an element side
+/** \brief Determine whether point is on an element side
 
  * @param   x - coordinates of given point
  * @param   theElement - element to scan
@@ -7434,8 +7167,7 @@
 #endif
 
 /****************************************************************************/
-/** \brief
-   DOUBLESide - Determine distance of a point to an element side
+/** \brief Determine distance of a point to an element side
 
  * @param   x - coordinates of given point
  * @param   theElement - element to scan
@@ -7498,8 +7230,7 @@
 #endif
 
 /****************************************************************************/
-/** \brief
-   FindFlippedElements - Determine whether elements are flipped
+/** \brief Determine whether elements are flipped
 
  * @param   theMG - multigrid
  * @param   verbose - verbose mode
@@ -7513,7 +7244,7 @@
 </ul> */
 /****************************************************************************/
 #ifdef __THREEDIM__
-INT NS_DIM_PREFIX FindFlippedElements(MULTIGRID *theMG, INT verbose)
+INT NS_DIM_PREFIX FindFlippedElements(const MULTIGRID *theMG, INT verbose)
 {
     ELEMENT *e;
 	INT l,n,i,j,fn,found,bfound,bfather;
@@ -7584,8 +7315,7 @@
 }
 #endif
 /****************************************************************************/
-/** \brief
-   FindElementFromPosition - Find element containing position 
+/** \brief Find element containing position 
 
  * @param   theGrid - grid level to search
  * @param   pos - given position
@@ -7659,8 +7389,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   FindElementOnSurfaceCached - Find element containing position  
+/** \brief Find element containing position  
 
  * @param   theMG - multigrid level to search
  * @param   global - given position
@@ -7736,8 +7465,7 @@
 
 
 /****************************************************************************/
-/** \brief
-   NeighbourElement - get the neighbouring element
+/** \brief Get the neighbouring element
 
  * @param   theElement - pointer to an element
  * @param   side - number of an element side
@@ -7837,7 +7565,7 @@
 */
 /****************************************************************************/
 
-static void CalculateCenterOfMassOfSide(ELEMENT *theElement, int side, DOUBLE_VECTOR global, DOUBLE_VECTOR local)
+static void CalculateCenterOfMassOfSide(const ELEMENT *theElement, int side, DOUBLE_VECTOR global, DOUBLE_VECTOR local)
 {
 	DOUBLE *corner;
 	DOUBLE *l_corner;
@@ -7860,8 +7588,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   KeyForObject - calculate an (hopefully) unique key for the geometric object
+/** \brief Calculate an (hopefully) unique key for the geometric object
 
  * @param   obj - geometric object which from the key is needed (can be one of VERTEX, ELEMENT, NODE or VECTOR)
 
@@ -7948,9 +7675,16 @@
 	return (GM_ERROR);
 }
 
+void  NS_DIM_PREFIX ListMultiGridHeader (const INT longformat)
+{
+	if (longformat)
+		sprintf(buffer,"   %-20.20s %-20.20s %-20.20s %10.10s %10.10s\n","mg name","domain name","problem name","heap size","heap used");
+	else
+		sprintf(buffer,"   %-20.20s\n","mg name");
+}
+
 /****************************************************************************/
-/** \brief
-   ListMultiGrid - List general information about multigrid structure
+/** \brief List general information about multigrid structure
 
  * @param   theMG - structure to list
  * @param   isCurrent - is `theMG` current multigrid 
@@ -7961,19 +7695,11 @@
 */
 /****************************************************************************/
 
-void  NS_DIM_PREFIX ListMultiGridHeader (const INT longformat)
-{
-	if (longformat)
-		sprintf(buffer,"   %-20.20s %-20.20s %-20.20s %10.10s %10.10s\n","mg name","domain name","problem name","heap size","heap used");
-	else
-		sprintf(buffer,"   %-20.20s\n","mg name");
-}
-
-void  NS_DIM_PREFIX ListMultiGrid (MULTIGRID *theMG, const INT isCurrent, const INT longformat)
+void  NS_DIM_PREFIX ListMultiGrid (const MULTIGRID *theMG, const INT isCurrent, const INT longformat)
 {
 	char c;
 	BVP *theBVP;
-	BVP_DESC *theBVPDesc;
+	const BVP_DESC *theBVPDesc;
 	
 	/* get BVP description */
 	theBVP = MG_BVP(theMG);
@@ -7991,8 +7717,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   MultiGridStatus - List information about refinement type distribution
+/** \brief List information about refinement type distribution
 
  * @param   theMG - structure to list
  * @param   gridflag -
@@ -8006,7 +7731,7 @@
 */
 /****************************************************************************/
 
-INT  NS_DIM_PREFIX MultiGridStatus (MULTIGRID *theMG, INT gridflag, INT greenflag, INT lbflag, INT verbose)
+INT  NS_DIM_PREFIX MultiGridStatus (const MULTIGRID *theMG, INT gridflag, INT greenflag, INT lbflag, INT verbose)
 {
 	INT		i,j,sons,maxsons,heap,used,free_bytes;
 	INT		red, green, yellow; 
@@ -8464,8 +8189,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   ListGrids - list general information about grids of multigrid
+/** \brief List general information about grids of multigrid
 
  * @param   theMG - multigrid structure
 
@@ -8779,8 +8503,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   ListNode - List information about node in multigrid
+/** \brief List information about node in multigrid
 
  * @param   theMG - structure containing the node
  * @param   theNode - node to list
@@ -8794,7 +8517,7 @@
 */
 /****************************************************************************/
 
-void NS_DIM_PREFIX ListNode (MULTIGRID *theMG, NODE *theNode, INT dataopt, INT bopt, INT nbopt, INT vopt)
+void NS_DIM_PREFIX ListNode (const MULTIGRID *theMG, const NODE *theNode, INT dataopt, INT bopt, INT nbopt, INT vopt)
 {
 	VERTEX *theVertex;
 	LINK *theLink;
@@ -8904,8 +8627,7 @@
 
 
 /****************************************************************************/
-/** \brief
-   ListNodeSelection - List information about all nodes in selection
+/** \brief List information about all nodes in selection
 
  * @param   theMG - structure containing the nodes
  * @param   dataopt - list user data if true
@@ -8964,8 +8686,7 @@
 
 
 /****************************************************************************/
-/** \brief
-   ListNodeRange - List information about nodes in given range of ids 
+/** \brief List information about nodes in given range of ids 
 
  * @param   theMG - structure to list
  * @param   from - first id 
@@ -9027,7 +8748,7 @@
 */
 /****************************************************************************/
 
-void NS_DIM_PREFIX ListElement (MULTIGRID *theMG, ELEMENT *theElement, INT dataopt, INT bopt, INT nbopt, INT vopt)
+void NS_DIM_PREFIX ListElement (const MULTIGRID *theMG, const ELEMENT *theElement, INT dataopt, INT bopt, INT nbopt, INT vopt)
 {
 	char etype[10];
 	char ekind[8];
@@ -9077,26 +8798,14 @@
 			UserWriteF("    FA=NULL");
 
 		UserWriteF("  NSONS=%d\n",NSONS(theElement));
-                /** \todo delete this
-		#ifdef __TWODIM__
-		for (i=0; i<SONS_OF_ELEM(theElement); i++)
-			if (SON(theElement,i)!=NULL)
-			{
-				UserWriteF("    S%d=" EID_FMTX ,
-					i,EID_PRTX(SON(theElement,i)));
-			}
-		#endif
-		#ifdef __THREEDIM__
-*/
+
 		if (GetAllSons(theElement,SonList)!=0) return;
 		for (i=0; SonList[i] != NULL; i++)
 		{
 			UserWriteF("    S%d=" EID_FMTX ,i,EID_PRTX(SonList[i]));
 			if ((i+1)%4 == 0) UserWrite("\n");
 		}
-/*
-		#endif
-*/
+
 	}
 	if (nbopt)
 	{
@@ -9134,8 +8843,7 @@
 
 
 /****************************************************************************/
-/** \brief
-    ListElementSelection - list information about elements in selection
+/** \brief List information about elements in selection
 
     * @param  theMG multigrid structure to list
  * @param   dataopt - list user data if true
@@ -9146,7 +8854,7 @@
 */
 /****************************************************************************/
 
-void  NS_DIM_PREFIX ListElementSelection (MULTIGRID *theMG, INT dataopt, INT bopt, INT nbopt, INT vopt)
+void  NS_DIM_PREFIX ListElementSelection (const MULTIGRID *theMG, INT dataopt, INT bopt, INT nbopt, INT vopt)
 {
 	int j;
 	ELEMENT *theElement;
@@ -9166,8 +8874,7 @@
 
 
 /****************************************************************************/
-/** \brief
-   IsElementSelected - Check whether element is in selection list
+/** \brief Check whether element is in selection list
 
  * @param   theMG - multigrid structure
  * @param   theElement - element to check
@@ -9180,7 +8887,7 @@
 </ul> */
 /****************************************************************************/
 
-INT  NS_DIM_PREFIX IsElementSelected (MULTIGRID *theMG, ELEMENT *theElement)
+INT NS_DIM_PREFIX IsElementSelected (const MULTIGRID *theMG, const ELEMENT *theElement)
 {
 	int j;
 
@@ -9193,8 +8900,7 @@
 
 
 /****************************************************************************/
-/** \brief
-   ListElementRange - List information about elements in range of ids
+/** \brief List information about elements in range of ids
 
  * @param   theMG - multigrid structure to list
  * @param   from - first id
@@ -9208,7 +8914,7 @@
 */
 /****************************************************************************/
 
-void  NS_DIM_PREFIX ListElementRange (MULTIGRID *theMG, INT from, INT to, INT idopt, INT dataopt, INT bopt, INT nbopt, INT vopt, INT lopt)
+void  NS_DIM_PREFIX ListElementRange (const MULTIGRID *theMG, INT from, INT to, INT idopt, INT dataopt, INT bopt, INT nbopt, INT vopt, INT lopt)
 {
 	int level,fromlevel,tolevel;
 	ELEMENT *theElement;
@@ -9249,8 +8955,7 @@
 
 
 /****************************************************************************/
-/** \brief
-   ListVector - List information about vector
+/** \brief List information about vector
 
  * @param   theMG - multigrid structure to list
  * @param   theVector - vector to list
@@ -9263,7 +8968,7 @@
 */
 /****************************************************************************/
 
-void NS_DIM_PREFIX ListVector (MULTIGRID *theMG, VECTOR *theVector, INT matrixopt, INT dataopt, INT modifiers)
+void NS_DIM_PREFIX ListVector (const MULTIGRID *theMG, const VECTOR *theVector, INT matrixopt, INT dataopt, INT modifiers)
 {
 	FORMAT *theFormat;
 	NODE *theNode;
@@ -9395,8 +9100,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   ListVectorOfElementSelection - List info about vectors of elements in selection
+/** \brief List info about vectors of elements in selection
 
  * @param   theMG -  structure to list
  * @param   matrixopt - list line of matrix corresponding to theVector
@@ -9408,7 +9112,7 @@
 */
 /****************************************************************************/
 
-void NS_DIM_PREFIX  ListVectorOfElementSelection (MULTIGRID *theMG, INT matrixopt, INT dataopt, INT modifiers)
+void NS_DIM_PREFIX  ListVectorOfElementSelection (const MULTIGRID *theMG, INT matrixopt, INT dataopt, INT modifiers)
 {
 	int i,j;
 	ELEMENT *theElement;
@@ -9451,8 +9155,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   ListVectorSelection - list information about vectors in selection
+/** \brief List information about vectors in selection
 
  * @param   theMG: multigrid structure to list
  * @param   matrixopt - list matrices of this vector
@@ -9464,7 +9167,7 @@
 */
 /****************************************************************************/
 
-void  NS_DIM_PREFIX ListVectorSelection (MULTIGRID *theMG, INT matrixopt, INT dataopt, INT modifiers)
+void NS_DIM_PREFIX ListVectorSelection (const MULTIGRID *theMG, INT matrixopt, INT dataopt, INT modifiers)
 {
 	int j;
 	VECTOR *theVector;
@@ -9483,8 +9186,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   IsVectorSelected - Check whether vector is in selection list
+/** \brief Check whether vector is in selection list
 
  * @param   theMG - multigrid structure
  * @param   theVector - vector to check
@@ -9497,7 +9199,7 @@
 </ul> */
 /****************************************************************************/
 
-INT  NS_DIM_PREFIX IsVectorSelected (MULTIGRID *theMG, VECTOR *theVector)
+INT NS_DIM_PREFIX IsVectorSelected (const MULTIGRID *theMG, const VECTOR *theVector)
 {
 	int j;
 
@@ -9509,8 +9211,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   ListVectorRange - list information about vectors in range of ids
+/** \brief List information about vectors in range of ids
 
  * @param   theMG - structure to list
  * @param   from - first index
@@ -9526,7 +9227,7 @@
 */
 /****************************************************************************/
 
-void NS_DIM_PREFIX ListVectorRange (MULTIGRID *theMG, INT fl, INT tl, INT from, INT to, INT idopt, INT matrixopt, INT dataopt, INT datatypes, INT modifiers)
+void NS_DIM_PREFIX ListVectorRange (const MULTIGRID *theMG, INT fl, INT tl, INT from, INT to, INT idopt, INT matrixopt, INT dataopt, INT datatypes, INT modifiers)
 {
 	int level;
 	VECTOR *theVector;
@@ -9558,26 +9259,8 @@
 			}
 }
 
-/*
-void ListConnections (GRID *theGrid)
-{
-	VECTOR *v;
-	MATRIX *m;
-	INT len; 
-    buffer[256];
-
-	for (v=PFIRSTVECTOR(theGrid); v!=NULL; v=SUCCVC(v)) {
-		len = sprintf(buffer,"%d: prio=%d  %8d ->",me,PRIO(v),GID(v));
-		for (m=START(v); m!=NULL; m=MNEXT(m))
-		    len += sprintf(buffer+len," %8d",GID(MDEST(m)));
-		printf("%s\n",buffer);
-	}
-}
-*/
-
 /****************************************************************************/
-/** \brief
-   ClearSelection - Clear selection buffer
+/** \brief Clear selection buffer
 
  * @param   theMG - multigrid structure
 
@@ -9946,8 +9629,7 @@
 
 
 /****************************************************************************/
-/** \brief
-   MinMaxAngle - Determine min and max angle in degrees
+/** \brief Determine min and max angle in degrees
 
  * @param   theElement - element to check
  * @param   amin - minimum angle
@@ -9961,7 +9643,7 @@
 </ul> */
 /****************************************************************************/
 
-INT  NS_DIM_PREFIX MinMaxAngle (ELEMENT *theElement, DOUBLE *amin, DOUBLE *amax)
+INT NS_DIM_PREFIX MinMaxAngle (const ELEMENT *theElement, DOUBLE *amin, DOUBLE *amax)
 {
 	INT error,i,s1,s2,tag;
 	DOUBLE angle,*x[MAX_CORNERS_OF_SIDE],n1[DIM],n2[DIM];
@@ -10035,8 +9717,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   DefineMGUDBlock - Define block in general MG user data space
+/** \brief Define block in general MG user data space
 
  * @param   id - the id of the block to be allocated
  * @param   size - size of the data block
@@ -10059,8 +9740,7 @@
 
 
 /****************************************************************************/
-/** \brief
-   FreeMGUDBlock - Free block in general MG user data space
+/** \brief Free block in general MG user data space
 
  * @param   id: the id of the block to be allocated 
 
@@ -10081,8 +9761,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   GetMGUDBlockDescriptor - Return pointer to block descriptor with id
+/** \brief Return pointer to block descriptor with id
 
  * @param   id - the id of the block to be allocated
 
@@ -10094,7 +9773,7 @@
 </ul> */
 /****************************************************************************/
 
-BLOCK_DESC	* NS_DIM_PREFIX GetMGUDBlockDescriptor (BLOCK_ID id)
+BLOCK_DESC* NS_DIM_PREFIX GetMGUDBlockDescriptor (BLOCK_ID id)
 {
 	return (GetBlockDesc(theGenMGUDM,id));
 }
@@ -10105,8 +9784,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   MaxNodeClass - Returns highest Node class of a dof on next level
+/** \brief Returns highest Node class of a dof on next level
 
  * @param   theElement - pointer to a element
 
@@ -10119,7 +9797,7 @@
 </ul> */										
 /****************************************************************************/
 
-static INT MaxNodeClass (ELEMENT *theElement)
+static INT MaxNodeClass (const ELEMENT *theElement)
 {
     INT m = 0;
 	INT i;
@@ -10134,8 +9812,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   MaxNextNodeClass - Returns highest Node class of a dof on next level
+/** \brief Returns highest Node class of a dof on next level
 
  * @param   theElement - pointer to a element
 
@@ -10148,7 +9825,7 @@
 </ul> */										
 /****************************************************************************/
 
-INT NS_DIM_PREFIX MaxNextNodeClass (ELEMENT *theElement)
+INT NS_DIM_PREFIX MaxNextNodeClass (const ELEMENT *theElement)
 {
     INT m = 0;
 	INT i;
@@ -10191,8 +9868,7 @@
 #endif
 
 /****************************************************************************/
-/** \brief
-   MinNodeClass - Returns minimal Node class of a dof on next level
+/** \brief Returns minimal Node class of a dof on next level
 
  * @param   theElement - pointer to a element
 
@@ -10205,7 +9881,7 @@
 </ul> */										
 /****************************************************************************/
 
-INT  NS_DIM_PREFIX MinNodeClass (ELEMENT *theElement)
+INT NS_DIM_PREFIX MinNodeClass (const ELEMENT *theElement)
 {
     INT m = 3;
 	INT i;
@@ -10220,8 +9896,7 @@
 }
 
 /****************************************************************************/
-/** \brief
-   MinNextNodeClass - Returns minimal Node class of a dof on next level
+/** \brief Returns minimal Node class of a dof on next level
 
  * @param   theElement - pointer to a element
 
@@ -10234,7 +9909,7 @@
 </ul> */										
 /****************************************************************************/
 
-INT  NS_DIM_PREFIX MinNextNodeClass (ELEMENT *theElement)
+INT  NS_DIM_PREFIX MinNextNodeClass (const ELEMENT *theElement)
 {
     INT m = 3;
 	INT i;
@@ -10249,8 +9924,7 @@
 }
 
 /****************************************************************************/
-/** \brief										
-   SeedNodeClasses - Initialize node classes
+/** \brief Initialize node classes
 
  * @param   theGrid - given grid
  * @param   theElement - given element
@@ -10274,8 +9948,7 @@
 }
 
 /****************************************************************************/
-/** \brief										
-   ClearNodeClasses - Reset node classes
+/** \brief Reset node classes
 
  * @param   theGrid - pointer to grid 
 
@@ -10297,20 +9970,6 @@
 
 	return(0);
 }
-/****************************************************************************/
-/** \brief										
-   PropagateNodeClasses - Compute Node classes after initialization
-
- * @param   theGrid - pointer to grid 
-
-   After Node classes have been reset and initialized, this function
-   now computes the class 2 and class 1 Nodes.
-
-   @return <ul>
-   <li>      0 if ok </li>
-   <li>      1 if error occured </li>				
-</ul> */										
-/****************************************************************************/
 
 #ifdef ModelP
 static int Gather_NodeClass (DDD_OBJ obj, void *data)
@@ -10341,6 +10000,19 @@
 }
 #endif
 
+/****************************************************************************/
+/** \brief Compute Node classes after initialization
+
+ * @param   theGrid - pointer to grid 
+
+   After Node classes have been reset and initialized, this function
+   now computes the class 2 and class 1 Nodes.
+
+   @return <ul>
+   <li>      0 if ok </li>
+   <li>      1 if error occured </li>				
+</ul> */										
+/****************************************************************************/
 static INT PropagateNodeClass (GRID *theGrid, INT nclass)
 {
     ELEMENT *theElement;
@@ -10554,13 +10226,12 @@
 		SETNNCLASS(theNode,0);
 	
 	/* now the refinement algorithm will initialize the class 3 Nodes   */
-	/* on the *NEXT* level.      										*/
+	/* on the *NEXT* level. */
 	return(0);
 }
 
 /****************************************************************************/
-/** \brief										
-   SeedNextNodeClasses - Set 'NNCLASS' in all Nodes associated with element
+/** \brief Set 'NNCLASS' in all Nodes associated with element
 
  * @param   theElement - pointer to element
 
@@ -10818,7 +10489,7 @@
 </ul> */
 /****************************************************************************/
 
-INT NS_DIM_PREFIX SetEdgeAndNodeSubdomainFromElements (GRID *theGrid)
+static INT SetEdgeAndNodeSubdomainFromElements (GRID *theGrid)
 {
 	ELEMENT *theElement;
 	NODE *n0,*n1;
@@ -11312,24 +10983,11 @@
 					break;
 			assert(i<SIDES_OF_ELEM(theElement));
 			
-#ifdef WITH_DEGENERATED_ELEM
-			if (SUBDOMAIN (theElement) != 0)
-				id = SUBDOMAIN (theElement);
-			else
-			{
-				/* set id from BNDS */
-				if (BNDS_BndSDesc(ELEM_BNDS(theElement,i),&id,&nbid,&part)) 
-					REP_ERR_RETURN (GM_ERROR);
-				assert(id>0);
-				SETSUBDOMAIN(theElement,id);
-			}
-#else
 			/* set id from BNDS */
 			if (BNDS_BndSDesc(ELEM_BNDS(theElement,i),&id,&nbid,&part)) 
 			    REP_ERR_RETURN (GM_ERROR);
 			assert(id>0);
 			SETSUBDOMAIN(theElement,id);
-#endif
 			SETUSED(theElement,1);			
 			fifo_in(&myfifo,(void *)theElement);
 			PRINTDEBUG(gm,1,("elem %3d sid %d\n",ID(theElement),SUBDOMAIN(theElement)));
@@ -11359,37 +11017,7 @@
 			if (USED(theNeighbor))
 			{
 				if (INNER_SIDE(theElement,i))
-				{
-					if (SUBDOMAIN(theElement)!=SUBDOMAIN(theNeighbor))
-					{
-						UserWriteF
-						 ("Error: Element %d (subdom. %d) shares an inner side %d "
-						  "with element %d from a different subdom %d.\n",
-						  ID (theElement), SUBDOMAIN(theElement), i,
-						  ID (theNeighbor), SUBDOMAIN(theNeighbor));
-						UserWriteF ("Element %d has vertices at", ID (theElement));
-						for (i = 0; i < TAG (theElement); i++)
-						{
-							UserWrite (" (");
-							for (j = 0; j < DIM; j++)
-								UserWriteF (" %lg", CVECT (MYVERTEX (CORNER (theElement, i))) [j]);
-							UserWrite (")");
-						}
-						UserWriteF ("\nElement %d has vertices at", ID (theNeighbor));
-						for (i = 0; i < TAG (theNeighbor); i++)
-						{
-							UserWrite (" (");
-							for (j = 0; j < DIM; j++)
-								UserWriteF (" %lg", CVECT (MYVERTEX (CORNER (theNeighbor, i))) [j]);
-							UserWrite (")");
-						}
-						UserWrite ("\n");
-						return GM_ERROR;
-					}
-					/* The old 'error message':
 					assert(SUBDOMAIN(theElement)==SUBDOMAIN(theNeighbor));
-					 */
-				}
 				continue;
 			}
 			SETSUBDOMAIN(theNeighbor,SUBDOMAIN(theElement));
@@ -12217,7 +11845,7 @@
 	{
 		ASSERT(NVECTOR(coordlist[i].node)!=NULL);
 		ASSERT(coordlist[i].vp[j]!=NULL);
-		PRINTDEBUG(gm,1,(" GID=%016llx",
+		PRINTDEBUG(gm,1,(" GID=%08x",
 			GID(coordlist[i].vp[j])))
 
 		DDD_IdentifyNumber(PARHDR(NVECTOR(coordlist[i].node)),p,
@@ -12259,7 +11887,7 @@
 		{
 			ASSERT(NVECTOR(coordlist[i].node)!=NULL);
 			ASSERT(coordlist[i].vp[j]!=NULL);
-			PRINTDEBUG(gm,1,(" GID=%016llx",
+			PRINTDEBUG(gm,1,(" GID=%08x",
 				GID(coordlist[i].vp[j])))
 
 if (0)
@@ -12813,7 +12441,7 @@
 	  MATRIX *mat;
 	  
 	  /* print all information available */
-	  PRINTDEBUG(gm,0,("#%8d: per_node GID= %016llx VGID= %016llx PRIO=%d coord: ( %f %f %f )\n",nn,GID(node),GID(NVECTOR(node)), PRIO(NVECTOR(node)), own_coord[0],own_coord[1],own_coord[2]));
+	  PRINTDEBUG(gm,0,("#%8d: per_node GID= %08x VGID= %08x PRIO=%d coord: ( %f %f %f )\n",nn,GID(node),GID(NVECTOR(node)), PRIO(NVECTOR(node)), own_coord[0],own_coord[1],own_coord[2]));
 	  nn++;
 
 	  if (((NODE *)VOBJECT(NVECTOR(node)))==NULL) {
@@ -12832,7 +12460,7 @@
 		  PRINTDEBUG(gm,0,("no destination vector -> continue\n"));
 		  continue;
 		}
-		PRINTDEBUG(gm,0,("\tGID=%016llx PRIO=%d\n",GID(MDEST(mat)),PRIO(MDEST(mat))));
+		PRINTDEBUG(gm,0,("\tGID=%08x PRIO=%d\n",GID(MDEST(mat)),PRIO(MDEST(mat))));
 	  }
 	}
   }
@@ -12853,7 +12481,7 @@
 	return(GM_OK);
 }
 
-static INT ListPeriodicNodeAndVec (GRID *g, DDD_GID vgid)
+static INT ListPeriodicNodeAndVec (GRID *g, INT vgid)
 {
 	VECTOR *v;
 	NODE *n,*nref;
@@ -12915,14 +12543,14 @@
 	DOUBLE tol[3] = {SMALL_DOUBLE,SMALL_DOUBLE,SMALL_DOUBLE};
 	NODE *n = FindNodeFromPosition(g,pos,tol);
 	INT i,found;
-	DDD_GID vgid;
+	INT vgid;
 
 	if (n != NULL)
 		vgid = GID(NVECTOR(n));
 	else
 		vgid = -1;
-	ASSERT(vgid==UG_GlobalMaxGID(vgid) || vgid==-1);
-	vgid = UG_GlobalMaxGID(vgid);
+	ASSERT(vgid==UG_GlobalMaxINT(vgid) || vgid==-1);
+	vgid = UG_GlobalMaxINT(vgid);
 	
 	if (vgid == -1)
 	{
diff -ru ug-orig/gm/ugm.h ug-patched/gm/ugm.h
--- ug-orig/gm/ugm.h	2008-10-30 13:29:06.000000000 +0100
+++ ug-patched/gm/ugm.h	2009-05-06 16:26:37.000000000 +0200
@@ -26,7 +26,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/gm/ugm.h,v 1.74 2008/10/30 12:29:06 dmitriy Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -130,7 +130,7 @@
 INT              PointInElement                 (const DOUBLE*, const ELEMENT *theElement);
 INT          PointOnSide            (const DOUBLE *global, const ELEMENT *theElement, INT side);
 DOUBLE       DistanceFromSide       (const DOUBLE *global, const ELEMENT *theElement, INT side);
-INT FindFlippedElements				(MULTIGRID *theMG, INT verbose);
+INT FindFlippedElements				(const MULTIGRID *theMG, INT verbose);
 NS_PREFIX VIRT_HEAP_MGMT *GetGenMGUDM             (void);
 INT             CheckOrientation                (INT n, VERTEX **vertices);
 INT             CheckOrientationInGrid  (GRID *theGrid);
@@ -166,9 +166,9 @@
 INT             ClearNextNodeClasses            (GRID *theGrid);
 INT             SeedNextNodeClasses             (ELEMENT *theElement);
 INT             PropagateNextNodeClasses        (GRID *theGrid);
-INT             MaxNextNodeClass                        (ELEMENT *theElement);
-INT             MinNodeClass                            (ELEMENT *theElement);
-INT             MinNextNodeClass                        (ELEMENT *theElement);
+INT             MaxNextNodeClass                        (const ELEMENT *theElement);
+INT             MinNodeClass                            (const ELEMENT *theElement);
+INT             MinNextNodeClass                        (const ELEMENT *theElement);
 #endif
 
 #ifdef __PERIODIC_BOUNDARY__
@@ -180,11 +180,6 @@
 INT                     Grid_CheckPeriodicity           (GRID *g);
 #endif
 
-#ifdef WITH_DEGENERATED_ELEM
-INT ElemIsDegenerated (ELEMENT * elem, INT * start_ind);
-INT GetDegElemAssNodes (ELEMENT * elem, INT * side_1, INT * side_2, INT * ass_nd);
-#endif
-
 END_UGDIM_NAMESPACE
 
 #endif
Nur in ug-orig/gm: ugrefine2d.c.
Nur in ug-orig/gm: ugrefine2d.h.
Nur in ug-orig/gm: ugrefine3d.c.
Nur in ug-orig/gm: ugrefine3d.h.
Nur in ug-orig/gm: ugrefine.h.
diff -ru ug-orig/graphics/covise/coviseif.cpp ug-patched/graphics/covise/coviseif.cpp
--- ug-orig/graphics/covise/coviseif.cpp	1997-12-23 17:04:10.000000000 +0100
+++ ug-patched/graphics/covise/coviseif.cpp	1997-12-23 17:04:10.000000000 +0100
@@ -164,7 +164,7 @@
 
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/graphics/covise/coviseif.cpp,v 1.3 1997/12/23 16:04:10 stefan Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 /****************************************************************************/
diff -ru ug-orig/graphics/covise/coviseif.h ug-patched/graphics/covise/coviseif.h
--- ug-orig/graphics/covise/coviseif.h	1997-12-16 17:23:36.000000000 +0100
+++ ug-patched/graphics/covise/coviseif.h	1997-12-16 17:23:36.000000000 +0100
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/graphics/covise/coviseif.h,v 1.1 1997/12/16 16:23:36 birken Exp $
+$Header$
 */
 
 
Nur in ug-orig/graphics/covise: CVS.
Nur in ug-orig/graphics: CVS.
Nur in ug-orig/graphics: .cvsignore.
diff -ru ug-orig/graphics/grape/connectuggrape.h ug-patched/graphics/grape/connectuggrape.h
--- ug-orig/graphics/grape/connectuggrape.h	2006-05-08 14:29:21.000000000 +0200
+++ ug-patched/graphics/grape/connectuggrape.h	2006-05-08 14:31:31.000000000 +0200
@@ -23,7 +23,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/graphics/grape/connectuggrape.h,v 1.9 2006/05/08 12:29:21 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/graphics/grape/connectuggrapeOFF.c ug-patched/graphics/grape/connectuggrapeOFF.c
--- ug-orig/graphics/grape/connectuggrapeOFF.c	2006-06-02 17:35:52.000000000 +0200
+++ ug-patched/graphics/grape/connectuggrapeOFF.c	2006-06-02 17:38:35.000000000 +0200
@@ -43,7 +43,7 @@
 USING_UG_NAMESPACES
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/graphics/grape/connectuggrapeOFF.c,v 1.12 2006/06/02 15:35:52 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 
diff -ru ug-orig/graphics/grape/connectuggrapeON.c ug-patched/graphics/grape/connectuggrapeON.c
--- ug-orig/graphics/grape/connectuggrapeON.c	2006-06-02 18:21:18.000000000 +0200
+++ ug-patched/graphics/grape/connectuggrapeON.c	2009-04-29 14:30:36.000000000 +0200
@@ -277,7 +277,7 @@
 
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/graphics/grape/connectuggrapeON.c,v 1.9 2006/06/02 16:21:18 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -1268,7 +1268,7 @@
 	return (ret);
 }
 
-int NS_PREFIX CallGrape (MULTIGRID *theMG)
+int NS_DIM_PREFIX CallGrape (MULTIGRID *theMG)
 { 
 	static HMESH *mesh;
 	int i,j;
Nur in ug-orig/graphics/grape: CVS.
Nur in ug-orig/graphics/grape: .cvsignore.
diff -ru ug-orig/graphics/grape/defs.h ug-patched/graphics/grape/defs.h
--- ug-orig/graphics/grape/defs.h	1997-07-18 16:59:15.000000000 +0200
+++ ug-patched/graphics/grape/defs.h	1997-07-18 17:00:14.000000000 +0200
@@ -1,7 +1,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/graphics/grape/defs.h,v 1.3 1997/07/18 14:59:15 birken Exp $
+$Header$
 */
 
 #define LIST_LEN 200 
diff -ru ug-orig/graphics/grape/Makefile.am ug-patched/graphics/grape/Makefile.am
--- ug-orig/graphics/grape/Makefile.am	2004-09-02 14:22:11.000000000 +0200
+++ ug-patched/graphics/grape/Makefile.am	2004-09-02 14:22:17.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.1 2004/09/02 12:22:11 thimo Exp $
+# $Id: Makefile.am 7772 2004-09-02 12:22:17Z thimo $
 
 if BUILD2D
   LIB_2D = libuggrape2.la
diff -ru ug-orig/graphics/graphics.c ug-patched/graphics/graphics.c
--- ug-orig/graphics/graphics.c	2004-07-21 11:21:44.000000000 +0200
+++ ug-patched/graphics/graphics.c	2008-12-19 11:13:29.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
@@ -96,7 +97,7 @@
 
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/graphics/graphics.c,v 1.6 2004/07/21 09:21:44 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/graphics/graphics.h ug-patched/graphics/graphics.h
--- ug-orig/graphics/graphics.h	2006-05-08 14:29:20.000000000 +0200
+++ ug-patched/graphics/graphics.h	2006-05-08 14:31:31.000000000 +0200
@@ -26,7 +26,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/graphics/graphics.h,v 1.6 2006/05/08 12:29:20 sander Exp $
+$Header$
 */
 
 
diff -ru ug-orig/graphics/Makefile.am ug-patched/graphics/Makefile.am
--- ug-orig/graphics/Makefile.am	2004-09-02 14:22:10.000000000 +0200
+++ ug-patched/graphics/Makefile.am	2004-09-02 14:22:17.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.1 2004/09/02 12:22:10 thimo Exp $
+# $Id: Makefile.am 7772 2004-09-02 12:22:17Z thimo $
 
 SUBDIRS = uggraph grape
 
Nur in ug-orig/graphics/pv3: CVS.
Nur in ug-orig/graphics/pv3: .cvsignore.
diff -ru ug-orig/graphics/pv3/pv3if.c ug-patched/graphics/pv3/pv3if.c
--- ug-orig/graphics/pv3/pv3if.c	2004-10-08 17:41:03.000000000 +0200
+++ ug-patched/graphics/pv3/pv3if.c	2008-12-19 11:13:29.000000000 +0100
@@ -27,6 +27,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <pV3.h>
 
diff -ru ug-orig/graphics/uggraph/bullet.c ug-patched/graphics/uggraph/bullet.c
--- ug-orig/graphics/uggraph/bullet.c	2005-07-18 15:41:11.000000000 +0200
+++ ug-patched/graphics/uggraph/bullet.c	2008-12-19 11:13:29.000000000 +0100
@@ -31,6 +31,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include "bullet.h"
 #include "ugdevices.h"
 #include "commands.h"
@@ -46,7 +47,7 @@
 USING_UG_NAMESPACES
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/graphics/uggraph/bullet.c,v 1.19 2005/07/18 13:41:11 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/graphics/uggraph/bullet.h ug-patched/graphics/uggraph/bullet.h
--- ug-orig/graphics/uggraph/bullet.h	2006-05-08 14:29:21.000000000 +0200
+++ ug-patched/graphics/uggraph/bullet.h	2006-05-08 14:31:31.000000000 +0200
@@ -23,7 +23,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/graphics/uggraph/bullet.h,v 1.10 2006/05/08 12:29:21 sander Exp $
+$Header$
  */
 
 /****************************************************************************/
Nur in ug-orig/graphics/uggraph: CVS.
Nur in ug-orig/graphics/uggraph: .cvsignore.
diff -ru ug-orig/graphics/uggraph/graph.c ug-patched/graphics/uggraph/graph.c
--- ug-orig/graphics/uggraph/graph.c	2005-07-18 15:41:11.000000000 +0200
+++ ug-patched/graphics/uggraph/graph.c	2008-12-19 11:13:29.000000000 +0100
@@ -26,6 +26,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -96,7 +97,7 @@
 static char buffer[256];						/* general purpose text buff*/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/graphics/uggraph/graph.c,v 1.22 2005/07/18 13:41:11 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/graphics/uggraph/graph.h ug-patched/graphics/uggraph/graph.h
--- ug-orig/graphics/uggraph/graph.h	2006-05-08 14:29:21.000000000 +0200
+++ ug-patched/graphics/uggraph/graph.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/graphics/uggraph/graph.h,v 1.13 2006/05/08 12:29:21 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/graphics/uggraph/initgraph.c ug-patched/graphics/uggraph/initgraph.c
--- ug-orig/graphics/uggraph/initgraph.c	2005-08-08 10:46:58.000000000 +0200
+++ ug-patched/graphics/uggraph/initgraph.c	2008-12-19 11:13:29.000000000 +0100
@@ -27,6 +27,7 @@
 /****************************************************************************/
 
 /* ANSI-C includes */
+#include "config.h"
 #include <stdio.h>
 
 /* low module */
@@ -52,7 +53,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/graphics/uggraph/initgraph.c,v 1.12 2005/08/08 08:46:58 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*
diff -ru ug-orig/graphics/uggraph/initgraph.h ug-patched/graphics/uggraph/initgraph.h
--- ug-orig/graphics/uggraph/initgraph.h	2006-05-08 14:29:21.000000000 +0200
+++ ug-patched/graphics/uggraph/initgraph.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/graphics/uggraph/initgraph.h,v 1.6 2006/05/08 12:29:21 sander Exp $
+$Header$
 */
 
 #ifndef __INITGRAPH__
diff -ru ug-orig/graphics/uggraph/iso.c ug-patched/graphics/uggraph/iso.c
--- ug-orig/graphics/uggraph/iso.c	2008-03-18 13:58:24.000000000 +0100
+++ ug-patched/graphics/uggraph/iso.c	2008-12-19 11:13:29.000000000 +0100
@@ -13,7 +13,8 @@
 /*																			*/
 /* History:   30.10.04 begin, ug3-version                                   */
 /*																			*/
-/* Remarks:                                                                 */
+/* Remarks:   Simple version that just decomposes hexahedra into 6 pyramids */
+/*            and then into 12 tetrahedra.                                  */
 /*                                                                          */
 /****************************************************************************/
 
@@ -25,11 +26,10 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <limits.h>
 #include <assert.h>
-#include <math.h>
-#include <float.h>
 #include "general.h"
 #include "iso.h"
 
@@ -53,11 +53,11 @@
 /*																			*/
 /****************************************************************************/
 
-static signed char Pyr[2][8] = {
+static int Pyr[2][8] = {
 	{0, 1, 2, 4, 0, 2, 3, 4},
 	{0, 1, 3, 4, 1, 2, 3, 4}};
 
-static signed char Pri[8][12] = {
+static int Pri[8][12] = {
 	{0, 4, 5, 3, 1, 4, 2, 0, 4, 5, 2, 0},
 	{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
 	{0, 4, 5, 3, 1, 4, 5, 0, 1, 5, 2, 0},
@@ -67,182 +67,100 @@
 	{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
 	{1, 5, 3, 4, 0, 2, 3, 1, 2, 5, 3, 1}};
 
-static signed char Hex[64][24] = {
-	{0, 4, 5, 6, 0, 7, 4, 6, 1, 0, 5, 6, 0, 1, 2, 6, 2, 3, 0, 6, 3, 6, 7, 0},
-	{0, 4, 5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 7, 1, 3, 1, 2, 7},
-	{3, 7, 4, 5, 3, 6, 7, 5, 0, 3, 4, 5, 3, 0, 1, 5, 1, 2, 3, 6, 1, 5, 6, 3},
-	{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
-	{1, 5, 6, 7, 1, 4, 5, 7, 3, 6, 7, 1, 1, 2, 3, 6, 3, 0, 1, 4, 3, 7, 4, 1},
-	{1, 5, 6, 7, 1, 4, 5, 7, 2, 1, 6, 7, 1, 2, 3, 7, 3, 0, 1, 4, 3, 7, 4, 1},
-	{3, 7, 4, 5, 3, 6, 7, 5, 0, 3, 4, 5, 3, 0, 1, 5, 1, 2, 3, 5, 2, 5, 6, 3},
-	{5, 4, 7, 3, 5, 0, 4, 3, 2, 7, 3, 5, 5, 6, 2, 7, 2, 1, 5, 3, 1, 3, 0, 5},
-	{3, 7, 4, 5, 3, 6, 7, 5, 1, 4, 5, 3, 3, 0, 1, 4, 1, 2, 3, 5, 2, 5, 6, 3},
-	{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
-
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/graphics/uggraph/iso.c,v 1.13 2008/03/18 12:58:24 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
+
 
-static int Interpolate(double *x, TET *tet, double lambda, int i, int j)
+static void Interpolate(double *x, TET *tet, double lambda, int i, int j)
 {
-	double t, d;
-	
-	d = tet->v[j]-tet->v[i];
-	if (fabs(d) <= 5.0*(fabs(tet->v[i])+fabs(tet->v[j]))*DBL_EPSILON)
-		t = 0.5;
-	else
-		t = (lambda-tet->v[i])/d;
+	double t = (lambda-tet->v[i])/(tet->v[j]-tet->v[i]);
 
 	x[0] = tet->x[i][0]+t*(tet->x[j][0]-tet->x[i][0]);
 	x[1] = tet->x[i][1]+t*(tet->x[j][1]-tet->x[i][1]);
 	x[2] = tet->x[i][2]+t*(tet->x[j][2]-tet->x[i][2]);
-
-	if (fabs(t) <= 10.0*DBL_EPSILON)
-	    return -1;
-	if (fabs(1.0-t) <= 10.0*DBL_EPSILON)
-	    return 1;	
-	return 0;
 }
 
 static void ExtractTet(TET *tet, double lambda, POLY *poly)
 {
-	int c = 0, d = 0, n = 0, d1, d2, d3, d4;
+	int index = 0;
 
-	if (tet->v[0] >= lambda) c |= 1;
-	if (tet->v[1] >= lambda) c |= 2;
-	if (tet->v[2] >= lambda) c |= 4;
-	if (tet->v[3] >= lambda) c |= 8;
+	if (tet->v[0] >= lambda) index |= 1;
+	if (tet->v[1] >= lambda) index |= 2;
+	if (tet->v[2] >= lambda) index |= 4;
+	if (tet->v[3] >= lambda) index |= 8;
 
-	switch(c)
+	switch (index)
 	{
 	case 0x01:
 	case 0x0E:
-	    if (Interpolate(poly->x[0], tet, lambda, 0, 1) < 0) d++;
-	    if (Interpolate(poly->x[1], tet, lambda, 0, 2) < 0) d++;
-	    if (Interpolate(poly->x[2], tet, lambda, 0, 3) < 0) d++;
-		if  (d <= 1) n = 3;
+		Interpolate(poly->x[0], tet, lambda, 0, 1);
+		Interpolate(poly->x[1], tet, lambda, 0, 2);
+		Interpolate(poly->x[2], tet, lambda, 0, 3);
+		poly->n = 3;
 		break;
 	case 0x02:
 	case 0x0D:
-	    if (Interpolate(poly->x[0], tet, lambda, 1, 0) < 0) d++;
-	    if (Interpolate(poly->x[1], tet, lambda, 1, 2) < 0) d++;
-	    if (Interpolate(poly->x[2], tet, lambda, 1, 3) < 0) d++;
-		if (d <= 1) n = 3;
+		Interpolate(poly->x[0], tet, lambda, 1, 0);
+		Interpolate(poly->x[1], tet, lambda, 1, 2);
+		Interpolate(poly->x[2], tet, lambda, 1, 3);
+		poly->n = 3;
 		break;
 	case 0x03:
 	case 0x0C:
-		d1 = Interpolate(poly->x[n++], tet, lambda, 0, 2);
-		d2 = Interpolate(poly->x[n],   tet, lambda, 1, 2);
-		if (d1 <= 0 || d2 <= 0) n++;
-		d3 = Interpolate(poly->x[n],   tet, lambda, 1, 3);
-		if (d2 >= 0 || d3 >= 0) n++;
-		d4 = Interpolate(poly->x[n],   tet, lambda, 0, 3);
-		if ((d3 <= 0 || d4 <= 0) && (d1 >= 0 || d4 >= 0)) n++;
+		Interpolate(poly->x[0], tet, lambda, 0, 2);
+		Interpolate(poly->x[1], tet, lambda, 1, 2);
+		Interpolate(poly->x[2], tet, lambda, 1, 3);
+		Interpolate(poly->x[3], tet, lambda, 0, 3);
+		poly->n = 4;
 		break;
 	case 0x04:
 	case 0x0B:
-	    if (Interpolate(poly->x[0], tet, lambda, 0, 2) > 0) d++;
-		if (Interpolate(poly->x[1], tet, lambda, 1, 2) > 0) d++;
-		if (Interpolate(poly->x[2], tet, lambda, 2, 3) < 0) d++;
-		if (d <= 1) n = 3;
+		Interpolate(poly->x[0], tet, lambda, 0, 2);
+		Interpolate(poly->x[1], tet, lambda, 1, 2);
+		Interpolate(poly->x[2], tet, lambda, 2, 3);
+		poly->n = 3;
 		break;
 	case 0x05:
 	case 0x0A:
-		d1 = Interpolate(poly->x[n++], tet, lambda, 0, 1);
-		d2 = Interpolate(poly->x[n],   tet, lambda, 1, 2);
-		if (d1 <= 0 || d2 >= 0) n++; 
-		d3 = Interpolate(poly->x[n],   tet, lambda, 2, 3);
-		if (d2 <= 0 || d3 >= 0) n++;
-		d4 = Interpolate(poly->x[n],   tet, lambda, 0, 3);
-		if ((d3 <= 0 || d4 <= 0) && (d1 >= 0 || d4 >= 0)) n++;
+		Interpolate(poly->x[0], tet, lambda, 0, 1);
+		Interpolate(poly->x[1], tet, lambda, 1, 2);
+		Interpolate(poly->x[2], tet, lambda, 2, 3);
+		Interpolate(poly->x[3], tet, lambda, 0, 3);
+		poly->n = 4;
 		break;
 	case 0x06:
 	case 0x09:
-		d1 = Interpolate(poly->x[n++], tet, lambda, 0, 1);
-		d2 = Interpolate(poly->x[n],   tet, lambda, 1, 3);
-		if (d1 <= 0 || d2 >= 0) n++;
-		d3 = Interpolate(poly->x[n],   tet, lambda, 2, 3);
-		if (d2 <= 0 || d3 <= 0) n++;
-		d4 = Interpolate(poly->x[n],   tet, lambda, 0, 2);
-		if ((d3 >= 0 || d4 <= 0) && (d1 >= 0 || d4 >= 0)) n++;
+		Interpolate(poly->x[0], tet, lambda, 0, 1);
+		Interpolate(poly->x[1], tet, lambda, 1, 3);
+		Interpolate(poly->x[2], tet, lambda, 2, 3);
+		Interpolate(poly->x[3], tet, lambda, 0, 2);
+		poly->n = 4;
 		break;
 	case 0x07:
 	case 0x08:
-	    if (Interpolate(poly->x[0], tet, lambda, 0, 3) > 0) d++;
-		if (Interpolate(poly->x[1], tet, lambda, 1, 3) > 0) d++;
-		if (Interpolate(poly->x[2], tet, lambda, 2, 3) > 0) d++;
-		if (d <= 1) n = 3;
+		Interpolate(poly->x[0], tet, lambda, 0, 3);
+		Interpolate(poly->x[1], tet, lambda, 1, 3);
+		Interpolate(poly->x[2], tet, lambda, 2, 3);
+		poly->n = 3;
 		break;
 	default:
-	    break;
+		poly->n = 0;
 	}
-	poly->n = (n >= 3) ? n:0;
 }
 
 static int SplitSide(CELL *cell, int i0, int i1, int i2, int i3)
 {
-	long long m1, m2;
-	int k1, k2;
+	int a[4], i, k, m;
 
-	if (cell->order[i0] < cell->order[i1]) { m1 = cell->order[i0]; k1 = 0; }
-	else                                   { m1 = cell->order[i1]; k1 = 1; }
-	if (cell->order[i2] < cell->order[i3]) { m2 = cell->order[i2]; k2 = 2; }
-	else                                   { m2 = cell->order[i3]; k2 = 3; }
-	if (m1 < m2) return k1;
-	else         return k2;
+	k = 0;
+	m = cell->order[i0];
+	a[0] = i0; a[1] = i1; a[2] = i2, a[3] = i3;
+	for (i = 1; i < 4; i++)
+		if (cell->order[a[i]] <= m) {
+			m = cell->order[a[i]];
+			k = i;
+		}
+	return a[k];
 }
 
 static int DecomposePyr(CELL *cell)
@@ -254,22 +172,28 @@
 {
 	return
 		((SplitSide(cell, 0, 1, 4, 3) & 1) << 0) |
-		((SplitSide(cell, 2, 1, 4, 5) & 1) << 1) |
-		((SplitSide(cell, 0, 2, 5, 3) & 1) << 2);
+		((SplitSide(cell, 1, 2, 5, 4) & 1) << 1) |
+		((SplitSide(cell, 2, 0, 3, 5) & 2) << 1);
 }
 
-static int DecomposeHex(CELL *cell)
+static void CenterNode(CELL *cell, double *xc, double *vc)
 {
-	return
-		((SplitSide(cell, 0, 1, 2, 3) & 1) << 5) |
-		((SplitSide(cell, 4, 5, 6, 7) & 1) << 4) |
-		((SplitSide(cell, 0, 3, 7, 4) & 1) << 3) |
-		((SplitSide(cell, 1, 2, 6, 5) & 1) << 2) |
-		((SplitSide(cell, 0, 1, 5, 4) & 1) << 1) |
-		((SplitSide(cell, 3, 2, 6, 7) & 1) << 0);
+	int i;
+
+	xc[0] = xc[1] = xc[2] = *vc = 0.0;
+	for (i = 0; i < cell->n; i++) {
+		xc[0] += cell->x[i][0];
+		xc[1] += cell->x[i][1];
+		xc[2] += cell->x[i][2];
+		*vc   += cell->v[i];
+	}
+	xc[0] /= cell->n;
+	xc[1] /= cell->n;
+	xc[2] /= cell->n;
+	*vc   /= cell->n;
 }
 
-static void CopyNodes(TET *tet, CELL *cell, signed char *t)
+static void CopyNodes(TET *tet, CELL *cell, int *t)
 {
 	int i;
 	
@@ -279,10 +203,35 @@
 	}
 }
 
+static void CopyNodes2(CELL *pyr, CELL *cell, int i0, int i1, int i2, int i3,
+					   double *xc, double vc)
+{
+	memcpy(pyr->x[0], cell->x[i0], 3*sizeof(double));
+	memcpy(pyr->x[1], cell->x[i1], 3*sizeof(double));
+	memcpy(pyr->x[2], cell->x[i2], 3*sizeof(double));
+	memcpy(pyr->x[3], cell->x[i3], 3*sizeof(double));
+	memcpy(pyr->x[4], xc,          3*sizeof(double));
+
+	pyr->v[0] = cell->v[i0];
+	pyr->v[1] = cell->v[i1];
+	pyr->v[2] = cell->v[i2];
+	pyr->v[3] = cell->v[i3];
+	pyr->v[4] = vc;
+	
+	pyr->order[0] = cell->order[i0];
+	pyr->order[1] = cell->order[i1];
+	pyr->order[2] = cell->order[i2];
+	pyr->order[3] = cell->order[i3];
+
+	pyr->n = 5;
+}
+
 void NS_DIM_PREFIX ExtractElement(CELL *cell, double lambda, POLY *poly, int *npoly)
 {
 	int k;
+	double xc[3], vc;
 	TET tet;
+	CELL pyr;
 
 	switch (cell->n)
 	{
@@ -311,24 +260,20 @@
 		*npoly = 3;
 		break;
 	case 8:
-		k = DecomposeHex(cell);
-		CopyNodes(&tet, cell, Hex[k]+  0);
-		ExtractTet(&tet, lambda, poly+ 0);
-		CopyNodes(&tet, cell, Hex[k]+  4);
-		ExtractTet(&tet, lambda, poly+ 1);
-		CopyNodes(&tet, cell, Hex[k]+  8);
-		ExtractTet(&tet, lambda, poly+ 2);
-		CopyNodes(&tet, cell, Hex[k]+ 12);
-		ExtractTet(&tet, lambda, poly+ 3);
-		CopyNodes(&tet, cell, Hex[k]+ 16);
-		ExtractTet(&tet, lambda, poly+ 4);
-		if (Hex[k][20] < 0)
-			*npoly = 5;
-		else {
-			CopyNodes(&tet, cell, Hex[k]+ 20);
-			ExtractTet(&tet, lambda, poly+ 5);
-			*npoly = 6;
-		}
+		CenterNode(cell, xc, &vc);
+		CopyNodes2(&pyr, cell, 0, 4, 5, 1, xc, vc);
+		ExtractElement(&pyr, lambda, poly+ 0, npoly);
+		CopyNodes2(&pyr, cell, 1, 5, 6, 2, xc, vc);
+		ExtractElement(&pyr, lambda, poly+ 2, npoly);
+		CopyNodes2(&pyr, cell, 2, 6, 7, 3, xc, vc);
+		ExtractElement(&pyr, lambda, poly+ 4, npoly);
+		CopyNodes2(&pyr, cell, 0, 3, 7, 4, xc, vc);
+		ExtractElement(&pyr, lambda, poly+ 6, npoly);
+		CopyNodes2(&pyr, cell, 0, 1, 2, 3, xc, vc);
+		ExtractElement(&pyr, lambda, poly+ 8, npoly);
+		CopyNodes2(&pyr, cell, 4, 7, 6, 5, xc, vc);
+		ExtractElement(&pyr, lambda, poly+10, npoly);
+		*npoly = 12;
 		break;
 	default:
 		assert(0);
diff -ru ug-orig/graphics/uggraph/iso.h ug-patched/graphics/uggraph/iso.h
--- ug-orig/graphics/uggraph/iso.h	2008-03-03 16:58:50.000000000 +0100
+++ ug-patched/graphics/uggraph/iso.h	2006-05-08 14:31:31.000000000 +0200
@@ -18,7 +18,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/graphics/uggraph/iso.h,v 1.7 2008/03/03 15:58:50 lampe Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -44,7 +44,7 @@
 /*																			*/
 /****************************************************************************/
 
-#define MAXPOLY 6
+#define MAXPOLY 12
 
 /****************************************************************************/
 /*																			*/
@@ -54,15 +54,14 @@
 
 typedef struct {
 	int n;
-	long long order[8];
+	int order[8];
 	double x[8][3];
 	double v[8];
 } CELL;
 
 typedef struct {
 	int n;
-	double x[5][3];
-	long c;
+	double x[4][3]; 
 } POLY;
 
 /****************************************************************************/
diff -ru ug-orig/graphics/uggraph/Makefile.am ug-patched/graphics/uggraph/Makefile.am
--- ug-orig/graphics/uggraph/Makefile.am	2005-01-18 19:20:48.000000000 +0100
+++ ug-patched/graphics/uggraph/Makefile.am	2005-01-18 19:20:49.000000000 +0100
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.3 2005/01/18 18:20:48 thimo Exp $
+# $Id: Makefile.am 7936 2005-01-18 18:20:49Z thimo $
 
 if BUILD2D
   LIB_2D = libuggraph2.la
diff -ru ug-orig/graphics/uggraph/pixel.h ug-patched/graphics/uggraph/pixel.h
--- ug-orig/graphics/uggraph/pixel.h	2004-11-02 11:35:35.000000000 +0100
+++ ug-patched/graphics/uggraph/pixel.h	2004-11-02 11:35:35.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: pixel.h,v 1.1 2004/11/02 10:35:35 thimo Exp $ */
+/* $Id: pixel.h 7889 2004-11-02 10:35:35Z thimo $ */
 
 #ifndef UG_PIXEL_H
 #define UG_PIXEL_H
diff -ru ug-orig/graphics/uggraph/placer.c ug-patched/graphics/uggraph/placer.c
--- ug-orig/graphics/uggraph/placer.c	2004-07-21 11:21:45.000000000 +0200
+++ ug-patched/graphics/uggraph/placer.c	2008-12-19 11:13:29.000000000 +0100
@@ -35,6 +35,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <math.h>
 #include <assert.h>
@@ -118,7 +119,7 @@
 
 /* RCS string */
 #ifdef INSIDE_UG
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/graphics/uggraph/placer.c,v 1.11 2004/07/21 09:21:45 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 #endif
 
 
diff -ru ug-orig/graphics/uggraph/ploteval.c ug-patched/graphics/uggraph/ploteval.c
--- ug-orig/graphics/uggraph/ploteval.c	1995-11-16 16:55:02.000000000 +0100
+++ ug-patched/graphics/uggraph/ploteval.c	2008-12-19 11:13:29.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -89,7 +90,7 @@
 static INT theElemVectorVarID;
 
 /* data for CVS */
-static char rcsid[] = "$Header: /home/cvsroot/UG/ug/graphics/uggraph/Attic/ploteval.c,v 1.4 1995/11/16 15:55:02 wieners Exp $";
+static char rcsid[] = "$Header$";
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/graphics/uggraph/plotproc.c ug-patched/graphics/uggraph/plotproc.c
--- ug-orig/graphics/uggraph/plotproc.c	2006-06-02 17:35:22.000000000 +0200
+++ ug-patched/graphics/uggraph/plotproc.c	2006-06-02 17:38:35.000000000 +0200
@@ -86,7 +86,7 @@
 static INT GradientFlag;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/graphics/uggraph/plotproc.c,v 1.22 2006/06/02 15:35:22 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/graphics/uggraph/plotproc.h ug-patched/graphics/uggraph/plotproc.h
--- ug-orig/graphics/uggraph/plotproc.h	2006-05-08 14:29:21.000000000 +0200
+++ ug-patched/graphics/uggraph/plotproc.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/graphics/uggraph/plotproc.h,v 1.4 2006/05/08 12:29:21 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/graphics/uggraph/wop.c ug-patched/graphics/uggraph/wop.c
--- ug-orig/graphics/uggraph/wop.c	2008-03-03 16:59:47.000000000 +0100
+++ ug-patched/graphics/uggraph/wop.c	2009-04-29 15:11:55.000000000 +0200
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stddef.h>
 #include <stdio.h>
@@ -116,6 +117,14 @@
 /* values for CUTMODE */
 enum {CM_BEHIND, CM_INTERSECT, CM_INFRONT};
 
+static INT ce_ELEMORD;
+#define ELEMORD_LEN 					2
+#define ELEMORD(p)						CW_READ(p,ce_ELEMORD)
+#define SETELEMORD(p,n) 				CW_WRITE(p,ce_ELEMORD,n)
+
+/* values for ELEMORD */
+enum {NOTHING_DONE, VSIDES_DONE, ALL_DONE};
+
 /* Macros for Node order */
 #define NODE_ORDER(p) 		   ((TAG(theElement) == TETRAHEDRON) ? \
 								NORDER(theElement) : (NODEORD(p)) )
@@ -124,7 +133,7 @@
 #define SETBITS(x,p,y)         (((y)<<((p)+1-(3)))|(x))
 #define CORNER_OF_SIDE0(t,s,c) (element_descriptors[t]->corner_of_side[(s)][(c)])
 
-/* Macros for ordering remote sons and collecting coarse grid (parallel only) */
+/* Macrod for ordering remote sons and collecting coarse grid (parallel only) */
 #ifdef ModelP
 #define HT_LEN                31
 #define GLEN                  (1+(3+MAX_SIDES_OF_ELEM)*MAX_SONS)
@@ -155,7 +164,7 @@
 #define CGG_SIDE(k)           (CGG_BLINK(k)->side)
 #define CGG_FVS(k)            (CGG_BLINK(k)->viewableBSide)
 #define CGG_FHS(k)            (CGG_BLINK(k)->hiddenBSide)
-#define CGG_2INT(d)           (*(DDD_GID *)d)
+#define CGG_2INT(d)           (*(INT *) d)
 #endif
 
 /* Macros for extended shell algorithm */
@@ -278,11 +287,11 @@
 } BS_DATA;
 
 typedef struct {
-	DDD_GID      gid;
+	INT          gid;
 	INT          gap;
 	INT          cnt;
 	INT          nad;
-	DDD_GID      *adjacent;
+	INT          *adjacent;
 	BS_DATA      *blink;
 } CGG_DATA;
 
@@ -292,13 +301,13 @@
 	INT          hisGap;
 	INT          cnt;
 	INT          nad;
-	DDD_GID      *adjacent;
+	INT          *adjacent;
 } GR_DATA;
 
 typedef struct {
-	DDD_GID      htab[HT_LEN];
+	INT          htab[HT_LEN];
 	GR_DATA      *GR_Data[HT_LEN];
-	DDD_GID      *table;
+	INT          *table;
 } SH_DATA;
 
 typedef struct {
@@ -432,6 +441,9 @@
 /*----------- used by DrawPictureFrame -------------------------------------*/
 static INT DoFramePicture=YES;
 
+/*----------- used by OrderElements_3D -------------------------------------*/
+static BLOCK_ID wopMGUDid;
+
 /****************************************************************************/
 /************ variables used for communication of functions *****************/
 /****************************************************************************/
@@ -800,19 +812,13 @@
 
 /*---------- working variables of 'EW_Isosurface3D' -------------------------*/
 static ElementEvalProcPtr   Isosurface3D_EvalFct;
-static DOUBLE               Isosurface3D_lambda[MAX_ISOS];
-static INT                  Isosurface3D_NoIsos;
+static DOUBLE               Isosurface3D_lambda;
 static DOUBLE               Isosurface3D_Min;
 static DOUBLE               Isosurface3D_Max;
 static INT                  Isosurface3D_DomainBackFaces;
 static DOUBLE               Isosurface3D_AmbientLight;
-static long                 Isosurface3D_color[MAX_ISOS];
+static long                 Isosurface3D_color;
 static long                 Isosurface3D_backcolor;
-static CUT                  *Isosurface3D_Cut;
-static INT                  Isosurface3D_DepthCueing;
-static DOUBLE_VECTOR        Isosurface3D_zDir;
-static DOUBLE               Isosurface3D_z1;
-static DOUBLE               Isosurface3D_z2;
 
 /*---------- working variables of 'GetNode...' routines --------------------*/
 static MULTIGRID	*GNode_MG;
@@ -892,7 +898,7 @@
 static INT do_bullet;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/graphics/uggraph/wop.c,v 1.245 2008/03/03 15:59:47 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -933,7 +939,7 @@
 D*/										
 /****************************************************************************/
 
-PLOTOBJHANDLING * NS_DIM_PREFIX CreatePlotObjHandling (char *PlotObjTypeName)
+PLOTOBJHANDLING * NS_DIM_PREFIX CreatePlotObjHandling (const char *PlotObjTypeName)
 {
 	PLOTOBJHANDLING *poh;
 	INT i;
@@ -1927,9 +1933,9 @@
 
 static ELEMENT *EW_GetFirstElement_vert_fw_up (MULTIGRID *theMG, INT fromLevel, INT toLevel)
 {
-	ELEMENT *theElement;
+        ELEMENT *theElement;
 #ifdef ModelP
-	ELEMENT *next;
+        ELEMENT *next;
 	INT i;
 #endif
 	
@@ -9054,9 +9060,9 @@
 		DO_2s(theDO) = EE2D_TEXTSIZE; DO_inc(theDO);
 		V2_COPY(MidPoint,DO_2Cp(theDO)); DO_inc_n(theDO,2);
 		#ifdef ModelP
-			sprintf(DO_2cp(theDO),"%d/%llx",
+			sprintf(DO_2cp(theDO),"%d/%x",
 				(int)ID(theElement),
-				(long long)EGID(theElement));
+				(long)EGID(theElement));
 			DO_inc_str(theDO);
 		#else
 			if (EE2D_Subdom && EE2D_ElemID)
@@ -9257,9 +9263,9 @@
 		DO_2Cp(theDO)[0]=Element_Z;
 		DO_inc(theDO);
 		#ifdef ModelP
-			sprintf(DO_2cp(theDO),"%d/%llx",
+			sprintf(DO_2cp(theDO),"%d/%x",
 				(int)ID(theElement),
-				(long long)EGID(theElement));
+				(long)EGID(theElement));
 			DO_inc_str(theDO);
 		#else
 			if (EE2D_Subdom && EE2D_ElemID)
@@ -9367,9 +9373,9 @@
 		DO_2s(theDO) = EE2D_TEXTSIZE; DO_inc(theDO);
 		V2_COPY(CVECT(MYVERTEX(theNode)),DO_2Cp(theDO)); DO_inc_n(theDO,2);
 		#ifdef ModelP
-			sprintf(DO_2cp(theDO),"%d/%llx",
+			sprintf(DO_2cp(theDO),"%d/%x",
 				(int)ID(theNode),
-				(long long)GID(theNode));
+				(long)GID(theNode));
 			DO_inc_str(theDO);
 		#else
 			sprintf(DO_2cp(theDO),"%d",(int)ID(theNode)); DO_inc_str(theDO);
@@ -9443,9 +9449,9 @@
 		DO_2s(theDO) = EE2D_TEXTSIZE; DO_inc(theDO);
 		V2_COPY(CVECT(MYVERTEX(NE_Node)),DO_2Cp(theDO)); DO_inc_n(theDO,2);
 		#ifdef ModelP
-			sprintf(DO_2cp(theDO),"%d/%llx",
+			sprintf(DO_2cp(theDO),"%d/%x",
 				(int)ID(NE_Node),
-				(long long)GID(NE_Node));
+				(long)GID(NE_Node));
 			DO_inc_str(theDO);
 		#else
 			sprintf(DO_2cp(theDO),"%d",(int)ID(NE_Node)); DO_inc_str(theDO);
@@ -13036,12 +13042,12 @@
 			DO_2s(theDO) = EE3D_TEXTSIZE; DO_inc(theDO);
 			V3_COPY(x[EE3D_PlotNode[j]],DO_2Cp(theDO)); DO_inc_n(theDO,3);
 			#ifdef ModelP
-				sprintf(DO_2cp(theDO),"%ld/%llx",
-						(long)ID(CORNER(theElement,EE3D_PlotNode[j])),
-						(long long)GID(CORNER(theElement,EE3D_PlotNode[j])));
+				sprintf(DO_2cp(theDO),"%d/%x",
+					(int)ID(CORNER(theElement,EE3D_PlotNode[j])),
+					(long)GID(CORNER(theElement,EE3D_PlotNode[j])));
 				DO_inc_str(theDO);
 			#else
-				sprintf(DO_2cp(theDO),"%ld",(long)ID(CORNER(theElement,EE3D_PlotNode[j]))); DO_inc_str(theDO);
+				sprintf(DO_2cp(theDO),"%d",(int)ID(CORNER(theElement,EE3D_PlotNode[j]))); DO_inc_str(theDO);
 			#endif
 		}
 	
@@ -15617,7 +15623,6 @@
 		if (ActualPosition == NewShellBegin) {
 			/* no regular shell, try to break up cycle */
 			for (wanted = 1; wanted <= 5; wanted++) {
-				UserWriteF("OrderSons: trying to break up a cycle, wanted=%d\n", wanted);
 				for (i = 0; i < NewShellBegin; i++) {
 					for (j=0; j<SIDES_OF_ELEM(table[i]); j++)
 					{
@@ -16182,7 +16187,7 @@
 
 #ifndef ModelP
 
-static int CompareIDs (const void *p, const void *q)
+static INT CompareIDs (const void *p, const void *q)
 {
     INT a, b;
 
@@ -16199,7 +16204,7 @@
 
 static int CompareGIDs(const void *p, const void *q)
 {
-	DDD_GID a, b;
+	INT a, b;
 
 	a = ((CGG_DATA *) p)->gid;
 	b = ((CGG_DATA *) q)->gid;
@@ -16597,10 +16602,9 @@
 
 #else
 
-static INT Gid2Index(DDD_GID gid)
+static INT Gid2Index(INT gid)
 {
-	INT l, r, m;
-	DDD_GID key;
+	INT l, r, m, key;
 
 	l = 0;
 	r = OE_nGlobalCGelems-1;
@@ -16814,7 +16818,6 @@
 		if (pos == newBegin) {
 			/* no regular shell, try to break up cycle */
 			for (wanted = 1; wanted <= 10; wanted++) {
-				UserWriteF("OrderFathers: trying to break up a cycle, wanted=%d\n", wanted);
 				for (i = 0; i < newBegin; i++) {
 					p = table[i];
 					for (j = 0; j < SIDES_OF_ELEM(p); j++) {
@@ -16872,10 +16875,10 @@
 
 static int compare_gid(const void *p, const void *q)
 {
-	DDD_GID gid1, gid2;
+	INT gid1, gid2;
 
-	gid1 = *(DDD_GID *)p;
-	gid2 = *(DDD_GID *)q;
+	gid1 = *(INT *)p;
+	gid2 = *(INT *)q;
 
 	if (gid1 < gid2)
 		return -1;
@@ -16884,7 +16887,7 @@
 	return 0;
 }
 
-static INT OrderFathersXSH (MULTIGRID *mg, DDD_GID *table)
+static INT OrderFathersXSH (MULTIGRID *mg, INT *table)
 {
 	HEAP *heap;
 	ILIST *h;
@@ -17001,7 +17004,6 @@
 		if (pos == newBegin) {
 			/* no regular shell, try to break up cycle */
 			for (wanted = 1; wanted <= 10; wanted++) {
-				UserWriteF("OrderFathers: trying to break up a cycle, wanted=%d\n", wanted);
 				for (i = 0; i < newBegin; i+=2) {
 					l = table[i];
 					for (j = 0; j < CGG_NAD(l); j++) {
@@ -17049,7 +17051,7 @@
 	}
 
 	/* sort list by gid */
-	qsort((void *)table, OE_nGlobalCGelems, 2*sizeof(DDD_GID), compare_gid);
+	qsort((void *)table, OE_nGlobalCGelems, 2*sizeof(INT), compare_gid);
 
 	return 0;
 }
@@ -17238,7 +17240,7 @@
 
 /* -------------------- a little hashing ---------------------------------- */
 
-static INT Lookup(DDD_GID *htab, DDD_GID gid)
+static INT Lookup(INT *htab, INT gid)
 {
 	INT i;
 
@@ -17248,7 +17250,7 @@
 	return i;
 }
 
-static INT Insert(DDD_GID *htab, DDD_GID gid)
+static INT Insert(INT *htab, INT gid)
 {
 	INT i;
 	
@@ -17284,11 +17286,10 @@
 static int GatherGraphs(DDD_OBJ obj, void *data)
 {
 	ELEMENT *p, *son, *nbElem, *sonList[MAX_SONS];
-	INT i, j, na, cnt; 
-	DDD_GID *d, *d1, *d2;
+	INT *d, *d1, *d2, i, j, na, cnt; 
 
 	p = (ELEMENT *)obj;
-	d = (DDD_GID *)data;
+	d = (INT *)data;
 
 	/* something to send? */
 	if (N_GLOBAL_SONS(p) == N_LOCAL_SONS(p) || N_LOCAL_SONS(p) == 0) {
@@ -17327,11 +17328,10 @@
 static int ScatterGraphs(DDD_OBJ obj, void *data)
 {
 	ELEMENT *p;
-	INT i, j, n, na;
-	DDD_GID *d, *d1, gid;
+	INT *d, *d1, i, j, n, na, gid;
 
 	p = (ELEMENT *)obj;
-	d = (DDD_GID *)data;
+	d = (INT *)data;
 	
 	/* got something? */
 	if (*d == 0) return 0;
@@ -17363,8 +17363,8 @@
 		CNT(p, i)      = *d;  d++;
 		NAD(p, i) = na = *d;  d++;
 		if (na > 0) {
-			if ((ADJACENT(p, i) = (DDD_GID *)GetTmpMem(OE_Heap, na*sizeof(DDD_GID), 
-												       OE_MarkKey)) == NULL) {
+			if ((ADJACENT(p, i) = (INT *)GetTmpMem(OE_Heap, na*sizeof(INT), 
+												   OE_MarkKey)) == NULL) {
 				OE_Error = 1;
 				return 0;
 			}
@@ -17383,7 +17383,7 @@
 	OE_Error = 0;
 	OE_MarkKey = MarkKey;
 	DDD_IFAOneway(ElementVIF, GRID_ATTR(theGrid), 
-				  IF_BACKWARD, GLEN*sizeof(DDD_GID),
+				  IF_BACKWARD, GLEN*sizeof(INT),
 				  GatherGraphs, ScatterGraphs);
 	return UG_GlobalMaxINT(OE_Error);
 }
@@ -17412,8 +17412,8 @@
 static INT OrderRemoteSons (ELEMENT *p, INT MarkKey)
 {
 	ELEMENT *sonList[MAX_SONS], *son, *nbElem, *pel[HT_LEN];
-	INT i, j, k, l, pos, lastBegin, newBegin, na, cnt, pid, wanted;
-	DDD_GID adjacent[HT_LEN][MAX_SIDES_OF_ELEM-1];
+	INT i, j, k, l, pos, lastBegin, newBegin, na, cnt, pid, wanted,
+		adjacent[HT_LEN][MAX_SIDES_OF_ELEM-1];
 
 	/* add local partial graph */
 	for (i = 0; i < HT_LEN; i++)
@@ -17441,7 +17441,7 @@
 		ADJACENT(p, k) = adjacent[k];
 	}
 
-	if ((TABLE(p) = (DDD_GID *)GetTmpMem(OE_Heap, N_GLOBAL_SONS(p)*sizeof(DDD_GID), MarkKey)) == NULL)
+	if ((TABLE(p) = (INT *)GetTmpMem(OE_Heap, N_GLOBAL_SONS(p)*sizeof(INT), MarkKey)) == NULL)
 		return 1;
 
 	/* find first shell */
@@ -17474,7 +17474,6 @@
 			if (pos == newBegin) {
 				/* no regular shell, try to break up cycle */
 				for (wanted = 1; wanted <= 5; wanted++) {
-					UserWriteF("OrderSons: trying to break up a cycle, wanted=%d\n", wanted);
 					for (i = 0; i < newBegin; i++) {
 						for (j = 0; j < NAD(p, k); j++) {
 							l = Lookup(HTAB(p), ADJACENT(p, k)[j]);
@@ -17538,11 +17537,10 @@
 static int GatherOrdering(DDD_OBJ obj, void *data) 
 {
 	ELEMENT *p;
-	INT i, k, pid;
-	DDD_GID *d, gid;
+	INT *d, i, k, pid, gid;
 
 	p = (ELEMENT *)obj;
-	d = (DDD_GID *)data;
+	d = (INT *)data;
 
 	/* something to send? */
 	if (SH_LINK(p) == NULL) return 0;
@@ -17563,11 +17561,10 @@
 static int ScatterOrdering(DDD_OBJ obj, void *data) 
 {
 	ELEMENT *p, *son, *sonList[MAX_SONS];
-	INT pid[HT_LEN], i, k;
-	DDD_GID *d, htab[HT_LEN], gid;
+	INT *d, htab[HT_LEN], pid[HT_LEN], gid, i, k;
 
 	p = (ELEMENT *)obj;
-	d = (DDD_GID *)data;
+	d = (INT *)data;
 
 	/* got something? */
 	if (N_LOCAL_SONS(p) == N_GLOBAL_SONS(p)) return 0;
@@ -17598,7 +17595,7 @@
 static void DistributeOrdering (GRID *theGrid)
 {
 	DDD_IFAOneway(ElementVIF, GRID_ATTR(theGrid), 
-				  IF_FORWARD, 2*MAX_SONS*sizeof(DDD_GID),
+				  IF_FORWARD, 2*MAX_SONS*sizeof(INT),
 				  GatherOrdering, ScatterOrdering);
 }
 
@@ -17715,7 +17712,7 @@
 
 static int cmp_gid(const void *p, const void *q) 
 {
-    DDD_GID gid1, gid2;
+    INT gid1, gid2;
     
 	gid1 = EGID(*((ELEMENT **)p));
     gid2 = EGID(*((ELEMENT **)q));
@@ -17727,10 +17724,9 @@
 	return 0;
 }
 
-static INT NumberCoarseGrid(DDD_GID *table, MULTIGRID *mg)
+static INT NumberCoarseGrid(INT *table, MULTIGRID *mg)
 {
-	INT i, j, err;
-	DDD_GID me;
+	INT i, j, me, err;
 	ELEMENT **mine, *p;
 	HEAP *heap;
 	INT MarkKey;
@@ -17888,7 +17884,7 @@
 						CGG_NAD(k) = na = CGG_2INT(d);  d++;
 						if (na > 0) {
 							if ((CGG_ADJACENT(k) = 
-								(DDD_GID *)GetTmpMem(heap, na*sizeof(DDD_GID), MarkKeyMaster)) == NULL){
+								(INT *)GetTmpMem(heap, na*sizeof(INT), MarkKeyMaster)) == NULL){
 								error = 1;
 								UserWrite("CollectCoarseGrid(): error in stage 1\n");
 								break;
@@ -18145,7 +18141,7 @@
 	INT MarkKeyMaster;
 	ELEMENT *p;
 	INT n;
-	DDD_GID *table;
+	INT *table;
 	#else
 	ELEMENT **table;
 	#endif
@@ -18163,7 +18159,7 @@
 	OE_nGlobalCGelems = n = UG_GlobalSumINT(n);
 
 	/* allocate memory for ordering list and coarse grid graph */
-	table  = (DDD_GID *)GetTmpMem(heap, 2*n*sizeof(DDD_GID), MarkKey);
+	table  = (INT *)GetTmpMem(heap, 2*n*sizeof(INT), MarkKey);
 	err = (table == NULL);
 	err = UG_GlobalMaxINT(err);
 	if (err) {
@@ -18237,7 +18233,7 @@
 	}
 	Broadcast(&err, sizeof(err));
 	if (err == 0) {
-		Broadcast(table, 2*n*sizeof(DDD_GID));
+		Broadcast(table, 2*n*sizeof(INT));
 		NumberCoarseGrid(table, mg);
 		DistributePlotIDs(GRID_ON_LEVEL(mg,0));
 	}
@@ -18269,9 +18265,29 @@
 */
 /****************************************************************************/
 
+static void SaveSettings (const VIEWEDOBJ *vo, WOP_MG_DATA *data)
+{
+	data->init = 1;
+	
+	V3_COPY(VO_VP(vo),data->vpt);
+	V3_COPY(VO_VT(vo),data->tgt);
+	V3_COPY(VO_PMP(vo),data->pmp);
+}
+
+static INT SettingsEqual (const VIEWEDOBJ *vo, const WOP_MG_DATA *data)
+{
+	if (V3_ISEQUAL(VO_VP(vo),data->vpt))
+		if (V3_ISEQUAL(VO_VT(vo),data->tgt))
+			if (V3_ISEQUAL(VO_PMP(vo),data->pmp))
+				return (YES);
+	return (NO);
+}
+
 static INT OrderElements_3D (MULTIGRID *mg, VIEWEDOBJ *vo, INT bullet)
 {
-	INT i;
+	WOP_MG_DATA *myMGdata;
+	MEM offset;
+	INT ord, i;
     #ifdef ModelP
 	HEAP *heap;
 	GRID *grid;
@@ -18280,6 +18296,35 @@
 	INT MarkKey;
     #endif
 
+/* Forget about this; it simply doesn't work -- at all */
+/*  -ml                                                */
+#if 0
+	/* check if multigrid is already ordered */
+	offset   = OFFSET_IN_MGUD(wopMGUDid);
+	myMGdata = (WOP_MG_DATA*) GEN_MGUD_ADR(mg, offset);
+	
+	if (myMGdata == NULL)
+		return 1;
+
+	if (myMGdata->init == 0)
+		/* not yet initialized */
+		SaveSettings(vo, myMGdata);
+	else if (!OE_force_ordering)
+	{
+		if (SettingsEqual(vo, myMGdata)) {
+			#ifdef ModelP
+			ord = UG_GlobalMinINT(ELEMORD(mg));
+			#else
+			ord = (ELEMORD(mg));
+			#endif
+			if (ord == ALL_DONE || bullet && ord == VSIDES_DONE)
+				return 0;
+		}
+	}
+	
+	OE_force_ordering = FALSE;
+#endif
+	
 	/* inits */
 	OE_ViewedObj = vo;
 		
@@ -18288,7 +18333,10 @@
 		CalcViewableSidesOnGrid(GRID_ON_LEVEL(mg,i));
 
 	/* no more to do for bullet plotter */
-	if (bullet) return 0;
+	if (bullet) {
+		/*SETELEMORD(mg, VSIDES_DONE);*/
+		return 0;
+	}
 
 	/* allocate memory for and compute OS_Data (parallel case only) */
 	#ifdef ModelP
@@ -18348,6 +18396,8 @@
 	}
 	#endif
 
+	/*SETELEMORD(mg, ALL_DONE);*/
+
 	return (0);
 }
 
@@ -20409,28 +20459,18 @@
  *   
  *---------------------------------------------------------------------------*/
 
-static INT MarkElementsIsosurfaceCuts(MULTIGRID *theMG,
-									  INT fromLevel, INT toLevel)
+static void MarkElementsIsosurfaceCuts(MULTIGRID *theMG,
+									   INT fromLevel, INT toLevel)
 {
 	ELEMENT *theElement;
 	NODE *theNode;
-	INT i, j, k, first;
+	INT i, j, first;
 	DOUBLE value, *CornersOfElem[MAX_CORNERS_OF_ELEM], LocalCoord[DIM];
 	
 	fromLevel = MAX(fromLevel,0);
 	toLevel = MIN(toLevel,CURRENTLEVEL(theMG));
 	
-	/* initialize node & element flags to zero */
-	for (i=fromLevel; i<=toLevel; i++)
-		for (theNode=FIRSTNODE(GRID_ON_LEVEL(theMG, i));
-			 theNode!=NULL;theNode=SUCCN(theNode))
-			EXTRA(theNode)=0;
-	for (i=fromLevel; i<=toLevel; i++)
-		for (theElement=FIRSTELEMENT(GRID_ON_LEVEL(theMG,i));
-			 theElement!=NULL; theElement=SUCCE(theElement))
-			EXTRA(theElement)=0;
-	
-	/* for each lambda flag surface element nodes 0/1 if value </>= lambda */
+	/* mark surface element nodes 0/1 if value </>= iso value */
 	for (i=fromLevel; i<=toLevel; i++)
 		for (theNode=FIRSTNODE(GRID_ON_LEVEL(theMG, i));
 			 theNode!=NULL;theNode=SUCCN(theNode))
@@ -20443,37 +20483,33 @@
 				for (j = 0; j < CORNERS_OF_ELEM(theElement); j++)
 					CornersOfElem[j] = CVECT(MYVERTEX(CORNER(theElement, j)));
 				for (j = 0; j < CORNERS_OF_ELEM(theElement); j++) {
-					theNode=CORNER(theElement, j);
-					if (USED(theNode)) continue;
-					SETUSED(theNode, 1);
+					if (USED(CORNER(theElement, j))) continue;
+					SETUSED(CORNER(theElement, j), 1);
 					LocalCornerCoordinates(DIM,TAG(theElement),j,LocalCoord);
 					value = (*Isosurface3D_EvalFct)
 						(theElement,(const DOUBLE**)CornersOfElem,LocalCoord);
-					for (k = 0; k < Isosurface3D_NoIsos; k++)
-						if (value >= Isosurface3D_lambda[k])
-							EXTRA(theNode) |= 1<<k;
+					if (value < Isosurface3D_lambda)
+						SETTHEFLAG(CORNER(theElement, j), 0);
+					else
+						SETTHEFLAG(CORNER(theElement, j), 1);
 				}
 			}
 		}
-		
+	
 	for (i=fromLevel; i<=toLevel; i++)
 		for (theElement=FIRSTELEMENT(GRID_ON_LEVEL(theMG,i));
 			 theElement!=NULL; theElement=SUCCE(theElement))
 		{
 			SETUSED(theElement, 0);
 			if (!IS_REFINED(theElement) || LEVEL(theElement) == toLevel) {
-				/* for each lambda flag surface elements that are cut */
-				for (k = 0; k < Isosurface3D_NoIsos; k++) {
-					first = EXTRA(CORNER(theElement, 0)) & (1<<k);
-					for (j = 1; j < CORNERS_OF_ELEM(theElement); j++)
-						if (first != (EXTRA(CORNER(theElement, j)) & (1<<k))) {
-							EXTRA(theElement) |= 1<<k;
-							break;
-						}
-				}
-				if (EXTRA(theElement))
-					SETUSED(theElement, 1);
-				/* mark surface elements with domain boundary back sides iff */
+				/* mark surface elements that have not all nodes marked equally */
+				first = THEFLAG(CORNER(theElement, 0));
+				for (j = 1; j < CORNERS_OF_ELEM(theElement); j++)
+					if (first != THEFLAG(CORNER(theElement, j))) {
+						SETUSED(theElement, 1);
+						break;
+					}
+				/* mark domain boundary back sides iff */
 				if (Isosurface3D_DomainBackFaces && OBJT(theElement)==BEOBJ)
 					for (j=0; j<SIDES_OF_ELEM(theElement); j++)
 						if (!INNER_SIDE(theElement,j) && !VIEWABLE(theElement,j)) {
@@ -20482,7 +20518,6 @@
 						}
 			}
 		}
-	return 0;
 }
 
 static INT EW_PreProcess_Isosurface3D(PICTURE *thePicture, WORK *theWork)
@@ -20490,54 +20525,33 @@
 	struct IsosurfacePlotobject3D *theIpo;
 	OUTPUTDEVICE *theOD;
 	MULTIGRID *theMG;
-	DOUBLE len;
-	INT k;
-
+	
 	theIpo = &(PIC_PO(thePicture)->theIpo);
 	theOD  = PIC_OUTPUTDEV(thePicture);
 	theMG  = PO_MG(PIC_PO(thePicture));
 
 	Isosurface3D_EvalFct         = theIpo->EvalFct->EvalProc;
-	memcpy(Isosurface3D_lambda, theIpo->lambda, MAX_ISOS*sizeof(DOUBLE));
-	Isosurface3D_NoIsos          = theIpo->NoIsos;
+	Isosurface3D_lambda          = theIpo->lambda;
 	Isosurface3D_Min             = theIpo->min;
 	Isosurface3D_Max             = theIpo->max;
 	Isosurface3D_DomainBackFaces = theIpo->DomainBackFaces;
 	Isosurface3D_AmbientLight    = theIpo->AmbientLight;
-	Isosurface3D_DepthCueing     = theIpo->DepthCueing;
-
+ 
 	/* colors */
-	for(k = 0; k < Isosurface3D_NoIsos; k++){
-		Isosurface3D_color[k]    = theOD->spectrumStart + 
-			(Isosurface3D_lambda[k]-Isosurface3D_Min)/(Isosurface3D_Max-Isosurface3D_Min)
-			*(theOD->spectrumEnd-theOD->spectrumStart);
-		Isosurface3D_color[k]    = MIN(Isosurface3D_color[k], theOD->spectrumEnd);
-		Isosurface3D_color[k]    = MAX(Isosurface3D_color[k], theOD->spectrumStart);
-	}
+	Isosurface3D_color           = theOD->spectrumStart
+		+(Isosurface3D_lambda-Isosurface3D_Min)/(Isosurface3D_Max-Isosurface3D_Min)
+		*(theOD->spectrumEnd-theOD->spectrumStart);
+	Isosurface3D_color           = MIN(Isosurface3D_color,theOD->spectrumEnd);
+	Isosurface3D_color           = MAX(Isosurface3D_color,theOD->spectrumStart);
 	Isosurface3D_backcolor       = theOD->gray;
 
-	/* remember cut */
-	Isosurface3D_Cut             = VO_CUT(PIC_VO(thePicture));
-
-	/* set some constants for depth cueing iff */
-	if (Isosurface3D_DepthCueing == YES) {
-		V3_SUBTRACT(PO_MIDPOINT(PIC_PO(thePicture)), VO_VP(PIC_VO(thePicture)),
-					Isosurface3D_zDir);
-		V3_SCALAR_PRODUCT(Isosurface3D_zDir, Isosurface3D_zDir, len);
-		len = sqrt(len);
-		V3_SCALE(1.0/len, Isosurface3D_zDir);
-		Isosurface3D_z1 = len - PO_RADIUS(PIC_PO(thePicture));
-		Isosurface3D_z2 = len + PO_RADIUS(PIC_PO(thePicture));
-	}
-
 	/* prepare evaluation routine */
 	if (theIpo->EvalFct->PreprocessProc != NULL)
-	    if ((*theIpo->EvalFct->PreprocessProc)(PO_NAME(theIpo),theMG))
+		if ((*theIpo->EvalFct->PreprocessProc)(PO_NAME(theIpo),theMG))
 			return 1;
 	
 	/* mark surface elements the isosurface cuts */
-	if (MarkElementsIsosurfaceCuts(theMG, 0, CURRENTLEVEL(theMG)))
-		return 1;
+	MarkElementsIsosurfaceCuts(theMG, 0, CURRENTLEVEL(theMG));
 	
 	return 0;
 }
@@ -20567,7 +20581,7 @@
 	return CompareQuadrilaterals(Triangle, ScreenPoint, Corners);
 }
 
-static void SortPolygons(POLY *poly, int npoly)
+static void SortPolygons(POLY *poly, INT npoly)
 {
 	/* This is a special version from ug/low/misc.c!! */
 	SelectionSort(poly, npoly, sizeof(POLY), ComparePolygons);
@@ -20575,133 +20589,42 @@
 
 static DOUBLE LightPolygon(POLY *poly)
 {
-	int i;
-	DOUBLE_VECTOR xcs, lightDir, edge1, edge2, normal, cmo;
-	DOUBLE cosa, scale1, scale2, fidc, lightz;
+	INT i;
+	DOUBLE xcs[3], lightDir[3], edge1[3], edge2[3], normal[3];
+	DOUBLE cosa, scale1, scale2;
 
-	/* from light source to center of polygon */
-	V3_CLEAR(xcs);
-	for (i = 0; i < poly->n; i++)
-	    V3_ADD(poly->x[i], xcs, xcs);
-	V3_SCALE(1.0/poly->n, xcs);
-	V3_SUBTRACT(xcs, VO_VP(OE_ViewedObj), cmo);
-
-	/* direction of light */
-	if (OBS_Perspective == YES)
-	    V3_COPY(cmo, lightDir)
+	/* light direction */
+	if (OBS_Perspective == YES) {
+		V3_CLEAR(xcs);
+		for (i = 0; i < poly->n; i++)
+			V3_ADD(poly->x[i], xcs, xcs);
+		V3_SCALE(1.0/poly->n, xcs);
+		V3_SUBTRACT(VO_VP(OE_ViewedObj), xcs, lightDir);
+	}
 	else
-	    V3_SUBTRACT(PO_MIDPOINT(VO_PO(OE_ViewedObj)), VO_VP(OE_ViewedObj), lightDir);
+		V3_SUBTRACT(VO_VP(OE_ViewedObj), VO_VT(OE_ViewedObj), lightDir);
 
 	/* polygon normal */
 	V3_SUBTRACT(poly->x[1], poly->x[0], edge1);
 	V3_SUBTRACT(poly->x[2], poly->x[0], edge2);
 	V3_VECTOR_PRODUCT(edge1, edge2, normal);
-
+	
 	/* face intensity */
 	V3_SCALAR_PRODUCT(lightDir, normal, cosa);
 	V3_SCALAR_PRODUCT(normal, normal, scale1);
 	V3_SCALAR_PRODUCT(lightDir, lightDir, scale2);
 	cosa = ABS(cosa)/sqrt(scale1*scale2);
-
-	/* factor for intensity depth-cueing */
-	if (Isosurface3D_DepthCueing == YES) {
-		V3_SCALAR_PRODUCT(cmo, Isosurface3D_zDir, lightz);
-		fidc = 1.0 - 0.85*(lightz - Isosurface3D_z1)/(Isosurface3D_z2 - Isosurface3D_z1);
-		fidc = MIN(fidc, 1.0);
-		fidc = MAX(fidc, 0.0);
-	}
-	else
-		fidc = 1.0;
-
-	return fidc*(Isosurface3D_AmbientLight + (1.0-Isosurface3D_AmbientLight)*cosa);
-}
-
-static int BehindCut(DOUBLE *x)
-{
-	DOUBLE_VECTOR xmp;
-	DOUBLE t;
-	
-	V3_SUBTRACT(x, CUT_PP(Isosurface3D_Cut), xmp);
-	V3_SCALAR_PRODUCT(xmp, CUT_PN(Isosurface3D_Cut), t);
-	if (t <= 0.0)
-		return 1;
-	else
-		return 0;
-}
-
-static int IntersectWithCut(DOUBLE *a, DOUBLE *b, DOUBLE *s)
-{
-	DOUBLE_VECTOR bma, pma;
-	DOUBLE lambda, t1, t2;
-	
-	V3_SUBTRACT(b, a, bma);
-	V3_SUBTRACT(CUT_PP(Isosurface3D_Cut), a, pma);
-	V3_SCALAR_PRODUCT(pma, CUT_PN(Isosurface3D_Cut), t1);
-	V3_SCALAR_PRODUCT(bma, CUT_PN(Isosurface3D_Cut), t2);
-	lambda = t1/t2;
-	V3_SCALE(lambda, bma);
-	V3_ADD(a, bma, s);
-	if (ABS(lambda) <= SMALL_D)
-		return -1;
-	if (ABS(lambda-1.0) <= SMALL_D)
-	    return 1;
-	return 0;
-}
-
-static void CutPolygon(POLY *poly)
-{
-    int i, j, n, bc[4], c;
-	DOUBLE_VECTOR x[5], s;
-	
-	for (i = n = 0; i < poly->n; i++)
-	    n += (bc[i] = BehindCut(poly->x[i]));
-
-	if (n == poly->n)
-		return;
-	if (n == 0) {
-		poly->n = 0;
-		return;
-	}
-
-	/* Sutherland-Hodgman Polygon Clipper */
-	for (i = n = 0; i < poly->n; i++) {
-		j = (i+1) % poly->n;
-		c = bc[i] + (bc[j] << 1);
-		switch(c)
-		{
-		case 0:
-			/* NOP */
-			break;
-		case 1:
-		    if (IntersectWithCut(poly->x[i], poly->x[j], s) >= 0) {
-				memcpy(x[n], s, sizeof(s));
-				n++;
-			}
-			break;
-		case 2:
-		    if (IntersectWithCut(poly->x[i], poly->x[j], s) <= 0) {
-			    memcpy(x[n], s, sizeof(s));
-			    n++;
-			}
-			memcpy(x[n], poly->x[j], sizeof(DOUBLE_VECTOR));
-			n++;
-			break;
-		case 3:
-			memcpy(x[n], poly->x[j], sizeof(DOUBLE_VECTOR));
-			n++;
-		}
-	}
-	memcpy(poly->x, x, sizeof(x));
-	poly->n = (n >= 3)? n:0;
+	return Isosurface3D_AmbientLight + (1.0-Isosurface3D_AmbientLight)*cosa;
 }
 
 static INT EW_Isosurface3D (ELEMENT *theElement, DRAWINGOBJ *theDO)
 {
 	CELL cell;
-	POLY poly[MAX_ISOS*MAXPOLY];
-	int i, j, k, n, npoly;
+	POLY poly[MAXPOLY];
+	INT i, j;
+	int npoly;
 	DOUBLE *x[MAX_CORNERS_OF_ELEM], lc[DIM], intensity;
-	
+
 	cell.n = CORNERS_OF_ELEM(theElement);
 
 	for (i = 0; i < CORNERS_OF_ELEM(theElement); i++)
@@ -20742,31 +20665,23 @@
 			}
 
 	/* extract & plot isosurface polygons */
-	npoly = 0;
-	for (k = 0; k < Isosurface3D_NoIsos; k++)
-		if (EXTRA(theElement) & (1<<k)) {
-			ExtractElement(&cell, Isosurface3D_lambda[k], poly+npoly, &n);
-			for (i = 0; i < n; i++)
-				poly[npoly + i].c = Isosurface3D_color[k];
-			npoly += n;
-		}
-	if (!do_bullet && npoly > 1)
-		SortPolygons(poly, npoly);
-	for (i = 0; i < npoly; i++) {
-		if (CUT_STATUS(Isosurface3D_Cut) == ACTIVE && poly[i].n > 0)
-			CutPolygon(&poly[i]);
-		if (poly[i].n == 0) continue;
-		if (Isosurface3D_AmbientLight < 1.0)
-			intensity = LightPolygon(&poly[i]);
-		else
-			intensity = 1.0;
-		DO_2c(theDO) = DO_SHADED_POLYGON; DO_inc(theDO);
-		DO_2c(theDO) = poly[i].n; DO_inc(theDO);
-		DO_2l(theDO) = poly[i].c; DO_inc(theDO); 		
-		DO_2C(theDO) = intensity; DO_inc(theDO);
-		for (j = 0; j < poly[i].n; j++) {
-			V3_COPY(poly[i].x[j], DO_2Cp(theDO));
-			DO_inc_n(theDO,3);
+	ExtractElement(&cell, Isosurface3D_lambda, poly, &npoly);
+	if (npoly > 0) {
+		if (!do_bullet && npoly > 1) SortPolygons(poly, npoly);
+		for (i = 0; i < npoly; i++) {
+			if (poly[i].n == 0) continue;
+			if (Isosurface3D_AmbientLight < 1.0)
+				intensity = LightPolygon(&poly[i]);
+			else
+				intensity = 1.0;
+			DO_2c(theDO) = DO_SHADED_POLYGON; DO_inc(theDO);
+			DO_2c(theDO) = poly[i].n; DO_inc(theDO);
+			DO_2l(theDO) = Isosurface3D_color; DO_inc(theDO);
+			DO_2C(theDO) = intensity; DO_inc(theDO);
+			for (j = 0; j < poly[i].n; j++) {
+				V3_COPY(poly[i].x[j], DO_2Cp(theDO));
+				DO_inc_n(theDO,3);
+			}
 		}
 	}
 	DO_2c(theDO) = DO_NO_INST;
@@ -20777,11 +20692,11 @@
 	return 0;
 }
 
-static void MarkElementsOnSurface(MULTIGRID *theMG, INT fromLevel, INT toLevel)
+static void MarkElementsOnSurface(MULTIGRID *theMG,INT fromLevel, INT toLevel)
 {
+	INT i;
 	ELEMENT *theElement;
 	NODE *theNode;
-	INT i;
 
 	fromLevel = MAX(fromLevel,0);
 	toLevel = MIN(toLevel,CURRENTLEVEL(theMG));
@@ -20828,7 +20743,7 @@
 
 static INT EW_Isosurface3D_FR(ELEMENT *theElement, DRAWINGOBJ *theDO)
 {
-	int i;
+	INT i;
 	DOUBLE *CornersOfElem[MAX_CORNERS_OF_ELEM], LocalCoord[DIM], value;
 
 	for (i = 0; i < CORNERS_OF_ELEM(theElement); i++)
@@ -20852,9 +20767,7 @@
 static INT EW_PostProcess_Isosurface3D_FR(PICTURE *thePicture, WORK *theWork)
 {
 	struct FindRange_Work *FR_Work = W_FINDRANGE_WORK(theWork);
-	DOUBLE delta;
-	int i, n;
-
+	
 #ifdef ModelP
 	GEN_FR_min = UG_GlobalMinDOUBLE(GEN_FR_min);
 	GEN_FR_max = UG_GlobalMaxDOUBLE(GEN_FR_max);
@@ -20878,10 +20791,6 @@
 	if (GEN_FR_put == YES) {
 		PIC_PO(thePicture)->theIpo.min = GEN_FR_min;
 		PIC_PO(thePicture)->theIpo.max = GEN_FR_max;
-		n = PIC_PO(thePicture)->theIpo.NoIsos;
-		delta = (GEN_FR_max - GEN_FR_min)/(n + 1);
-		for (i = 0; i < n; i++)
-			PIC_PO(thePicture)->theIpo.lambda[i] = GEN_FR_min + (i+1)*delta;
 	}
 
 	return 0;
@@ -21244,7 +21153,6 @@
 }   
 
 
-
 /****************************************************************************/
 /*
    PWorkGEN_Quit - test for end of PWorkXX_Evaluate / PWorkXX_Execute loop
@@ -21404,16 +21312,16 @@
 			{
 				/* prepare next element */
 				(*WOP_EW_EvaluateProc)(WOP_Element, WOP_DrawingObject);
-				WOP_CurrDoLen = (INT)(WOP_DObjPnt) - (INT)(WOP_DrawingObject);
+				WOP_CurrDoLen = (long int)(WOP_DObjPnt) - (long int)(WOP_DrawingObject);
 				WOP_Element = (*WOP_EW_GetNextElementProc)(WOP_Element);
 			}
-		} while (DO_SLOT_SIZE*sizeof(DRAWINGOBJ) - ((INT)(p) - (INT)(p1)) 
+		} while (DO_SLOT_SIZE*sizeof(DRAWINGOBJ) - ((long int)(p) - (long int)(p1)) 
 				 > WOP_CurrDoLen);
 
 		/* set endmarker & length */
 		DO_2c(p) = DO_NO_INST;
 		DO_inc(p1);
-		DO_2INT(p1) = (INT)p-(INT)p1+2*sizeof(DRAWINGOBJ);
+		DO_2INT(p1) = (long int)p-(long int)p1+2*sizeof(DRAWINGOBJ);
 
 		/* book slot */
 		WOP_Count[i]++;
@@ -21597,10 +21505,10 @@
 					(*WOP_EW_EvaluateProc)(WOP_Element, WOP_DrawingObject);
 					WOP_nextID = ID(WOP_Element);
 					consecutive = GElem_Consecutive;
-					WOP_CurrDoLen = (INT)(WOP_DObjPnt) - (INT)(WOP_DrawingObject);
+					WOP_CurrDoLen = (long int)(WOP_DObjPnt) - (long int)(WOP_DrawingObject);
 					WOP_Element = (*WOP_EW_GetNextElementProc)(WOP_Element);
 				}
-			} while (DO_SLOT_SIZE*sizeof(DRAWINGOBJ) - ((INT)(p) - (INT)(p1)) 
+			} while (DO_SLOT_SIZE*sizeof(DRAWINGOBJ) - ((long int)(p) - (long int)(p1)) 
 					 > WOP_CurrDoLen && consecutive);
 
 		} while ( p == p2+2);
@@ -21610,7 +21518,7 @@
 		DO_2c(p) = DO_NO_INST;
 		DO_2INT(p2) = WOP_lastID;
 		DO_inc(p2);
-		DO_2INT(p2) = (INT)p-(INT)p1+sizeof(DRAWINGOBJ);;
+		DO_2INT(p2) = (long int)p-(long int)p1+sizeof(DRAWINGOBJ);;
 
 		/* book slot */
 		WOP_Count[i]++;
@@ -21659,14 +21567,14 @@
 			}
 			else {
 				(*WOP_NW_EvaluateProc)(WOP_Node, WOP_DrawingObject);
-				WOP_CurrDoLen = (INT)(WOP_DObjPnt) - (INT)(WOP_DrawingObject);
+				WOP_CurrDoLen = (long int)(WOP_DObjPnt) - (long int)(WOP_DrawingObject);
 				WOP_Node = (*WOP_NW_GetNextNodeProc)(WOP_Node);
 			}
-		} while (DO_SLOT_SIZE*sizeof(DRAWINGOBJ) - ((INT)(p) - (INT)(p1)) 
+		} while (DO_SLOT_SIZE*sizeof(DRAWINGOBJ) - ((long int)(p) - (long int)(p1)) 
 				 > WOP_CurrDoLen);
 		DO_2c(p) = DO_NO_INST;
 		DO_inc(p1);
-		DO_2INT(p1) = (INT)p-(INT)p1+2*sizeof(DRAWINGOBJ);
+		DO_2INT(p1) = (long int)p-(long int)p1+2*sizeof(DRAWINGOBJ);
 		WOP_Count[i]++;
 		WOP_Front[i] = (WOP_Front[i] + 1) % DO_BUFFER_SLOTS;
 	}
@@ -21714,14 +21622,14 @@
 			}
 			else {
 				(*WOP_VW_EvaluateProc)(WOP_Vector, WOP_DrawingObject);
-				WOP_CurrDoLen = (INT)(WOP_DObjPnt) - (INT)(WOP_DrawingObject);
+				WOP_CurrDoLen = (long int)(WOP_DObjPnt) - (long int)(WOP_DrawingObject);
 				WOP_Vector = (*WOP_VW_GetNextVectorProc)(WOP_Vector);
 			}
-		} while (DO_SLOT_SIZE*sizeof(DRAWINGOBJ) - ((INT)(p) - (INT)(p1)) 
+		} while (DO_SLOT_SIZE*sizeof(DRAWINGOBJ) - ((long int)(p) - (long int)(p1)) 
 				 > WOP_CurrDoLen);
 		DO_2c(p) = DO_NO_INST;
 		DO_inc(p1);
-		DO_2INT(p1) = (INT)p-(INT)p1+2*sizeof(DRAWINGOBJ);
+		DO_2INT(p1) = (long int)p-(long int)p1+2*sizeof(DRAWINGOBJ);
 		WOP_Count[i]++;
 		WOP_Front[i] = (WOP_Front[i] + 1) % DO_BUFFER_SLOTS;
 	}
@@ -21729,43 +21637,6 @@
 
 /****************************************************************************/
 /*
-   PWorkET_Init - Initialisation for PWorkET_Evaluate and PWorkET_Execute
-
-   SYNOPSIS:
-   void PWorkET_Init(void)
-
-   PARAMETERS:
-   none
-
-   RETURN VALUE:
-   void
-*/
-/****************************************************************************/
-static void PWorkET_Init(void)
-{
-	int i;
-
-	for (i=0; i<WopDownChannels; i++) {
-		WOP_Sending[i]   = 0;
-		WOP_Receiving[i] = 0; 
-		WOP_NbTokens[i]  = 0;
-		WOP_Count[i]     = 0;
-		WOP_Front[i]     = 0;
-		WOP_Rear[i]      = 0;
-		WOP_More[i]      = (WOP_DownChannel[i] != NULL);
-	}
-	WOP_Sending[WopDownChannels] = 0;
-	WOP_Count  [WopDownChannels] = 0;
-	WOP_Front  [WopDownChannels] = 0;
-	WOP_Rear   [WopDownChannels] = 0;
-	WOP_More   [WopDownChannels] = 1;
-
-	WOP_CurrDoLen = 0;
-
-}   
-
-/****************************************************************************/
-/*
    PWorkET_Evaluate - evaluates extern wise
 
    SYNOPSIS:
@@ -21807,13 +21678,13 @@
 			}
 			else {
 				(*WOP_EXT_EvaluateProc)(WOP_DrawingObject, &WOP_EXT_End);
-				WOP_CurrDoLen = (INT)(WOP_DObjPnt) - (INT)(WOP_DrawingObject);
+				WOP_CurrDoLen = (long int)(WOP_DObjPnt) - (long int)(WOP_DrawingObject);
 			}
-		} while (DO_SLOT_SIZE*sizeof(DRAWINGOBJ) - ((INT)(p) - (INT)(p1)) 
+		} while (DO_SLOT_SIZE*sizeof(DRAWINGOBJ) - ((long int)(p) - (long int)(p1)) 
 				 > WOP_CurrDoLen);
 		DO_2c(p) = DO_NO_INST;
 		DO_inc(p1);
-		DO_2INT(p1) = (INT)p-(INT)p1+2*sizeof(DRAWINGOBJ);
+		DO_2INT(p1) = (long int)p-(long int)p1+2*sizeof(DRAWINGOBJ);
 		WOP_Count[i]++;
 		WOP_Front[i] = (WOP_Front[i] + 1) % DO_BUFFER_SLOTS;
 	}
@@ -21845,14 +21716,14 @@
 D*/
 /****************************************************************************/
 
-static INT WOP_Init(INT WOP_WorkMode, INT work_type, INT cycle, INT bullet)
+static INT WOP_Init(INT WOP_WorkMode, INT work_type, INT bullet)
 {
 	switch (WOP_WorkMode)
 	{
 		case ELEMENTWISE:
 		
 			/* order elements if */
-			if (WOP_ViewDim == TYPE_3D && cycle == 0)
+			if (WOP_ViewDim == TYPE_3D)
 			{
 				#ifdef __TWODIM__
 					if (OrderElements_2D(WOP_MG,WOP_ViewedObj /*,bullet */))
@@ -22247,17 +22118,16 @@
 		return 1;
 	}
 
-	PWorkET_Init();
+	PWorkGEN_Init();
 
 	WOP_EXT_End = !CONTEXT(me);
-
-
+				
 	for (;;) {
 		if (PWorkGEN_Quit()) break;
 		PWorkGEN_Execute();
 		PWorkET_Evaluate();
 	}
-
+  
 	ReleaseTmpMem(heap,MarkKey);
 	return (0);
 
@@ -22387,7 +22257,7 @@
 		WOP_WorkMode = WP_WORKMODE(WOP_WorkProcs);
 
 		/* initialize */
-		if (WOP_Init(WOP_WorkMode, W_ID(theWork), i, NO)!=0) return 1;
+		if (WOP_Init(WOP_WorkMode, W_ID(theWork), NO)!=0) return 1;
 
 		/* work */
 		if (WOP_GEN_PreProcessProc!=NULL)
@@ -22445,7 +22315,7 @@
 
 static INT BulletDrawWork(PICTURE *thePicture, WORK *theWork, DOUBLE zOffsetFactor)
 {
-	INT i, j, error;
+	INT i, error;
 
 	if (thePicture==NULL || theWork==NULL)	return (1);
 	WOP_Picture = thePicture;
@@ -22536,7 +22406,7 @@
 		WOP_WorkMode = WP_WORKMODE(WOP_WorkProcs);
 
 		/* initialize */
-		if (WOP_Init(WOP_WorkMode, DRAW_WORK, i, YES)!=0) return 1;
+		if (WOP_Init(WOP_WorkMode, DRAW_WORK, YES)!=0) return 1;
 
 		/* work */
 		if (WOP_GEN_PreProcessProc!=NULL)
@@ -22547,21 +22417,27 @@
 		{
 		case ELEMENTWISE:
 #ifdef ModelP
-			if (CONTEXT(me))
+			WOP_Element = (CONTEXT(me) ?
+			  (*WOP_EW_GetFirstElementProc)(WOP_MG, 0, WOP_MG->currentLevel) : NULL);
+#else
+			WOP_Element = (*WOP_EW_GetFirstElementProc)(WOP_MG,0,
+														WOP_MG->currentLevel);
 #endif
+			for (; WOP_Element != NULL; 
+				 WOP_Element=(*WOP_EW_GetNextElementProc)(WOP_Element)) 
 			{
-				for (j = 0; j <= WOP_MG->currentLevel; j++)
-					for (WOP_Element = FIRSTELEMENT(GRID_ON_LEVEL(WOP_MG, j));
-						 WOP_Element != NULL; WOP_Element = SUCCE(WOP_Element))
-						if (USED(WOP_Element)) {
-							if ((*WOP_EW_EvaluateProc)(WOP_Element, WOP_DrawingObject))
-								return 1;
-							if ((*WOP_GEN_ExecuteProc)(WOP_DrawingObject))
-								return 1;
-						}
+				if ((*WOP_EW_EvaluateProc)(WOP_Element,WOP_DrawingObject))	return 1;
+				if ((*WOP_GEN_ExecuteProc)(WOP_DrawingObject))				return (1);
+/*
+#ifdef __THREEDIM__
+				if (BulletDraw3D(WOP_DrawingObject)) return 1;
+#else
+				if (BulletDraw2D(WOP_DrawingObject)) return 1;
+#endif
+*/
 			}
 			break;
-			
+
 		case NODEWISE:
 		case VECTORWISE:
 		case EXTERN:
@@ -24078,6 +23954,12 @@
 	InitRotObsTrafo3d	= VirtSphereInitRotObsTrafo3d;
 	RotObsTrafo3d		= VirtSphereRotObsTrafo3d;
 	
+	/* allocate storage in general mg user data:
+	   store view to check neccessity for ordering elements */
+	wopMGUDid = GetNewBlockID();
+	
+	if (DefineMGUDBlock(wopMGUDid,sizeof(WOP_MG_DATA))!=GM_OK) return (__LINE__);
+	
 	/* create WorkHandling for 'Matrix' */
 	if ((thePOH=CreatePlotObjHandling ("Matrix"))	   == NULL) return (__LINE__);
 		
@@ -24535,6 +24417,10 @@
 			if (AllocateControlEntry(FLAG_CW,CUTMODE_LEN,&ce_CUTMODE) != GM_OK)
 				return (__LINE__);
 		
+		/* flag in MG status to indicated elements have been ordered */
+		if (AllocateControlEntry(MULTIGRID_STATUS_CW,ELEMORD_LEN,&ce_ELEMORD) != GM_OK)
+			return (__LINE__);
+		
 		/* create WorkHandling for 'VecMat' */
 		if ((thePOH=CreatePlotObjHandling ("VecMat")) 	== NULL) return (__LINE__);
 		
diff -ru ug-orig/graphics/uggraph/wop.csave ug-patched/graphics/uggraph/wop.csave
--- ug-orig/graphics/uggraph/wop.csave	1997-08-14 12:11:35.000000000 +0200
+++ ug-patched/graphics/uggraph/wop.csave	1997-08-14 12:11:35.000000000 +0200
@@ -844,7 +844,7 @@
 
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/graphics/uggraph/Attic/wop.csave,v 1.122 1997/08/14 10:11:35 root Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/graphics/uggraph/wop.h ug-patched/graphics/uggraph/wop.h
--- ug-orig/graphics/uggraph/wop.h	2008-04-04 13:46:36.000000000 +0200
+++ ug-patched/graphics/uggraph/wop.h	2009-04-29 15:11:55.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/graphics/uggraph/wop.h,v 1.31 2008/04/04 11:46:36 lampe Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -142,7 +142,7 @@
 /****************************************************************************/
 
 #ifdef ModelP
-#define WOP_DOWN_CHANNELS_MAX           128
+#define WOP_DOWN_CHANNELS_MAX           32
 #define DO_BUFFER_SLOTS                 2
 #define DO_SLOT_SIZE                    (DO_SIZE+3)
 #endif
@@ -502,7 +502,7 @@
 INT             ErasePicture                    (PICTURE *thePicture);
 INT                     SetOrderStrategy                (INT OrderStrategy);
 
-PLOTOBJHANDLING *CreatePlotObjHandling (char *PlotObjTypeName);
+PLOTOBJHANDLING *CreatePlotObjHandling (const char *PlotObjTypeName);
 INT             Draw2D                                  (DRAWINGOBJ *q);
 INT             Draw3D                                  (DRAWINGOBJ *q);
 
diff -ru ug-orig/graphics/uggraph/wpm.c ug-patched/graphics/uggraph/wpm.c
--- ug-orig/graphics/uggraph/wpm.c	2008-03-18 14:00:18.000000000 +0100
+++ ug-patched/graphics/uggraph/wpm.c	2008-12-19 11:13:29.000000000 +0100
@@ -24,6 +24,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stddef.h>
 #include <stdio.h>
@@ -76,7 +77,7 @@
 static INT thePlotObjTypesVarID;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/graphics/uggraph/wpm.c,v 1.101 2008/03/18 13:00:18 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 static INT SetDeviceInfo (void)
 {
@@ -5503,47 +5504,39 @@
 	return (0);
 }
 
-/****************************************************************************/
-/*D
-   Isosurface PlotObject - extract isosurface(s) from scalar field
- 
-   USAGE:
-   'setplotobject Isosurface [$l <lambda1> <lambda2> ... | $n <n>]
-                             [$f <from>] [$t <to>]
-                             [$b 0|1] [$a 0..1] [$c 0|1]
-                             $s <vecdatadesc> [$e <evalproc>]'
- 
-.   $l...    - isosurface value(s) (default: 0.5)
-.   $n...    - desired number of isosurfaces (use instead of $l)
-.   $f...    - min value of field (default: 0.0)
-.   $t...    - max value of field (default: 1.0)
-.   $b...    - whether to plot domain boundary back sides (default: 0)
-.   $a...    - lighting: share of ambient light (default: 0.4)
-.   $c...    - whether to use depth cueing with lighting (default: 1)
-.   $s...    - vecdata descriptor for field
-.   $e...    - evaluation procedure (default: nvalue)
-
-   KEYWORDS:
-   graphics, plot, window, picture, plotobject, vecdesc, function
-D*/
-/****************************************************************************/
+/*------------------[doxygen??, ug help sys??, blah!!]-----------------------*
+ *
+ *   Isosurface PlotObject---extract isosurface from scalar field
+ *
+ *   Usage:
+ *
+ *   setplotobject Isosurface [$l <lambda>] [$f <from>] [$t <to>] [$b 0|1]
+ *                            [$a 0..1] $s <vecdatadesc> [$e <evalproc>]
+ *
+ *   $l...    - isosurface value (default: 0.5)
+ *   $f...    - min value of field (default: 0.0)
+ *   $t...    - max value of field (default: 1.0)
+ *   $b...    - whether to plot domain boundary back sides (default: 0)
+ *   $a...    - lighting: share of ambient light (default: 0.4, nice)
+ *   $s...    - vecdata descriptor for field
+ *   $e...    - evaluation procedure (default: nvalue)
+ *
+ *---------------------------------------------------------------------------*/
 
 static INT InitIsosurfacePlotObject_3D (PLOTOBJ *thePlotObj, INT argc, char **argv)
 {
 	struct IsosurfacePlotobject3D *theIpo;
 	BVP_DESC *theBVPDesc;
 	char buffer[64];
-	INT i, j, n, ret, nopt;
+	INT i, ret;
 	int iValue;
 	float fValue;
-	float f[MAX_ISOS];
-	DOUBLE delta;
-
+	
 	theIpo = &(thePlotObj->theIpo);
 	theBVPDesc = MG_BVPD(PO_MG(thePlotObj));
 	V3_COPY(BVPD_MIDPOINT(theBVPDesc),PO_MIDPOINT(thePlotObj));
 	PO_RADIUS(thePlotObj) = BVPD_RADIUS(theBVPDesc);
-	PO_USESCUT(thePlotObj) = YES;
+	PO_USESCUT(thePlotObj) = NO;
 
 	ret = ACTIVE;
 	
@@ -5551,47 +5544,23 @@
 	if (PO_STATUS(thePlotObj)==NOT_INIT)
 	{
 		theIpo->EvalFct 		= NULL;
-		theIpo->lambda[0]       = 0.5;
-		theIpo->NoIsos          = 1;
+		theIpo->lambda          = 0.5;
 		theIpo->min			    = 0.0;
 		theIpo->max			    = 1.0;
 		theIpo->DomainBackFaces = NO;
 		theIpo->AmbientLight    = 0.4;
-		theIpo->DepthCueing     = YES;
 	}
 
-	/* get isosurface values */
+	/* get isosurface value */
 	for (i=1; i<argc; i++)
 		if (argv[i][0]=='l')
 		{
-			n = sscanf(argv[i],"l %g %g %g %g %g %g %g %g %g %g %g",
-					   f, f+1, f+2, f+3, f+4, f+5, f+6, f+7, f+8, f+9, &fValue);
-			if (n < 1 || n > MAX_ISOS) {
-				UserWriteF("Specify 1 to %d values with $l option\n", MAX_ISOS);
-				ret = NOT_ACTIVE;
-			}
-			else {
-				theIpo->NoIsos = n;
-				for(j = 0; j < n; j++)
-					theIpo->lambda[j] = f[j];
-			}
+			if (sscanf(argv[i],"l %g",&fValue)!=1)
+				break;
+			theIpo->lambda = fValue;
 			break;
 		}
 
-	/* get desired number of isosurfaces */
-	nopt = 0;
-	for (i=1; i<argc; i++)
-        if (argv[i][0]=='n')
-        {
-			sscanf(argv[i],"n %d",&iValue);
-			if (iValue < 1 || iValue > MAX_ISOS) { 
-				UserWriteF("Number of isosurfaces has to be between 1 and %d\n", MAX_ISOS);
-				ret = NOT_ACTIVE;
-			}
-			else
-				nopt = iValue;
-		}
-
 	/* set from option */
 	for (i=1; i<argc; i++)
 		if (argv[i][0]=='f')
@@ -5666,33 +5635,12 @@
 	if (theIpo->AmbientLight < 0.0 || theIpo->AmbientLight > 1.0)
 		theIpo->AmbientLight = 1.0;
 
-	/* depth cueing? */
-	for (i=1; i<argc; i++)
-		if (argv[i][0]=='c')
-		{
-			if (sscanf(argv[i],"c %d",&iValue)!=1)
-				break;
-			if (iValue==1)
-				theIpo->DepthCueing = YES;
-			else if (iValue==0)
-				theIpo->DepthCueing = NO;
-			break;
-		}	
-
 	if (theIpo->EvalFct == NULL)
 	{
 		UserWrite("cannot find plot procedure\n");
 		ret = NOT_ACTIVE;
 	}
-
-	/* if $n given compute values */
-	if (nopt) {
-		theIpo->NoIsos = nopt;
-		delta = (theIpo->max - theIpo->min)/(nopt + 1); 
-		for (i = 0; i < nopt; i++)
-			theIpo->lambda[i] = theIpo->min + (i+1)*delta;
-	}
-
+		
 	return (ret);
 }
 
@@ -5714,18 +5662,14 @@
 	else
 		UserWriteF(DISPLAY_PO_FORMAT_SS,"EvalProc","---");
 	UserWriteF(DISPLAY_PO_FORMAT_SS,"name",PO_NAME(theIpo));
-	UserWriteF(DISPLAY_PO_FORMAT_SI,"NoIsos",theIpo->NoIsos);
+	UserWriteF(DISPLAY_PO_FORMAT_SF,"lambda",(float)theIpo->lambda);
 	UserWriteF(DISPLAY_PO_FORMAT_SFF,"Range",(float)theIpo->min,(float)theIpo->max);
 	if (theIpo->DomainBackFaces == YES)
-		UserWriteF(DISPLAY_PO_FORMAT_SS,"BackFaces","YES");
+		UserWriteF(DISPLAY_PO_FORMAT_SS,"DomainBackFaces","YES");
 	else
-		UserWriteF(DISPLAY_PO_FORMAT_SS,"BackFaces","NO");	
+		UserWriteF(DISPLAY_PO_FORMAT_SS,"DomainBackFaces","NO");	
 	UserWriteF(DISPLAY_PO_FORMAT_SF,"AmbientLight",(float)theIpo->AmbientLight);
-	if (theIpo->DepthCueing == YES)
-        UserWriteF(DISPLAY_PO_FORMAT_SS,"DepthCueing","YES");
-    else
-        UserWriteF(DISPLAY_PO_FORMAT_SS,"DepthCueing","NO");
-
+	UserWrite("\n");
 	return 0;
 }
 
diff -ru ug-orig/graphics/uggraph/wpm.h ug-patched/graphics/uggraph/wpm.h
--- ug-orig/graphics/uggraph/wpm.h	2008-03-18 14:00:18.000000000 +0100
+++ ug-patched/graphics/uggraph/wpm.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/graphics/uggraph/wpm.h,v 1.59 2008/03/18 13:00:18 lampe Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -443,18 +443,14 @@
                 INT UndispSubDom;                       /* subdomain not displayed OS_CHANGED           */
 };
 
-#define MAX_ISOS 10
-
 struct IsosurfacePlotobject3D {
 	struct PlotObjHead theHead; 			/* the head 									*/
 
 	EVALUES *EvalFct;						/* evaluation procedure	    					*/
-	DOUBLE lambda[MAX_ISOS];                /* isosurface values                            */
-	INT NoIsos;
+	DOUBLE lambda;                          /* isosurface value                             */
 	DOUBLE min, max;						/* range										*/
 	INT DomainBackFaces;                    /* plot domain boundary back faces?             */
 	DOUBLE AmbientLight;                    /* share of ambient light                       */
-	INT DepthCueing;
 };
 
 union PlotObj {
diff -ru ug-orig/icc.opts ug-patched/icc.opts
--- ug-orig/icc.opts	2004-09-02 14:22:03.000000000 +0200
+++ ug-patched/icc.opts	2004-09-02 14:22:17.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: icc.opts,v 1.1 2004/09/02 12:22:03 thimo Exp $
+# $Id: icc.opts 7772 2004-09-02 12:22:17Z thimo $
 
 # options for icc
 # remember to run ./autogen.sh after changing these values!
diff -ru ug-orig/initug.c ug-patched/initug.c
--- ug-orig/initug.c	2005-07-18 15:44:18.000000000 +0200
+++ ug-patched/initug.c	2008-12-19 11:18:36.000000000 +0100
@@ -37,6 +37,7 @@
 /****************************************************************************/
 
 /* ANSI-C includes */
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 
@@ -103,7 +104,7 @@
 /* RCS string */
 static char
 RCS_ID
-("$Header: /home/cvsroot/UG/ug/initug.c,v 1.41 2005/07/18 13:44:18 sander Exp $",
+("$Header$",
 UG_RCS_STRING);
 
 /****************************************************************************/
diff -ru ug-orig/initug.h ug-patched/initug.h
--- ug-orig/initug.h	2006-06-02 18:12:03.000000000 +0200
+++ ug-patched/initug.h	2006-06-02 18:15:49.000000000 +0200
@@ -25,7 +25,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/initug.h,v 1.12 2006/06/02 16:12:03 sander Exp $
+$Header$
 */
 
 #ifndef __INITUG__
Nur in ug-orig/lib: CVS.
Nur in ug-orig/lib: .cvsignore.
diff -ru ug-orig/lib/Makefile.am ug-patched/lib/Makefile.am
--- ug-orig/lib/Makefile.am	2005-04-01 16:23:35.000000000 +0200
+++ ug-patched/lib/Makefile.am	2007-02-14 21:27:52.000000000 +0100
@@ -1,47 +1,47 @@
-# $Id: Makefile.am,v 1.5 2005/04/01 14:23:35 thimo Exp $
+# $Id: Makefile.am 8267 2007-02-14 20:27:52Z christi $
 
 SUBDIRS = ugdata
 
 if BUILD2D
-  LIB_2D = libug2.la
+  LIB_2D = libugS2.la libugL2.la
 else
   LIB_2D =
 endif
 
 if BUILD3D
-  LIB_3D = libug3.la
+  LIB_3D = libugS3.la libugL3.la
 else
   LIB_3D =
 endif
 
-if PARALLEL
-  PLIBS_2D = ../parallel/libparallel2.la
-  PLIBS_3D = ../parallel/libparallel3.la
-else
-  PLIBS_2D =
-  PLIBS_3D =
-endif
+2DLIBS = ../gm/libug_gm2.la \
+         ../np/libnp2.la \
+         ../graphics/libgraphics2.la \
+         ../ui/libugui2.la \
+         ../dev/libdevices.la \
+         ../low/liblow2.la
+
+3DLIBS = ../gm/libug_gm3.la \
+         ../np/libnp3.la \
+         ../graphics/libgraphics3.la \
+         ../ui/libugui3.la \
+         ../dev/libdevices.la \
+         ../low/liblow3.la
 
 lib_LTLIBRARIES = $(LIB_2D) $(LIB_3D)
 
-libug2_la_SOURCES = ../initug.c
-libug2_la_CPPFLAGS = $(UG_2DFLAGS)
-libug2_la_LIBADD = ../gm/libug_gm2.la \
-                   ../np/libnp2.la \
-                   ../graphics/libgraphics2.la \
-                   ../ui/libugui2.la \
-                   ../dev/libdevices.la \
-                   ../low/liblow2.la \
-                   ../parallel/util/libparutil.la \
-                   ../low/liblow.la $(PLIBS_2D)
-
-libug3_la_SOURCES = ../initug.c
-libug3_la_CPPFLAGS = $(UG_3DFLAGS)
-libug3_la_LIBADD = ../gm/libug_gm3.la \
-                   ../np/libnp3.la \
-                   ../graphics/libgraphics3.la \
-                   ../ui/libugui3.la \
-                   ../dev/libdevices.la \
-                   ../low/liblow3.la \
-                   ../parallel/util/libparutil.la \
-                   ../low/liblow.la $(PLIBS_3D)
+libugS2_la_SOURCES = ../initug.c
+libugS2_la_CPPFLAGS = $(UG_2DFLAGS)
+libugS2_la_LIBADD = $(2DLIBS) ../dom/std/libdomS2.la
+
+libugL2_la_SOURCES = ../initug.c
+libugL2_la_CPPFLAGS = $(UG_2DFLAGS)
+libugL2_la_LIBADD = $(2DLIBS) ../dom/lgm/libdomL2.la
+
+libugS3_la_SOURCES = ../initug.c
+libugS3_la_CPPFLAGS = $(UG_3DFLAGS)
+libugS3_la_LIBADD = $(3DLIBS) ../dom/std/libdomS3.la
+
+libugL3_la_SOURCES = ../initug.c
+libugL3_la_CPPFLAGS = $(UG_3DFLAGS)
+libugL3_la_LIBADD = $(3DLIBS) ../dom/lgm/libdomL3.la
Nur in ug-orig/lib/MWCW/2D: CVS.
Nur in ug-orig/lib/MWCW/3D: CVS.
Nur in ug-orig/lib/MWCW: CVS.
diff -ru ug-orig/lib/MWCW/general_prefix.h ug-patched/lib/MWCW/general_prefix.h
--- ug-orig/lib/MWCW/general_prefix.h	1998-05-06 16:36:01.000000000 +0200
+++ ug-patched/lib/MWCW/general_prefix.h	1998-05-06 16:36:09.000000000 +0200
@@ -18,7 +18,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/lib/MWCW/general_prefix.h,v 1.1 1998/05/06 14:36:01 henrik Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/lib/MWCW/mif_prefix.h ug-patched/lib/MWCW/mif_prefix.h
--- ug-orig/lib/MWCW/mif_prefix.h	1998-05-06 16:36:02.000000000 +0200
+++ ug-patched/lib/MWCW/mif_prefix.h	1998-05-06 16:36:09.000000000 +0200
@@ -18,7 +18,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/lib/MWCW/mif_prefix.h,v 1.1 1998/05/06 14:36:02 henrik Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/lib/MWCW/pch2d_prefix.h ug-patched/lib/MWCW/pch2d_prefix.h
--- ug-orig/lib/MWCW/pch2d_prefix.h	1998-05-06 16:36:03.000000000 +0200
+++ ug-patched/lib/MWCW/pch2d_prefix.h	1998-05-06 16:36:09.000000000 +0200
@@ -18,7 +18,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/lib/MWCW/pch2d_prefix.h,v 1.1 1998/05/06 14:36:03 henrik Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/lib/MWCW/ug2d_prefix.h ug-patched/lib/MWCW/ug2d_prefix.h
--- ug-orig/lib/MWCW/ug2d_prefix.h	1998-05-06 16:36:08.000000000 +0200
+++ ug-patched/lib/MWCW/ug2d_prefix.h	1998-05-06 16:36:09.000000000 +0200
@@ -18,7 +18,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/lib/MWCW/ug2d_prefix.h,v 1.1 1998/05/06 14:36:08 henrik Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/lib/MWCW/ug3d_prefix.h ug-patched/lib/MWCW/ug3d_prefix.h
--- ug-orig/lib/MWCW/ug3d_prefix.h	1998-05-06 16:36:09.000000000 +0200
+++ ug-patched/lib/MWCW/ug3d_prefix.h	1998-05-06 16:36:09.000000000 +0200
@@ -18,7 +18,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/lib/MWCW/ug3d_prefix.h,v 1.1 1998/05/06 14:36:09 henrik Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/lib/MWCW/UGheaders2d.pch ug-patched/lib/MWCW/UGheaders2d.pch
--- ug-orig/lib/MWCW/UGheaders2d.pch	1998-05-06 16:35:59.000000000 +0200
+++ ug-patched/lib/MWCW/UGheaders2d.pch	1998-05-06 16:36:09.000000000 +0200
@@ -22,7 +22,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/lib/MWCW/UGheaders2d.pch,v 1.1 1998/05/06 14:35:59 henrik Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/lib/MWCW/UGheaders3d.pch ug-patched/lib/MWCW/UGheaders3d.pch
--- ug-orig/lib/MWCW/UGheaders3d.pch	1998-05-06 16:36:00.000000000 +0200
+++ ug-patched/lib/MWCW/UGheaders3d.pch	1998-05-06 16:36:09.000000000 +0200
@@ -22,7 +22,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/lib/MWCW/UGheaders3d.pch,v 1.1 1998/05/06 14:36:00 henrik Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/lib/MWCW/UGheaders.h ug-patched/lib/MWCW/UGheaders.h
--- ug-orig/lib/MWCW/UGheaders.h	1998-08-03 14:39:42.000000000 +0200
+++ ug-patched/lib/MWCW/UGheaders.h	1998-08-03 14:39:42.000000000 +0200
@@ -147,5 +147,5 @@
 #include "uginterface.h"
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/lib/MWCW/UGheaders.h,v 1.2 1998/08/03 12:39:42 reichenb Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
diff -ru ug-orig/lib/MWCW/ug.proj.sit.hqx ug-patched/lib/MWCW/ug.proj.sit.hqx
--- ug-orig/lib/MWCW/ug.proj.sit.hqx	2002-04-02 17:27:18.000000000 +0200
+++ ug-patched/lib/MWCW/ug.proj.sit.hqx	2002-04-02 17:27:18.000000000 +0200
@@ -1 +1,647 @@
-(This file must be converted with BinHex 4.0):#h9R,R"bEfSZFfPd!&0*9$96593K!*!%H(m!N!4fYP0dG@CQ5A3J+'-T-6Nj0bda16Ni)%&XB@4ND@iJ8hPcG'9YFb`J5@jM,L`JD(4dF$S[,hH3!bjKE'&NC'PZFhPc,Q0[E5p6G(9QCNPd,`d+'J!&%!!!H(m!N!0b!!%!N!0bc,m0TD95CA0PFRCPC+@P!+@3"!%!!$F!!,*"C4ZicjGf!*!0"kb,!!IC8!!!Gl)!N!32!(9R,R"bEfS!!,C(68e3FN0A588!N!1L!!%!N!U!!*!(3X(9GB!K$Lj!V@DRS@D#!0Ni6qBLB"#'qA6j#HQ0G,F5'rJi0DN34kM)JT-1K&@U'!6(LA4R1C!!pV+DqIMlCRR(8C&bA&p19F0MLfm6rK2Q`G-J52`E9P[+KP$lU8qp`IcjE@#VqlikXRCBA@&DZbdX*a+QRf5P&Dek*D,bc$IYA4C-M552J`1%VcZ4b"8+KGmjf(9YJA63YBriT#*E@BiVZVKRKbP5RK`Mq5PkM'[k9fd,AEVEh@BI1XLLT99["Ii2f4cl2fJ#L'e+B0)YRkcU%,jR6-'K$,`-QpqK@dI(2eJNGS[l#f4rVTCeLhYBYY5+pHe`&e#EpLPpKVDefFrq"[b+A`ij18SM(1DL09"mk%HmNbE-RC'3!!l+$YiF9`%fi$fm64XaR%S[P3bV0Lj*(V4hj5)hmkSTkB8@mkE8(8-1eM'84(bTSH2qjLp*6pacB4lGCp9afr-6b)4KQ2F05'e%"F`q+Bac2CKY!&(HAd@ArB+VZeP'qdlm4`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lZVA'ab!fKBX`arDCl*4RDb!i!cj`!!:
Nur in ug-orig/lib/ugdata: CVS.
Nur in ug-orig/lib/ugdata: .cvsignore.
diff -ru ug-orig/lib/ugdata/Makefile.am ug-patched/lib/ugdata/Makefile.am
--- ug-orig/lib/ugdata/Makefile.am	2005-04-01 16:23:35.000000000 +0200
+++ ug-patched/lib/ugdata/Makefile.am	2005-04-01 16:23:35.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.1 2005/04/01 14:23:35 thimo Exp $
+# $Id: Makefile.am 7977 2005-04-01 14:23:35Z thimo $
 
 # install into share-directory
 dist_data_DATA = helpfile.list RefRules.data tetra.rls triangle.rls
Nur in ug-orig/lib/Xcode: CVS.
Nur in ug-orig/lib/Xcode/UG.xcode: CVS.
diff -ru ug-orig/low/architecture.h ug-patched/low/architecture.h
--- ug-orig/low/architecture.h	2004-09-02 13:45:58.000000000 +0200
+++ ug-patched/low/architecture.h	2004-09-02 13:45:58.000000000 +0200
@@ -1,4 +1,4 @@
-/* $Id: architecture.h,v 1.1 2004/09/02 11:45:58 thimo Exp $ */
+/* $Id: architecture.h 7770 2004-09-02 11:45:58Z thimo $ */
 
 /*
 
diff -ru ug-orig/low/bbtree.c ug-patched/low/bbtree.c
--- ug-orig/low/bbtree.c	2005-01-04 11:24:23.000000000 +0100
+++ ug-patched/low/bbtree.c	2008-12-19 11:06:12.000000000 +0100
@@ -13,6 +13,7 @@
  *            system include files                                           *
  *            application include files                                      *
  *****************************************************************************/
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <float.h>
@@ -51,7 +52,7 @@
  * PRIVATE global variables (global to this source file)                     *
  *****************************************************************************/
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/low/bbtree.c,v 1.6 2005/01/04 10:24:23 stefan Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 INT theBBTDim = 0;
 HEAP *theBBTHeap = NULL;
diff -ru ug-orig/low/bbtree.h ug-patched/low/bbtree.h
--- ug-orig/low/bbtree.h	2004-07-21 11:19:50.000000000 +0200
+++ ug-patched/low/bbtree.h	2009-05-07 10:00:28.000000000 +0200
@@ -81,7 +81,7 @@
 DOUBLE BBT_TreePointDistance(BBT_TREE *tree, DOUBLE *x, void **obj,
                                                          BBT_POINT_DIST_FUNC dist);
 
-END_NAMESPACE
+END_UG_NAMESPACE
         
 #endif
 
diff -ru ug-orig/low/bio.c ug-patched/low/bio.c
--- ug-orig/low/bio.c	2008-05-05 15:30:21.000000000 +0200
+++ ug-patched/low/bio.c	2009-04-29 15:11:55.000000000 +0200
@@ -34,10 +34,11 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 
-#if !defined __MWCW__ && !defined __BGP__
+#ifndef __MWCW__
 #include <rpc/rpc.h>	/* to include xdr.h in a portable way */
 #endif
 
@@ -64,9 +65,12 @@
 /*                                                                          */
 /****************************************************************************/
 
-typedef int (*RW_mint_proc) (int n, int *intList);
-typedef int (*RW_mdouble_proc) (int n, double *doubleList);
-typedef int (*RW_string_proc) (char *string);
+typedef int (*R_mint_proc) (int n, int *intList);
+typedef int (*W_mint_proc) (int n, const int *intList);
+typedef int (*R_mdouble_proc) (int n, double *doubleList);
+typedef int (*W_mdouble_proc) (int n, const double *doubleList);
+typedef int (*R_string_proc) (char *string);
+typedef int (*W_string_proc) (const char *string);
 
 /****************************************************************************/
 /*                                                                          */
@@ -84,17 +88,20 @@
 static FILE *stream;
 static int n_byte;
 static fpos_t pos;
-#if !defined __MWCW__ && !defined __BGP__
+#ifndef __MWCW__
 static XDR xdrs;
 #endif
 
 /* low level read/write functions */
-static RW_mint_proc Read_mint, Write_mint;
-static RW_mdouble_proc Read_mdouble, Write_mdouble;
-static RW_string_proc Read_string, Write_string;
+static R_mint_proc Read_mint;
+static W_mint_proc Write_mint;
+static R_mdouble_proc Read_mdouble;
+static W_mdouble_proc Write_mdouble;
+static R_string_proc Read_string;
+static W_string_proc Write_string;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/low/bio.c,v 1.21 2008/05/05 13:30:21 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
@@ -107,7 +114,7 @@
 /* debug i/o                                                                */
 /*                                                                          */
 /****************************************************************************/
-#if !defined __MWCW__ && !defined __BGP__
+#ifndef __MWCW__
 
 static int XDR_Read_mint (int n, int *intList)
 {
@@ -124,7 +131,7 @@
 	return (0);
 }
 
-static int XDR_Write_mint (int n, int *intList)
+static int XDR_Write_mint (int n, const int *intList)
 {
 	int i;
 	
@@ -147,13 +154,13 @@
 	return (0);
 }
 
-static int XDR_Write_mdouble (int n, double *doubleList)
+static int XDR_Write_mdouble (int n, const double *doubleList)
 {
 	int i;
 	
 	for (i=0; i<n; i++)
 	{
-		if (!xdr_double(&xdrs,&(doubleList[i]))) return (1);
+		if (!xdr_double(&xdrs,(double*) &(doubleList[i]))) return (1);
 		n_byte += 8;
 	}
 	return (0);
@@ -177,7 +184,7 @@
 	return (0);
 }
 
-static int XDR_Write_string (char *string)
+static int XDR_Write_string (const char *string)
 {
 	int i,m,len;
 	
@@ -211,7 +218,7 @@
 	return (0);
 }
 
-static int ASCII_Write_mint (int n, int *intList)
+static int ASCII_Write_mint (int n, const int *intList)
 {
 	int i,m;
 	
@@ -233,7 +240,7 @@
 	return (0);
 }
 
-static int ASCII_Write_mdouble (int n, double *doubleList)
+static int ASCII_Write_mdouble (int n, const double *doubleList)
 {
 	int i,m;
 	
@@ -265,7 +272,7 @@
 }
 
 
-static int ASCII_Write_string (char *string)
+static int ASCII_Write_string (const char *string)
 {
 	int i,m,len;
 	
@@ -296,7 +303,7 @@
 	return (0);
 }
 
-static int BIN_Write_mint (int n, int *intList)
+static int BIN_Write_mint (int n, const int *intList)
 {
 	if (fwrite((void*)intList,sizeof(int)*n,1,stream)!=1)	return (1);
 	n_byte += n*sizeof(int);
@@ -309,7 +316,7 @@
 	return (0);
 }
 
-static int BIN_Write_mdouble (int n, double *doubleList)
+static int BIN_Write_mdouble (int n, const double *doubleList)
 {
 	if (fwrite((void*)doubleList,sizeof(double)*n,1,stream)!=1)	return (1);
 	n_byte += n*sizeof(double);
@@ -335,7 +342,7 @@
 }
 
 
-static int BIN_Write_string (char *string)
+static int BIN_Write_string (const char *string)
 {
 	int i,m,len;
 	
@@ -364,7 +371,7 @@
 	
 	switch (mode)
 	{
-		#if !defined __MWCW__ && !defined __BGP__
+		#ifndef __MWCW__
 		case BIO_XDR:
             if (rw=='r')      xdrstdio_create(&xdrs,file,XDR_DECODE);
             else if (rw=='w') xdrstdio_create(&xdrs,file,XDR_ENCODE);
@@ -425,7 +432,7 @@
 	return ((*Read_string)(string));
 }
 
-int NS_PREFIX Bio_Write_string (char *string)
+int NS_PREFIX Bio_Write_string (const char *string)
 {
 	return ((*Write_string)(string));
 }
diff -ru ug-orig/low/bio.h ug-patched/low/bio.h
--- ug-orig/low/bio.h	2004-07-21 11:19:50.000000000 +0200
+++ ug-patched/low/bio.h	2009-05-07 10:00:28.000000000 +0200
@@ -28,7 +28,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/low/bio.h,v 1.8 2004/07/21 09:19:50 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -94,13 +94,13 @@
 int Bio_Read_mdouble            (int n, double *doubleList);
 int Bio_Write_mdouble           (int n, double *doubleList);
 int Bio_Read_string             (char *string);
-int Bio_Write_string            (char *string);
+int Bio_Write_string            (const char *string);
 int Bio_Jump_From                       (void);
 int Bio_Jump_To                         (void);
 int Bio_Jump                            (int dojump);
 
 
-END_NAMESPACE
+END_UG_NAMESPACE
 
 /** @} */
 #endif
diff -ru ug-orig/low/boxtree.c ug-patched/low/boxtree.c
--- ug-orig/low/boxtree.c	2006-06-02 18:13:41.000000000 +0200
+++ ug-patched/low/boxtree.c	2006-06-02 18:15:34.000000000 +0200
@@ -51,7 +51,7 @@
 #endif
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/low/boxtree.c,v 1.3 2006/06/02 16:13:41 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/low/boxtree.h ug-patched/low/boxtree.h
--- ug-orig/low/boxtree.h	2004-08-31 12:03:02.000000000 +0200
+++ ug-patched/low/boxtree.h	2004-08-31 12:03:03.000000000 +0200
@@ -18,7 +18,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/low/boxtree.h,v 1.2 2004/08/31 10:03:02 thimo Exp $
+$Header$
 */
 
 /****************************************************************************/
Nur in ug-orig/low: CVS.
Nur in ug-orig/low: .cvsignore.
diff -ru ug-orig/low/debug.c ug-patched/low/debug.c
--- ug-orig/low/debug.c	2004-07-21 11:19:50.000000000 +0200
+++ ug-patched/low/debug.c	2008-12-19 11:06:12.000000000 +0100
@@ -27,6 +27,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include "general.h"
 
 #ifdef Debug
@@ -105,7 +106,7 @@
 static char 				*debugfilename;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/low/debug.c,v 1.27 2004/07/21 09:19:50 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/low/debug.h ug-patched/low/debug.h
--- ug-orig/low/debug.h	2008-06-05 20:01:30.000000000 +0200
+++ ug-patched/low/debug.h	2005-11-15 09:50:58.000000000 +0100
@@ -21,7 +21,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/low/debug.h,v 1.30 2008/06/05 18:01:30 lampe Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -36,10 +36,6 @@
 #include "general.h"
 #include "misc.h"
 
-#include "namespace.h"
-
-START_UG_NAMESPACE
-
 /****************************************************************************/
 /*																			*/
 /* defines in the following order											*/
@@ -180,6 +176,4 @@
 INT  PrintRepErrStack		(PrintfProcPtr print);
 #endif
 
-END_NAMESPACE
-
 #endif
diff -ru ug-orig/low/defaults.c ug-patched/low/defaults.c
--- ug-orig/low/defaults.c	2006-05-08 14:12:59.000000000 +0200
+++ ug-patched/low/defaults.c	2008-12-19 11:06:12.000000000 +0100
@@ -25,6 +25,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -50,44 +51,34 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/low/defaults.c,v 1.16 2006/05/08 12:12:59 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 #ifdef ModelP
 static char *defaults_buffer=NULL;
 #endif
 
+#define NAMESIZE    32
+#define NAMELEN     31
+#define NAMELENSTR    "31"
 
-/****************************************************************************/
-/*D
-   GetLocalizedDefaultValue - Provide access to defaults file
-
-   SYNOPSIS:
-   INT GetLocalizedDefaultValue (const char *filename, const char *name, char *value);
 
-   PARAMETERS:
-.  filename - pointer to char (const)
-.  name -     pointer to char (const)
-.  value -    pointer to char
+/****************************************************************************/
+/** \brief Provide access to defaults file
 
-   DESCRIPTION:
    This function provides access to defaults file. When 'ug' is started
    this function reads the defaults on file in order to set some
    parameters of 'ug' in advance.
 
-   RETURN VALUE:
-   INT
-.n    0 if OK
-.n    1 if error in opening or reading defaults file
-   
-   SEE ALSO:
+   \return <ul>
+   <li> 0 if OK </li>
+   <li> 1 if error in opening or reading defaults file </li>
+   </ul>
+
+   \sa
    GetDefaultValue
-D*/
+*/
 /****************************************************************************/
 
-#define NAMESIZE    32
-#define NAMELEN     31
-#define NAMELENSTR    "31"
-
 INT NS_PREFIX GetLocalizedDefaultValue (const char *filename, const char *name, char *value)
 {
     FILE *defaultsFile;
@@ -192,34 +183,6 @@
 }
 
 
-/****************************************************************************/
-/*D
-   GetDefaultValue - Provide access to defaults file
-
-   SYNOPSIS:
-   INT GetDefaultValue (const char *filename, const char *name, char *value);
-
-   PARAMETERS:
-.  filename - pointer to char (const)
-.  name -     pointer to char (const)
-.  value -    pointer to char
-
-   DESCRIPTION:
-   This function provides access to defaults file. When 'ug' is started
-   this function reads the defaults on file in order to set some
-   parameters of 'ug' in advance.
-
-   RETURN VALUE:
-   INT
-.n    0 if OK
-.n    1 if error in opening or reading defaults file
-   
-   SEE ALSO:
-   GetLocalizedDefaultValue
-D*/
-/****************************************************************************/
-
-
 #define MAX_PATH_LEN		1024
 enum {PATH_TOO_LONG = 1, COULD_NOT_STAT};
 
@@ -247,6 +210,23 @@
 	}
 }
 
+/****************************************************************************/
+/** \brief Provide access to defaults file
+
+   This function provides access to defaults file. When 'ug' is started
+   this function reads the defaults on file in order to set some
+   parameters of 'ug' in advance.
+
+   \return <ul>
+   <li> 0 if OK </li>
+   <li> 1 if error in opening or reading defaults file </li>
+   </ul>
+
+   \sa
+   GetLocalizedDefaultValue
+*/
+/****************************************************************************/
+
 INT NS_PREFIX GetDefaultValue (const char *filename, const char *name, char *value)
 {
 	#ifdef ModelP
diff -ru ug-orig/low/defaults.h ug-patched/low/defaults.h
--- ug-orig/low/defaults.h	2006-05-08 14:12:59.000000000 +0200
+++ ug-patched/low/defaults.h	2009-05-07 10:00:28.000000000 +0200
@@ -21,7 +21,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/low/defaults.h,v 1.7 2006/05/08 12:12:59 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -72,7 +72,7 @@
 INT	GetDefaultValue				(const char *filename, const char *name, char *value);
 INT	GetLocalizedDefaultValue	(const char *filename, const char *name, char *value);
 
-END_NAMESPACE
+END_UG_NAMESPACE
 
 #endif
 
diff -ru ug-orig/low/dimension.h ug-patched/low/dimension.h
--- ug-orig/low/dimension.h	2006-02-06 09:53:09.000000000 +0100
+++ ug-patched/low/dimension.h	2006-02-06 09:53:09.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: dimension.h,v 1.2 2006/02/06 08:53:09 sander Exp $ */
+/* $Id: dimension.h 8138 2006-02-06 08:53:09Z sander $ */
 
 /** \file
     \brief Provide the usual preprocessor-defines for the dimension and complain 
diff -ru ug-orig/low/dunemarker.c ug-patched/low/dunemarker.c
--- ug-orig/low/dunemarker.c	2006-11-17 11:04:32.000000000 +0100
+++ ug-patched/low/dunemarker.c	2008-12-19 11:06:12.000000000 +0100
@@ -16,9 +16,10 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/low/dunemarker.c,v 1.2 2006/11/17 10:04:32 sander Exp $
+$Header$
 */
 
+#include "config.h"
 #include "namespace.h"
 #include "dunemarker.h"
 
diff -ru ug-orig/low/dunemarker.h ug-patched/low/dunemarker.h
--- ug-orig/low/dunemarker.h	2006-03-17 10:37:12.000000000 +0100
+++ ug-patched/low/dunemarker.h	2009-05-07 10:00:28.000000000 +0200
@@ -16,7 +16,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/low/dunemarker.h,v 1.1 2006/03/17 09:37:12 sander Exp $
+$Header$
 */
 
 #ifndef UG_DUNE_MARKER_H
@@ -39,6 +39,6 @@
 extern int duneMarker;
 #endif
 
-END_NAMESPACE
+END_UG_NAMESPACE
 
 #endif
diff -ru ug-orig/low/fifo.c ug-patched/low/fifo.c
--- ug-orig/low/fifo.c	2006-03-13 10:04:00.000000000 +0100
+++ ug-patched/low/fifo.c	2008-12-19 11:06:12.000000000 +0100
@@ -28,6 +28,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 
 #include "compiler.h"
@@ -43,7 +44,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/low/fifo.c,v 1.10 2006/03/13 09:04:00 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /** \brief Initialize fifo data structure 
diff -ru ug-orig/low/fifo.h ug-patched/low/fifo.h
--- ug-orig/low/fifo.h	2006-03-13 10:04:00.000000000 +0100
+++ ug-patched/low/fifo.h	2009-05-07 10:00:28.000000000 +0200
@@ -22,7 +22,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/low/fifo.h,v 1.6 2006/03/13 09:04:00 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -66,6 +66,6 @@
 INT     fifo_in     (FIFO *myfifo, void *newelement);
 void    *fifo_out    (FIFO *myfifo);
 
-END_NAMESPACE
+END_UG_NAMESPACE
 
 #endif
diff -ru ug-orig/low/fileopen.c ug-patched/low/fileopen.c
--- ug-orig/low/fileopen.c	2008-02-11 20:08:46.000000000 +0100
+++ ug-patched/low/fileopen.c	2008-12-19 11:06:12.000000000 +0100
@@ -2,7 +2,7 @@
 /*																			*/
 /* File:	  fileopen.c													*/
 /*																			*/
-/* Purpose:   definition of an fopen fct. that accepts UNIX-style pathnames	*/
+/* Purpose:   definition of a fopen fct. that accepts UNIX-style pathnames	*/
 /*																			*/
 /* Author:	  Henrik Rentz-Reichert 										*/
 /*			  Institut fuer Computeranwendungen III 						*/
@@ -27,6 +27,7 @@
 
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -71,7 +72,7 @@
 
 #include "fileopen.h"
 
-#ifndef __MACINTOSH__
+#if defined __HP__ || __SGI__ || __T3E__ || __PARAGON__ || __DEC__ || __SUN__ || __PC__ || __LINUXPPC__
 #include <dirent.h>
 #endif
 
@@ -136,7 +137,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/low/fileopen.c,v 1.46 2008/02/11 19:08:46 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -595,7 +596,7 @@
 {
 
 /* encapsulate implementation dependent stuff for DirWalk */
-#ifndef __MACINTOSH__  /* by now (2008) this means POSIX! */
+#if defined __HP__ || __SGI__ || __T3E__ || __PARAGON__ || __DEC__ || __SUN__ || __PC__ || __LINUXPPC__
  
 	typedef struct dirent	DIRENT;
 	#define D_NAME(d)		((d)->d_name)
@@ -638,7 +639,7 @@
 	closedir(dfd);
 	return 0;
 
-#else /* old Mac OS Classic -- untested by now for years! */
+#elif macintosh
 
 #define pstrlen(s)		((s)[0])		/* length of pascal string */
 
@@ -750,6 +751,10 @@
 	return 0;
 
 #endif
+
+	printf("fileopen.c: DirWalk() not implemented for architecture: %s\n",ARCHNAME);
+
+	REP_ERR_RETURN (NOT_IMPLEMENTED);
 }
 
 #ifdef PARALLEL
diff -ru ug-orig/low/fileopen.h ug-patched/low/fileopen.h
--- ug-orig/low/fileopen.h	2006-05-03 14:03:08.000000000 +0200
+++ ug-patched/low/fileopen.h	2009-05-07 10:00:28.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/low/fileopen.h,v 1.19 2006/05/03 12:03:08 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -116,7 +116,7 @@
 
 INT                     InitFileOpen                            (void);
 
-END_NAMESPACE
+END_UG_NAMESPACE
 
 #endif
 
diff -ru ug-orig/low/general.h ug-patched/low/general.h
--- ug-orig/low/general.h	2006-05-30 14:01:06.000000000 +0200
+++ ug-patched/low/general.h	2006-05-30 14:01:06.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/low/general.h,v 1.18 2006/05/30 12:01:06 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/low/heaps.c ug-patched/low/heaps.c
--- ug-orig/low/heaps.c	2008-07-02 19:04:58.000000000 +0200
+++ ug-patched/low/heaps.c	2007-12-04 10:54:36.000000000 +0100
@@ -34,8 +34,6 @@
 #include <assert.h>
 #include <stdio.h> 
 
-#include "domain.h"
-
 #include "compiler.h"
 #include "heaps.h"
 #include "misc.h"
@@ -47,12 +45,9 @@
 #include "gm.h"
 #include "commands.h"
 #include "mgheapmgr.h"
+#endif
 #include "namespace.h"
 USING_UG_NAMESPACE
-#else
-USING_UG_NAMESPACE
-#endif
-USING_UGDIM_NAMESPACE
 
 /****************************************************************************/
 /*                                                                          */
@@ -64,7 +59,7 @@
 /*                                                                          */
 /****************************************************************************/
 
-#define FLOOR(n)   ((n)&~(MEM)(ALIGNMENT-1)) /* lower next multiple of four */
+#define FLOOR(n)    ((n)&ALIGNMASK)     /* lower next multiple of four */
 
 
 /* defines and macros for the virtual heap management                        */
@@ -85,7 +80,7 @@
 REP_ERR_FILE;
 
 /* data for CVS */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/low/heaps.c,v 1.36 2008/07/02 17:04:58 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
@@ -193,7 +188,7 @@
 */
 /****************************************************************************/
 
-HEAP *NS_PREFIX NewHeap (INT type, MEM size, void *buffer)
+HEAP *NS_PREFIX NewHeap (enum HeapType type, MEM size, void *buffer)
 {
     HEAP *theHeap;
 	INT i;
@@ -283,7 +278,7 @@
 void *NS_PREFIX GetMem (HEAP *theHeap, MEM n, INT mode)
 {
     BLOCK *theBlock,*newBlock;
-    MEM newsize,allocated;
+    long newsize,allocated;
 
 	#if defined(DYNAMIC_MEMORY_ALLOCMODEL) && defined(Debug)
 	if (GetCurrentMultigrid() != NULL)
@@ -589,7 +584,6 @@
 
  \param theHeap - pointer to Heap
  \param size - size of the object 
- \param type - type of the requested object 
 
    This function gets an object of type `type` from free list if possible,
    otherwise it allocates memory from the heap using 'GetMem'.
diff -ru ug-orig/low/heaps.h ug-patched/low/heaps.h
--- ug-orig/low/heaps.h	2006-06-02 17:40:38.000000000 +0200
+++ ug-patched/low/heaps.h	2009-05-07 10:00:28.000000000 +0200
@@ -27,7 +27,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/low/heaps.h,v 1.25 2006/06/02 15:40:38 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -72,7 +72,7 @@
     /** \brief Max depth of mark/release calls */
 #define MARK_STACK_SIZE 128             
 
-    enum {GENERAL_HEAP,              /**< Heap with alloc/free mechanism  */
+    enum HeapType {GENERAL_HEAP,              /**< Heap with alloc/free mechanism  */
           SIMPLE_HEAP              /**< Heap with mark/release mechanism*/
     };
 
@@ -146,7 +146,7 @@
 };
 
 typedef struct {
-    INT type;
+    enum HeapType type;
     MEM size;
     MEM used;
     MEM freelistmem;
@@ -213,7 +213,7 @@
 
     /** @name Functions for the simple and general heap management */
     /* @{ */
-HEAP        *NewHeap                (INT type, MEM size, void *buffer);
+HEAP        *NewHeap                (enum HeapType type, MEM size, void *buffer);
 void        *GetMem                 (HEAP *theHeap, MEM n, INT mode);
 void            *GetMemUsingKey                 (HEAP *theHeap, MEM n, INT mode, INT key);
 void         DisposeMem             (HEAP *theHeap, void *buffer);
@@ -242,7 +242,7 @@
 INT          FreeBlock                (VIRT_HEAP_MGMT *theVHM, BLOCK_ID id);
  /* @} */
 
-END_NAMESPACE
+END_UG_NAMESPACE
 
 /** @} */
 
diff -ru ug-orig/low/initlow.c ug-patched/low/initlow.c
--- ug-orig/low/initlow.c	2005-06-14 17:59:22.000000000 +0200
+++ ug-patched/low/initlow.c	2008-12-19 11:06:12.000000000 +0100
@@ -36,6 +36,7 @@
 /****************************************************************************/
 
 /* ANSI-C includes */
+#include "config.h"
 #include <stdio.h>
 
 /* low module */
@@ -60,7 +61,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/low/initlow.c,v 1.12 2005/06/14 15:59:22 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 
@@ -86,10 +87,6 @@
 	INT err;
 	char buffer[BUFFSIZE];
 	
-	/* keep type for sscanf */
-	int heapSize;
-	
-	
 	/* init heaps.c */
 	if ((err=InitHeaps())!=0)
 	{
@@ -98,12 +95,7 @@
 	}
 	
 	/* init ugenv.c */
-	if (GetDefaultValue(DEFAULTSFILENAME,"envmemory",buffer)==0)
-		sscanf(buffer," %d ",&heapSize);
-	else
-		heapSize = DEFAULTENVSIZE;
-	
-	if ((err=InitUgEnv(heapSize))!=0)
+	if ((err=InitUgEnv())!=0)
 	{
 		SetHiWrd(err,__LINE__);
 		return (err);
diff -ru ug-orig/low/initlow.h ug-patched/low/initlow.h
--- ug-orig/low/initlow.h	2005-06-14 17:59:22.000000000 +0200
+++ ug-patched/low/initlow.h	2009-05-07 10:00:28.000000000 +0200
@@ -29,7 +29,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/low/initlow.h,v 1.10 2005/06/14 15:59:22 sander Exp $
+$Header$
 */
 
 #ifndef __INITLOW__
@@ -53,7 +53,7 @@
 
 INT ExitLow();
 
-END_NAMESPACE
+END_UG_NAMESPACE
 
 /** @} */
 #endif
diff -ru ug-orig/low/low.doc ug-patched/low/low.doc
--- ug-orig/low/low.doc	2006-03-13 10:07:10.000000000 +0100
+++ ug-patched/low/low.doc	2007-07-30 10:18:58.000000000 +0200
@@ -1,41 +1,3 @@
-/***************************************************************************/
-/*D
-   compiler - Header file for defining standard types and constants (machine dependent)
-
-   DESCRIPTION:
-   In the definitions of the `CFLAGS` in the file 'mk.arch' the
-   key word for a special machine has to be chosen. For example by the 
-   compiler option '-D__HP__' ug is about to run on a HP computer. 
-   Concerning this option the corresponding definitions of the standard 
-   types in the file 'compiler.h' are taken.
-   (The file compiler.h is located in $UGROOT/arch.)
-
-   As this header file 'compiler.h' defines the standard types used in ug
-   it has to be included in `all` source files of ug!!! 
-
-   The basic types (normally 'short', 'int', 'float' and 'double') are 
-   replaced by 'SHORT', 'INT', 'FLOAT' and 'DOUBLE'. The type 'DOUBLE' 
-   is used for all Cartesian coordinates of the (x,y[,z])-directions of 
-   the grids and 'SCREEN_DOUBLE' is used for all transformed coordinates 
-   of the graphical interface.
-
-   The constant 'ALIGNMENT' has to be set equal to '4' or '8' depending on 
-   the 32 or 64 bit architecture of the machine used. It is also related 
-   to the constant 'ALIGNMASK', which has correspondingly to be set equal 
-   to '0xFFFFFFFC' or '0xFFFFFFF8' to clear the last two or three bits 
-   of a memory address.
-   
-   If you have to add a new mk.? file to support a new machine you also
-   have to provide a new entry in the 'compiler.h' file defining the basic 
-   data types and memory alignment. 
-   To that end you include a flag -D<your new machine>
-   in the CFLAGS section of your new mk.<your new machine> file and add
-   a new paragraph depending on this flag in 'compiler.h'.
- 
-D*/
-/***************************************************************************/
-
-
 /****************************************************************************/
 /*D
    heaps - Memory handling by the use of 'heaps'
@@ -129,70 +91,3 @@
 D*/
 /****************************************************************************/
 
-/***************************************************************************/
-/*D
-    ugenv - general data management concept in a tree structure
-    
-    PURPOSE:
-    The environment management of ug provides the possibility to store data in
-    a tree structure. The storage is taken from a 'GENERAL_HEAP' allocated at
-    initialization time with the size specified by 'envmemory' in the 'defaults'
-    file (if no 'defaults' file is available 'DEFAULTENVSIZE' is used).
-    
-    The data structures of the environment allow to create directories and items
-    of specified size. Both data structures start with a general head (among
-    others a name by which one can refer to it). The remaining memory up to the
-    specified size can be used in arbitrary way.
-    
-    The head is identical with the struct 'ENVVAR:'
-
-.vb
-typedef struct {                // user defined variable                    
-    INT type;                   // even number by GetNewEnvVarID            
-    INT locked;                 // may not be changed or deleted            
-    union envitem *next;
-    union envitem *previous;    // double linked list of environment items  
-    char name[NAMESIZE];        // name of that item                        
-                                
-//  ...                            may be longer, but of no interest for env
-
-} ENVVAR;
-.ve
-    
-    All items are members of doubly linked lists.
-    
-    The data structure for the directory has just an extra component to the
-    start of a list which is the directory contents (and can consist of
-    directories itself, of course).
-    
-.vb
-
-typedef struct {                // directory                                
-    INT type;                   // odd number by GetNewEnvDirID     
-    INT locked;                 // may not be changed or deleted            
-    union envitem *next;
-    union envitem *previous;    // double linked list of environment items  
-    char name[NAMESIZE];        // name of that item                        
-    union envitem *down;        // one level down in the tree               
-                                
-//  ...                            may be longer, but of no interest for env
-
-} ENVDIR;
-.ve
-    
-    The tree starts with a root directory "/" and there is always a current
-    or working directory. Paths are specified in UNIX-style. The current
-    directory can be changed using 'ChangeEnvDir' while 'GetCurrentDir'
-    returns a pointer to the current directory. The routine
-    'MakeEnvItem' creates the specified item in the current directory and
-    it is possible to 'RemoveEnvItem's created previously.
-    
-    Finally 'SearchEnv' offers the possibility to hierarchically search
-    the environment tree for an item specified by its name.
-    
-    SEE ALSO:
-    ENVITEM, ChangeEnvDir, GetCurrentDir, GetPathName, MakeEnvItem, RemoveEnvItem,
-    SearchEnv, GetNewEnvDirID, GetNewEnvVarID
-D*/
-/****************************************************************************/
-
diff -ru ug-orig/low/Makefile.am ug-patched/low/Makefile.am
--- ug-orig/low/Makefile.am	2006-03-17 10:38:28.000000000 +0100
+++ ug-patched/low/Makefile.am	2009-04-29 14:30:36.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.4 2006/03/17 09:38:28 sander Exp $
+# $Id: Makefile.am 8348 2009-04-29 12:30:36Z sander $
 
 noinst_LTLIBRARIES = liblow.la liblow2.la liblow3.la
 
@@ -6,7 +6,7 @@
 liblow_la_SOURCES = ugenv.c heaps.c fifo.c misc.c \
                   defaults.c initlow.c fileopen.c \
                   ugstruct.c debug.c bio.c \
-                  scan.c ugtimer.c tree.c pfile.c dunemarker.c \
+                  scan.c ugtimer.c tree.c dunemarker.c \
 architecture.h bio.h boxtree.h  debug.h  defaults.h  dimension.h  fifo.h \
 fileopen.h general.h heaps.h initlow.h misc.h pfile.h \
 scan.h smallvecs.h tree.h ugenv.h ugfile.h ugmemory.h ugstrings.h \
@@ -22,10 +22,22 @@
                   namespace.h pfile.h dunemarker.h
 
 # special library for the parts of low that need a dimension
-DIMDEPSOURCES = boxtree.c
+DIMDEPSOURCES = boxtree.c pfile.c
+
+if PARALLEL
+  PLIBS_2D = ../parallel/libparallel2.la
+  PLIBS_3D = ../parallel/libparallel3.la
+else
+  PLIBS_2D =
+  PLIBS_3D =
+endif
 
 liblow2_la_SOURCES = $(DIMDEPSOURCES) 
 liblow2_la_CPPFLAGS = $(UG_2DFLAGS)
+liblow2_la_LIBADD = ../parallel/util/libparutil.la \
+                   $(PLIBS_2D) liblow.la
 
 liblow3_la_SOURCES = $(DIMDEPSOURCES) 
 liblow3_la_CPPFLAGS = $(UG_3DFLAGS)
+liblow3_la_LIBADD = ../parallel/util/libparutil.la \
+                   $(PLIBS_3D) liblow.la
diff -ru ug-orig/low/misc.c ug-patched/low/misc.c
--- ug-orig/low/misc.c	2005-07-18 15:24:49.000000000 +0200
+++ ug-patched/low/misc.c	2008-12-19 11:06:12.000000000 +0100
@@ -25,6 +25,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <math.h>
 #include <assert.h>
 #include <stdlib.h>
@@ -95,7 +96,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/low/misc.c,v 1.32 2005/07/18 13:24:49 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
@@ -122,23 +123,14 @@
 /****************************************************************************/
 
 /****************************************************************************/
-/*D
-   INT_2_bitpattern	- transform an INT into a bitpattern string
+/** \brief Transform an INT into a bitpattern string
 
-   SYNOPSIS:
-   static void INT_2_bitpattern (INT n, char *text)
+ \param n - integer to convert
+ \param text - string of size >= 33 for conversion
 
-   PARAMETERS:
-.  n - integer to convert
-.  text - string of size >= 33 for conversion
-
-   DESCRIPTION:
    This function transforms an INT into a bitpattern string consisting of 0s
    and 1s only.
-
-   RETURN VALUE:
-   void
-D*/									
+*/									
 /****************************************************************************/
 
 void NS_PREFIX INT_2_bitpattern (INT n, char text[33])
@@ -156,40 +148,19 @@
 }
 
 /****************************************************************************/
-/*																			*/
-/* Function:  CenterInPattern												*/
-/*																			*/
-/* Purpose:   fill str up to PatLen with pattern and center text in it.		*/
-/*			  Terminate the str with end									*/
-/*																			*/
-/* Input:	  s.a															*/
-/*																			*/
-/* Output:	  INT 0: ok														*/
-/*				  1: error													*/
-/*																			*/
-/****************************************************************************/
+/** \brief Compose a headline of chars with string centered
 
-/****************************************************************************/
-/*D
-   CenterInPattern	- compose a headline of chars with string centered
-
-   SYNOPSIS:
-   INT CenterInPattern (char *str, INT PatLen, const char *text, char p, const char *end)
-
-   PARAMETERS:
-.  str - string to print to
-.  PatLen - width of headline
-.  text - text to center in headline
-.  p - char replicated for headline
-.  end - trailing string (optional)
-
-   DESCRIPTION:
-   This function transforms an INT into a bitpattern string consisting of 0s
-   and 1s only.
-
-   RETURN VALUE:
-   void
-D*/									
+ \param str - string to print to
+ \param PatLen - width of headline
+ \param text - text to center in headline
+ \param p - char replicated for headline
+ \param end - trailing string (optional)
+
+   Fill str up to PatLen with pattern and center text in it. Terminate the str with end
+
+   \return
+   0 okay 1 error
+*/									
 /****************************************************************************/
 
 INT NS_PREFIX CenterInPattern (char *str, INT PatLen, const char *text, char p, const char *end)
@@ -218,25 +189,7 @@
 	return (0);
 }
 
-/****************************************************************************/
-/*D
-   expandfmt - Expand (make explicit) charset-ranges in scanf
 
-   SYNOPSIS:
-   char *expandfmt (const char *fmt)
-
-   PARAMETERS:
-.  fmt - pointer to char (const)
-
-   DESCRIPTION:
-   This function expands (make explicit) charset-ranges in scanf.
-   For example '%<number>[...a-d...]' --> '%<number>[...abcd...]'.
-
-   RETURN VALUE:
-   char*
-.n        new pointer to char
-D*/
-/****************************************************************************/
 
 /* install a user math error handler */
 static int UG_matherr(
@@ -258,6 +211,16 @@
 
 static char newfmt[FMTBUFFSIZE];
 
+/****************************************************************************/
+/** \brief Expand (make explicit) charset-ranges in scanf
+
+   This function expands (make explicit) charset-ranges in scanf.
+   For example '%<number>[...a-d...]' --> '%<number>[...abcd...]'.
+
+   \return
+.n        new pointer to char
+*/
+/****************************************************************************/
 char * NS_PREFIX expandfmt (const char *fmt)
 {
     const char *pos;
@@ -421,25 +384,18 @@
 }
 
 /****************************************************************************/
-/*D
-   StrTok - Copy a token out of a string (ANSI-C)
+/** \brief Copy a token out of a string (ANSI-C)
 
-   SYNOPSIS:
-   char *StrTok (char *s, const char *ct)
+ \param s -  pointer to char
+ \param ct - pointer to char (const)
 
-   PARAMETERS:
-.  s -  pointer to char
-.  ct - pointer to char (const)
-
-   DESCRIPTION:
    This function copies a token out of a string.
 
    See also ANSI-C for description of this function.
 
-   RETURN VALUE:
-   char
+   \return
 .n    pointer to char, modified string
-D*/
+*/
 /****************************************************************************/
 
 char * NS_PREFIX StrTok (char *s, const char *ct)
@@ -477,29 +433,22 @@
 }
 
 /****************************************************************************/
-/*D
-   strntok - Split a string into tokens each of maximal length 'n+1'
-
-   SYNOPSIS:
-   const char *strntok (const char *str, const char *sep, int n, char *token)
+/** \brief Split a string into tokens each of maximal length 'n+1'
 
-   PARAMETERS:
-.  str -   pointer to char (const)
-.  sep -   pointer to char (const)
-.  n -     integer, number of chars in token
-.  token - pointer to char
+ \param str -   pointer to char (const)
+ \param sep -   pointer to char (const)
+ \param n -     integer, number of chars in token
+ \param token - pointer to char
 
-   DESCRIPTION:
    This function splits a string into tokens each of maximal length 'n+1'.
    A pointer to the next char following the token (its a sep) is returned.
    NB: possibly check whether the returned char is a sep.
    If not: the token was to long and only the first n chars where copied!
 
-   RETURN VALUE:
-   char
+   \return
 .n     pointer to token
 .n     NULL if token larger than n.
-D*/
+*/
 /****************************************************************************/
 
 const char * NS_PREFIX strntok (const char *str, const char *sep, int n, char *token)
@@ -526,22 +475,15 @@
 }
 
 /****************************************************************************/
-/*D
-   StrDup - duplicate string to memory allocated with malloc
+/** \brief Duplicate string to memory allocated with malloc
 
-   SYNOPSIS:
-   char *StrDup (const char *s)
+ \param s - string to duplicate
 
-   PARAMETERS:
-.  s - string to duplicate
-
-   DESCRIPTION:
    This function duplicates a string to memory allocated with malloc.
 
-   RETURN VALUE:
-   char*
+   \return
 .n        pointer to new string
-D*/
+*/
 /****************************************************************************/
 
 char * NS_PREFIX StrDup (const char *s)
@@ -566,26 +508,17 @@
 }
 
 /****************************************************************************/
-/*D
-   QSort - Sorting routine (standard function)
-
-   SYNOPSIS:
-   void QSort (void *base,INT n,INT size,int (*cmp)(const void *,const void *))
+/** \brief Sorting routine (standard function)
 
-   PARAMETERS:
-.  base - pointer to void, field to be sorted
-.  n -    integer, length of string
-.  size - integer, number of characters to be sorted
-.  cmp -  pointer to function with two arguments
+ \param base - pointer to void, field to be sorted
+ \param n -    integer, length of string
+ \param size - integer, number of characters to be sorted
+ \param cmp -  pointer to function with two arguments
 
-   DESCRIPTION:
    This function sorts the values returned by a function given as argument.
    
    See also standard description of 'QSort'.
-
-   RETURN VALUE:
-   void
-D*/
+*/
 /****************************************************************************/
 void NS_PREFIX QSort (void *base, INT n, INT size, int (*cmp)(const void *, const void *))
 {
@@ -647,26 +580,17 @@
 }
 
 /****************************************************************************/
-/*D
-   SelectionSort - Sorting routine (standard)
-
-   SYNOPSIS:
-   void SelectionSort (void *base,INT n,INT size,int (*cmp)(const void *,const void *))
+/** \brief Sorting routine (standard)
 
-   PARAMETERS:
-.  base - pointer to void, field to be sorted
-.  n -    integer, length of string
-.  size - integer, number of characters to be sorted
-.  cmp -  pointer to function with two arguments
+ \param base - pointer to void, field to be sorted
+ \param n -    integer, length of string
+ \param size - integer, number of characters to be sorted
+ \param cmp -  pointer to function with two arguments
 
-   DESCRIPTION:
    This function sorts the arguments of the function.
 
    See also standard description of 'SelectionSort'.
-
-   RETURN VALUE:
-   void
-D*/
+*/
 /****************************************************************************/
 
 void  NS_PREFIX SelectionSort (void *base, INT n, INT size, int (*cmp)(const void *, const void *))
@@ -708,17 +632,11 @@
 
 
 /****************************************************************************/
-/*D
-    ReadMemSizeFromString - Convert a (memory)size specification from String to MEM (long int)
-
-   SYNOPSIS:
-   INT ReadMemSizeFromString (const char *s, MEM *mem_size ); 
+/** \brief Convert a (memory)size specification from String to MEM (long int)
 
-   PARAMETERS:
-.  s - input string
-.  mem_size - the specified mem size in byte
+ \param s - input string
+ \param mem_size - the specified mem size in byte
 
-   DESCRIPTION:
    This function converts a (memory)size specification from String to type MEM (an integer type).
    The size specification contains an integer number followed by an optional unit specifier:
       G for gigabyte
@@ -729,14 +647,14 @@
    EXAMPLE:
       "10M" is converted to 10485760 (10 mega byte).
 
-   RETURN VALUE:
+   \return
    INT: 0 ok
         1 integer could not be read
         2 invalid unit specifier
 
-   SEE ALSO:
+   \sa
    MEM, WriteMemSizeToString
-D*/
+*/
 /****************************************************************************/
 
 INT  NS_PREFIX ReadMemSizeFromString (const char *s, MEM *mem_size )
@@ -766,26 +684,20 @@
 }
 
 /****************************************************************************/
-/*D
-    WriteMemSizeToString - Convert a (memory)size MEM to string
+/** \brief Convert a (memory)size MEM to string
 
-   SYNOPSIS:
-   INT WriteMemSizeToString (MEM mem_size, char *s)
+ \param s - input string
+ \param mem_size - the specified mem size in byte
 
-   PARAMETERS:
-.  s - input string
-.  mem_size - the specified mem size in byte
-
-   DESCRIPTION:
    This function writes a MEM size in MBytes to string in a format that is recognized by
    WriteMemSizeToString.
 
-   RETURN VALUE:
-   INT: 0 ok
+   \return
+   0 ok
 
-   SEE ALSO:
+   \sa
    MEM, ReadMemSizeFromString
-D*/
+*/
 /****************************************************************************/
 
 INT  NS_PREFIX WriteMemSizeToString (MEM mem_size, char *s)
diff -ru ug-orig/low/misc.h ug-patched/low/misc.h
--- ug-orig/low/misc.h	2006-06-02 17:40:38.000000000 +0200
+++ ug-patched/low/misc.h	2009-05-07 10:00:28.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/low/misc.h,v 1.40 2006/06/02 15:40:38 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -148,7 +148,7 @@
 #ifndef ModelP
 
 #ifdef __cplusplus
-END_NAMESPACE
+END_UG_NAMESPACE
 namespace PPIF {
 #endif
 extern int me;          /* to have in the serial case this variable as a dummy */
@@ -191,6 +191,6 @@
 
 INT                     MemoryParameters        (void);
 
-END_NAMESPACE
+END_UG_NAMESPACE
 
 #endif
diff -ru ug-orig/low/namespace.h ug-patched/low/namespace.h
--- ug-orig/low/namespace.h	2008-06-05 19:57:46.000000000 +0200
+++ ug-patched/low/namespace.h	2009-05-07 10:00:28.000000000 +0200
@@ -1,4 +1,4 @@
-/* $Id: namespace.h,v 1.9 2008/06/05 17:57:46 lampe Exp $ */
+/* $Id: namespace.h 8353 2009-05-07 08:00:28Z sander $ */
 
 /** \file
 
@@ -14,7 +14,7 @@
 
     ...
 
-    END_NAMESPACE
+    END_UG_NAMESPACE
 
   for stuff that is independent of the space dimension or
 
@@ -50,10 +50,10 @@
 #ifndef UG_NAMESPACE_H
 #define UG_NAMESPACE_H
 
-#if defined __cplusplus && !defined NO_NAMESPACES
+#ifdef __cplusplus
 
 #define START_UG_NAMESPACE namespace UG {
-#define END_NAMESPACE }
+#define END_UG_NAMESPACE }
 #define END_UGDIM_NAMESPACE }}
 #define NS_PREFIX UG::
 #define USING_UG_NAMESPACE using namespace UG;
@@ -74,7 +74,7 @@
   /* normal C-compiler, no namespace-stuff */
 # define START_UG_NAMESPACE
 # define START_UGDIM_NAMESPACE
-# define END_NAMESPACE
+# define END_UG_NAMESPACE
 # define END_UGDIM_NAMESPACE
 # define NS_PREFIX
 #define NS_DIM_PREFIX
@@ -84,7 +84,7 @@
 #endif
 
 /* check if the required symbols exist */
-#if !defined(NS_PREFIX) || !defined(START_UG_NAMESPACE) || !defined(END_NAMESPACE)
+#if !defined(NS_PREFIX) || !defined(START_UG_NAMESPACE) || !defined(END_UG_NAMESPACE)
 # error missing symbol!
 #endif
 
diff -ru ug-orig/low/pfile.c ug-patched/low/pfile.c
--- ug-orig/low/pfile.c	2008-03-09 19:11:45.000000000 +0100
+++ ug-patched/low/pfile.c	2009-04-29 14:30:36.000000000 +0200
@@ -1,17 +1,17 @@
 /****************************************************************************/
 /*                                                                          */
-/* File:      pfile.c		                                                */
+/* File:      pfile.c                                                       */
 /*                                                                          */
-/* Purpose:   a nice utility for writing a single file from parallel		*/
-/*            processes														*/
+/* Purpose:   a nice utility for writing a single file from parallel        */
+/*            processes                                                     */
 /*                                                                          */
-/* Author:	  Peter Bastian         										*/
-/*			  Institut fuer Computeranwendungen III 						*/
-/*			  Universitaet Stuttgart										*/
-/*			  Pfaffenwaldring 27											*/
-/*			  70569 Stuttgart												*/
-/*																			*/
-/* History:   28.01.97    begin												*/
+/* Author:    Peter Bastian                                                 */
+/*            Institut fuer Computeranwendungen III                         */
+/*            Universitaet Stuttgart                                        */
+/*            Pfaffenwaldring 27                                            */
+/*            70569 Stuttgart                                               */
+/*                                                                          */
+/* History:   28.01.97    begin                                             */
 /*                                                                          */
 /* Remarks:                                                                 */
 /*                                                                          */
@@ -25,6 +25,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -72,7 +73,7 @@
 /****************************************************************************/
 
 /* data for CVS */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/low/pfile.c,v 1.17 2008/03/09 18:11:45 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
@@ -81,10 +82,9 @@
 /****************************************************************************/
 
 /****************************************************************************/
-/*D																			
-   pfile - write single (text) file from parallel processes
+/** \file
+    \brief write single (text) file from parallel processes
 
-   DESCRIPTION:
    This module provides some useful functions to write a single
    file from multiple parallel processes. It is assumed that the
    file is subdivided into several segments. Each segment consists
@@ -110,9 +110,9 @@
 
    pfile uses the Concentrate, Broadcast calls of ppif.
          
-   FILE STRUCTURE:
+   \section File Structure
 
-.vb
+\verbatim
    segment 1
       item1 ... item n1
    segment 2
@@ -120,38 +120,33 @@
    ...
    segment m
       item1 ... item nm   
-.ve
+\endverbatim
 
-D*/																			
+*/
 /****************************************************************************/
 
 /****************************************************************************/
-/*D																			
-   pfile_open - open a parallel file
-
-   SYNOPSIS:
-   PFILE *pfile_open (char *name);
+/** \brief Open a parallel file
 
-   PARAMETERS:
-.  name - filename, relative paths are allowed
+ \param name - filename, relative paths are allowed
 
-   DESCRIPTION:
    Allocates a new PFILE data structure on all processors and
    returns a pointer to it. This function has to be called by
    all processes, but the file is only opened on the master.
    The PFILE data structure contains a buffer. The size of
    the buffer can be adjusted in pfile.h .
 
-   RETURN VALUE:
-.n NULL if any errors are encountered, this is a global state
-.n valid pointer if allocate successful on all processors
+   \return <ul>
+   <li> NULL if any errors are encountered, this is a global state </li>
+   <li> valid pointer if allocate successful on all processors </li>
+   </ul>
 
-   SEE ALSO:
+   \sa
    'pfile_sync', 'pfile_puts', 'pfile_close'
-D*/																			
+*/
 /****************************************************************************/
 
-PFILE * NS_PREFIX pfile_open (char *name)
+NS_DIM_PREFIX PFILE * NS_DIM_PREFIX pfile_open (char *name)
 {
 #ifndef ModelP
 	return( (PFILE *) fileopen(name,"w") );
@@ -206,33 +201,28 @@
 
 
 /****************************************************************************/
-/*D																			
-   pfile_master_puts - write string to file immediately
+/** \brief Write string to file immediately
 
-   SYNOPSIS:
-   INT pfile_master_puts (PFILE *pf, char *s);
+ \param pf - pointer to parallel file
+ \param s - item to be written
 
-   PARAMETERS:
-.  pf - pointer to parallel file
-.  s - item to be written
-
-   DESCRIPTION:
    Enables the master process to write a string to the
    output file immediately. This function should be called
    immediately after pfile_open or pfile_sync. Otherwise
    the position of the string withinm the segment is not
    predictable.
 
-   RETURN VALUE:
-.n 0 if ok.
-.n >0 if any errors are encountered, this is a LOCAL state
+   \return <ul>
+   <li> 0 if ok </li>
+   <li> >0 if any errors are encountered, this is a LOCAL state </li>
+   </ul>
 
-   SEE ALSO:
+   \sa
    'pfile_sync', 'pfile_open', 'pfile_close'
-D*/																			
+*/
 /****************************************************************************/
 
-INT NS_PREFIX pfile_master_puts (PFILE *pf, char *s)
+INT NS_DIM_PREFIX pfile_master_puts (PFILE *pf, char *s)
 {
 #ifndef ModelP
 	fputs(s,(FILE *) pf);
@@ -246,26 +236,20 @@
 
 #ifdef ModelP
 /****************************************************************************/
-/*																			
-   flush_buffer - flush buffer in global sequence
-
-   SYNOPSIS:
-static void flush_buffer (PFILE *pf)
+/** \brief Flush buffer in global sequence
 
-   PARAMETERS:
-.  pf - pointer to parallel file
+  \param pf - pointer to parallel file
 
-   DESCRIPTION:
+  \return <ul>
+ <li> 1 if all processors had local.nchars==0 </li>
+ <li> 0 else </li>
+ </ul>
 
-   RETURN VALUE:
-.n 1 if all processors had local.nchars==0
-.n 0 else
-
-   SEE ALSO:
+   \sa
    'pfile_sync', 'pfile_open', 'pfile_close'
-*/																			
+*/
 /****************************************************************************/
-static INT flush_buffer (PFILE *pf)
+static INT flush_buffer (NS_DIM_PREFIX PFILE *pf)
 {
 	INT i,j,min_key,min_index,finish=0;
 	char *buffer;
@@ -278,7 +262,7 @@
 	for (i=0; i<degree; i++)
 		if (!pf->valid_state[i])
 		{
-			GetConcentrate(i,pf->state+i,sizeof(PFILE_STATE));
+			GetConcentrate(i,pf->state+i,sizeof(NS_DIM_PREFIX PFILE_STATE));
 			pf->valid_state[i] = 1;
 #ifdef LOCAL_DEBUG
 			UserWriteF("receiving state from %d: n=%d, fst=%d, lst=%d\n",
@@ -313,7 +297,7 @@
 		if (me == master)
 			finish = 1; /* now all are finished */
 		else {
-			Concentrate(&pf->local,sizeof(PFILE_STATE)); /* has nchars==0 !  */
+			Concentrate(&pf->local,sizeof(NS_DIM_PREFIX PFILE_STATE)); /* has nchars==0 !  */
 			GetSpread(&finish,sizeof(INT));			     /* the global state */
 		}
 		
@@ -365,7 +349,7 @@
 		if (nchars>0) fputs(buffer,pf->stream);
 	}
 	else {
-		Concentrate(pf->state+min_index,sizeof(PFILE_STATE)); /* send state */
+		Concentrate(pf->state+min_index,sizeof(NS_DIM_PREFIX PFILE_STATE)); /* send state */
 		Concentrate(buffer,nchars+1);      /* send data  */
 	}
 	
@@ -377,17 +361,11 @@
 
 
 /****************************************************************************/
-/*D																			
-   pfile_puts - write string to parallel file
-
-   SYNOPSIS:
-   INT pfile_puts (PFILE *pf, char *s);
+/** \brief Write string to parallel file
 
-   PARAMETERS:
-.  pf - pointer to parallel file
-.  s - item to be written
+ \param pf - pointer to parallel file
+ \param s - item to be written
 
-   DESCRIPTION:
    Writes a string to a previously opened parallel file.
    It is ensured that the string s is written as a whole to
    the output file. The string is appended to the output buffer
@@ -395,16 +373,17 @@
 
    Any number of calls to pfile_puts may be issued by a single process.
 
-   RETURN VALUE:
-.n 0 if ok.
-.n >0 if any errors are encountered, this is a LOCAL state
+   \return <ul>
+   <li> 0 if ok </li>
+   <li> >0 if any errors are encountered, this is a LOCAL state </li>
+   </ul>
 
-   SEE ALSO:
+   \sa
    'pfile_sync', 'pfile_open', 'pfile_close'
-D*/																			
+*/
 /****************************************************************************/
 
-INT NS_PREFIX pfile_puts (PFILE *pf, char *s)
+INT NS_DIM_PREFIX pfile_puts (PFILE *pf, char *s)
 {
 #ifndef ModelP
 	fputs(s,(FILE *) pf);
@@ -446,37 +425,8 @@
 
 
 
-/****************************************************************************/
-/*D																			
-   pfile_tagged_puts - write tagged string to parallel file
-
-   SYNOPSIS:
-   INT pfile_tagged_puts (PFILE *pf, char *s, INT key);
-
-   PARAMETERS:
-.  pf - pointer to parallel file
-.  s - item to be written
-.  key - key for this item
-
-   DESCRIPTION:
-   Writes a tagged item to the output file. Tags should be globally
-   unique and locally increasing within each segment. If tags
-   are out of order, a warning is issued and the item is treated
-   as in order.
-
-   Any number of calls to pfile_tagged_puts may be issued by a single process.
-
-   RETURN VALUE:
-.n 0 if ok.
-.n >0 if any errors are encountered, this is a LOCAL state
-
-   SEE ALSO:
-   'pfile_sync', 'pfile_open', 'pfile_close'
-D*/																			
-/****************************************************************************/
-
 #ifdef ModelP
-static INT append_buffer (PFILE *pf, char *s, INT key)
+static INT append_buffer (NS_DIM_PREFIX PFILE *pf, char *s, INT key)
 {
 	INT n;
 
@@ -510,7 +460,31 @@
 }
 #endif
 	
-INT NS_PREFIX pfile_tagged_puts (PFILE *pf, char *s, INT key)
+/****************************************************************************/
+/** \brief Write tagged string to parallel file
+
+ \param pf - pointer to parallel file
+ \param s - item to be written
+ \param key - key for this item
+
+   Writes a tagged item to the output file. Tags should be globally
+   unique and locally increasing within each segment. If tags
+   are out of order, a warning is issued and the item is treated
+   as in order.
+
+   Any number of calls to pfile_tagged_puts may be issued by a single process.
+
+   \return <ul>
+   <li> 0 if ok </li>
+   <li> >0 if any errors are encountered, this is a LOCAL state </li>
+   </ul>
+
+   \sa
+   'pfile_sync', 'pfile_open', 'pfile_close'
+*/
+/****************************************************************************/
+
+INT NS_DIM_PREFIX pfile_tagged_puts (PFILE *pf, char *s, INT key)
 {
 #ifndef ModelP
 	fputs(s,(FILE *) pf);
@@ -545,31 +519,26 @@
 
 
 /****************************************************************************/
-/*D																			
-   pfile_sync - indicate end of file segment
-
-   SYNOPSIS:
-   INT pfile_sync (PFILE *pf);
+/** \brief Indicate end of file segment
 
-   PARAMETERS:
-.  pf - pointer to parallel file
+ \param pf - pointer to parallel file
 
-   DESCRIPTION:
    At the end of a segment this function has to be called by
    all processes. The function returns when all process
    have reached the end the current segment. Then the segment
    counter is increased.
 
-   RETURN VALUE:
-.n 0 if ok.
-.n >0 if any errors are encountered, this is a LOCAL state
+   \return <ul>
+ <li> 0 if ok </li>
+ <li> >0 if any errors are encountered, this is a LOCAL state </li>
+ </ul>
 
-   SEE ALSO:
+   \sa
    'pfile_puts', 'pfile_open', 'pfile_close'
-D*/																			
+*/
 /****************************************************************************/
 
-INT NS_PREFIX pfile_sync (PFILE *pf)
+INT NS_DIM_PREFIX pfile_sync (PFILE *pf)
 {
 #ifdef ModelP
 	/* wait until all processors reach end of segment */
@@ -582,31 +551,26 @@
 
 
 /****************************************************************************/
-/*D																			
-   pfile_close - indicate end of file
-
-   SYNOPSIS:
-   INT pfile_close (PFILE *pf);
+/** \brief Indicate end of file
 
-   PARAMETERS:
-.  pf - pointer to parallel file
+ \param pf - pointer to parallel file
 
-   DESCRIPTION:
    At the end of the file this function has to be called by
    all processes. The function returns when all process
    have reached the end of file. Then the file is closed
    and buffer space is released.
 
-   RETURN VALUE:
-.n 0 if ok.
-.n >0 if any errors are encountered, this is a LOCAL state
+   \return <ul>
+ <li> 0 if ok </li>
+ <li> >0 if any errors are encountered, this is a LOCAL state </li>
+ </ul>
 
-   SEE ALSO:
+   \sa
    'pfile_puts', 'pfile_open', 'pfile_sync'
-D*/																			
+*/
 /****************************************************************************/
 
-INT NS_PREFIX pfile_close (PFILE *pf)
+INT NS_DIM_PREFIX pfile_close (PFILE *pf)
 {
 #ifdef ModelP
 	/* wait until all processors reach end of segment */
@@ -625,16 +589,10 @@
 }
 
 /****************************************************************************/
-/*D																			
-   pfile_open_bin - open a parallel binary file
+/** \brief Open a parallel binary file
 
-   SYNOPSIS:
-   PFILE_BIN *pfile_open_bin (char *name);
+ \param name - filename, relative paths are allowed
 
-   PARAMETERS:
-.  name - filename, relative paths are allowed
-
-   DESCRIPTION:
    Allocates a new PFILE_BIN data structure on all processors and
    returns a pointer to it. This function has to be called by
    all processes, but the file is only opened on the master.
@@ -642,16 +600,17 @@
    and one for floats. The size of the buffer can be adjusted
    in pfile.h .
 
-   RETURN VALUE:
-.n NULL if any errors are encountered, this is a global state
-.n valid pointer if allocate successful on all processors
+   \return <ul>
+ <li> NULL if any errors are encountered, this is a global state </li>
+ <li> valid pointer if allocate successful on all processors </li>
+ </ul>
 
-   SEE ALSO:
+   \sa
    'pfile_sync_bin', 'pfile_close_bin'
-D*/																			
+*/
 /****************************************************************************/
 
-PFILE_BIN* NS_PREFIX pfile_open_bin (char *name)
+NS_DIM_PREFIX PFILE_BIN* NS_DIM_PREFIX pfile_open_bin (char *name)
 {
 #ifndef ModelP
 	return( (PFILE_BIN *) fileopen(name,"wb") );
@@ -704,11 +663,11 @@
 #ifdef ModelP
 /****************************************************************************/
 /* change for BYTES not finished ! */
-static INT flush_buffer_bin (PFILE_BIN *pf)
+static INT flush_buffer_bin (NS_DIM_PREFIX PFILE_BIN *pf)
 {
 	INT i,j,min_key,min_index,finish=0;
-	int *buf_int;
-	float *buf_float;
+	INT *buf_INT;
+	FLOAT *buf_FLOAT;
 	INT nints, nfloats;
 	
 	/* copy local state to array */
@@ -717,7 +676,7 @@
 	/* update downtree states */
 	for (i=0; i<degree; i++)
 		if (!pf->valid_state[i]) {
-			GetConcentrate(i,pf->state+i,sizeof(PFILE_STATE_BIN));
+			GetConcentrate(i,pf->state+i,sizeof(NS_DIM_PREFIX PFILE_STATE_BIN));
 			pf->valid_state[i] = 1;
 #ifdef LOCAL_DEBUG
 			UserWriteF("receiving state from %d: nints=%d, nfloats=%d fst=%d, lst=%d\n",
@@ -749,7 +708,7 @@
 		if (me == master)
 			finish = 1; /* now all are finished */
 		else {
-			Concentrate(&pf->local,sizeof(PFILE_STATE_BIN)); /* has (nints && nfloats)==0 !  */
+			Concentrate(&pf->local,sizeof(NS_DIM_PREFIX PFILE_STATE_BIN)); /* has (nints && nfloats)==0 !  */
 			GetSpread(&finish,sizeof(INT));			         /* the global state */
 		}
 		
@@ -778,35 +737,35 @@
 #ifdef LOCAL_DEBUG
 		UserWriteF("Writing my own buffer, nints=%d, nfloats=%d\n",pf->local.nints,pf->local.nfloats);
 #endif
-		buf_int = pf->buf_int;
-		buf_float = pf->buf_float;
+		buf_INT = pf->buf_INT;
+		buf_FLOAT = pf->buf_FLOAT;
 		nints = pf->local.nints;
 		nfloats = pf->local.nfloats;
 		pf->local.nints = pf->local.nfloats = 0;  /* buffer is empty again */
 		pf->local.first_key = pf->local.last_key = 0;
 	} else {
 		/* fetch downtree data, we have only state ! */
-		GetConcentrate(min_index,pf->buf_int2,pf->state[min_index].nints*sizeof(int));
-		GetConcentrate(min_index,pf->buf_float2,pf->state[min_index].nfloats*sizeof(float));
+		GetConcentrate(min_index,pf->buf_INT2,pf->state[min_index].nints*sizeof(INT));
+		GetConcentrate(min_index,pf->buf_FLOAT2,pf->state[min_index].nfloats*sizeof(FLOAT));
 #ifdef LOCAL_DEBUG
 		UserWriteF("Writing buffer from %d, nints=%d, nfloats=%d\n",/
 				   min_index,pf->state[min_index].nints,pf->state[min_index].nfloats);
 #endif
-		buf_int = pf->buf_int2;
-		buf_float = pf->buf_float2;
+		buf_INT = pf->buf_INT2;
+		buf_FLOAT = pf->buf_FLOAT2;
 		nints = pf->state[min_index].nints;
 		nfloats = pf->state[min_index].nfloats;
 		pf->valid_state[min_index] = 0; /* get new state next time */
 	}
 	/* now process data */
 	if (me==master) {
-		if (nints>0) fwrite(buf_int, sizeof(int), nints, pf->stream);
-		if (nfloats>0) fwrite(buf_float, sizeof(float), nfloats, pf->stream);
+		if (nints>0) fwrite(buf_INT, sizeof(INT), nints, pf->stream);
+		if (nfloats>0) fwrite(buf_FLOAT, sizeof(FLOAT), nfloats, pf->stream);
 	}
 	else {
-		Concentrate(pf->state+min_index,sizeof(PFILE_STATE_BIN)); /* send state */
-		Concentrate(buf_int,nints*sizeof(int));                   /* send INT data  */
-		Concentrate(buf_float,nfloats*sizeof(float));             /* send FLOAT data  */
+		Concentrate(pf->state+min_index,sizeof(NS_DIM_PREFIX PFILE_STATE_BIN)); /* send state */
+		Concentrate(buf_INT,nints*sizeof(INT));                   /* send INT data  */
+		Concentrate(buf_FLOAT,nfloats*sizeof(FLOAT));             /* send FLOAT data  */
 	}
 	
 	/* Note: While sending data uptree we don't expect to get	*/
@@ -815,44 +774,12 @@
 }
 #endif
 
-/****************************************************************************/
-/*D																			
-   pfile_tagged_write_int - write tagged sequence of integers to
-   parallel binary file
-
-   SYNOPSIS:
-   INT pfile_tagged_write_int (PFILE_BIN *pf, int *values, int n, INT key);
-
-   PARAMETERS:
-.  pf - pointer to parallel binary file
-.  values - integers to be written
-.  n - number of integers
-.  key - key for this sequence of integers
-
-   DESCRIPTION:
-   Writes a tagged item to the output file. Tags should be globally
-   unique and locally increasing within each segment. If tags
-   are out of order, a warning is issued and the item is treated
-   as in order.
-
-   Any number of calls to pfile_tagged_write_INT may be issued by
-   a single process.
-
-   RETURN VALUE:
-.n 0 if ok.
-.n >0 if any errors are encountered, this is a LOCAL state
-
-   SEE ALSO:
-   'pfile_sync_bin', 'pfile_open_bin', 'pfile_close_bin'
-D*/																			
-/****************************************************************************/
-
 #ifdef ModelP
-static INT append_buffer_bin_int (PFILE_BIN *pf, int *values, int n, INT key)
+static INT append_buffer_bin_INT (NS_DIM_PREFIX PFILE_BIN *pf, INT *values, int n, INT key)
 {
 	int i;
 #ifdef LOCAL_DEBUG
-	UserWriteF("appending %d ints with key %d, nints=%d, lst=%d\n",n,key,
+	UserWriteF("appending %d INTs with key %d, nints=%d, lst=%d\n",n,key,
 		pf->local.nints,pf->local.last_key);
 #endif	
 	if (n+pf->local.nints<PFILE_BUFFER_SIZE)
@@ -862,7 +789,7 @@
 		
 		/* append to buffer */
 		for (i=0; i<n; i++)
-			pf->buf_int[pf->local.nints+i]=values[i];
+			pf->buf_INT[pf->local.nints+i]=values[i];
 		pf->local.nints += n;
 		
 		/* update last key */
@@ -881,33 +808,59 @@
 }
 #endif
 
-INT NS_PREFIX pfile_tagged_write_int (PFILE_BIN *pf, int *values, int n, INT key)
+/****************************************************************************/
+/** \brief Write tagged sequence of integers to parallel binary file
+
+ \param pf - pointer to parallel binary file
+ \param values - integers to be written
+ \param n - number of integers
+ \param key - key for this sequence of integers
+
+   Writes a tagged item to the output file. Tags should be globally
+   unique and locally increasing within each segment. If tags
+   are out of order, a warning is issued and the item is treated
+   as in order.
+
+   Any number of calls to pfile_tagged_write_INT may be issued by
+   a single process.
+
+   \return <ul>
+ <li> 0 if ok </li>
+ <li> >0 if any errors are encountered, this is a LOCAL state </li>
+ </ul>
+
+   \sa
+   'pfile_sync_bin', 'pfile_open_bin', 'pfile_close_bin'
+*/
+/****************************************************************************/
+
+INT NS_DIM_PREFIX pfile_tagged_write_INT (PFILE_BIN *pf, INT *values, int n, INT key)
 {
 #ifndef ModelP
-	fwrite(values, sizeof(int), n, (FILE *) pf);
+	fwrite(values, sizeof(INT), n, (FILE *) pf);
 #else
 	/* check order of keys */
 	if ( (pf->local.nints > 0) && (key < pf->local.last_key) )
 	{
-		PrintErrorMessage('W',"pfile_tagged_write_int","keys locally not ordered");
+		PrintErrorMessage('W',"pfile_tagged_write_INT","keys locally not ordered");
 		key = pf->local.last_key+1; /* treat as in order ! */
 	}
 
 	if ( (pf->local.nints > 0) && (key > pf->local.last_key+1) ) /* not consecutive case */
 		if (flush_buffer_bin(pf))
 		{
-			PrintErrorMessage('E',"pfile_tagged_write_int","unxepected finish");
+			PrintErrorMessage('E',"pfile_tagged_write_INT","unxepected finish");
 			return(1);
 		}
 
-	if (!append_buffer_bin_int(pf,values,n,key))
+	if (!append_buffer_bin_INT(pf,values,n,key))
 	{
 		if (flush_buffer_bin(pf))
 		{
-			PrintErrorMessage('E',"pfile_tagged_write_int","unxepected finish");
+			PrintErrorMessage('E',"pfile_tagged_write_INT","unxepected finish");
 			return(1);
 		}
-		append_buffer_bin_int(pf,values,n,key);
+		append_buffer_bin_INT(pf,values,n,key);
 	}
 #endif
 	return(0);
@@ -915,11 +868,11 @@
 
 /****************************************************************************/
 #ifdef ModelP
-static INT append_buffer_bin_float (PFILE_BIN *pf, float *values, int n, INT key)
+static INT append_buffer_bin_FLOAT (NS_DIM_PREFIX PFILE_BIN *pf, FLOAT *values, int n, INT key)
 {
 	int i;
 #ifdef LOCAL_DEBUG
-	UserWriteF("appending %d floats with key %d, nfloats=%d, lst=%d\n",n,key,
+	UserWriteF("appending %d FLOATs with key %d, nfloats=%d, lst=%d\n",n,key,
 		pf->local.nfloats,pf->local.last_key);
 #endif	
 	if (n+pf->local.nfloats<PFILE_BUFFER_SIZE)
@@ -929,7 +882,7 @@
 		
 		/* append to buffer */
 		for (i=0; i<n; i++)
-			pf->buf_float[pf->local.nfloats+i]=values[i];
+			pf->buf_FLOAT[pf->local.nfloats+i]=values[i];
 		pf->local.nfloats += n;
 		
 		/* update last key */
@@ -948,33 +901,33 @@
 }
 #endif
 
-INT NS_PREFIX pfile_tagged_write_float (PFILE_BIN *pf, float *values, int n, INT key)
+INT NS_DIM_PREFIX pfile_tagged_write_FLOAT (PFILE_BIN *pf, FLOAT *values, int n, INT key)
 {
 #ifndef ModelP
-	fwrite(values, sizeof(float), n, (FILE *) pf);
+	fwrite(values, sizeof(FLOAT), n, (FILE *) pf);
 #else
 	/* check order of keys */
 	if ( (pf->local.nfloats > 0) && (key < pf->local.last_key) )
 	{
-		PrintErrorMessage('W',"pfile_tagged_write_float","keys locally not ordered");
+		PrintErrorMessage('W',"pfile_tagged_write_INT","keys locally not ordered");
 		key = pf->local.last_key+1; /* treat as in order ! */
 	}
 
 	if ( (pf->local.nfloats > 0) && (key > pf->local.last_key+1) ) /* not consecutive case */
 		if (flush_buffer_bin(pf))
 		{
-			PrintErrorMessage('E',"pfile_tagged_write_float","unxepected finish");
+			PrintErrorMessage('E',"pfile_tagged_write_INT","unxepected finish");
 			return(1);
 		}
 
-	if (!append_buffer_bin_float(pf,values,n,key))
+	if (!append_buffer_bin_FLOAT(pf,values,n,key))
 	{
 		if (flush_buffer_bin(pf))
 		{
-			PrintErrorMessage('E',"pfile_tagged_write_float","unxepected finish");
+			PrintErrorMessage('E',"pfile_tagged_write_INT","unxepected finish");
 			return(1);
 		}
-		append_buffer_bin_float(pf,values,n,key);
+		append_buffer_bin_FLOAT(pf,values,n,key);
 	}
 #endif
 	return(0);
@@ -982,11 +935,11 @@
 
 /****************************************************************************/
 #ifdef ModelP
-static INT append_buffer_bin_byte (PFILE_BIN *pf, unsigned char *values, int n, INT key)
+static INT append_buffer_bin_BYTE (NS_DIM_PREFIX PFILE_BIN *pf, unsigned char *values, int n, INT key)
 {
 	int i;
 #ifdef LOCAL_DEBUG
-	UserWriteF("appending %d bytess with key %d, nbytes=%d, lst=%d\n",n,key,
+	UserWriteF("appending %d BYTEs with key %d, nbytes=%d, lst=%d\n",n,key,
 		pf->local.nbytes,pf->local.last_key);
 #endif	
 	if (n+pf->local.nbytes<PFILE_BUFFER_SIZE)
@@ -996,7 +949,7 @@
 		
 		/* append to buffer */
 		for (i=0; i<n; i++)
-			pf->buf_byte[pf->local.nbytes+i]=values[i];
+			pf->buf_BYTE[pf->local.nbytes+i]=values[i];
 		pf->local.nbytes += n;
 		
 		/* update last key */
@@ -1015,7 +968,7 @@
 }
 #endif
 
-INT NS_PREFIX pfile_tagged_write_byte (PFILE_BIN *pf, unsigned char *values, int n, INT key)
+INT NS_DIM_PREFIX pfile_tagged_write_BYTE (PFILE_BIN *pf, unsigned char *values, int n, INT key)
 {
 #ifndef ModelP
 	fwrite(values, sizeof(unsigned char), n, (FILE *) pf);
@@ -1023,56 +976,51 @@
 	/* check order of keys */
 	if ( (pf->local.nbytes > 0) && (key < pf->local.last_key) )
 	{
-		PrintErrorMessage('W',"pfile_tagged_write_byte","keys locally not ordered");
+		PrintErrorMessage('W',"pfile_tagged_write_INT","keys locally not ordered");
 		key = pf->local.last_key+1; /* treat as in order ! */
 	}
 
 	if ( (pf->local.nbytes > 0) && (key > pf->local.last_key+1) ) /* not consecutive case */
 		if (flush_buffer_bin(pf))
 		{
-			PrintErrorMessage('E',"pfile_tagged_write_byte","unxepected finish");
+			PrintErrorMessage('E',"pfile_tagged_write_INT","unxepected finish");
 			return(1);
 		}
 
-	if (!append_buffer_bin_byte(pf,values,n,key))
+	if (!append_buffer_bin_BYTE(pf,values,n,key))
 	{
 		if (flush_buffer_bin(pf))
 		{
-			PrintErrorMessage('E',"pfile_tagged_write_byte","unxepected finish");
+			PrintErrorMessage('E',"pfile_tagged_write_INT","unxepected finish");
 			return(1);
 		}
-		append_buffer_bin_byte(pf,values,n,key);
+		append_buffer_bin_BYTE(pf,values,n,key);
 	}
 #endif
 	return(0);
 }
 
 /****************************************************************************/
-/*D																			
-   pfile_sync_bin - indicate end of binary file segment
+/** \brief Indicate end of binary file segment
 
-   SYNOPSIS:
-   INT pfile_sync_bin (PFILE_BIN *pf);
+ \param pf - pointer to parallel binary file
 
-   PARAMETERS:
-.  pf - pointer to parallel binary file
-
-   DESCRIPTION:
    At the end of a segment this function has to be called by
    all processes. The function returns when all process
    have reached the end the current segment. Then the segment
    counter is increased.
 
-   RETURN VALUE:
-.n 0 if ok.
-.n >0 if any errors are encountered, this is a LOCAL state
+   \return <ul>
+   <li> 0 if ok </li>
+   <li> >0 if any errors are encountered, this is a LOCAL state </li>
+   </ul>
 
-   SEE ALSO:
+   \sa
    'pfile_open_bin', 'pfile_close_bin'
-D*/																			
+*/
 /****************************************************************************/
 
-INT NS_PREFIX pfile_sync_bin (PFILE_BIN *pf)
+INT NS_DIM_PREFIX pfile_sync_bin (PFILE_BIN *pf)
 { 
 #ifdef ModelP
 	while (!flush_buffer_bin(pf));
@@ -1081,31 +1029,26 @@
 }
 
 /****************************************************************************/
-/*D																			
-   pfile_close_bin - indicate end of binary file
-
-   SYNOPSIS:
-   INT pfile_close_bin (PFILE_BIN *pf);
+/** \brief Indicate end of binary file
 
-   PARAMETERS:
-.  pf - pointer to parallel binary file
+ \param pf - pointer to parallel binary file
 
-   DESCRIPTION:
    At the end of the file this function has to be called by
    all processes. The function returns when all process
    have reached the end of file. Then the file is closed
    and buffer space is released.
 
-   RETURN VALUE:
-.n 0 if ok.
-.n >0 if any errors are encountered, this is a LOCAL state
+   \return <ul>
+ <li> 0 if ok </li>
+ <li> >0 if any errors are encountered, this is a LOCAL state </li>
+ </ul>
 
-   SEE ALSO:
+   \sa
    'pfile_open_bin', 'pfile_sync_bin'
-D*/																			
+*/
 /****************************************************************************/
 
-INT NS_PREFIX pfile_close_bin (PFILE_BIN *pf)
+INT NS_DIM_PREFIX pfile_close_bin (PFILE_BIN *pf)
 {
 #ifndef ModelP
 	fclose( (FILE *) pf);
diff -ru ug-orig/low/pfile.h ug-patched/low/pfile.h
--- ug-orig/low/pfile.h	2008-04-16 14:56:11.000000000 +0200
+++ ug-patched/low/pfile.h	2009-04-29 14:30:36.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/low/pfile.h,v 1.6 2008/04/16 12:56:11 lampe Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -35,7 +35,7 @@
 #include "compiler.h"
 #include "namespace.h"
 
-START_UG_NAMESPACE
+START_UGDIM_NAMESPACE
 
 #define PFILE_BUFFER_SIZE	16384
 #define PFILE_MAX_TREE		32
@@ -72,12 +72,12 @@
 	PFILE_STATE_BIN state[PFILE_MAX_TREE+1];
 	INT robin;
 #ifdef ModelP
-	int buf_int[PFILE_BUFFER_SIZE];
-	int buf_int2[PFILE_BUFFER_SIZE];
-	float buf_float[PFILE_BUFFER_SIZE];
-	float buf_float2[PFILE_BUFFER_SIZE];
-	unsigned char buf_byte[PFILE_BUFFER_SIZE];
-	unsigned char buf_byte2[PFILE_BUFFER_SIZE];
+	INT buf_INT[PFILE_BUFFER_SIZE];
+	INT buf_INT2[PFILE_BUFFER_SIZE];
+	FLOAT buf_FLOAT[PFILE_BUFFER_SIZE];
+	FLOAT buf_FLOAT2[PFILE_BUFFER_SIZE];
+	unsigned char buf_BYTE[PFILE_BUFFER_SIZE];
+	unsigned char buf_BYTE2[PFILE_BUFFER_SIZE];
 #endif
 } PFILE_BIN ;
  
@@ -94,13 +94,13 @@
 INT    pfile_sync               (PFILE *pf);
 INT    pfile_close              (PFILE *pf);
 PFILE_BIN *pfile_open_bin           (char *name);
-INT        pfile_tagged_write_int   (PFILE_BIN *pf, int *values, int n, INT key);
-INT        pfile_tagged_write_float (PFILE_BIN *pf, float *values, int n, INT key);
-/* TODO: pfile_tagged_write_byte works only in seq Mode !!! */
-INT        pfile_tagged_write_byte  (PFILE_BIN *pf, unsigned char *values, int n, INT key);
+INT        pfile_tagged_write_INT   (PFILE_BIN *pf, INT *values, int n, INT key);
+INT        pfile_tagged_write_FLOAT (PFILE_BIN *pf, FLOAT *values, int n, INT key);
+/* TODO: pfile_tagged_write_BYTE works only in seq Mode !!! */
+INT        pfile_tagged_write_BYTE  (PFILE_BIN *pf, unsigned char *values, int n, INT key);
 INT        pfile_sync_bin           (PFILE_BIN *pf);
 INT        pfile_close_bin          (PFILE_BIN *pf);
 
-END_NAMESPACE
+END_UGDIM_NAMESPACE
 
 #endif
diff -ru ug-orig/low/scan.c ug-patched/low/scan.c
--- ug-orig/low/scan.c	2006-06-02 17:34:14.000000000 +0200
+++ ug-patched/low/scan.c	2006-06-02 17:38:35.000000000 +0200
@@ -73,7 +73,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/low/scan.c,v 1.16 2006/06/02 15:34:14 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
diff -ru ug-orig/low/scan.h ug-patched/low/scan.h
--- ug-orig/low/scan.h	2004-09-08 15:33:35.000000000 +0200
+++ ug-patched/low/scan.h	2009-05-07 10:00:28.000000000 +0200
@@ -20,7 +20,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/low/scan.h,v 1.10 2004/09/08 13:33:35 thimo Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -92,6 +92,6 @@
 INT ReadArgvMEM (const char *name, MEM *mem_size, INT argc, char **argv);
 INT ReadArgvOption (const char *name, INT argc, char **argv);
 
-END_NAMESPACE
+END_UG_NAMESPACE
 
 #endif
diff -ru ug-orig/low/smallvecs.h ug-patched/low/smallvecs.h
--- ug-orig/low/smallvecs.h	2004-09-02 13:45:58.000000000 +0200
+++ ug-patched/low/smallvecs.h	2004-09-02 13:45:58.000000000 +0200
@@ -1,4 +1,4 @@
-/* $Id: smallvecs.h,v 1.1 2004/09/02 11:45:58 thimo Exp $ */
+/* $Id: smallvecs.h 7770 2004-09-02 11:45:58Z thimo $ */
 
 /*
 
diff -ru ug-orig/low/tree.c ug-patched/low/tree.c
--- ug-orig/low/tree.c	2004-07-21 11:19:50.000000000 +0200
+++ ug-patched/low/tree.c	2008-12-19 11:06:12.000000000 +0100
@@ -23,6 +23,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <limits.h>
 #include <stdlib.h>
 #ifndef __MWCW__
@@ -57,32 +58,25 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/low/tree.c,v 1.8 2004/07/21 09:19:50 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header: /var/lib/cvs/UG/ug/low/tree.c,v 1.8 2004-07-21 09:19:50 sander Exp $",UG_RCS_STRING);
 
 
 /****************************************************************************/
-/*D
-   CreateTree - Create root of search tree
+/** \brief Create root of search tree
 
-   SYNOPSIS:
-   TREE *CreateTree(HEAP *theHeap, INT dim, DOUBLE *posrange)
-
-   PARAMETERS:
 .  HEAP - reference to Heap to get memory from
 .  dim - dimension of underlaying space
 .  posrange - array of ranges of positions in order x1min,x1max,x2min,...
 
-   DESCRIPTION:
    This function creates a new search tree.
 
    For dim equal to one the tree is a binary tree, for dim equal to two
    a quarttree...
 
    RETURN VALUE:
-   TREE *
 .n     pointer to the tree
 .n     NULL if an error occurred
-D*/
+*/
 /****************************************************************************/
 TREE *CreateTree (HEAP *theHeap, INT dim, DOUBLE *posrange)
 {
@@ -109,21 +103,14 @@
 }
 
 /****************************************************************************/
-/*D
-   DeleteTree - Removes a search tree
-
-   SYNOPSIS:
-   INT DeleteTree(TREE *theTree);
+/** \brief Removes a search tree
 
-   PARAMETERS:
 .  theTree - reference to the tree
 
-   DESCRIPTION:
    This function deletes a search tree and frees all the memory
    occupied by the tree and its objects.
 
    RETURN VALUE:
-   INT
 .n     0 if okay
 .n     1 if an error occurred
 D*/
@@ -200,26 +187,18 @@
 }
 
 /****************************************************************************/
-/*D
-   SearchInsertPoint - Gets position of insert point
+/** \brief Gets position of insert point
 
-   SYNOPSIS:
-   INT SearchInsertPoint(TREE *theTree, DOUBLE *position,
-                                  TREE_ENTRY **insertPoint)
-
-   PARAMETERS:
 .  theTree - reference to the tree
 .  Position - position of the object
 . insertPoint - Pointer to result
 
-   DESCRIPTION:
    This function searches the tree for the point for insertation of a new
    object. *insertPoint points to the insertation place and the return value
    indicates if the insertation point is at a free end of the tree or already
    occupied.
 
    RETURN VALUE:
-   INT
 .n 0 - tree not correct
 .n 1 - insertation point is a free end
 .n 2 - place is occupied
@@ -260,24 +239,17 @@
 
 
 /****************************************************************************/
-/*D
-   InsertinTree - Inserts object in search tree
-
-   SYNOPSIS:
-   void *InsertinTree(TREE *theTree, DOUBLE *Position);
+/** \brief Inserts object in search tree
 
-   PARAMETERS:
 .  theTree - reference to the tree
 .  Position - position of the object
 .  obj - pointer to object
 
-   DESCRIPTION:
    This function changes the search tree for a new object at Position.
    The tree leaf will hold a pointer to the object which has to exist
    before.
 
    RETURN VALUE:
-   INT
 .n     error code
 .n     0 if okay
 D*/
@@ -427,25 +399,18 @@
 }
 
 /****************************************************************************/
-/*D
-   DeleteObjinTree - Deletes object in search tree
-
-   SYNOPSIS:
-   void *DeleteObjinTree(TREE *theTree, DOUBLE *Position);
+/** \brief Deletes object in search tree
 
-   PARAMETERS:
 .  theTree - reference to the tree
 .  Position - position of the object
 
-   DESCRIPTION:
    This function deletes the tree leaf at Position and all
    unnecassary tree nodes from the search tree.
 
    RETURN VALUE:
-   void *
 .n     pointer to object at delete position
 .n     NULL if none or error occured
-D*/
+*/
 /****************************************************************************/
 void *DeleteObjinTree (TREE *theTree, DOUBLE *Position)
 {
@@ -534,29 +499,21 @@
 }
 
 /****************************************************************************/
-/*D
-   GetFirstLeafinQuader,GetNextLeafinQuader - Gives objects whitch are inside a hyper-rectangular
-
-   SYNOPSIS:
-   void *GetFirstLeafinQuader(TREE *theTree, DOUBLE *ll, DOUBLE *ur);
-.n void *GetNextLeafinQuader(TREE *theTree);
+/** \brief Gives objects whitch are inside a hyper-rectangular
 
-   PARAMETERS:
 .  theTree - reference to the tree
 .  ll: lower left ... corner coordinates
 .  ur: upper right ... corner coordinates
 
-   DESCRIPTION:
    GetFirstLeafinQuader initializes the fifo for a search and searches for
    a first leaf entry in the tree theTree which is lying inside the quader
    with lower left ... corner ll and upper right ... corner ur.
 .n GetNextLeafinQuader searches for the next object in the quader.
 
    RETURN VALUE:
-   INT
 .n     Pointer to the TREE_ENTRY
 .n     NULL if no leaf entry inside exists or an error occured
-D*/
+*/
 /****************************************************************************/
 TREE_ENTRY *GetFirstLeafinQuader(TREE *theTree, DOUBLE *ll, DOUBLE *ur)
 {
@@ -644,6 +601,23 @@
 	return(NULL);
 }
 
+/****************************************************************************/
+/** \brief Gives objects whitch are inside a hyper-rectangular
+
+.  theTree - reference to the tree
+.  ll: lower left ... corner coordinates
+.  ur: upper right ... corner coordinates
+
+   GetFirstLeafinQuader initializes the fifo for a search and searches for
+   a first leaf entry in the tree theTree which is lying inside the quader
+   with lower left ... corner ll and upper right ... corner ur.
+.n GetNextLeafinQuader searches for the next object in the quader.
+
+   RETURN VALUE:
+.n     Pointer to the TREE_ENTRY
+.n     NULL if no leaf entry inside exists or an error occured
+*/
+/****************************************************************************/
 TREE_ENTRY *GetNextLeafinQuader(TREE *theTree)
 {
 	INT i, dim, inside;
diff -ru ug-orig/low/tree.h ug-patched/low/tree.h
--- ug-orig/low/tree.h	2004-07-21 11:19:50.000000000 +0200
+++ ug-patched/low/tree.h	2009-05-07 10:00:28.000000000 +0200
@@ -15,7 +15,7 @@
 /*                                                                          */
 /****************************************************************************/
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/low/tree.h,v 1.4 2004/07/21 09:19:50 sander Exp $
+$Header$
 */
 /****************************************************************************/
 /*                                                                          */
@@ -126,6 +126,6 @@
 TREE_ENTRY *GetNextLeafinQuader(TREE *theTree);
 
 
-END_NAMESPACE
+END_UG_NAMESPACE
 
 #endif
diff -ru ug-orig/low/ugenv.c ug-patched/low/ugenv.c
--- ug-orig/low/ugenv.c	2006-04-18 10:55:47.000000000 +0200
+++ ug-patched/low/ugenv.c	2009-11-18 14:35:32.000000000 +0100
@@ -24,6 +24,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
@@ -56,12 +57,14 @@
 /*                                                                          */
 /****************************************************************************/
 
-static HEAP *envHeap=NULL;              /* heap used for the environment    */
-static ENVDIR *path[MAXENVPATH];        /* path to current directory        */
+/** \brief Path to current directory
+    
+We only need the first entry to be zero-initialized. */
+static ENVDIR *path[MAXENVPATH] = {NULL};
 static int pathIndex;                   /* entry to path array              */
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/low/ugenv.c,v 1.21 2006/04/18 08:55:47 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /** \brief Initialize the Environment and the heap
@@ -78,23 +81,17 @@
 */
 /****************************************************************************/
 
-INT NS_PREFIX InitUgEnv (INT heapSize)
+INT NS_PREFIX InitUgEnv ()
 {
-    void *buffer;
     ENVDIR *root;
 
     /* Environment heap already initialized? */
-    if (envHeap)
+    if (path[0])
         return 0;
-    
-    /* allocate memory from system */
-    if ((buffer=malloc(heapSize))==NULL) return(__LINE__);
-    
-    /* initialize heap structure */
-    if ((envHeap=NewHeap(GENERAL_HEAP,heapSize,buffer))==NULL) return(__LINE__);
-    
+
     /* allocate root directory */
-    if ((root=(ENVDIR*)GetMem(envHeap,sizeof(ENVDIR),0))==NULL) return(__LINE__);
+    if ((root=(ENVDIR*)malloc(sizeof(ENVDIR)))==NULL) return(__LINE__);
+
     root->type = ROOT_DIR;
     root->next = root->previous = root->down = NULL;
     strcpy(root->name,"root");
@@ -107,14 +104,6 @@
     return(0);
 }
 
-INT NS_PREFIX ExitUgEnv()
-{
-    free(envHeap);
-    envHeap = NULL;
-    return 0;
-}
-
-
 /****************************************************************************/
 /** \brief Change environment directory    
 
@@ -263,6 +252,8 @@
     /* check if name not already used in this directory */
     currentDir = path[pathIndex];
     anItem = lastItem = currentDir->down;
+
+#ifdef Debug
     while (anItem!=NULL)
     {
         if ((anItem->v.type==type)&&(strcmp(anItem->v.name,name)==0))
@@ -273,7 +264,8 @@
         lastItem = anItem;
         anItem = anItem->v.next;
     }
-    
+#endif    
+
     /* allocate memory from environment heap */
     switch (type)
     {
@@ -284,7 +276,8 @@
             if (type%2==0)
             {
                 /* new variable */
-                newItem=(ENVITEM *) GetMem(envHeap,size,0);
+                newItem=(ENVITEM*) malloc(size);
+
                 if (newItem==NULL)
 				{
 					UserWriteF("MakeEnvItem(): envHeap out of memory\n");
@@ -296,7 +289,8 @@
             {
                 /* new directory */
                 if (pathIndex+1>=MAXENVPATH) return(NULL);
-                newItem=(ENVITEM *) GetMem(envHeap,size,0);
+                newItem=(ENVITEM*) malloc(size);
+
                 if (newItem==NULL)
 				{
 					UserWriteF("MakeEnvItem(): envHeap out of memory\n");
@@ -322,10 +316,11 @@
     }
     else
     {
-        /* append to last Item */
-        lastItem->v.next = newItem;
-        newItem->v.previous = lastItem;
-        newItem->v.next = NULL;
+        /* insert before first item */
+        newItem->v.previous = NULL;
+        currentDir->down->v.previous = newItem;
+        newItem->v.next = currentDir->down;
+        currentDir->down = newItem;
     }
 
     /* return pointer to new item */
@@ -378,32 +373,12 @@
         theItem->v.next->v.previous = theItem->v.previous;
     
     /* deallocate memory */
-    DisposeMem(envHeap,theItem);
-    
+    free(theItem);
+
     /* return ok */
     return(0);
 }
 
-/****************************************************************************/
-/*D
-   RemoveEnvDir - Deallocate an environment directory
-
-   SYNOPSIS:
-   INT RemoveEnvItem (ENVITEM *theItem);
-
-   PARAMETERS:
- * @param   theItem - pointer to item
-
-   DESCRIPTION:
-   This function deallocates an environment directory.
-
-   @return <ul>
-   INT
- *   <li>     0 if OK
- *   <li>     3 if attempt is done to delete locked item.
-D*/
-/****************************************************************************/
-
 #ifndef __T3E__
 static 
 #endif
@@ -415,12 +390,28 @@
 		Next = NEXT_ENVITEM(Item);
 		if (IS_ENVDIR(Item)) 
 			RemoveEnvDirContent(ENVITEM_DOWN(Item));
-		DisposeMem(envHeap,Item);
+                free(Item);
 	}
 
     return(0);
 }
 
+/****************************************************************************/
+/** \brief Deallocate an environment directory
+
+ * @param   theItem - pointer to item
+
+   This function deallocates an environment directory.
+
+   @return <ul>
+   <li>     0 if OK
+   <li>     1 if item not found in current directory
+   <li>     2 if theItem is not a directory
+   <li>     3 if attempt is done to delete locked item
+   </ul>
+*/
+/****************************************************************************/
+
 INT NS_PREFIX RemoveEnvDir (ENVITEM *theItem)
 {
     ENVITEM *anItem;
@@ -448,7 +439,7 @@
         theItem->v.next->v.previous = theItem->v.previous;
     
     /* deallocate memory */
-    DisposeMem(envHeap,theItem);
+    free(theItem);
 
     return(0);
 }
@@ -580,11 +571,11 @@
 
 
 /****************************************************************************/
-/** \brief Allocate memory from environment heap
+/** \brief For backward compatibility: Allocate memory from environment heap
 
  * @param   size - number of bytes to be allocated
 
-   This function allocates memory from environment heap.
+ \deprecated Simply a wrapper for malloc()
 
    @return <ul>
    Pointer to allocated memory
@@ -593,37 +584,37 @@
 
 void * NS_PREFIX AllocEnvMemory (INT size)
 {
-    return(GetMem(envHeap,size,0));
+    return malloc(size);
 }
 
 /****************************************************************************/
-/** \brief Deallocate memory from environment heap 
+/** \brief For backward compatibility: Deallocate memory from environment heap 
 
  * @param   buffer - pointer to buffer previously allocated
 
-   This function deallocates memory from environment heap.
-
+ \deprecated Simply a wrapper for free()
 */
 /****************************************************************************/
 
 void  NS_PREFIX FreeEnvMemory (void *buffer)
 {
-    DisposeMem(envHeap,buffer);
+    free(buffer);
 }
 
 /****************************************************************************/
-/** \brief Print size and used of environment heap to string
+/** \brief For backward compatibility: Print size and used of environment heap to string
 
  * @param   s - string to print on
 
-   This function prints size and used of environment heap to string. 
-
+   This function used to print size and used percentage of the environment heap 
+   to a string.  Ever since the operating system heap is used this information
+   is not available anymore.
 */
 /****************************************************************************/
 
 void  NS_PREFIX EnvHeapInfo (char *s)
 {
-    sprintf(s,"   size: %ld\n   used: %ld\n",HeapSize(envHeap),HeapUsed(envHeap));
+    sprintf(s,"no heap information available\n");
 }
 
 /****************************************************************************/
@@ -665,3 +656,11 @@
 }
 
 
+INT NS_PREFIX ExitUgEnv()
+{
+    RemoveEnvDirContent((ENVITEM*)path[0]);
+    path[0] = NULL;
+    return 0;
+}
+
+
diff -ru ug-orig/low/ugenv.h ug-patched/low/ugenv.h
--- ug-orig/low/ugenv.h	2006-06-02 17:40:38.000000000 +0200
+++ ug-patched/low/ugenv.h	2009-05-07 10:00:28.000000000 +0200
@@ -16,9 +16,39 @@
 /*                                                                          */
 /****************************************************************************/
 
+/** \file
+    \brief General data management concept in a tree structure
+
+    The environment management of ug provides the possibility to store data in
+    a tree structure.    
+    The data structures of the environment allow to create directories and items
+    of specified size. Both data structures start with a general head (among
+    others a name by which one can refer to it). The remaining memory up to the
+    specified size can be used in arbitrary way.
+    
+    The head is identical with the struct ENVVAR.
+
+    All items are members of doubly linked lists.
+    
+    The data structure for the directory ENVDIR has just an extra component to the
+    start of a list which is the directory contents (and can consist of
+    directories itself, of course).
+    
+    The tree starts with a root directory "/" and there is always a current
+    or working directory. Paths are specified in UNIX-style. The current
+    directory can be changed using 'ChangeEnvDir' while 'GetCurrentDir'
+    returns a pointer to the current directory. The routine
+    'MakeEnvItem' creates the specified item in the current directory and
+    it is possible to 'RemoveEnvItem's created previously.
+    
+    Finally 'SearchEnv' offers the possibility to hierarchically search
+    the environment tree for an item specified by its name.
+    
+*/
+
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/low/ugenv.h,v 1.17 2006/06/02 15:40:38 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -90,7 +120,7 @@
 /** \brief User-defined variable */
 typedef struct {
 
-    /** \brief One of the variable types above            */
+    /** \brief even number by GetNewEnvVarID           */
     INT type;
 
     /** \brief May not be changed or deleted            */
@@ -108,7 +138,7 @@
 /** \brief Directory */
 typedef struct {
 
-    /** \brief One of the directory types above         */
+    /** \brief odd number by GetNewEnvDirID        */
     INT type;
 
     /** \brief May not be changed or deleted            */
@@ -138,8 +168,8 @@
 /*                                                                          */
 /****************************************************************************/
 
-/* initialize environment with following heapSize */
-INT      InitUgEnv        (INT heapSize);
+/* initialize environment  */
+INT      InitUgEnv        ();
 
 /* Free all memory allocated for the environment */
 INT      ExitUgEnv();
@@ -182,6 +212,6 @@
 INT      GetNewEnvVarID (void);
 
 
-END_NAMESPACE
+END_UG_NAMESPACE
 
 #endif
diff -ru ug-orig/low/ugfile.h ug-patched/low/ugfile.h
--- ug-orig/low/ugfile.h	2004-09-02 13:45:58.000000000 +0200
+++ ug-patched/low/ugfile.h	2004-09-02 13:45:58.000000000 +0200
@@ -1,4 +1,4 @@
-/* $Id: ugfile.h,v 1.1 2004/09/02 11:45:58 thimo Exp $ */
+/* $Id: ugfile.h 7770 2004-09-02 11:45:58Z thimo $ */
 
 /*
 
diff -ru ug-orig/low/ugmemory.h ug-patched/low/ugmemory.h
--- ug-orig/low/ugmemory.h	2004-09-02 13:45:58.000000000 +0200
+++ ug-patched/low/ugmemory.h	2004-09-02 13:45:58.000000000 +0200
@@ -1,4 +1,4 @@
-/* $Id: ugmemory.h,v 1.1 2004/09/02 11:45:58 thimo Exp $ */
+/* $Id: ugmemory.h 7770 2004-09-02 11:45:58Z thimo $ */
 
 /*
 
diff -ru ug-orig/low/ugstrings.h ug-patched/low/ugstrings.h
--- ug-orig/low/ugstrings.h	2004-09-02 13:45:58.000000000 +0200
+++ ug-patched/low/ugstrings.h	2009-08-16 08:10:22.000000000 +0200
@@ -1,4 +1,4 @@
-/* $Id: ugstrings.h,v 1.1 2004/09/02 11:45:58 thimo Exp $ */
+/* $Id: ugstrings.h 8356 2009-08-16 06:10:22Z sander $ */
 
 /*
 
@@ -28,7 +28,7 @@
 #if STDC_HEADERS
 # ifdef HAVE_STRING_H
 #  include <string.h>
-# elif
+# else
 #  ifdef HAVE_STRINGS_H
 #   include <strings.h>
 #  endif
diff -ru ug-orig/low/ugstruct.c ug-patched/low/ugstruct.c
--- ug-orig/low/ugstruct.c	2004-07-21 11:19:50.000000000 +0200
+++ ug-patched/low/ugstruct.c	2009-04-29 15:11:55.000000000 +0200
@@ -30,6 +30,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -74,28 +75,21 @@
 static INT theStringVarID;			/* env type for String vars 			*/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/low/ugstruct.c,v 1.17 2004/07/21 09:19:50 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
-/*D
-   ChangeStructDir - change current structure directory
+/** \brief Change current structure directory
    
-   SYNOPSIS:
-   ENVDIR *ChangeStructDir (const char *name);
+\param name - name to which the current structure directory shall be changed
    
-   PARAMETERS:
-.  name - name to which the current structure directory shall be changed
-   
-   DESCRIPTION:
    Changes the current structure directory to the one given by name. The name is
    interpreted as starting from the previous end of the path. It is possible to
    use ".." to go to the parent directory and ":" at the beginning
    to start from the root directory.
    
-   RETURN VALUE:
-   ENVDIR *
-.n The new directory or NULL, if it was not found.
-D*/
+   \return
+   The new directory or NULL, if it was not found.
+*/
 /****************************************************************************/
 
 ENVDIR * NS_PREFIX ChangeStructDir (const char *name)
@@ -177,36 +171,29 @@
 	return(path[pathIndex]);
 }
 
+static char token[NAMESIZE]; 			/* must be global for lastnameHnd ! */
+static char nexttoken[NAMESIZE];        /* must be global for lastnameHnd ! */
+
 /****************************************************************************/
-/*D
-   FindStructDir - finds the directory with the given name or its parent
+/** \brief Finds the directory with the given name or its parent
    
-   SYNOPSIS:
-   ENVDIR *FindStructDir (const char *name, char **lastnameHnd);
+ \param name - name to be found (from current structure directory)
+ \param lastnameHnd - if not NULL it is set to a pointer to the last name
    
-   PARAMETERS:
-.  name - name to be found (from current structure directory)
-.  lastnameHnd - if not NULL it is set to a pointer to the last name
-   
-   DESCRIPTION:
    This function searchs (starting from the current structure directory)
    for the structure directory given by name and returns its adress.
    It does not change the current structure directory! If 'lastnameHnd!=NULL'
    it also sets '*lastNameHnd' to be a pointer to the last name of the directory.
    
-   SEE ALSO:
+   \sa
    strntok
    
-   RETURN VALUE:
-   ENVDIR *
-.n The directory, or NULL if not found.
-D*/
+   \return
+   The directory, or NULL if not found.
+*/
 /****************************************************************************/
 
-static char token[NAMESIZE]; 			/* must be global for lastnameHnd ! */
-static char nexttoken[NAMESIZE];        /* must be global for lastnameHnd ! */
-
-ENVDIR * NS_PREFIX FindStructDir (const char *name, char **lastnameHnd)
+ENVDIR * NS_PREFIX FindStructDir (const char *name, const char **lastnameHnd)
 {
 	ENVDIR *newPath[MAXENVPATH];
 	ENVDIR *theDir;
@@ -300,23 +287,14 @@
 }
 
 /****************************************************************************/
-/*D
-   FindStringVar - searches a string variable inside a directory/structure
+/** \brief Searches a string variable inside a directory/structure
    
-   SYNOPSIS:
-   STRVAR *FindStringVar (const ENVDIR *where, const char *name);
+ \param where - the directory to be searched
+ \param name - the name to be searched
 
-   PARAMETERS:
-.  where - the directory to be searched
-.  name - the name to be searched
-
-   DESCRIPTION:
-   See above.
-
-   RETURN VALUE:
-   STRVAR *
-.n The address of the variable or NULL, if not found.
-D*/
+   \return
+   The address of the variable or NULL, if not found.
+*/
 /****************************************************************************/
 
 STRVAR * NS_PREFIX FindStringVar (const ENVDIR *where, const char *name)
@@ -339,20 +317,14 @@
 }
 
 /****************************************************************************/
-/*D
-   FindStructure - searches a directory/structure inside a directory/structure
+/** \brief Searches a directory/structure inside a directory/structure
    
-   SYNOPSIS:
-   ENVDIR *FindStructure (const ENVDIR *where, const char *name)
+ \param where - the directory to be searched (if NULL then search is in root)
+ \param name - the name to be searched
    
-   PARAMETERS:
-.  where - the directory to be searched (if NULL then search is in root)
-.  name - the name to be searched
-   
-   RETURN VALUE:
-   ENVDIR *
-.n The address of the structure or NULL, if not found.
-D*/
+   \return
+   The address of the structure or NULL, if not found.
+*/
 /****************************************************************************/
 
 ENVDIR * NS_PREFIX FindStructure (const ENVDIR *where, const char *name)
@@ -377,28 +349,20 @@
 }
 
 /****************************************************************************/
-/*D
-    GetStringVar - Get string contained in the variable 'name'
+/** \brief Get string contained in the variable 'name'
 
-    SYNOPSIS:
-    char *GetStringVar (const char *name);
+ \param  name - name of the string variable (from the current structure directory)
 
-    PARAMETERS:
-.   name - name of the string variable (from the current structure directory)
-
-    DESCRIPTION:
     This function returns the string contained in the variable 'name'.	
 
-    RETURN VALUE:
-    char *
-.n  pointer to the string
-.n  NULL if not found
-D*/
+    \return
+   Pointer to the string, or NULL if not found
+*/
 /****************************************************************************/
 
 char * NS_PREFIX GetStringVar (const char *name)
 {
-	char *lastname;
+	const char *lastname;
 	ENVDIR *theDir;
 	STRVAR *myVar;
 	
@@ -412,30 +376,25 @@
 }
 
 /****************************************************************************/
-/*
-   GetStringValue - Get double value of the string contained in the variable 'name'
+/** \brief Get double value of the string contained in the variable 'name'
+
+ \param name - name of the string variable
+ \param value - address where the result is stored
+
+   Same as GetStringValueDouble. 
 
-   SYNOPSIS:
-   INT GetStringValue (const char *name, double *value);
+   \todo Should not be used and may be skipped in a future version.
 
-   PARAMETERS:
-.  name - name of the string variable
-.  value - address where the result is stored
-
-   DESCRIPTION:
-   Same as GetStringValueDouble. Should not be used and may be skipped
-   in a future version.
-
-   RETURN VALUE:
-   INT
-.n     0 if ok
-.n     1 if error occured.
+   \return <ul>
+   <li> 0 if ok </li>
+   <li> 1 if error occured </li>
+   </ul>
 */
 /****************************************************************************/
 
 INT  NS_PREFIX GetStringValue (const char *name, double *value)
 {
-	char *lastname;
+	const char *lastname;
 	ENVDIR *theDir;
 	STRVAR *myVar;
 	
@@ -452,30 +411,24 @@
 }
 
 /****************************************************************************/
-/*D
-   GetStringValueDouble	- Get double value of a variable
+/** \brief Get double value of a variable
 
-   SYNOPSIS:
-   INT GetStringValueDouble (const char *name, double *value);
+ \param name - name of the string variable
+ \param value - address where the result is stored
 
-   PARAMETERS:
-.  name - name of the string variable
-.  value - address where the result is stored
-
-   DESCRIPTION:
    This function evaluates a string variable holding a floating point number
    and returns the result.
 
-   RETURN VALUE:
-   INT
-.n     0 if ok
-.n     1 if error occured.
-D*/
+   \return <ul>
+   <li> 0 if ok </li>
+   <li> 1 if error occured </li>
+   </ul>
+*/
 /****************************************************************************/
 
 INT  NS_PREFIX GetStringValueDouble (const char *name, double *value)
 {
-	char *lastname;
+	const char *lastname;
 	ENVDIR *theDir;
 	STRVAR *myVar;
 	double val;
@@ -494,30 +447,24 @@
 }
 
 /****************************************************************************/
-/*D
-   GetStringValueInt - Get integer value of a variable
-
-   SYNOPSIS:
-   INT GetStringValueInt (const char *name, int *value);
+/** \brief Get integer value of a variable
 
-   PARAMETERS:
-.  name - name of the string variable
-.  value - place result here
+ \param name - name of the string variable
+ \param value - place result here
 
-   DESCRIPTION:
    This function evaluates a string variable holding an integer number
    and returns the result.
 
-   RETURN VALUE:
-   INT
-.n     0 if ok
-.n     1 if error occured.
-D*/
+   \return <ul>
+   <li> 0 if ok </li>
+   <li> 1 if error occured </li>
+   </ul>
+*/
 /****************************************************************************/
 
 INT  NS_PREFIX GetStringValueInt (const char *name, int *value)
 {
-	char *lastname;
+	const char *lastname;
 	ENVDIR *theDir;
 	STRVAR *myVar;
 	int val;
@@ -536,35 +483,28 @@
 }
 
 /****************************************************************************/
-/*D
-   GetStringDOUBLEInRange - Get the double value of 'name' together with a range check
+/** \brief Get the double value of 'name' together with a range check
 
-   SYNOPSIS:
-   INT GetStringDOUBLEInRange (const char *name, DOUBLE min, 
-   DOUBLE max, DOUBLE *value);
-
-   PARAMETERS:
-.  name - memory address of the string variable
-.  min - left endpoint of interval
-.  max - right endpoint of interval
-.  value - address where the value is stored
+ \param name - memory address of the string variable
+ \param min - left endpoint of interval
+ \param max - right endpoint of interval
+ \param value - address where the value is stored
  
-   DESCRIPTION:
    This function gets the double value of the string variable 'name'
    and checks wether it is lying in the specified interval.
 
-   RETURN VALUE:
-   INT
-.n     0 if ok
-.n     1 variable not found
-.n     2 no legal value
-.n     3/4 outside of range
-D*/
+   \return <ul>
+<li>  0 if ok </li>
+<li>  1 variable not found </li>
+<li>  2 no legal value </li>
+<li>  3/4 outside of range </li>
+</ul>
+*/
 /****************************************************************************/
 
 INT  NS_PREFIX GetStringDOUBLEInRange (const char *name, DOUBLE min, DOUBLE max, DOUBLE *value)
 {
-	char *lastname;
+	const char *lastname;
 	ENVDIR *theDir;
 	STRVAR *myVar;
 	double val;
@@ -580,34 +520,28 @@
 }
 
 /****************************************************************************/
-/*D
-   GetStringINTInRange - Get the integer value of 'name' together with a range check
+/** \brief Get the integer value of 'name' together with a range check
 
-   SYNOPSIS:
-   INT GetStringINTInRange (const char *name, INT min, INT max, INT *value);
+ \param name - memory address of the string variable
+ \param min - left endpoint of interval
+ \param max - right endpoint of interval
+ \param value - address where the value is stored
 
-   PARAMETERS:
-.  name - memory address of the string variable
-.  min - left endpoint of interval
-.  max - right endpoint of interval
-.  value - address where the value is stored
-
-   DESCRIPTION:
    This function gets the integer value of the string variable 'name'
    and checks wether it is lying in the specified interval.
 
-   RETURN VALUE:
-   INT
-.n     0 if ok
-.n     1 variable not found
-.n     2 no legal value
-.n     3/4 outside of range
-D*/
+   \return <ul>
+   <li>  0 if ok </li>
+   <li>  1 variable not found </li>
+   <li>  2 no legal value </li>
+   <li>  3/4 outside of range </li>
+</ul>
+*/
 /****************************************************************************/
 
 INT  NS_PREFIX GetStringINTInRange (const char *name, INT min, INT max, INT *value)
 {
-	char *lastname;
+	const char *lastname;
 	ENVDIR *theDir;
 	STRVAR *myVar;
 	int val;
@@ -623,23 +557,15 @@
 }
 
 /****************************************************************************/
-/*D
-   GetCurrentStructDir - get current structure directory
-
-   SYNOPSIS:
-   ENVDIR *GetCurrentStructDir ();
-
-   PARAMETERS:
-.  void -
+/** \brief Get current structure directory
 
-   DESCRIPTION:
    This function returns the current structure directory.
 
-   RETURN VALUE:
-   ENVDIR *
-.n     pointer to the directory
-.n     NULL
-D*/
+   \return <ul>
+<li>  pointer to the directory </li>
+<li>  NULL </li>
+</ul>
+*/
 /****************************************************************************/
 
 ENVDIR * NS_PREFIX GetCurrentStructDir ()
@@ -648,24 +574,17 @@
 }
 
 /****************************************************************************/
-/*D
-   GetStructPathName - Assemble pathname of current structure directory	
-
-   SYNOPSIS:
-   INT GetStructPathName (char *s, int n);
+/** \brief Assemble pathname of current structure directory	
 
-   PARAMETERS:
-.  s - pointer to buffer for the string						
-.  n - length of buffer
+ \param s - pointer to buffer for the string						
+ \param n - length of buffer
 
-   DESCRIPTION:
    This function assembles the pathname of the current structure directory. 
 
-   RETURN VALUE:
-   INT
-.n     0 if ok
-.n     1 if error occured.
-D*/
+   \return
+<li>  0 if ok </li>
+<li>  1 if error occured. </li>
+*/
 /****************************************************************************/
 
 INT  NS_PREFIX GetStructPathName (char *s, int n)
@@ -689,32 +608,25 @@
 }
 
 /****************************************************************************/
-/*D
-   MakeStructItem - Allocate a new environment item in the current directory 
+/** \brief Allocate a new environment item in the current directory 
 
-   SYNOPSIS:
-   ENVITEM *MakeStructItem (ENVDIR *where, const char *name, INT type, 
-  INT size);
-
-   PARAMETERS:
-.  where - directory in which the new one will be allocated
-.  name - name of the new item
-.  type - type of the new item
-.  size - total size if user defined, string size for string variable
+ \param where - directory in which the new one will be allocated
+ \param name - name of the new item
+ \param type - type of the new item
+ \param size - total size if user defined, string size for string variable
   
-   DESCRIPTION:
    This function allocates a new environment item in the current directory.
    It is some reduced form of 'MakeEnvItem' with the additional feature,
    that it can start from a given directory.
    
-   SEE ALSO:
+   \sa
    MakeEnvItem
    
-   RETURN VALUE:
-   ENVITEM *
-.n      pointer to
-.n      NULL if not enough memory in the environment heap or other error condition occurs
-D*/
+   \return <ul>
+<li>   pointer to </li>
+<li>   NULL if not enough memory in the environment heap or other error condition occurs </li>
+</ul>
+*/
 /****************************************************************************/
 
 ENVITEM * NS_PREFIX MakeStructItem (ENVDIR *where, const char *name, INT type, INT size)
@@ -785,25 +697,20 @@
 }
 
 /****************************************************************************/
-/*D
-   MakeStruct - Allocate a new structure
-
-   SYNOPSIS:
-   INT MakeStruct (const char *name);
+/** \brief Allocate a new structure
 
-   PARAMETERS:
-.  name - name of the new directory
+ \param name - name of the new directory
 
-   RETURN VALUE:
-   INT
-.n     0 if ok
-.n     1 if error occured.
-D*/
+   \return <ul>
+<li>  0 if ok </li>
+<li>  1 if error occured </li>
+</ul>
+*/
 /****************************************************************************/
 
 INT NS_PREFIX MakeStruct (const char *name)
 {
-	char *lastname;
+	const char *lastname;
 	ENVDIR *theDir,*theStruct;
 	
 	if ((theDir=FindStructDir(name,&lastname))==NULL)							return(1);
@@ -815,32 +722,27 @@
 }
 
 /****************************************************************************/
-/*D
-   DeleteStruct	- Delete an existing structure
-
-   SYNOPSIS:
-   INT DeleteStruct (char *name);
+/** \brief Delete an existing structure
 
-   PARAMETERS:
-.  name - structure name
+ \param name - structure name
 
    SEE ALSO:
    FindStructDir, FindStructure, CheckIfInStructPath, CheckStructTree, RemoveStructTree
 
-   RETURN VALUE:
-   INT
-.n     0 if ok
-.n     1 structure directory not found
-.n     2 structure does not exist
-.n     3 structure is inside structure path
-.n     4 structure contains locked objects
-.n     5 structure could not be removed
-D*/
+   \return <ul>
+<li>  0 if ok </li>
+<li>  1 structure directory not found </li>
+<li>  2 structure does not exist </li>
+<li>  3 structure is inside structure path </li>
+<li>  4 structure contains locked objects </li>
+<li>  5 structure could not be removed </li>
+</ul>
+*/
 /****************************************************************************/
 
-INT  NS_PREFIX DeleteStruct (char *name)
+INT  NS_PREFIX DeleteStruct (const char *name)
 {
-	char *lastname;
+	const char *lastname;
 	ENVDIR *theDir,*theStruct;
 	
 	if ((theDir=FindStructDir(name,&lastname))==NULL)
@@ -862,26 +764,20 @@
 }
 
 /****************************************************************************/
-/*D
-   RemoveStringVar - remove a string variable fro the environment tree
-
-   SYNOPSIS:
-   INT RemoveStringVar (ENVDIR *homeDir, STRVAR *theVar)
+/** \brief Remove a string variable fro the environment tree
 
-   PARAMETERS:
-.  homeDir - theVar is located in this directory
-.  theVar - string var to remove
+ \param homeDir - theVar is located in this directory
+ \param theVar - string var to remove
 
-   DESCRIPTION:
    This function removes a string variable from the environment tree.
 
-   RETURN VALUE:
-   INT
-.n     0 if ok
-.n     1 homeDir==NULL
-.n     2 theVar==NULL
-.n     3 theVar is a directory
-D*/
+   \return <ul>
+<li>  0 if ok </li>
+<li>  1 homeDir==NULL </li>
+<li>  2 theVar==NULL </li>
+<li>  3 theVar is a directory </li>
+</ul>
+*/
 /****************************************************************************/
 
 INT NS_PREFIX RemoveStringVar (ENVDIR *homeDir, STRVAR *theVar)
@@ -906,31 +802,26 @@
 }
 
 /****************************************************************************/
-/*D
-   DeleteVariable	- Delete an existing string variable
+/** \brief Delete an existing string variable
 
-   SYNOPSIS:
-   INT DeleteVariable (char *name);
-
-   PARAMETERS:
-.  name - variable name
+ \param name - variable name
 
    SEE ALSO:
    FindStructDir, FindStructure, CheckIfInStructPath, CheckStructTree, RemoveStructTree
 
-   RETURN VALUE:
-   INT
-.n     0 if ok
-.n     1 variable directory not found
-.n     2 variable does not exist
-.n     4 variable contains locked objects
-.n     5 variable could not be removed
-D*/
+   \return <ul>
+<li>  0 if ok </li>
+<li>  1 variable directory not found </li>
+<li>  2 variable does not exist </li>
+<li>  4 variable contains locked objects </li>
+<li>  5 variable could not be removed </li>
+</ul>
+*/
 /****************************************************************************/
 
-INT  NS_PREFIX DeleteVariable (char *name)
+INT  NS_PREFIX DeleteVariable (const char *name)
 {
-	char *lastname;
+	const char *lastname;
 	ENVDIR *theDir;
 	STRVAR *myVar;
 	
@@ -950,35 +841,29 @@
 }
 
 /****************************************************************************/
-/*D
-   SetStringVar - Set a string variable to a given string
+/** \brief Set a string variable to a given string
 
-   SYNOPSIS:
-   INT SetStringVar (const char *name, const char *sval);
+ \param name - variable name	
+ \param sval - address of the string
 
-   PARAMETERS:
-.  name - variable name	
-.  sval - address of the string
-
-   DESCRIPTION:
    This function searches a string variable and sets it to the given string.
    If the string variable does not yet exist it is created, if it is
    too short for the string, it is removed and newly created.
 
-   SEE ALSO:
+   \sa
    FindStructDir, FindStringVar, RemoveStringVar, MakeStructItem
 
-   RETURN VALUE:
-   INT
-.n     0 if ok
-.n     1 structure directory not found
-.n     2 could not allocate variable
-D*/
+   \return <ul>
+<li>  0 if ok </li>
+<li>  1 structure directory not found </li>
+<li>  2 could not allocate variable </li>
+</ul>
+*/
 /****************************************************************************/
 
 INT NS_PREFIX SetStringVar (const char *name, const char *sval)
 {
-	char *lastname;
+	const char *lastname;
 	ENVDIR *theDir;
 	STRVAR *myVar;
 	
@@ -1006,18 +891,12 @@
 }
 
 /****************************************************************************/
-/*D
-   SetnStringVar - Set a string variable to a given string
-
-   SYNOPSIS:
-   INT SetnStringVar (const char *name, const char *sval, int n);
+/** \brief Set a string variable to a given string
 
-   PARAMETERS:
-.  name - variable name
-.  sval - address of the string
-.  n - length of string
+ \param name - variable name
+ \param sval - address of the string
+ \param n - length of string
 
-   DESCRIPTION:
    This function searches a string variable and sets it to the given string.
    If the string variable does not yet exist it is created, if it is
    too short for the string, it is removed and newly created.
@@ -1025,20 +904,20 @@
    The difference to 'SetStringVar' is that the string is not terminated
    by '\0'.
 
-   SEE ALSO:
+   \sa
    SetStringVar, FindStructDir, FindStringVar, RemoveStringVar, MakeStructItem
 
-   RETURN VALUE:
-   INT
-.n     0 if ok
-.n     1 structure directory not found
-.n     2 could not allocate variable
-D*/
+   \return <ul>
+<li>  0 if ok </li>
+<li>  1 structure directory not found </li>
+<li>  2 could not allocate variable </li>
+</ul>
+*/
 /****************************************************************************/
 
 INT NS_PREFIX SetnStringVar (const char *name, const char *sval, int n)
 {
-	char *lastname;
+	const char *lastname;
 	ENVDIR *theDir;
 	STRVAR *myVar;
 	
@@ -1066,35 +945,29 @@
 	return(0);
 }
 /****************************************************************************/
-/*D
-   SetStringVarNotify - Set a string variable to a given string and notify if changed
+/** \brief Set a string variable to a given string and notify if changed
 
-   SYNOPSIS:
-   INT SetStringVarNotify (const char *name, const char *sval);
+ \param name - variable name	
+ \param sval - address of the string
 
-   PARAMETERS:
-.  name - variable name	
-.  sval - address of the string
-
-   DESCRIPTION:
    This function searches a string variable and sets it to the given string.
    If the string variable does not yet exist it is created, if it is
    too short for the string, it is removed and newly created.
 
-   SEE ALSO:
+   \sa
    FindStructDir, FindStringVar, RemoveStringVar, MakeStructItem
 
-   RETURN VALUE:
-   INT
-.n     0 if ok
-.n     1 structure directory not found
-.n     2 could not allocate variable
-D*/
+   \return <ul>
+<li>  0 if ok </li>
+<li>  1 structure directory not found </li>
+<li>  2 could not allocate variable </li>
+</ul>
+*/
 /****************************************************************************/
 
 INT NS_PREFIX SetStringVarNotify (const char *name, const char *sval)
 {
-	char *lastname;
+	const char *lastname;
 	ENVDIR *theDir;
 	STRVAR *myVar;
 	int notify = SV_NOT_CHANGED;
@@ -1126,26 +999,19 @@
 }
 
 /****************************************************************************/
-/*D
-   SetStringValue - Set a variable to a real value
-
-   SYNOPSIS:
-   INT SetStringValue (const char *name, double value);
+/** \brief Set a variable to a real value
 
-   PARAMETERS:
-.  name - variable name
-.  value - value
+ \param name - variable name
+ \param value - value
 
-   DESCRIPTION:
    This function sets a variable to a real value.
 
-   SEE ALSO:
+   \sa
    SetStringVar
 
-   RETURN VALUE:
-   INT
-.n     see 'SetStringVar'
-D*/
+   \return
+    see 'SetStringVar'
+*/
 /****************************************************************************/
 
 INT NS_PREFIX SetStringValue (const char *name, double value)
@@ -1158,25 +1024,19 @@
 
 
 /****************************************************************************/
-/*D
-   CheckStructTree - Check if LOCKED-Flag is set somewhere
+/** \brief Check if LOCKED-Flag is set somewhere
 
-   SYNOPSIS:
-   INT CheckStructTree (const ENVDIR *theDir);
+ \param theDir - directory in which struct is located
 
-   PARAMETERS:
-.  theDir - directory in which struct is located
-
-   DESCRIPTION:
    This function checks (recursively) if the LOCKED-Flag is set somewhere
    inside the directory tree starting at 'theDir'.
    Up to now the locking is not yet used.
 
-   RETURN VALUE:
-   INT
-.n     1 if LOCKED-Flag set somewhere
-.n     0 else.
-D*/											
+   \return <ul>
+<li>  1 if LOCKED-Flag set somewhere </li>
+<li>  0 else </li>
+</ul>
+*/											
 /****************************************************************************/
 
 INT NS_PREFIX CheckStructTree (const ENVDIR *theDir)
@@ -1195,23 +1055,15 @@
 }
 
 /****************************************************************************/
-/*D
-   CheckIfInStructPath - Searches '*theDir' inside the current structure path
-
-   SYNOPSIS:
-   INT CheckIfInStructPath (const ENVDIR *theDir);
+/** \brief Searches '*theDir' inside the current structure path
 
-   PARAMETERS:
-.  theDir - structure 
+ \param theDir - structure 
 
-   DESCRIPTION:
-   See above.
-
-   RETURN VALUE:
-   INT
-.n     1 if inside path
-.n     0 if not inside path.
-D*/
+   \return <ul>
+<li>  1 if inside path </li>
+<li>  0 if not inside path </li>
+</ul>
+*/
 /****************************************************************************/
 
 INT  NS_PREFIX CheckIfInStructPath (const ENVDIR *theDir)
@@ -1226,24 +1078,18 @@
 }		
 
 /****************************************************************************/
-/*D
-   RemoveStructTree - Removes the whole structure tree	
+/** \brief Removes the whole structure tree	
 
-   SYNOPSIS:
-   INT RemoveStructTree (ENVDIR *homeDir, ENVDIR *theDir);
+ \param homeDir - home directory
+ \param theDir - structure 
 
-   PARAMETERS:
-.  homeDir - home directory
-.  theDir - structure 
-
-   DESCRIPTION:
    This function removes recursively the whole structure tree.
 
-   RETURN VALUE:
-   INT
-.n     0 if ok
-.n     1 if error occured.
-D*/
+   \return <ul>
+<li>  0 if ok </li>
+<li>  1 if error occured </li>
+</ul>
+*/
 /****************************************************************************/
 
 INT NS_PREFIX RemoveStructTree (ENVDIR *homeDir, ENVDIR *theDir)
@@ -1270,34 +1116,28 @@
 }
 
 /****************************************************************************/
-/*D
-   DirOut - (recursively) print directory contents
+/** \brief (recursively) print directory contents
 
-   SYNOPSIS:
-   static INT DirOut (const ENVDIR *theDir, char *buffer, int bufLen, int ropt);
+ \param theDir - structure
+ \param buffer - address of buffer
+ \param bufLen - length of buffer
+ \param ropt - if set, the contents are printed recursively
 
-   PARAMETERS:
-.  theDir - structure
-.  buffer - address of buffer
-.  bufLen - length of buffer
-.  ropt - if set, the contents are printed recursively
-
-   DESCRIPTION:
    This function (recursively) prints the contents of theDir into the buffer.
    It will return the value 4 if the buffer is full and it is not yet ready.
    In this case it has to be called another time. If it is ready it returns
    the value 0.
 
-   RETURN VALUE:
-   INT
-.n    0 all is done
-.n    1 buffer too small
-.n    2 theDir is not a string directory
-.n    3 false type encountered (should never occur)
-.n    4 not yet ready with output (this is not an error!)
-.n    5 directory tree too deeply nested (should never occur)
-.n    6 this should also never occur
-D*/
+   \return <ul>
+<li> 0 all is done </li>
+<li> 1 buffer too small </li>
+<li> 2 theDir is not a string directory </li>
+<li> 3 false type encountered (should never occur) </li>
+<li> 4 not yet ready with output (this is not an error!) </li>
+<li> 5 directory tree too deeply nested (should never occur) </li>
+<li> 6 this should also never occur </li>
+</ul>
+*/
 /****************************************************************************/
 
 static INT DirOut (const ENVDIR *theDir, char *buffer, int bufLen, int ropt)
@@ -1427,29 +1267,23 @@
 }
 
 /****************************************************************************/
-/*D
-   VarOut - prints variable = content into a buffer
+/** \brief Prints variable = content into a buffer
 
-   SYNOPSIS:
-   static INT VarOut (const STRVAR *StrVar, char *buffer, int bufLen,);
+ \param StrVar - string variable
+ \param buffer - address of buffer
+ \param bufLen - length of buffer
 
-   PARAMETERS:
-.  StrVar - string variable
-.  buffer - address of buffer
-.  bufLen - length of buffer
-
-   DESCRIPTION:
    This function prints the contents of StrVar into the buffer.
    It will return the value 4 if the buffer is full and it is not yet ready.
    In this case it has to be called another time. If it is ready it returns
    the value 0.
 
-   RETURN VALUE:
-   INT
-.n    0 all is done
-.n    1 buffer too small
-.n    4 not yet ready with output (this is not an error!)
-D*/
+   \return <ul>
+<li> 0 all is done </li>
+<li> 1 buffer too small </li>
+<li> 4 not yet ready with output (this is not an error!) </li>
+</ul>
+*/
 /****************************************************************************/
 
 static INT VarOut (const STRVAR *StrVar, char *buffer, int bufLen)
@@ -1484,36 +1318,30 @@
 }
 
 /****************************************************************************/
-/*D
-   PrintStructContents - (recursively) print structure contents
+/** \brief (recursively) print structure contents
 
-   SYNOPSIS:
-   INT PrintStructContents (const char *name, char *buffer, int bufLen, int ropt);
+ \param name - name of structure(dir)
+ \param buffer - address of buffer
+ \param bufLen - length of buffer
+ \param ropt - if set, the contents are printed recursively
 
-   PARAMETERS:
-.  name - name of structure(dir)
-.  buffer - address of buffer
-.  bufLen - length of buffer
-.  ropt - if set, the contents are printed recursively
-
-   DESCRIPTION:
    This function prints the contents of the variable or structure 'name'.
    More or less it provides a call for the functions DirOut and VarOut.
    You should take care with error handling when using these function.
    
-   SEE ALSO:
+   \sa
    DirOut, VarOut, FindStructDir, FindStringVar, FindStructure
 
-   RETURN VALUE:
-   INT
-.n    0 all is done
-.n    1 buffer too small
-.n    2, 3 (should not occur)
-.n    4 not yet ready with output (this is not an error!)
-.n    5, 6 (should not occur)
-.n    7 structure path not found
-.n    8 structure not found
-D*/
+   \return <ul>
+<li> 0 all is done </li>
+<li> 1 buffer too small </li>
+<li> 2, 3 (should not occur) </li>
+<li> 4 not yet ready with output (this is not an error!) </li>
+<li> 5, 6 (should not occur) </li>
+<li> 7 structure path not found </li>
+<li> 8 structure not found </li>
+</ul>
+*/
 /****************************************************************************/
 
 INT  NS_PREFIX PrintStructContents (const char *name, char *buffer, int bufLen, int ropt)
@@ -1521,7 +1349,7 @@
 	static ENVDIR *theDir;
 	static STRVAR *StrVar;
 	static int status;
-	char *lastname;
+	const char *lastname;
 	int ret;
 	
 	buffer[0]=(char) 0;
@@ -1577,33 +1405,27 @@
 }
 
 /****************************************************************************/
-/*D
-   PrintCurrentStructContents - (recursively) print contents of current structure directory
-
-   SYNOPSIS:
-   INT PrintCurrentStructContents (int flag, char *buffer, int bufLen, int ropt);
+/** \brief (recursively) print contents of current structure directory
 
-   PARAMETERS:
-.  flag - 1 for the first call, 0 if others are necessary
-.  buffer - address of buffer
-.  bufLen - length of buffer
-.  ropt - if set, the contents are printed recursively
+ \param flag - 1 for the first call, 0 if others are necessary
+ \param buffer - address of buffer
+ \param bufLen - length of buffer
+ \param ropt - if set, the contents are printed recursively
 
-   DESCRIPTION:
    This function prints the contents of the of the current working structure.
    More or less it calls the function DirOut.
 
-   SEE ALSO:
+   \sa
    DirOut, PrintStructContents, FindStructDir, FindStringVar, FindStructure
 
-   RETURN VALUE:
-   INT
-.n    0 all is done
-.n    1 buffer too small
-.n    2, 3 (should not occur)
-.n    4 not yet ready with output (this is not an error!)
-.n    5, 6 (should not occur)
-D*/
+   \return <ul>
+<li> 0 all is done </li>
+<li> 1 buffer too small </li>
+<li> 2, 3 (should not occur) </li>
+<li> 4 not yet ready with output (this is not an error!) </li>
+<li> 5, 6 (should not occur) </li>
+</ul>
+*/
 /****************************************************************************/
 
 INT  NS_PREFIX PrintCurrentStructContents (int flag, char *buffer, int bufLen, int ropt)
@@ -1615,21 +1437,16 @@
 }
 
 /****************************************************************************/
-/*D
-   InitUgStruct	- Initialize ugstruct
+/** \brief Initialize ugstruct
 
-   PARAMETERS:
-.  none
-
-   DESCRIPTION:
    This function creates the '/Strings'-directory, gets an ID for
    string directories and sets the current structure path to '/Strings'.
 
-   RETURN VALUE:
-   INT
-.n     0 if ok
-.n     1 if not enough memory.
-D*/
+   \return <ul>
+   <li>  0 if ok </li>
+   <li>  1 if not enough memory </li>
+   </ul>
+*/
 /****************************************************************************/
 
 INT NS_PREFIX InitUgStruct ()
diff -ru ug-orig/low/ugstruct.h ug-patched/low/ugstruct.h
--- ug-orig/low/ugstruct.h	2004-07-21 11:19:50.000000000 +0200
+++ ug-patched/low/ugstruct.h	2009-05-07 10:00:28.000000000 +0200
@@ -22,7 +22,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/low/ugstruct.h,v 1.10 2004/07/21 09:19:50 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -82,10 +82,10 @@
 
 /* hierarchical string directory */
 INT      MakeStruct                             (const char *name);
-INT      DeleteStruct                           (char *name);
-INT      DeleteVariable                         (char *name);
+INT      DeleteStruct                           (const char *name);
+INT      DeleteVariable                         (const char *name);
 ENVDIR  *ChangeStructDir                        (const char *s);
-ENVDIR  *FindStructDir                          (const char *name, char **lastnameHnd);
+ENVDIR  *FindStructDir                          (const char *name, const char **lastnameHnd);
 STRVAR  *FindStringVar                          (const ENVDIR *where, const char *name);
 ENVDIR  *FindStructure                          (const ENVDIR *where, const char *name);
 INT              RemoveStringVar                        (ENVDIR *homeDir, STRVAR *theVar);
@@ -111,7 +111,7 @@
 /* initialization of this module */
 INT     InitUgStruct                            (void);
 
-END_NAMESPACE
+END_UG_NAMESPACE
 
 #endif
 
diff -ru ug-orig/low/ugtime.h ug-patched/low/ugtime.h
--- ug-orig/low/ugtime.h	2004-10-06 11:16:37.000000000 +0200
+++ ug-patched/low/ugtime.h	2004-10-06 11:16:37.000000000 +0200
@@ -1,4 +1,4 @@
-/* $Id: ugtime.h,v 1.2 2004/10/06 09:16:37 thimo Exp $ */
+/* $Id: ugtime.h 7835 2004-10-06 09:16:37Z thimo $ */
 
 /*
 
diff -ru ug-orig/low/ugtimer.c ug-patched/low/ugtimer.c
--- ug-orig/low/ugtimer.c	2006-03-13 10:05:05.000000000 +0100
+++ ug-patched/low/ugtimer.c	2008-12-19 11:06:12.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <assert.h>
 
@@ -66,7 +67,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/low/ugtimer.c,v 1.3 2006/03/13 09:05:05 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/low/ugtimer.h ug-patched/low/ugtimer.h
--- ug-orig/low/ugtimer.h	2006-03-13 10:05:05.000000000 +0100
+++ ug-patched/low/ugtimer.h	2009-05-07 10:00:28.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/low/ugtimer.h,v 1.5 2006/03/13 09:05:05 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -90,6 +90,6 @@
 
 void new_timer (int *n);
 
-END_NAMESPACE
+END_UG_NAMESPACE
 
 #endif
diff -ru ug-orig/low/ugtypes.h ug-patched/low/ugtypes.h
--- ug-orig/low/ugtypes.h	2006-06-12 13:44:46.000000000 +0200
+++ ug-patched/low/ugtypes.h	2009-05-07 10:00:28.000000000 +0200
@@ -1,9 +1,13 @@
-/* $Id: ugtypes.h,v 1.4 2006/06/12 11:44:46 sander Exp $ */
+/* $Id: ugtypes.h 8353 2009-05-07 08:00:28Z sander $ */
 
-/*
-
-  globally set data types
+/** \file
+    \brief Globally set data types
 
+    The basic types (normally 'short', 'int', 'float' and 'double') are 
+    replaced by 'SHORT', 'INT', 'FLOAT' and 'DOUBLE'. The type 'DOUBLE' 
+    is used for all Cartesian coordinates of the (x,y[,z])-directions of 
+    the grids and 'SCREEN_DOUBLE' is used for all transformed coordinates 
+    of the graphical interface.
 */
 
 #ifndef UGTYPES_H
@@ -53,6 +57,6 @@
 
 #endif
 
-END_NAMESPACE
+END_UG_NAMESPACE
 
 #endif
Nur in ug-orig/m4: CVS.
diff -ru ug-orig/m4/dune_mpi.m4 ug-patched/m4/dune_mpi.m4
--- ug-orig/m4/dune_mpi.m4	2004-10-28 14:11:17.000000000 +0200
+++ ug-patched/m4/dune_mpi.m4	2004-10-28 14:11:17.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: dune_mpi.m4,v 1.3 2004/10/28 12:11:17 thimo Exp $
+# $Id: dune_mpi.m4 7885 2004-10-28 12:11:17Z thimo $
 
 # wrapper for the autoconf-archive check. Note: compiling MPI-stuff sucks!
 
diff -ru ug-orig/Makefile.am ug-patched/Makefile.am
--- ug-orig/Makefile.am	2005-01-18 19:20:47.000000000 +0100
+++ ug-patched/Makefile.am	2008-02-25 11:51:28.000000000 +0100
@@ -1,7 +1,7 @@
-# $Id: Makefile.am,v 1.6 2005/01/18 18:20:47 thimo Exp $
+# $Id: Makefile.am 8310 2008-02-25 10:51:28Z sander $
 
 # do everything in the subdirs (order matters!)
-SUBDIRS = arch low dev parallel gm dom graphics np ui lib tools
+SUBDIRS = arch parallel low dev gm dom graphics np ui lib tools
 #
 # libltdl after low will be needed for plugins later
 
@@ -12,8 +12,10 @@
 pkgconfig_DATA = libug.pc
 
 # !!! crazy trick to get include-dir compatibility
+# Crazy indeed.  Let's at least not install f2c.h (because it creates
+# problems) and std_internal.h (because it is newer than the build system).
 install-data-hook:
-	find $(top_srcdir) -name \*.h -exec $(INSTALL_DATA) {} $(includedir)/ \;
+	find $(top_srcdir) -name \*.h -not -name "f2c.h" -not -name "std_internal.h" -exec $(INSTALL_DATA) {} $(includedir)/ \;
 	rm -f $(includedir)/config.h
 	touch $(includedir)/config.h
 
diff -ru ug-orig/np/algebra/amgtools.c ug-patched/np/algebra/amgtools.c
--- ug-orig/np/algebra/amgtools.c	2006-06-02 18:15:34.000000000 +0200
+++ ug-patched/np/algebra/amgtools.c	2006-06-02 18:15:34.000000000 +0200
@@ -101,7 +101,7 @@
 #endif
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/algebra/amgtools.c,v 1.48 2006/06/02 16:15:34 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 REP_ERR_FILE;
 
 /****************************************************************************/
diff -ru ug-orig/np/algebra/amgtools.h ug-patched/np/algebra/amgtools.h
--- ug-orig/np/algebra/amgtools.h	2006-05-08 14:27:33.000000000 +0200
+++ ug-patched/np/algebra/amgtools.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/algebra/amgtools.h,v 1.15 2006/05/08 12:27:33 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/algebra/block.c ug-patched/np/algebra/block.c
--- ug-orig/np/algebra/block.c	2006-05-08 14:27:34.000000000 +0200
+++ ug-patched/np/algebra/block.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <math.h>
 
 #include "ugdevices.h"
@@ -77,7 +78,7 @@
 static DOUBLE BL_mat1[LOCAL_DIM*LOCAL_DIM];
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/algebra/block.c,v 1.16 2006/05/08 12:27:34 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/algebra/block.h ug-patched/np/algebra/block.h
--- ug-orig/np/algebra/block.h	2006-05-08 14:27:34.000000000 +0200
+++ ug-patched/np/algebra/block.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/algebra/block.h,v 1.10 2006/05/08 12:27:34 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
Nur in ug-orig/np/algebra: CVS.
Nur in ug-orig/np/algebra: .cvsignore.
diff -ru ug-orig/np/algebra/fegeom.c ug-patched/np/algebra/fegeom.c
--- ug-orig/np/algebra/fegeom.c	2004-05-17 15:29:26.000000000 +0200
+++ ug-patched/np/algebra/fegeom.c	2008-12-19 11:17:43.000000000 +0100
@@ -27,6 +27,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
@@ -131,7 +132,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/algebra/fegeom.c,v 1.6 2004/05/17 13:29:26 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/algebra/fegeom.h ug-patched/np/algebra/fegeom.h
--- ug-orig/np/algebra/fegeom.h	2006-05-08 14:27:34.000000000 +0200
+++ ug-patched/np/algebra/fegeom.h	2006-05-08 14:31:31.000000000 +0200
@@ -23,7 +23,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/algebra/fegeom.h,v 1.7 2006/05/08 12:27:34 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/algebra/ff.c ug-patched/np/algebra/ff.c
--- ug-orig/np/algebra/ff.c	2004-07-21 11:18:54.000000000 +0200
+++ ug-patched/np/algebra/ff.c	2008-12-19 11:17:43.000000000 +0100
@@ -28,6 +28,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <assert.h>
 #include <math.h>
 #include <time.h>
@@ -75,7 +76,7 @@
 /****************************************************************************/
 
 /* data for CVS */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/algebra/ff.c,v 1.21 2004/07/21 09:18:54 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 REP_ERR_FILE;
 
diff -ru ug-orig/np/algebra/ff_gen.c ug-patched/np/algebra/ff_gen.c
--- ug-orig/np/algebra/ff_gen.c	2006-07-25 10:47:53.000000000 +0200
+++ ug-patched/np/algebra/ff_gen.c	2009-04-29 15:11:55.000000000 +0200
@@ -28,6 +28,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <assert.h>
 #include <math.h>
 #include <string.h>
@@ -136,7 +137,7 @@
 /****************************************************************************/
 
 /* data for CVS */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/algebra/ff_gen.c,v 1.22 2006/07/25 08:47:53 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 REP_ERR_FILE;
 
@@ -524,7 +525,7 @@
 
 #ifdef __BLOCK_VECTOR_DESC__
 
-static void printBVrec( BLOCKVECTOR *bv_first, char *indent, const BV_DESC *bvd_parent, const BV_DESC_FORMAT *bvdf )
+static void printBVrec( BLOCKVECTOR *bv_first, const char *indent, const BV_DESC *bvd_parent, const BV_DESC_FORMAT *bvdf )
 {
 	register VECTOR *v;
 	BLOCKVECTOR *bv;
diff -ru ug-orig/np/algebra/ff_gen.h ug-patched/np/algebra/ff_gen.h
--- ug-orig/np/algebra/ff_gen.h	2006-05-08 14:27:34.000000000 +0200
+++ ug-patched/np/algebra/ff_gen.h	2006-05-08 14:31:31.000000000 +0200
@@ -22,7 +22,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/algebra/ff_gen.h,v 1.20 2006/05/08 12:27:34 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/algebra/ff.h ug-patched/np/algebra/ff.h
--- ug-orig/np/algebra/ff.h	2006-05-08 14:27:34.000000000 +0200
+++ ug-patched/np/algebra/ff.h	2006-05-08 14:31:31.000000000 +0200
@@ -21,7 +21,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/algebra/ff.h,v 1.10 2006/05/08 12:27:34 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/algebra/fvgeom.c ug-patched/np/algebra/fvgeom.c
--- ug-orig/np/algebra/fvgeom.c	2005-11-24 10:13:53.000000000 +0100
+++ ug-patched/np/algebra/fvgeom.c	2008-12-19 11:17:43.000000000 +0100
@@ -26,6 +26,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
@@ -171,7 +172,7 @@
 static LOCAL_DOUBLES LocalCoords[TAGS];
 
 /* data for CVS */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/algebra/fvgeom.c,v 1.34 2005/11/24 09:13:53 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 REP_ERR_FILE;
 
diff -ru ug-orig/np/algebra/fvgeom.h ug-patched/np/algebra/fvgeom.h
--- ug-orig/np/algebra/fvgeom.h	2006-05-08 14:27:34.000000000 +0200
+++ ug-patched/np/algebra/fvgeom.h	2006-05-08 14:31:31.000000000 +0200
@@ -23,7 +23,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/algebra/fvgeom.h,v 1.15 2006/05/08 12:27:34 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/algebra/Makefile.algebra ug-patched/np/algebra/Makefile.algebra
--- ug-orig/np/algebra/Makefile.algebra	2008-10-29 18:22:26.000000000 +0100
+++ ug-patched/np/algebra/Makefile.algebra	2002-08-06 19:04:29.000000000 +0200
@@ -10,7 +10,7 @@
 include $(UGROOT)/ug.conf
 
 OBJECTS = ugblas.o ugiter.o transgrid.o block.o quadrature.o fvgeom.o fegeom.o\
-	  sidefvgeom.o ff_gen.o ff.o amgtools.o npcheck.o sm.o blasm.o ugeblas.o
+	  ff_gen.o ff.o amgtools.o npcheck.o sm.o blasm.o ugeblas.o
 
 $(UG_LIB) : $(OBJECTS) Makefile.algebra
 	$(ARCH_AR)  $(ARCH_ARFLAGS) $(UG_LIB) $(OBJECTS)
diff -ru ug-orig/np/algebra/Makefile.am ug-patched/np/algebra/Makefile.am
--- ug-orig/np/algebra/Makefile.am	2008-10-29 18:22:26.000000000 +0100
+++ ug-patched/np/algebra/Makefile.am	2006-05-02 17:58:31.000000000 +0200
@@ -1,6 +1,6 @@
-# $Id: Makefile.am,v 1.3 2008/10/29 17:22:26 dmitriy Exp $
+# $Id: Makefile.am 8175 2006-05-02 15:58:31Z stefan $
 
-SOURCES = ugblas.c ugiter.c transgrid.c block.c quadrature.c fvgeom.c fegeom.c sidefvgeom.c ff_gen.c ff.c amgtools.c npcheck.c sm.c blasm.c ugeblas.c amgtools.h blasm.h block.h fegeom.h ff_gen.h ff.h fvgeom.h npcheck.h quadrature.h sm.h transgrid.h ugblas.h
+SOURCES = ugblas.c ugiter.c transgrid.c block.c quadrature.c fvgeom.c fegeom.c ff_gen.c ff.c amgtools.c npcheck.c sm.c blasm.c ugeblas.c amgtools.h blasm.h block.h fegeom.h ff_gen.h ff.h fvgeom.h npcheck.h quadrature.h sm.h transgrid.h ugblas.h
 
 if BUILD2D
   LIB_2D = libalgebra2.la
@@ -19,7 +19,7 @@
 # include templates in distribution tarball
 EXTRA_DIST = matfunc.ct matloop.ct matmode.ct vecfunc.ct vecloop.ct vecmode.ct
 
-include_HEADERS = sm.h fvgeom.h fegeom.h sidefvgeom.h quadrature.h block.h
+include_HEADERS = sm.h fvgeom.h fegeom.h quadrature.h block.h
 
 libalgebra2_la_SOURCES = $(SOURCES)
 libalgebra2_la_CPPFLAGS = $(UG_2DFLAGS)
diff -ru ug-orig/np/algebra/matfunc.ct ug-patched/np/algebra/matfunc.ct
--- ug-orig/np/algebra/matfunc.ct	1999-07-15 18:22:44.000000000 +0200
+++ ug-patched/np/algebra/matfunc.ct	1999-07-15 18:22:53.000000000 +0200
@@ -17,7 +17,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/algebra/matfunc.ct,v 1.10 1999/07/15 16:22:44 niko Exp $
+$Header$
 */
 
 #ifdef T_USE_MATMUL
diff -ru ug-orig/np/algebra/matloop.ct ug-patched/np/algebra/matloop.ct
--- ug-orig/np/algebra/matloop.ct	1999-07-15 18:22:44.000000000 +0200
+++ ug-patched/np/algebra/matloop.ct	1999-07-15 18:22:53.000000000 +0200
@@ -17,7 +17,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/algebra/matloop.ct,v 1.5 1999/07/15 16:22:44 niko Exp $
+$Header$
 */
  	#ifdef T_SURFACE_MODE 
 	for (lev=FULLREFINELEVEL(mg); lev<tl; lev++)
diff -ru ug-orig/np/algebra/matmode.ct ug-patched/np/algebra/matmode.ct
--- ug-orig/np/algebra/matmode.ct	2005-12-06 12:21:36.000000000 +0100
+++ ug-patched/np/algebra/matmode.ct	2005-12-06 12:21:36.000000000 +0100
@@ -17,7 +17,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/algebra/matmode.ct,v 1.9 2005/12/06 11:21:36 sander Exp $
+$Header$
 */
 
 #ifdef T_MOD_SCAL
diff -ru ug-orig/np/algebra/npcheck.c ug-patched/np/algebra/npcheck.c
--- ug-orig/np/algebra/npcheck.c	2005-07-18 15:38:46.000000000 +0200
+++ ug-patched/np/algebra/npcheck.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <math.h>
 
 #include "ugdevices.h"
@@ -80,7 +81,7 @@
 #endif
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/algebra/npcheck.c,v 1.13 2005/07/18 13:38:46 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 INT NS_DIM_PREFIX CheckSymmetryOfMatrix (GRID *theGrid, MATDATA_DESC *A)
 {
diff -ru ug-orig/np/algebra/npcheck.h ug-patched/np/algebra/npcheck.h
--- ug-orig/np/algebra/npcheck.h	2006-05-08 14:27:34.000000000 +0200
+++ ug-patched/np/algebra/npcheck.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/algebra/npcheck.h,v 1.6 2006/05/08 12:27:34 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/algebra/quadrature.c ug-patched/np/algebra/quadrature.c
--- ug-orig/np/algebra/quadrature.c	2008-06-25 18:41:16.000000000 +0200
+++ ug-patched/np/algebra/quadrature.c	2006-06-02 18:15:34.000000000 +0200
@@ -69,7 +69,7 @@
 
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/algebra/quadrature.c,v 1.26 2008/06/25 16:41:16 vadym Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
@@ -2301,246 +2301,6 @@
 #undef B_2
 #undef C
 
-
-/* Quadrature formulas from Cools' Encyclopaedia */
-/* Fully symmetric, positive weights, order=6, points=24 */
-#define s_1 0.214602871259152029288839219386284
-#define t_1 1.-3.*s_1
-#define s_2 0.0406739585346113531155794489564100
-#define t_2 1.-3.*s_2
-#define s_3 0.322337890142275510343994470762492
-#define t_3 1.-3.*s_3
-#define u_1 0.0636610018750175252992355276057269
-#define u_2 0.269672331458315808034097805727606
-#define u_3 1.-2.*u_1-u_2
-#define area 0.16666666666666666666666666666666
-#define w_1 ((6.65379170969458201661510459291332e-3)/area)
-#define w_2 ((1.67953517588677382466887290765614e-3)/area)
-#define w_3 ((9.22619692394245368252554630895433e-3)/area)
-#define w_4 ((8.03571428571428571428571428571428e-3)/area)
-
-static const DOUBLE_VECTOR_3D Quadrature3D46_l[] = {
-  {s_1,s_1,s_1},
-  {t_1,s_1,s_1},
-  {s_1,t_1,s_1},
-  {s_1,s_1,t_1},
-  {s_2,s_2,s_2},
-  {t_2,s_2,s_2},
-  {s_2,t_2,s_2},
-  {s_2,s_2,t_2},
-  {s_3,s_3,s_3},
-  {t_3,s_3,s_3},
-  {s_3,t_3,s_3},
-  {s_3,s_3,t_3},
-  {u_1,u_1,u_2},
-  {u_1,u_2,u_1},
-  {u_2,u_1,u_1},
-  {u_1,u_1,u_3},
-  {u_1,u_3,u_1},
-  {u_3,u_1,u_1},
-  {u_1,u_2,u_3},
-  {u_1,u_3,u_2},
-  {u_2,u_1,u_3},
-  {u_3,u_1,u_2},
-  {u_2,u_3,u_1},
-  {u_3,u_2,u_1}
-};
-static const DOUBLE Quadrature3D46_w[] = {
-  w_1,w_1,w_1,w_1,w_2,w_2,w_2,w_2,w_3,w_3,w_3,w_3,
-  w_4,w_4,w_4,w_4,w_4,w_4,w_4,w_4,w_4,w_4,w_4,w_4
-};
-static QUADRATURE Quadrature3D46 = {24, 6, Quadrature3D46_l, Quadrature3D46_w};
-
-#undef s_1
-#undef s_2
-#undef s_3
-#undef t_1
-#undef t_2
-#undef t_3
-#undef u_1
-#undef u_2
-#undef u_3
-#undef area
-#undef w_1
-#undef w_2
-#undef w_3
-#undef w_4
-
-/* Fully symmetric, 4 negative weights, order=7, points=31 */
-#define s_3 0.0782131923303180643739942508375545
-#define t_3 1.-3.*s_3
-#define s_4 0.121843216663905174652156372684818
-#define t_4 1.-3.*s_4
-#define s_5 0.332539164446420624152923823157707
-#define t_5 1.-3.*s_5
-#define u_1 0.1
-#define u_2 0.2
-#define u_3 1.-2.*u_1-u_2
-#define area 0.16666666666666666666666666666666
-#define w_1 ((9.70017636684303350970017636684303e-4)/area)
-#define w_2 (0.0182642234661088202912015685649462/area)
-#define w_3 (0.0105999415244136869164138748545257/area)
-#define w_4 (-0.0625177401143318516914703474927900/area)
-#define w_5 ((4.89142526307349938479576303671027e-3)/area)
-#define w_6 (0.0275573192239858906525573192239858/area)
-
-static const DOUBLE_VECTOR_3D Quadrature3D47_l[] = {
-  {0.5,0.5,0.},
-  {0.5,0.,0.5},
-  {0.,0.5,0.5},
-  {0.,0.,0.5},
-  {0.,0.5,0.},
-  {0.5,0.,0.},
-  {0.25,0.25,0.25},
-  {s_3,s_3,s_3},
-  {t_3,s_3,s_3},
-  {s_3,t_3,s_3},
-  {s_3,s_3,t_3},
-  {s_4,s_4,s_4},
-  {t_4,s_4,s_4},
-  {s_4,t_4,s_4},
-  {s_4,s_4,t_4},
-  {s_5,s_5,s_5},
-  {t_5,s_5,s_5},
-  {s_5,t_5,s_5},
-  {s_5,s_5,t_5},
-  {u_1,u_1,u_2},
-  {u_1,u_2,u_1},
-  {u_2,u_1,u_1},
-  {u_1,u_1,u_3},
-  {u_1,u_3,u_1},
-  {u_3,u_1,u_1},
-  {u_1,u_2,u_3},
-  {u_1,u_3,u_2},
-  {u_3,u_1,u_2},
-  {u_2,u_1,u_3},
-  {u_2,u_3,u_1},
-  {u_3,u_2,u_1}
-};
-static const DOUBLE Quadrature3D47_w[] = {
-  w_1,w_1,w_1,w_1,w_1,w_1,w_2,w_3,w_3,w_3,w_3,w_4,w_4,w_4,w_4,w_5,w_5,w_5,w_5,
-  w_6,w_6,w_6,w_6,w_6,w_6,w_6,w_6,w_6,w_6,w_6,w_6
-};
-static QUADRATURE Quadrature3D47 = {31, 7, Quadrature3D47_l, Quadrature3D47_w};
-
-#undef s_3
-#undef s_4
-#undef s_5
-#undef t_3
-#undef t_4
-#undef t_5
-#undef u_1
-#undef u_2
-#undef u_3
-#undef area
-#undef w_1
-#undef w_2
-#undef w_3
-#undef w_4
-#undef w_5
-#undef w_6
-
-/* Fully symmetric, one negative weight, order=8, points=43 */
-#define s_3 0.206829931610673204083980900024961
-#define t_3 1.-3.*s_3
-#define s_4 0.0821035883105467230906058078714215
-#define t_4 1.-3.*s_4
-#define s_5 5.78195050519799725317663886414270e-3
-#define t_5 1.-3.*s_5
-#define v_1 0.0505327400188942244256245285579071
-#define v_2 0.5-v_1
-#define u_1 0.229066536116811139600408854554753
-#define u_2 0.0356395827885340437169173969506114
-#define u_3 1.-2.*u_1-u_2
-#define y_1 0.0366077495531974236787738546327104
-#define y_2 0.190486041934633455699433285315099
-#define y_3 1.-2.*y_1-y_2
-#define area 0.16666666666666666666666666666666
-#define w_1 (-0.0205001886586399158405865177642941/area)
-#define w_3 (0.0142503058228669012484397415358704/area)
-#define w_4 ((1.96703331313390098756280342445466e-3)/area)
-#define w_5 ((1.69834109092887379837744566704016e-4)/area)
-#define w_6 ((4.57968382446728180074351446297276e-3)/area)
-#define w_7 ((5.70448580868191850680255862783040e-3)/area)
-#define w_8 ((2.14051914116209259648335300092023e-3)/area)
-
-static const DOUBLE_VECTOR_3D Quadrature3D48_l[] = {
-  {0.25,0.25,0.25},
-  {s_3,s_3,s_3},
-  {t_3,s_3,s_3},
-  {s_3,t_3,s_3},
-  {s_3,s_3,t_3},
-  {s_4,s_4,s_4},
-  {t_4,s_4,s_4},
-  {s_4,t_4,s_4},
-  {s_4,s_4,t_4},
-  {s_5,s_5,s_5},
-  {t_5,s_5,s_5},
-  {s_5,t_5,s_5},
-  {s_5,s_5,t_5},
-  {v_1,v_1,v_2},
-  {v_1,v_2,v_1},
-  {v_2,v_1,v_1},
-  {v_1,v_2,v_2},
-  {v_2,v_1,v_2},
-  {v_2,v_2,v_1},
-  {u_1,u_1,u_2},
-  {u_1,u_2,u_1},
-  {u_2,u_1,u_1},
-  {u_1,u_1,u_3},
-  {u_1,u_3,u_1},
-  {u_3,u_1,u_1},
-  {u_1,u_2,u_3},
-  {u_1,u_3,u_2},
-  {u_3,u_1,u_2},
-  {u_2,u_1,u_3},
-  {u_2,u_3,u_1},
-  {u_3,u_2,u_1},
-  {y_1,y_1,y_2},
-  {y_1,y_2,y_1},
-  {y_2,y_1,y_1},
-  {y_1,y_1,y_3},
-  {y_1,y_3,y_1},
-  {y_3,y_1,y_1},
-  {y_1,y_2,y_3},
-  {y_1,y_3,y_2},
-  {y_3,y_1,y_2},
-  {y_2,y_1,y_3},
-  {y_2,y_3,y_1},
-  {y_3,y_2,y_1}
-};
-static const DOUBLE Quadrature3D48_w[] = {
-  w_1,w_3,w_3,w_3,w_3,w_4,w_4,w_4,w_4,w_5,w_5,w_5,w_5,w_6,w_6,w_6,w_6,w_6,w_6,
-  w_7,w_7,w_7,w_7,w_7,w_7,w_7,w_7,w_7,w_7,w_7,w_7,
-  w_8,w_8,w_8,w_8,w_8,w_8,w_8,w_8,w_8,w_8,w_8,w_8
-};
-static QUADRATURE Quadrature3D48 = {43, 8, Quadrature3D48_l, Quadrature3D48_w};
-
-#undef s_3
-#undef s_4
-#undef s_5
-#undef t_3
-#undef t_4
-#undef t_5
-#undef v_1
-#undef v_2
-#undef u_1
-#undef u_2
-#undef u_3
-#undef y_1
-#undef y_2
-#undef y_3
-#undef area
-#undef w_1
-#undef w_3
-#undef w_4
-#undef w_5
-#undef w_6
-#undef w_7
-#undef w_8
-
-
-
 static const DOUBLE_VECTOR_3D Quadrature3D52_l[] = {{0.58541020, 0.72819660, 0.13819660},
     										  {0.13819660, 0.72819660, 0.13819660},
     										  {0.13819660, 0.27630920, 0.58541020},
@@ -3471,12 +3231,7 @@
 			  case 1:  return(&Quadrature3D41);
 			  case 2:  return(&Quadrature3D42);
 			  case 3:  return(&Quadrature3D43);
-			  case 4:
-              case 5:  return(&Quadrature3D45);
-			  case 6:  return(&Quadrature3D46);
-			  case 7:  return(&Quadrature3D47);
-			  case 8:  return(&Quadrature3D48);
-			  default: return(&Quadrature3D48);
+			  default: return(&Quadrature3D45);
 			  }
 		  case 5: return(&Quadrature3D52);
 		  case 6: 
@@ -3595,7 +3350,7 @@
 			  case 4:	return(&Quadrature2D_Triangle_P4_N6);
 			  case 5:	return(&Quadrature2D_Triangle_P5_N7);
 			  case 6:	return(&Quadrature2D_Triangle_P6_N12a);
-			  case 7:	return(&Quadrature2D_Triangle_P7_N15);
+			  case 7:	return(&Quadrature2D_Triangle_P7_N12);
 			  case 8:	return(&Quadrature2D_Triangle_P8_N16);
 			  case 9:	return(&Quadrature2D_Triangle_P9_N19);
 			  case 10:	return(&Quadrature2D_Triangle_P10_N25a);
@@ -3611,14 +3366,13 @@
 			  case 2:	return(&Quadrature2D_Quad_P2_N4);
 			  case 3:	return(&Quadrature2D_Quad_P3_N4a);
 			  case 4:
-			  case 5:	return(&Quadrature2D_Quad_P5_N8);
+			  case 5:	return(&Quadrature2D_Quad_P5_N7);
 			  case 6:
 			  case 7:	return(&Quadrature2D_Quad_P7_N12);
 			  case 8:
 			  case 9:	return(&Quadrature2D_Quad_P9_N20b);
-/* 			  case 10:	return(&Quadrature2D_Quad_P11_N24); */
-/* 			  default:	return(&Quadrature2D_Quad_P11_N24); */
-			  default:	return(&Quadrature2D_Quad_P9_N20b);
+			  case 10:	return(&Quadrature2D_Quad_P11_N24);
+			  default:	return(&Quadrature2D_Quad_P11_N24);
 			  }
 		  }
 	  case 3:
@@ -3631,12 +3385,7 @@
 			  case 1:  return(&Quadrature3D41);
 			  case 2:  return(&Quadrature3D42);
 			  case 3:  return(&Quadrature3D43);
-			  case 4:
-              case 5:  return(&Quadrature3D45);
-			  case 6:  return(&Quadrature3D46);
-              case 7:  return(&Quadrature3D47);
-			  case 8:  return(&Quadrature3D48);
-			  default: return(&Quadrature3D48);
+			  default: return(&Quadrature3D45);
 			  }
 		  case 5: return(&Quadrature3D52);
 		  case 6: 
diff -ru ug-orig/np/algebra/quadrature.h ug-patched/np/algebra/quadrature.h
--- ug-orig/np/algebra/quadrature.h	2006-05-08 14:27:34.000000000 +0200
+++ ug-patched/np/algebra/quadrature.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/algebra/quadrature.h,v 1.15 2006/05/08 12:27:34 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
Nur in ug-orig/np/algebra: sidefvgeom.c.
Nur in ug-orig/np/algebra: sidefvgeom.h.
diff -ru ug-orig/np/algebra/sm.c ug-patched/np/algebra/sm.c
--- ug-orig/np/algebra/sm.c	2006-06-02 18:15:34.000000000 +0200
+++ ug-patched/np/algebra/sm.c	2009-04-29 14:30:36.000000000 +0200
@@ -34,7 +34,7 @@
 #ifndef __UG__
    #include "sm.h"
    #define ERR_FILE_ID 6
-#define NS_PREFIX
+#define NS_DIM_PREFIX
 #else /* __UG__ */
 
 #include "sm.h"
@@ -66,7 +66,7 @@
 */
 /****************************************************************************/
 
-NS_PREFIX INT NS_PREFIX ComputeSMSizeOfArray (SHORT nr, SHORT nc, const SHORT *comps,
+NS_PREFIX INT NS_DIM_PREFIX ComputeSMSizeOfArray (SHORT nr, SHORT nc, const SHORT *comps,
 						  SHORT *NPtr, SHORT *NredPtr)
 {
 	SHORT off,N,Nred;
@@ -122,7 +122,7 @@
 */
 /****************************************************************************/
 
-NS_PREFIX INT NS_PREFIX SM2Array (const SPARSE_MATRIX *sm, SHORT *comps)
+NS_PREFIX INT NS_DIM_PREFIX SM2Array (const SPARSE_MATRIX *sm, SHORT *comps)
 {
 	int i,j,nr,nc,off,posc;
 
@@ -179,7 +179,7 @@
 */
 /****************************************************************************/
 
-NS_PREFIX INT NS_PREFIX Array2SM (SHORT nr, SHORT nc, const SHORT *comps, SPARSE_MATRIX *sm)
+NS_PREFIX INT NS_DIM_PREFIX Array2SM (SHORT nr, SHORT nc, const SHORT *comps, SPARSE_MATRIX *sm)
 {
 	INT error;
 	SHORT off,posc,N,Nred;
@@ -244,7 +244,7 @@
 */
 /****************************************************************************/
 
-NS_PREFIX INT NS_PREFIX String2SMArray (SHORT n, char *str, SHORT *comps)
+NS_PREFIX INT NS_DIM_PREFIX String2SMArray (SHORT n, char *str, SHORT *comps)
 {
 	SHORT off;
 	int i;
@@ -314,7 +314,7 @@
 */
 /****************************************************************************/
 
-NS_PREFIX INT NS_PREFIX SM_Compute_Reduced_Size (SPARSE_MATRIX *sm)
+NS_PREFIX INT NS_DIM_PREFIX SM_Compute_Reduced_Size (SPARSE_MATRIX *sm)
 {
 	register INT i, j, off;
 	register INT ident_count;
@@ -359,7 +359,7 @@
 */
 /****************************************************************************/
 
-NS_PREFIX INT NS_PREFIX SM_Compute_Reduced_Offsets (SPARSE_MATRIX *sm, SHORT *reduced_offsets)
+NS_PREFIX INT NS_DIM_PREFIX SM_Compute_Reduced_Offsets (SPARSE_MATRIX *sm, SHORT *reduced_offsets)
 {
 	register INT i, j, k, off;
 	
@@ -405,7 +405,7 @@
 */
 /****************************************************************************/
 
-NS_PREFIX INT NS_PREFIX SM_Compare (SPARSE_MATRIX *sm1, SPARSE_MATRIX *sm2)
+NS_PREFIX INT NS_DIM_PREFIX SM_Compare (SPARSE_MATRIX *sm1, SPARSE_MATRIX *sm2)
 {
 	register INT i, j, off1, off2;
 
@@ -465,7 +465,7 @@
 */
 /****************************************************************************/
 
-NS_PREFIX INT NS_PREFIX SM_Compute_Diff_From_Offset (INT N, SHORT *offset, ptrdiff_t *Diff)
+NS_PREFIX INT NS_DIM_PREFIX SM_Compute_Diff_From_Offset (INT N, SHORT *offset, ptrdiff_t *Diff)
 {
 	register int i;
 	
@@ -506,7 +506,7 @@
 */
 /****************************************************************************/
 
-NS_PREFIX INT NS_PREFIX SM_Compute_yDiff_From_Offset (INT N, SHORT *col_ind, SHORT *cmp_off,
+NS_PREFIX INT NS_DIM_PREFIX SM_Compute_yDiff_From_Offset (INT N, SHORT *col_ind, SHORT *cmp_off,
 								  ptrdiff_t *Diff)
 {
 	register int i;
@@ -524,7 +524,7 @@
 	return(0);
 }
 
-NS_PREFIX INT NS_PREFIX Decompose_LR_pivot (int n, DOUBLE *mat, int *pivot)
+NS_PREFIX INT NS_DIM_PREFIX Decompose_LR_pivot (int n, DOUBLE *mat, int *pivot)
 {
 	register DOUBLE dinv, piv, sum, factor;
 	register int i, j, k, off_i, off_j;
@@ -574,7 +574,7 @@
 	return(0);
 }
 
-NS_PREFIX INT NS_PREFIX Solve_LR (int n, const DOUBLE *LR, const int *pivot, DOUBLE *x, const DOUBLE *b)
+NS_PREFIX INT NS_DIM_PREFIX Solve_LR (int n, const DOUBLE *LR, const int *pivot, DOUBLE *x, const DOUBLE *b)
 {
 	register int i, j, off_i;
 	register DOUBLE sum;
@@ -625,7 +625,7 @@
 */
 /****************************************************************************/
 
-NS_PREFIX INT NS_PREFIX SM_Decompose_LR_pivot (const SPARSE_MATRIX *sm, DOUBLE *values,
+NS_PREFIX INT NS_DIM_PREFIX SM_Decompose_LR_pivot (const SPARSE_MATRIX *sm, DOUBLE *values,
 						   DOUBLE *LR, int *pivot)
 {
 	register int i,j,k,n;
diff -ru ug-orig/np/algebra/sm.h ug-patched/np/algebra/sm.h
--- ug-orig/np/algebra/sm.h	2006-06-02 18:15:49.000000000 +0200
+++ ug-patched/np/algebra/sm.h	2009-04-29 14:30:36.000000000 +0200
@@ -44,7 +44,7 @@
 
 #ifdef __UG__
 #include "namespace.h"
-START_UG_NAMESPACE
+START_UGDIM_NAMESPACE
 #endif
 
 /****************************************************************************/
@@ -99,7 +99,7 @@
 						   DOUBLE *LR, int *pivot);
 
 #ifdef __UG__
-END_NAMESPACE
+END_UGDIM_NAMESPACE
 #endif
 
 #endif /* __SM__ */
Nur in ug-orig/np/algebra: tff.c.
diff -ru ug-orig/np/algebra/transgrid.c ug-patched/np/algebra/transgrid.c
--- ug-orig/np/algebra/transgrid.c	2005-07-12 17:08:17.000000000 +0200
+++ ug-patched/np/algebra/transgrid.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <math.h>
@@ -90,7 +91,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/algebra/transgrid.c,v 1.57 2005/07/12 15:08:17 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/algebra/transgrid.h ug-patched/np/algebra/transgrid.h
--- ug-orig/np/algebra/transgrid.h	2001-01-24 14:52:35.000000000 +0100
+++ ug-patched/np/algebra/transgrid.h	2001-01-24 14:52:35.000000000 +0100
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/algebra/transgrid.h,v 1.3 2001/01/24 13:52:35 wieners Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/algebra/ugblas.c ug-patched/np/algebra/ugblas.c
--- ug-orig/np/algebra/ugblas.c	2006-11-17 11:59:50.000000000 +0100
+++ ug-patched/np/algebra/ugblas.c	2008-12-19 11:17:43.000000000 +0100
@@ -40,6 +40,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -199,7 +200,7 @@
 static INT trace_ugblas=0;
 
 /* RCS string */
-const static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/algebra/ugblas.c,v 1.105 2006/11/17 10:59:50 sander Exp $",UG_RCS_STRING);
+const static char RCS_ID("$Header$",UG_RCS_STRING);
 
 REP_ERR_FILE;
 
diff -ru ug-orig/np/algebra/ugblas.h ug-patched/np/algebra/ugblas.h
--- ug-orig/np/algebra/ugblas.h	2006-05-08 14:27:34.000000000 +0200
+++ ug-patched/np/algebra/ugblas.h	2006-05-08 14:31:31.000000000 +0200
@@ -30,7 +30,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/algebra/ugblas.h,v 1.13 2006/05/08 12:27:34 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/algebra/ugeblas.c ug-patched/np/algebra/ugeblas.c
--- ug-orig/np/algebra/ugeblas.c	2004-07-21 11:18:57.000000000 +0200
+++ ug-patched/np/algebra/ugeblas.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include "general.h"
 #include "ugblas.h"
 
@@ -66,7 +67,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/algebra/ugeblas.c,v 1.5 2004/07/21 09:18:57 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/algebra/ugiter.c ug-patched/np/algebra/ugiter.c
--- ug-orig/np/algebra/ugiter.c	2006-06-02 18:15:34.000000000 +0200
+++ ug-patched/np/algebra/ugiter.c	2006-06-02 18:15:34.000000000 +0200
@@ -154,7 +154,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/algebra/ugiter.c,v 1.58 2006/06/02 16:15:34 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
diff -ru ug-orig/np/algebra/vecfunc.ct ug-patched/np/algebra/vecfunc.ct
--- ug-orig/np/algebra/vecfunc.ct	2004-01-19 10:34:39.000000000 +0100
+++ ug-patched/np/algebra/vecfunc.ct	2004-01-19 10:37:49.000000000 +0100
@@ -17,7 +17,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/algebra/vecfunc.ct,v 1.8 2004/01/19 09:34:39 sander Exp $
+$Header$
 */
 
 INT T_FUNCNAME (MULTIGRID *mg, INT fl, INT tl, INT mode, const VECDATA_DESC *x T_ARGS)
diff -ru ug-orig/np/algebra/vecloop.ct ug-patched/np/algebra/vecloop.ct
--- ug-orig/np/algebra/vecloop.ct	1997-07-25 19:44:19.000000000 +0200
+++ ug-patched/np/algebra/vecloop.ct	1997-07-25 19:44:29.000000000 +0200
@@ -17,7 +17,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/algebra/vecloop.ct,v 1.1 1997/07/25 17:44:19 wieners Exp $
+$Header$
 */
  	#ifdef T_SURFACE_MODE 
 	for (lev= FULLREFINELEVEL(mg); lev<tl; lev++)
diff -ru ug-orig/np/algebra/vecmode.ct ug-patched/np/algebra/vecmode.ct
--- ug-orig/np/algebra/vecmode.ct	2005-12-06 12:21:36.000000000 +0100
+++ ug-patched/np/algebra/vecmode.ct	2005-12-06 12:21:36.000000000 +0100
@@ -17,7 +17,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/algebra/vecmode.ct,v 1.4 2005/12/06 11:21:36 sander Exp $
+$Header$
 */
 
 #ifdef T_MOD_SCAL
diff -ru ug-orig/np/amglib/amg_blas.c ug-patched/np/amglib/amg_blas.c
--- ug-orig/np/amglib/amg_blas.c	1997-10-20 11:03:48.000000000 +0200
+++ ug-patched/np/amglib/amg_blas.c	2008-12-19 11:17:43.000000000 +0100
@@ -30,6 +30,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <time.h>
@@ -71,7 +72,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/amglib/amg_blas.c,v 1.1 1997/10/20 09:03:48 peter Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/amglib/amg_blas.h ug-patched/np/amglib/amg_blas.h
--- ug-orig/np/amglib/amg_blas.h	1997-10-20 11:03:48.000000000 +0200
+++ ug-patched/np/amglib/amg_blas.h	1997-10-20 11:03:54.000000000 +0200
@@ -21,7 +21,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/amglib/amg_blas.h,v 1.1 1997/10/20 09:03:48 peter Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/amglib/amg_coarsen.c ug-patched/np/amglib/amg_coarsen.c
--- ug-orig/np/amglib/amg_coarsen.c	2005-11-24 10:10:40.000000000 +0100
+++ ug-patched/np/amglib/amg_coarsen.c	2008-12-19 11:17:43.000000000 +0100
@@ -29,6 +29,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <time.h>
@@ -43,7 +44,7 @@
 #include "amg_coarsen.h"
 
 /* RCS string 
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/amglib/amg_coarsen.c,v 1.11 2005/11/24 09:10:40 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/amglib/amg_coarsen.h ug-patched/np/amglib/amg_coarsen.h
--- ug-orig/np/amglib/amg_coarsen.h	1997-10-23 19:35:28.000000000 +0200
+++ ug-patched/np/amglib/amg_coarsen.h	1997-10-23 19:35:29.000000000 +0200
@@ -21,7 +21,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/amglib/amg_coarsen.h,v 1.3 1997/10/23 17:35:28 peter Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/amglib/amg_header.h ug-patched/np/amglib/amg_header.h
--- ug-orig/np/amglib/amg_header.h	1997-10-21 15:34:44.000000000 +0200
+++ ug-patched/np/amglib/amg_header.h	1997-10-21 15:34:47.000000000 +0200
@@ -22,7 +22,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/amglib/amg_header.h,v 1.2 1997/10/21 13:34:44 peter Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/amglib/amg_iter.c ug-patched/np/amglib/amg_iter.c
--- ug-orig/np/amglib/amg_iter.c	1997-12-12 01:43:29.000000000 +0100
+++ ug-patched/np/amglib/amg_iter.c	2008-12-19 11:17:43.000000000 +0100
@@ -30,6 +30,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <math.h>
@@ -70,7 +71,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/amglib/amg_iter.c,v 1.3 1997/12/12 00:43:29 henrik Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/amglib/amg_iter.h ug-patched/np/amglib/amg_iter.h
--- ug-orig/np/amglib/amg_iter.h	1997-10-21 15:34:45.000000000 +0200
+++ ug-patched/np/amglib/amg_iter.h	1997-10-21 15:34:47.000000000 +0200
@@ -21,7 +21,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/amglib/amg_iter.h,v 1.2 1997/10/21 13:34:45 peter Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/amglib/amg_low.c ug-patched/np/amglib/amg_low.c
--- ug-orig/np/amglib/amg_low.c	1997-10-20 11:03:51.000000000 +0200
+++ ug-patched/np/amglib/amg_low.c	2008-12-19 11:17:43.000000000 +0100
@@ -30,6 +30,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <time.h>
@@ -75,7 +76,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/amglib/amg_low.c,v 1.1 1997/10/20 09:03:51 peter Exp $
+$Header$
 */
 
 /* user installable print handler */
@@ -147,7 +148,7 @@
 D*/
 /****************************************************************************/
 
-int AMG_Print (char *s)
+int AMG_Print (const char *s)
 {
 	if (outFile!=NULL)
 	{
diff -ru ug-orig/np/amglib/amg_low.h ug-patched/np/amglib/amg_low.h
--- ug-orig/np/amglib/amg_low.h	1997-10-20 11:03:51.000000000 +0200
+++ ug-patched/np/amglib/amg_low.h	2008-04-17 12:21:51.000000000 +0200
@@ -22,7 +22,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/amglib/amg_low.h,v 1.1 1997/10/20 09:03:51 peter Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -50,7 +50,7 @@
 /******** typedefs     ******************************************************/
 /****************************************************************************/
 
-typedef void (*AMG_PrintFuncPtr) (char *);
+typedef void (*AMG_PrintFuncPtr) (const char *);
 typedef void * (*AMG_MallocFuncPtr) (size_t n);
 
 /****************************************************************************/
@@ -59,7 +59,7 @@
 
 /* string i/o */
 int       AMG_InstallPrintHandler (AMG_PrintFuncPtr print);
-int       AMG_Print         (char *s);
+int       AMG_Print         (const char *s);
 int 	  AMG_RedirectToFile (char *name);
 int 	  AMG_RedirectToScreen (void);
 
diff -ru ug-orig/np/amglib/amg_solve.c ug-patched/np/amglib/amg_solve.c
--- ug-orig/np/amglib/amg_solve.c	1998-09-02 14:25:01.000000000 +0200
+++ ug-patched/np/amglib/amg_solve.c	2008-12-19 11:17:43.000000000 +0100
@@ -29,6 +29,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <math.h>
@@ -43,7 +44,7 @@
 #include "amg_solve.h"
 
 /* RCS string 
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/amglib/amg_solve.c,v 1.9 1998/09/02 12:25:01 henrik Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/amglib/amg_solve.h ug-patched/np/amglib/amg_solve.h
--- ug-orig/np/amglib/amg_solve.h	1997-11-05 11:33:14.000000000 +0100
+++ ug-patched/np/amglib/amg_solve.h	1997-11-05 11:33:15.000000000 +0100
@@ -21,7 +21,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/amglib/amg_solve.h,v 1.3 1997/11/05 10:33:14 df Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/amglib/amg_sp.c ug-patched/np/amglib/amg_sp.c
--- ug-orig/np/amglib/amg_sp.c	2000-11-21 10:56:32.000000000 +0100
+++ ug-patched/np/amglib/amg_sp.c	2008-12-19 11:17:43.000000000 +0100
@@ -30,6 +30,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <time.h>
@@ -41,7 +42,7 @@
 #include "amg_sp.h"
 
 /* RCS string 
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/amglib/amg_sp.c,v 1.6 2000/11/21 09:56:32 klaus Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 */
 
 /****************************************************************************/
@@ -102,7 +103,7 @@
 D*/
 /****************************************************************************/
 
-AMG_VECTOR *AMG_NewVector (int n, int b, char *name)
+AMG_VECTOR *AMG_NewVector (int n, int b, const char *name)
 {
 	AMG_VECTOR *New;
 	double *values;
@@ -157,7 +158,7 @@
 D*/
 /****************************************************************************/
 
-AMG_MATRIX *AMG_NewMatrix (int n, int b, int nonzeros, int system_as_scalar, char *name)
+AMG_MATRIX *AMG_NewMatrix (int n, int b, int nonzeros, int system_as_scalar, const char *name)
 {
 	AMG_MATRIX *New;
 	double *a;
diff -ru ug-orig/np/amglib/amg_sp.h ug-patched/np/amglib/amg_sp.h
--- ug-orig/np/amglib/amg_sp.h	1997-10-21 15:34:47.000000000 +0200
+++ ug-patched/np/amglib/amg_sp.h	2008-03-31 10:58:07.000000000 +0200
@@ -21,7 +21,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/amglib/amg_sp.h,v 1.2 1997/10/21 13:34:47 peter Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -78,7 +78,7 @@
 #define AMG_VECTOR_X(p)				((p)->x)
 #define AMG_VECTOR_ENTRY(p,i,ii)	((p)->x[(i)*(p)->b+(ii)])
 
-AMG_VECTOR *AMG_NewVector (int n, int b, char *name);
+AMG_VECTOR *AMG_NewVector (int n, int b, const char *name);
 
 /****************************************************************************/
 /******** pattern of a general m x n sparse block matrix    *****************/
@@ -118,7 +118,7 @@
 #define AMG_MATRIX_A(p)				((p)->a)
 
 /* Construction */
-AMG_MATRIX *AMG_NewMatrix (int n, int b, int nonzeros, int system_as_scalar, char *name);
+AMG_MATRIX *AMG_NewMatrix (int n, int b, int nonzeros, int system_as_scalar, const char *name);
 AMG_MATRIX *AMG_CopyMatrix (AMG_MATRIX *A, char *name);
 int        	AMG_SetRowLength (AMG_MATRIX *A, int i, int l);
 int        	AMG_FindEntry (AMG_MATRIX *A, int i, int j);
diff -ru ug-orig/np/amglib/amg_ug.c ug-patched/np/amglib/amg_ug.c
--- ug-orig/np/amglib/amg_ug.c	2006-04-18 10:57:21.000000000 +0200
+++ ug-patched/np/amglib/amg_ug.c	2008-12-19 11:17:43.000000000 +0100
@@ -33,6 +33,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stddef.h>
 #include <stdio.h>
@@ -130,7 +131,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/amglib/amg_ug.c,v 1.17 2006/04/18 08:57:21 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/amglib/amg_ug.h ug-patched/np/amglib/amg_ug.h
--- ug-orig/np/amglib/amg_ug.h	2006-05-08 14:28:45.000000000 +0200
+++ ug-patched/np/amglib/amg_ug.h	2006-05-08 14:31:31.000000000 +0200
@@ -21,7 +21,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/amglib/amg_ug.h,v 1.3 2006/05/08 12:28:45 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
Nur in ug-orig/np/amglib: CVS.
Nur in ug-orig/np/amglib: .cvsignore.
diff -ru ug-orig/np/amglib/Makefile.am ug-patched/np/amglib/Makefile.am
--- ug-orig/np/amglib/Makefile.am	2004-09-02 14:22:13.000000000 +0200
+++ ug-patched/np/amglib/Makefile.am	2004-09-02 14:22:17.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.1 2004/09/02 12:22:13 thimo Exp $
+# $Id: Makefile.am 7772 2004-09-02 12:22:17Z thimo $
 
 SOURCES = amg_blas.c amg_coarsen.c amg_iter.c amg_low.c amg_solve.c amg_sp.c amg_ug.c amg_blas.h amg_coarsen.h amg_header.h amg_iter.h amg_low.h amg_solve.h amg_sp.h amg_ug.h
 
diff -ru ug-orig/np/amglib/test.c ug-patched/np/amglib/test.c
--- ug-orig/np/amglib/test.c	1998-02-04 12:26:25.000000000 +0100
+++ ug-patched/np/amglib/test.c	2008-12-19 11:17:43.000000000 +0100
@@ -31,6 +31,8 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
+
 #ifdef MWCW
 #include <console.h>
 #endif
@@ -67,7 +69,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/amglib/test.c,v 1.8 1998/02/04 11:26:25 df Exp $
+$Header$
 */
 
 
diff -ru ug-orig/np/cpldisc/coupleddiscinit.c ug-patched/np/cpldisc/coupleddiscinit.c
--- ug-orig/np/cpldisc/coupleddiscinit.c	2006-06-20 18:24:56.000000000 +0200
+++ ug-patched/np/cpldisc/coupleddiscinit.c	2008-12-19 11:17:43.000000000 +0100
@@ -5,6 +5,7 @@
  * D. Logashenko
  */
 
+#include "config.h"
 #include <stdio.h>
 #include <math.h>
 
Nur in ug-orig/np/cpldisc: CVS.
diff -ru ug-orig/np/cpldisc/globdisc.cc ug-patched/np/cpldisc/globdisc.cc
--- ug-orig/np/cpldisc/globdisc.cc	2008-05-26 16:01:22.000000000 +0200
+++ ug-patched/np/cpldisc/globdisc.cc	2006-06-20 18:24:56.000000000 +0200
@@ -622,7 +622,7 @@
  )
  {
   INT i;
-  int id; /* keep 'int' here for 'sscanf' and 'sprintf'! */
+  INT id;
   np_part_discretization * disc;
   char disc_name [64];
   DOUBLE scale;
@@ -640,7 +640,7 @@
      sprintf (disc_name, "scale%d", id);
      if (ReadArgvDOUBLE (disc_name, &scale, argc, argv))
       scale = 1;
-     if (add_discretization (disc, (INT) id, scale))
+     if (add_discretization (disc, id, scale))
       return __LINE__;
     };
   
@@ -783,7 +783,7 @@
  {
   INT i;
   char imp_name [64], exp_name [64];
-  int exp_id, imp_id; /* keep 'int' here for 'sscanf' and 'sprintf'! */
+  INT exp_id, imp_id;
   import_param * imp_param;
   export_param * exp_param;
   t_disc_list * disc_elem;
@@ -803,7 +803,7 @@
     {
      /* Find the discretisation for the import parameter: */
      disc_elem = disc_list;
-     while (disc_elem->disc->id != (INT) imp_id)
+     while (disc_elem->disc->id != imp_id)
       if ((disc_elem = disc_elem->tl) == NULL)
        {
         PrintErrorMessageF ('E', "globdisc",
@@ -817,9 +817,9 @@
         "Cannot find import param. '%s' for disc. id %d", imp_name, imp_id);
        return __LINE__;
       };
-     /* Find the discretisation for the export parameter: */
+      /* Find the discretisation for the export parameter: */
      disc_elem = disc_list;
-     while (disc_elem->disc->id != (INT) exp_id)
+     while (disc_elem->disc->id != exp_id)
       if ((disc_elem = disc_elem->tl) == NULL)
        {
         PrintErrorMessageF ('E', "globdisc",
@@ -986,8 +986,7 @@
  )
  {
   t_disc_list * disc_elem;
-  INT i;
-  int disc_id; /* keep 'int' here for 'sscanf' and 'sprintf' */
+  INT i, disc_id;
   import_param * param;
   char param_name [64];
   param_value * p_val;
@@ -1000,7 +999,7 @@
    {
     /* Find the discretisation for the import parameter: */
     disc_elem = disc_list;
-    while (disc_elem->disc->id != (INT) disc_id)
+    while (disc_elem->disc->id != disc_id)
      if ((disc_elem = disc_elem->tl) == NULL)
       {
        PrintErrorMessageF ('E', "globdisc",
@@ -1083,7 +1082,7 @@
   import_param * param;
   VECDATA_DESC * vd;
   param_vec_desc * param_vd;
-  int disc_id; /* keep 'int' here for 'sscanf' and 'sprintf'! */
+  INT disc_id;
   char param_name [64], vd_name [64];
   INT n;
   char * str = command + sizeof (vd_command);
@@ -1093,7 +1092,7 @@
    {
     /* Find the discretisation for the import parameter: */
     disc_elem = disc_list;
-    while (disc_elem->disc->id != (INT) disc_id)
+    while (disc_elem->disc->id != disc_id)
      if ((disc_elem = disc_elem->tl) == NULL)
       {
        PrintErrorMessageF ('E', "globdisc",
@@ -1530,7 +1529,7 @@
   * res = 0; return 0;
  }
 
-/* AssembleDefect - assembles the global defect of all the discretizations.
+/* AssembleDefect - assembles the global defect all the discretizations.
  * The defect is added to that kept in the vector descriptor.
  * Returns 0 if OK, nonzero on an error:
  */
@@ -2123,12 +2122,7 @@
               UserWriteF ("[");
               for (j = 0; j < np->n_equations; j++)
                if ((ind = J_entry_cmp [n_i_comp * np->n_equations + j]) >= 0)
-                {
-                 if (fabs (s = MVALUE (mat, ind)) >= 1e-12)
-                  UserWriteF (" %g", MVALUE (mat, ind));
-                 else
-                  UserWrite (" 0");
-                }
+                UserWriteF (" %g", MVALUE (mat, ind));
                else
                 UserWriteF (" @");
               UserWriteF ("]");
diff -ru ug-orig/np/cpldisc/multivd.c ug-patched/np/cpldisc/multivd.c
--- ug-orig/np/cpldisc/multivd.c	2006-06-20 18:24:56.000000000 +0200
+++ ug-patched/np/cpldisc/multivd.c	2008-12-19 11:17:43.000000000 +0100
@@ -10,6 +10,7 @@
  * to the components of vector descriptors <vd1>, <vd2>, ... in the
  * order in which these descriptors are listed in the command.
  */
+#include "config.h"
 #include <stdio.h>
 #include <math.h>
 #include <stdlib.h>
diff -ru ug-orig/np/cpldisc/partdisc.cc ug-patched/np/cpldisc/partdisc.cc
--- ug-orig/np/cpldisc/partdisc.cc	2007-12-03 17:59:36.000000000 +0100
+++ ug-patched/np/cpldisc/partdisc.cc	2007-12-04 11:02:04.000000000 +0100
@@ -120,7 +120,7 @@
   VEC_SCALAR damp /* damping factors */
  )
  {
-  INT i, k, n, vec_data_type;
+  INT i, k, n;
   SHORT * from_comp, * to_comp;
   GRID * fine_grid;
   NODE * node;
@@ -137,52 +137,50 @@
   if (n < np->n_equations)
    return __LINE__;
   
-  /* Get the data types: */
-  vec_data_type = VD_DATA_TYPES (dst);
-  
   /* Get the fine grid: */
   if (level < 1) return __LINE__;
   fine_grid = GRID_ON_LEVEL (NP_MG (np), level);
   
   /* Prolong the correction: */
   for (node = FIRSTNODE (fine_grid); node != NULL; node = SUCCN (node))
-   if (V_IN_DATATYPE (vec = NVECTOR (node), vec_data_type))
-    {
-     /* Set the components to zero: */
-     for (k = 0; k < np->n_equations; k++)
-      VVALUE (vec, to_comp [np->first_vec_cmp + k]) = 0;
-     
-     if (CORNERTYPE (node))
-      {
-       /* Copy the components of the vector: */
-       c_vec = NVECTOR ((NODE *) NFATHER (node));
-       for (k = 0; k < np->n_equations; k++)
-        if ((np->Dirichlet_bc == NULL)?
-            (vec->skip & (1 << (np->first_vec_cmp + k))) == 0
-             : np->Dirichlet_bc (np, vec->skip, k) == 0)
-         VVALUE (vec, to_comp [np->first_vec_cmp + k])
-          = damp [np->first_vec_cmp + k]
-           * VVALUE (c_vec, from_comp [np->first_vec_cmp + k]);
-      }
-     else
-      {
-       /* Sum the 'hat'-functions: */
-       vert = MYVERTEX (node);
-       elem = VFATHER (vert);
-       GNs ((n = CORNERS_OF_ELEM (elem)), LCVECT (vert), c);
-       for (i = 0; i < n; i++)
-        {
-         c_vec = NVECTOR (CORNER (elem, i));
-         for (k = 0; k < np->n_equations; k++)
-          if ((np->Dirichlet_bc == NULL)?
-              (vec->skip & (1 << (np->first_vec_cmp + k))) == 0
-               : np->Dirichlet_bc (np, vec->skip, k) == 0)
-           VVALUE (vec, to_comp [np->first_vec_cmp + k])
-            += damp [np->first_vec_cmp + k] * c [i]
-             * VVALUE (c_vec, from_comp [np->first_vec_cmp + k]);
-        };
-      };
-    };
+   {
+    vec = NVECTOR (node);
+    
+    /* Set the components to zero: */
+    for (k = 0; k < np->n_equations; k++)
+     VVALUE (vec, to_comp [np->first_vec_cmp + k]) = 0;
+    
+    if (CORNERTYPE (node))
+     {
+      /* Copy the components of the vector: */
+      c_vec = NVECTOR ((NODE *) NFATHER (node));
+      for (k = 0; k < np->n_equations; k++)
+       if ((np->Dirichlet_bc == NULL)?
+           (vec->skip & (1 << (np->first_vec_cmp + k))) == 0
+            : np->Dirichlet_bc (np, vec->skip, k) == 0)
+        VVALUE (vec, to_comp [np->first_vec_cmp + k])
+         = damp [np->first_vec_cmp + k]
+          * VVALUE (c_vec, from_comp [np->first_vec_cmp + k]);
+     }
+    else
+     {
+      /* Sum the 'hat'-functions: */
+      vert = MYVERTEX (node);
+      elem = VFATHER (vert);
+      GNs ((n = CORNERS_OF_ELEM (elem)), LCVECT (vert), c);
+      for (i = 0; i < n; i++)
+       {
+        c_vec = NVECTOR (CORNER (elem, i));
+        for (k = 0; k < np->n_equations; k++)
+         if ((np->Dirichlet_bc == NULL)?
+             (vec->skip & (1 << (np->first_vec_cmp + k))) == 0
+              : np->Dirichlet_bc (np, vec->skip, k) == 0)
+          VVALUE (vec, to_comp [np->first_vec_cmp + k])
+           += damp [np->first_vec_cmp + k] * c [i]
+            * VVALUE (c_vec, from_comp [np->first_vec_cmp + k]);
+       };
+     };
+   };
   
   return 0;
  }
@@ -197,7 +195,7 @@
   VEC_SCALAR damp /* damping factors */
  )
  {
-  INT i, k, n, vec_data_type;
+  INT i, k, n;
   SHORT * from_comp, * to_comp;
   GRID * fine_grid;
   NODE * node;
@@ -214,9 +212,6 @@
   if (n < np->n_equations)
    return __LINE__;
   
-  /* Get the data types: */
-  vec_data_type = VD_DATA_TYPES (dst);
-  
   /* Get the fine grid: */
   if (level < 1) return __LINE__;
   fine_grid = GRID_ON_LEVEL (NP_MG (np), level);
@@ -224,14 +219,13 @@
   /* Set the components to zero: */
   for (vec = PFIRSTVECTOR (GRID_ON_LEVEL (NP_MG (np), level - 1)); vec != NULL;
    vec = SUCCVC (vec))
-   if (V_IN_DATATYPE (vec, vec_data_type) && VNCLASS (vec) >= NEWDEF_CLASS)
+   if (VNCLASS (vec) >= NEWDEF_CLASS)
     for (k = 0; k < np->n_equations; k++)
      VVALUE (vec, to_comp [np->first_vec_cmp + k]) = 0;
   
-  /* Restrict the defect: */
+  /* Prolong the correction: */
   for (node = FIRSTNODE (fine_grid); node != NULL; node = SUCCN (node))
-   if (V_IN_DATATYPE (vec = NVECTOR (node), vec_data_type)
-    && VCLASS (vec) >= NEWDEF_CLASS)
+   if (VCLASS (vec = NVECTOR (node)) >= NEWDEF_CLASS)
     {
      /* Sum the 'hat'-functions: */
      if (CORNERTYPE (node))
diff -ru ug-orig/np/cpldisc/sparsepattern.c ug-patched/np/cpldisc/sparsepattern.c
--- ug-orig/np/cpldisc/sparsepattern.c	2006-06-20 18:24:56.000000000 +0200
+++ ug-patched/np/cpldisc/sparsepattern.c	2008-12-19 11:17:43.000000000 +0100
@@ -41,6 +41,7 @@
  * set @var_name @i;
  * This sets 'diag_line2' to "2".
  */
+#include "config.h"
 #include <stdio.h>
 #include <math.h>
 #include <stdlib.h>
Nur in ug-orig/np: CVS.
Nur in ug-orig/np: .cvsignore.
Nur in ug-orig/np/famglib: CVS.
Nur in ug-orig/np/famglib: .cvsignore.
diff -ru ug-orig/np/famglib/famg_algebra.C ug-patched/np/famglib/famg_algebra.C
--- ug-orig/np/famglib/famg_algebra.C	2000-04-04 17:44:17.000000000 +0200
+++ ug-patched/np/famglib/famg_algebra.C	2008-12-19 11:17:43.000000000 +0100
@@ -18,6 +18,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <iostream.h>
 #include <math.h>
 #include <assert.h>
@@ -37,7 +38,7 @@
 #include "famg_sparse.h"
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_algebra.C,v 1.15 2000/04/04 15:44:17 christia Exp $
+$Header$
 */
 
 #ifdef __AIX__
diff -ru ug-orig/np/famglib/famg_algebra.h ug-patched/np/famglib/famg_algebra.h
--- ug-orig/np/famglib/famg_algebra.h	2000-05-17 10:48:22.000000000 +0200
+++ ug-patched/np/famglib/famg_algebra.h	2000-05-17 10:48:22.000000000 +0200
@@ -22,7 +22,7 @@
 #define __FAMG_ALGEBRA__
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_algebra.h,v 1.19 2000/05/17 08:48:22 christia Exp $
+$Header$
 */
 
 // if defined, only one type of alegra data structure is active (ug DS if USE_UG_DS is
diff -ru ug-orig/np/famglib/famg_approx.C ug-patched/np/famglib/famg_approx.C
--- ug-orig/np/famglib/famg_approx.C	1999-08-13 18:18:29.000000000 +0200
+++ ug-patched/np/famglib/famg_approx.C	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 */
 
 
+#include "config.h"
 #include <iostream.h>
 #include <strstream.h>
 #include <math.h>
@@ -37,7 +38,7 @@
 #include "famg_system.h"
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_approx.C,v 1.5 1999/08/13 16:18:29 chris Exp $
+$Header$
 */
 
 #ifndef FAMG_SPARSE_BLOCK
diff -ru ug-orig/np/famglib/famg_approxNew.C ug-patched/np/famglib/famg_approxNew.C
--- ug-orig/np/famglib/famg_approxNew.C	1999-10-05 11:51:30.000000000 +0200
+++ ug-patched/np/famglib/famg_approxNew.C	2008-12-19 11:17:43.000000000 +0100
@@ -20,6 +20,7 @@
 /****************************************************************************/
 
 
+#include "config.h"
 #include <iostream.h>
 #include <strstream.h>
 #include <math.h>
diff -ru ug-orig/np/famglib/famg_approxSparse.C ug-patched/np/famglib/famg_approxSparse.C
--- ug-orig/np/famglib/famg_approxSparse.C	1999-10-04 19:10:35.000000000 +0200
+++ ug-patched/np/famglib/famg_approxSparse.C	2008-12-19 11:17:43.000000000 +0100
@@ -20,6 +20,7 @@
 /****************************************************************************/
 
 
+#include "config.h"
 #include <iostream.h>
 #include <strstream.h>
 #include <math.h>
diff -ru ug-orig/np/famglib/famg_arrayalgebra.C ug-patched/np/famglib/famg_arrayalgebra.C
--- ug-orig/np/famglib/famg_arrayalgebra.C	1998-09-30 12:43:39.000000000 +0200
+++ ug-patched/np/famglib/famg_arrayalgebra.C	2008-12-19 11:17:43.000000000 +0100
@@ -18,12 +18,13 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <iostream.h>
 #include <math.h>
 #include "famg_algebraalgebra.h"
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_arrayalgebra.C,v 1.1 1998/09/30 10:43:39 christia Exp $
+$Header$
 */
 
 
diff -ru ug-orig/np/famglib/famg_arrayalgebra.h ug-patched/np/famglib/famg_arrayalgebra.h
--- ug-orig/np/famglib/famg_arrayalgebra.h	1998-08-26 21:20:40.000000000 +0200
+++ ug-patched/np/famglib/famg_arrayalgebra.h	1998-08-26 21:20:40.000000000 +0200
@@ -22,7 +22,7 @@
 #define __FAMG_ARRAYALGEBRA__
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_arrayalgebra.h,v 1.1 1998/08/26 19:20:40 christia Exp $
+$Header$
 */
 
 #endif
diff -ru ug-orig/np/famglib/famg.C ug-patched/np/famglib/famg.C
--- ug-orig/np/famglib/famg.C	2000-02-04 11:03:38.000000000 +0100
+++ ug-patched/np/famglib/famg.C	2008-12-19 11:17:43.000000000 +0100
@@ -19,6 +19,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <strstream.h>
 #include <iostream.h>
 #include <fstream.h>
@@ -30,7 +31,7 @@
 #include "famg_system.h"
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg.C,v 1.8 2000/02/04 10:03:38 christia Exp $
+$Header$
 */
 
 int firsti;
diff -ru ug-orig/np/famglib/famg_coloring.C ug-patched/np/famglib/famg_coloring.C
--- ug-orig/np/famglib/famg_coloring.C	1999-11-15 17:35:13.000000000 +0100
+++ ug-patched/np/famglib/famg_coloring.C	2008-12-19 11:17:43.000000000 +0100
@@ -20,6 +20,7 @@
 
 #ifdef ModelP
 
+#include "config.h"
 #include <stdlib.h> 		// for (s)rand
 #include <string.h> 		// for memset
 #include <limits.h> 		// for INT_MAX
@@ -38,7 +39,7 @@
 #include "famg_ugalgebra.h"
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_coloring.C,v 1.17 1999/11/15 16:35:13 christia Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/famglib/famg_coloring.h ug-patched/np/famglib/famg_coloring.h
--- ug-orig/np/famglib/famg_coloring.h	1999-11-15 17:01:23.000000000 +0100
+++ ug-patched/np/famglib/famg_coloring.h	1999-11-15 17:01:24.000000000 +0100
@@ -21,7 +21,7 @@
 #define __FAMG_COLORING__
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_coloring.h,v 1.5 1999/11/15 16:01:23 christia Exp $
+$Header$
 */
 
 #ifdef ModelP
diff -ru ug-orig/np/famglib/famg_construct.C ug-patched/np/famglib/famg_construct.C
--- ug-orig/np/famglib/famg_construct.C	2000-09-22 19:52:41.000000000 +0200
+++ ug-patched/np/famglib/famg_construct.C	2008-12-19 11:17:43.000000000 +0100
@@ -19,6 +19,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <iostream.h>
 #include <math.h>
 
@@ -59,7 +60,7 @@
 #endif
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_construct.C,v 1.28 2000/09/22 17:52:41 christia Exp $
+$Header$
 */
 
 void prm(int level, int comp)
diff -ru ug-orig/np/famglib/famg_decomp.C ug-patched/np/famglib/famg_decomp.C
--- ug-orig/np/famglib/famg_decomp.C	1998-08-21 18:39:37.000000000 +0200
+++ ug-patched/np/famglib/famg_decomp.C	2008-12-19 11:17:43.000000000 +0100
@@ -19,6 +19,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <iostream.h>
 #include "famg_decomp.h"
 #include "famg_heap.h"
@@ -26,7 +27,7 @@
 #include "famg_system.h"
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_decomp.C,v 1.1 1998/08/21 16:39:37 christia Exp $
+$Header$
 */
 
 // Class FAMGDecompEntry
diff -ru ug-orig/np/famglib/famg_decomp.h ug-patched/np/famglib/famg_decomp.h
--- ug-orig/np/famglib/famg_decomp.h	1998-09-30 12:43:41.000000000 +0200
+++ ug-patched/np/famglib/famg_decomp.h	1998-09-30 12:43:57.000000000 +0200
@@ -25,7 +25,7 @@
 #include "famg_algebra.h"
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_decomp.h,v 1.2 1998/09/30 10:43:41 christia Exp $
+$Header$
 */
 
 struct FAMGDecompBitField
diff -ru ug-orig/np/famglib/famg_fifo.h ug-patched/np/famglib/famg_fifo.h
--- ug-orig/np/famglib/famg_fifo.h	1998-08-21 18:39:38.000000000 +0200
+++ ug-patched/np/famglib/famg_fifo.h	1998-08-21 18:39:50.000000000 +0200
@@ -23,7 +23,7 @@
 #define __FAMG_FIFO__
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_fifo.h,v 1.1 1998/08/21 16:39:38 christia Exp $
+$Header$
 */
 
 // integer fifo. for pointers: cast pointers to integer.
diff -ru ug-orig/np/famglib/famg_graph.C ug-patched/np/famglib/famg_graph.C
--- ug-orig/np/famglib/famg_graph.C	1999-08-13 18:18:31.000000000 +0200
+++ ug-patched/np/famglib/famg_graph.C	2008-12-19 11:17:43.000000000 +0100
@@ -19,6 +19,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <iostream.h>
 #include <math.h>
 
@@ -30,7 +31,7 @@
 #include "famg_fifo.h"
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_graph.C,v 1.9 1999/08/13 16:18:31 chris Exp $
+$Header$
 */
    
     // Class List
diff -ru ug-orig/np/famglib/famg_graph.h ug-patched/np/famglib/famg_graph.h
--- ug-orig/np/famglib/famg_graph.h	2000-02-03 17:44:55.000000000 +0100
+++ ug-patched/np/famglib/famg_graph.h	2000-02-03 17:44:55.000000000 +0100
@@ -33,7 +33,7 @@
 
 #include "famg_algebra.h"   
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_graph.h,v 1.14 2000/02/03 16:44:55 christia Exp $
+$Header$
 */
 
 const int FAMGMAXPARENTS=2;
diff -ru ug-orig/np/famglib/famg_graphics.C ug-patched/np/famglib/famg_graphics.C
--- ug-orig/np/famglib/famg_graphics.C	2000-07-20 14:28:18.000000000 +0200
+++ ug-patched/np/famglib/famg_graphics.C	2008-12-19 11:17:43.000000000 +0100
@@ -20,6 +20,7 @@
 /****************************************************************************/
 
 
+#include "config.h"
 #include <stdlib.h>
 #include <stddef.h>
 #include <stdio.h>
@@ -47,7 +48,7 @@
 #include "famg_uginterface.h"
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_graphics.C,v 1.15 2000/07/20 12:28:18 christia Exp $
+$Header$
 */
 
 static long BlackColor; /* Black  */
diff -ru ug-orig/np/famglib/famg_grid.C ug-patched/np/famglib/famg_grid.C
--- ug-orig/np/famglib/famg_grid.C	2000-09-22 19:55:31.000000000 +0200
+++ ug-patched/np/famglib/famg_grid.C	2008-12-19 11:17:43.000000000 +0100
@@ -19,6 +19,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <iostream.h>
 #include <strstream.h>
 #include <math.h>
@@ -82,7 +83,7 @@
 #endif
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_grid.C,v 1.76 2000/09/22 17:55:31 christia Exp $ 
+$Header$ 
 */
 
 #ifdef FAMG_CLEAREMPTY_PE
diff -ru ug-orig/np/famglib/famg_grid.h ug-patched/np/famglib/famg_grid.h
--- ug-orig/np/famglib/famg_grid.h	2000-06-29 18:43:43.000000000 +0200
+++ ug-patched/np/famglib/famg_grid.h	2000-06-29 18:43:44.000000000 +0200
@@ -26,7 +26,7 @@
 #include "famg_transfer.h"    
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_grid.h,v 1.21 2000/06/29 16:43:43 christia Exp $
+$Header$
 */
 
 //additional measurement and output
diff -ru ug-orig/np/famglib/famg_heap.C ug-patched/np/famglib/famg_heap.C
--- ug-orig/np/famglib/famg_heap.C	1999-10-04 15:30:25.000000000 +0200
+++ ug-patched/np/famglib/famg_heap.C	2008-12-19 11:17:43.000000000 +0100
@@ -17,6 +17,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <iostream.h>
 #include <strstream.h>
 #include <math.h>
@@ -33,7 +34,7 @@
 #endif
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_heap.C,v 1.6 1999/10/04 13:30:25 christia Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/famglib/famg_heap.h ug-patched/np/famglib/famg_heap.h
--- ug-orig/np/famglib/famg_heap.h	1999-10-04 15:30:26.000000000 +0200
+++ ug-patched/np/famglib/famg_heap.h	1999-10-04 15:30:26.000000000 +0200
@@ -23,7 +23,7 @@
 #define __FAMG_HEAP__
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_heap.h,v 1.3 1999/10/04 13:30:26 christia Exp $
+$Header$
 */
 
 #define FAMGMAXSTACK 8
diff -ru ug-orig/np/famglib/famg_interface.C ug-patched/np/famglib/famg_interface.C
--- ug-orig/np/famglib/famg_interface.C	1999-12-08 16:16:14.000000000 +0100
+++ ug-patched/np/famglib/famg_interface.C	2008-12-19 11:17:43.000000000 +0100
@@ -19,12 +19,13 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include "famg_system.h"
 #include "famg_heap.h"
 #include "famg_interface.h"
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_interface.C,v 1.4 1999/12/08 15:16:14 christia Exp $
+$Header$
 */
 
 static FAMGSystem *famgsystemptr;
diff -ru ug-orig/np/famglib/famg_interface.h ug-patched/np/famglib/famg_interface.h
--- ug-orig/np/famglib/famg_interface.h	1998-09-30 12:43:46.000000000 +0200
+++ ug-patched/np/famglib/famg_interface.h	1998-09-30 12:43:57.000000000 +0200
@@ -23,7 +23,7 @@
 #define FAMG_INTERFACE
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_interface.h,v 1.2 1998/09/30 10:43:46 christia Exp $
+$Header$
 */
 
 	// exported functions
diff -ru ug-orig/np/famglib/famg_matrix.C ug-patched/np/famglib/famg_matrix.C
--- ug-orig/np/famglib/famg_matrix.C	1998-09-30 12:43:47.000000000 +0200
+++ ug-patched/np/famglib/famg_matrix.C	2008-12-19 11:17:43.000000000 +0100
@@ -19,6 +19,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <iostream.h>
 #include <math.h>
 #include "famg_misc.h"
@@ -27,7 +28,7 @@
 #include "famg_grid.h"
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_matrix.C,v 1.2 1998/09/30 10:43:47 christia Exp $
+$Header$
 */
 
 static double famgzero = 0.0;
diff -ru ug-orig/np/famglib/famg_matrix.h ug-patched/np/famglib/famg_matrix.h
--- ug-orig/np/famglib/famg_matrix.h	1998-09-30 12:43:48.000000000 +0200
+++ ug-patched/np/famglib/famg_matrix.h	1998-09-30 12:43:57.000000000 +0200
@@ -27,7 +27,7 @@
 #include "famg_graph.h"    
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_matrix.h,v 1.2 1998/09/30 10:43:48 christia Exp $
+$Header$
 */
 
     // for other data structures, FAMGMatrixPtr may contain only
diff -ru ug-orig/np/famglib/famg_misc.C ug-patched/np/famglib/famg_misc.C
--- ug-orig/np/famglib/famg_misc.C	1999-11-10 13:47:50.000000000 +0100
+++ ug-patched/np/famglib/famg_misc.C	2008-12-19 11:17:43.000000000 +0100
@@ -19,6 +19,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <math.h>
 #include "famg_misc.h"
 
@@ -38,7 +39,7 @@
 #endif
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_misc.C,v 1.5 1999/11/10 12:47:50 christia Exp $
+$Header$
 */
 
 void FAMGError(ostrstream &OutputString)
diff -ru ug-orig/np/famglib/famg_misc.h ug-patched/np/famglib/famg_misc.h
--- ug-orig/np/famglib/famg_misc.h	1999-10-04 19:10:39.000000000 +0200
+++ ug-patched/np/famglib/famg_misc.h	1999-10-04 19:10:44.000000000 +0200
@@ -26,7 +26,7 @@
 #include <strstream.h>
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_misc.h,v 1.3 1999/10/04 17:10:39 chris Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/famglib/famg_multigrid.C ug-patched/np/famglib/famg_multigrid.C
--- ug-orig/np/famglib/famg_multigrid.C	2000-07-07 14:50:26.000000000 +0200
+++ ug-patched/np/famglib/famg_multigrid.C	2008-12-19 11:17:43.000000000 +0100
@@ -19,6 +19,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <iostream.h>
 #include <math.h>
 
@@ -32,7 +33,7 @@
 #include "famg_sparse.h"
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_multigrid.C,v 1.29 2000/07/07 12:50:26 christia Exp $
+$Header$
 */
 
 // data structure local to this file
diff -ru ug-orig/np/famglib/famg_multigrid.h ug-patched/np/famglib/famg_multigrid.h
--- ug-orig/np/famglib/famg_multigrid.h	1998-09-30 12:43:49.000000000 +0200
+++ ug-patched/np/famglib/famg_multigrid.h	1998-09-30 12:43:57.000000000 +0200
@@ -25,7 +25,7 @@
 #include "famg_grid.h"  
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_multigrid.h,v 1.2 1998/09/30 10:43:49 christia Exp $
+$Header$
 */
 
 const int FAMGMAXGRIDS=32;  
diff -ru ug-orig/np/famglib/famg_onlyugalgebra.h ug-patched/np/famglib/famg_onlyugalgebra.h
--- ug-orig/np/famglib/famg_onlyugalgebra.h	1999-10-07 13:06:27.000000000 +0200
+++ ug-patched/np/famglib/famg_onlyugalgebra.h	1999-10-07 13:06:27.000000000 +0200
@@ -23,7 +23,7 @@
 #define __FAMG_ONLYUGALGEBRA__
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_onlyugalgebra.h,v 1.10 1999/10/07 11:06:27 christia Exp $
+$Header$
 */
 
 extern "C"
diff -ru ug-orig/np/famglib/famg_sparse.C ug-patched/np/famglib/famg_sparse.C
--- ug-orig/np/famglib/famg_sparse.C	1999-10-04 19:10:41.000000000 +0200
+++ ug-patched/np/famglib/famg_sparse.C	2008-12-19 11:17:43.000000000 +0100
@@ -19,6 +19,7 @@
 /*																			*/
 /****************************************************************************/
  
+#include "config.h"
 #include <string.h>
 #include <strstream.h>
 #include "famg_sparse.h"
diff -ru ug-orig/np/famglib/famg_system.C ug-patched/np/famglib/famg_system.C
--- ug-orig/np/famglib/famg_system.C	1999-08-13 18:18:37.000000000 +0200
+++ ug-patched/np/famglib/famg_system.C	2008-12-19 11:17:43.000000000 +0100
@@ -19,6 +19,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <iostream.h>
 #include <strstream.h>
 #include <fstream.h>
@@ -38,7 +39,7 @@
 #endif
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_system.C,v 1.8 1999/08/13 16:18:37 chris Exp $
+$Header$
 */
 
 // Class  Parameter
diff -ru ug-orig/np/famglib/famg_system.h ug-patched/np/famglib/famg_system.h
--- ug-orig/np/famglib/famg_system.h	1999-12-08 16:16:15.000000000 +0100
+++ ug-patched/np/famglib/famg_system.h	1999-12-08 16:16:19.000000000 +0100
@@ -35,7 +35,7 @@
 #include "famg_sparse.h"
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_system.h,v 1.9 1999/12/08 15:16:15 christia Exp $
+$Header$
 */
 
 const int FAMGMULTIGRIDS=1;
diff -ru ug-orig/np/famglib/famg_transfer.C ug-patched/np/famglib/famg_transfer.C
--- ug-orig/np/famglib/famg_transfer.C	2000-06-29 18:43:44.000000000 +0200
+++ ug-patched/np/famglib/famg_transfer.C	2008-12-19 11:17:43.000000000 +0100
@@ -19,6 +19,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include "famg_transfer.h"
 #include "famg_heap.h"
 #include "famg_misc.h"
@@ -39,7 +40,7 @@
 #endif
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_transfer.C,v 1.21 2000/06/29 16:43:44 christia Exp $
+$Header$
 */
 
 //
diff -ru ug-orig/np/famglib/famg_transfer.h ug-patched/np/famglib/famg_transfer.h
--- ug-orig/np/famglib/famg_transfer.h	1999-08-13 21:42:32.000000000 +0200
+++ ug-patched/np/famglib/famg_transfer.h	1999-08-13 21:42:32.000000000 +0200
@@ -40,7 +40,7 @@
 class FAMGGrid;
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_transfer.h,v 1.6 1999/08/13 19:42:32 chris Exp $
+$Header$
 */
 
 // Class FAMGTransferEntry
diff -ru ug-orig/np/famglib/famg_traverse.template ug-patched/np/famglib/famg_traverse.template
--- ug-orig/np/famglib/famg_traverse.template	1998-09-30 12:43:53.000000000 +0200
+++ ug-patched/np/famglib/famg_traverse.template	1998-09-30 12:43:57.000000000 +0200
@@ -22,7 +22,7 @@
 #include "famg_algebra.h"
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_traverse.template,v 1.1 1998/09/30 10:43:53 christia Exp $
+$Header$
 */
 
 // respected preprocessor variables:
diff -ru ug-orig/np/famglib/famg_ugalgebra.C ug-patched/np/famglib/famg_ugalgebra.C
--- ug-orig/np/famglib/famg_ugalgebra.C	2000-04-12 12:17:59.000000000 +0200
+++ ug-patched/np/famglib/famg_ugalgebra.C	2008-12-19 11:17:43.000000000 +0100
@@ -19,6 +19,7 @@
 /****************************************************************************/
 
 extern "C" {
+#include "config.h"
 #include <math.h>
 #include <gm.h>
 #include <algebra.h>
@@ -30,7 +31,7 @@
 #include "famg_sparse.h"
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_ugalgebra.C,v 1.11 2000/04/12 10:17:59 christia Exp $
+$Header$
 */
  
 
diff -ru ug-orig/np/famglib/famg_ugalgebra.h ug-patched/np/famglib/famg_ugalgebra.h
--- ug-orig/np/famglib/famg_ugalgebra.h	1999-10-04 19:10:43.000000000 +0200
+++ ug-patched/np/famglib/famg_ugalgebra.h	1999-10-04 19:10:44.000000000 +0200
@@ -35,7 +35,7 @@
 #include "famg_algebra.h"
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_ugalgebra.h,v 1.17 1999/10/04 17:10:43 chris Exp $
+$Header$
 */
 
 //
diff -ru ug-orig/np/famglib/famg_uginterface.C ug-patched/np/famglib/famg_uginterface.C
--- ug-orig/np/famglib/famg_uginterface.C	2000-04-04 17:44:22.000000000 +0200
+++ ug-patched/np/famglib/famg_uginterface.C	2008-12-19 11:17:43.000000000 +0100
@@ -19,6 +19,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <iostream.h>
 
 #include "famg_uginterface.h"
@@ -28,7 +29,7 @@
 #include "famg_sparse.h"
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_uginterface.C,v 1.19 2000/04/04 15:44:22 christia Exp $
+$Header$
 */
 
     // actually these should be a system member functions. Maybe it is more
diff -ru ug-orig/np/famglib/famg_uginterface.h ug-patched/np/famglib/famg_uginterface.h
--- ug-orig/np/famglib/famg_uginterface.h	2000-04-04 17:44:23.000000000 +0200
+++ ug-patched/np/famglib/famg_uginterface.h	2000-04-04 17:44:27.000000000 +0200
@@ -23,7 +23,7 @@
 #define __FAMG_UGINTERFACE__
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/famg_uginterface.h,v 1.10 2000/04/04 15:44:23 christia Exp $
+$Header$
 */
 
 //#include "gm.h"        /* for ug data structure               */
diff -ru ug-orig/np/famglib/ug-famg.C ug-patched/np/famglib/ug-famg.C
--- ug-orig/np/famglib/ug-famg.C	2000-08-28 12:27:59.000000000 +0200
+++ ug-patched/np/famglib/ug-famg.C	2008-12-19 11:17:43.000000000 +0100
@@ -27,6 +27,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <strstream.h>
 
 extern "C"
@@ -108,7 +109,7 @@
 static struct FAMGParameter_ug famg_parameter;
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/ug-famg.C,v 1.39 2000/08/28 10:27:59 christia Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/famglib/ug-famg.h ug-patched/np/famglib/ug-famg.h
--- ug-orig/np/famglib/ug-famg.h	2000-04-04 17:44:24.000000000 +0200
+++ ug-patched/np/famglib/ug-famg.h	2000-04-04 17:44:27.000000000 +0200
@@ -24,7 +24,7 @@
 #include "amgtransfer.h"    
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/famglib/ug-famg.h,v 1.9 2000/04/04 15:44:24 christia Exp $
+$Header$
 */
 
 /****************************************************************************/
Nur in ug-orig/np/field: CVS.
Nur in ug-orig/np/field: .cvsignore.
diff -ru ug-orig/np/field/field.h ug-patched/np/field/field.h
--- ug-orig/np/field/field.h	2006-05-08 14:26:01.000000000 +0200
+++ ug-patched/np/field/field.h	2006-05-08 14:31:31.000000000 +0200
@@ -18,7 +18,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/field/field.h,v 1.9 2006/05/08 12:26:01 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/field/Makefile.am ug-patched/np/field/Makefile.am
--- ug-orig/np/field/Makefile.am	2004-09-02 14:22:14.000000000 +0200
+++ ug-patched/np/field/Makefile.am	2004-09-02 14:22:17.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.1 2004/09/02 12:22:14 thimo Exp $
+# $Id: Makefile.am 7772 2004-09-02 12:22:17Z thimo $
 
 SOURCES = stoch.c field.h
 
diff -ru ug-orig/np/field/stoch.c ug-patched/np/field/stoch.c
--- ug-orig/np/field/stoch.c	2004-07-21 11:18:58.000000000 +0200
+++ ug-patched/np/field/stoch.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*																		*/
 /************************************************************************/
 
+#include "config.h"
 #include <ctype.h>
 #include <string.h>
 #include <stdio.h>
@@ -107,7 +108,7 @@
 static DOUBLE *H;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/field/stoch.c,v 1.18 2004/07/21 09:18:58 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /************************************************************************/
 /*																		*/
diff -ru ug-orig/np/initnp.c ug-patched/np/initnp.c
--- ug-orig/np/initnp.c	2008-07-09 17:39:33.000000000 +0200
+++ ug-patched/np/initnp.c	2008-12-19 11:17:43.000000000 +0100
@@ -26,6 +26,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 
 #include "np.h"
@@ -63,8 +64,6 @@
 #include "initnp.h"
 #include "numproc.h"
 #include "amglib/amg_ug.h"
-#include "slu/slu.h"
-#include "mlilu/mlilulib.h"
 
 #ifdef USE_FAMG
 #include "ug-famg.h"
@@ -79,7 +78,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/initnp.c,v 1.43 2008/07/09 15:39:33 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*D
@@ -235,14 +234,6 @@
 	}
 #endif
 
-#ifdef _MLILU
-	/* init mlilu solver */
-	if ((err=Init_MLILU())!=0) {
-		SetHiWrd(err,__LINE__);
-		return (err);
-	}
-#endif
-
 	/* init order numproc */
 	if ((err=InitOrder())!=0) {
 		SetHiWrd(err,__LINE__);
@@ -267,12 +258,6 @@
         return (err);
     }
 
-    /* init slu */
-    if ((err=InitSLU())!=0) {
-        SetHiWrd(err,__LINE__);
-        return (err);
-    }
-
     /* init els */
     if ((err=InitELinearSolver())!=0) {
         SetHiWrd(err,__LINE__);
diff -ru ug-orig/np/initnp.h ug-patched/np/initnp.h
--- ug-orig/np/initnp.h	2006-05-08 14:28:44.000000000 +0200
+++ ug-patched/np/initnp.h	2006-05-08 14:31:31.000000000 +0200
@@ -27,7 +27,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/initnp.h,v 1.7 2006/05/08 12:28:44 sander Exp $
+$Header$
 */
 #ifndef __INITNP__
 #define __INITNP__
diff -ru ug-orig/np/initnumerics.h ug-patched/np/initnumerics.h
--- ug-orig/np/initnumerics.h	2006-05-08 14:28:44.000000000 +0200
+++ ug-patched/np/initnumerics.h	2006-05-08 14:31:31.000000000 +0200
@@ -20,7 +20,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/initnumerics.h,v 1.6 2006/05/08 12:28:44 sander Exp $
+$Header$
 */
 
 #ifndef __INITNUMERICS__
diff -ru ug-orig/np/Makefile.am ug-patched/np/Makefile.am
--- ug-orig/np/Makefile.am	2004-09-03 15:16:22.000000000 +0200
+++ ug-patched/np/Makefile.am	2007-09-17 16:29:22.000000000 +0200
@@ -1,6 +1,6 @@
-# $Id: Makefile.am,v 1.2 2004/09/03 13:16:22 thimo Exp $
+# $Id: Makefile.am 8299 2007-09-17 14:29:22Z sander $
 
-SUBDIRS = algebra amglib field procs udm slu
+SUBDIRS = algebra amglib field procs udm
 
 # famglib ist auch im alten Makefile nicht drin
 
@@ -28,8 +28,8 @@
                    amglib/libamg2.la \
                    field/libfield2.la \
                    procs/libprocs2.la \
-                   slu/libslu2.la \
-                   udm/libudm2.la
+                   udm/libudm2.la \
+                   ../low/liblow2.la
 
 libnp3_la_SOURCES = $(SOURCES)
 libnp3_la_CPPFLAGS = $(UG_3DFLAGS)
@@ -37,6 +37,6 @@
                    amglib/libamg3.la \
                    field/libfield3.la \
                    procs/libprocs3.la \
-                   slu/libslu3.la \
-                   udm/libudm3.la
+                   udm/libudm3.la \
+                   ../low/liblow3.la
 
diff -ru ug-orig/np/Makefile.np ug-patched/np/Makefile.np
--- ug-orig/np/Makefile.np	2008-07-09 17:39:33.000000000 +0200
+++ ug-patched/np/Makefile.np	2007-09-17 16:29:22.000000000 +0200
@@ -10,8 +10,7 @@
 include $(UGROOT)/ug.conf
 
 # the following list may be extended
-MODULES = PROCStarget ALGEBRAtarget UDMtarget FIELDtarget AMGLIBtarget SLUtarget \
-	$(MLILU_TARGET)
+MODULES = PROCStarget ALGEBRAtarget UDMtarget FIELDtarget AMGLIBtarget SLUtarget
 
 # object files for both dimensions
 OBJECTS = initnp.o
@@ -46,14 +45,6 @@
 AMGLIBtarget:
 	cd amglib && make -f Makefile.amglib
 
-SLUtarget:
-	cd slu && make -f Makefile.slu
-
-MLILU_ON:
-	cd mlilu && make -f Makefile.mlilu
-
-MLILU_OFF:
-
 .SUFFIXES: .o .c
 
 .c.o:
@@ -66,8 +57,6 @@
 	cd udm && make -f Makefile.udm clean
 	cd field && make -f Makefile.field clean
 	cd amglib && make -f Makefile.amglib clean
-	cd slu && make -f Makefile.slu clean
-	cd mlilu && make -f Makefile.mlilu clean
 
 extract:
 	$(ARCH_AR) $(ARCH_EXFLAGS) $(UGROOT)/lib/libug$(UG_LIBSUFFIX).a $(OBJECTS)
@@ -76,7 +65,5 @@
 	cd udm && make -f Makefile.udm extract
 	cd field && make -f Makefile.field extract
 	cd amglib && make -f Makefile.amglib extract
-	cd slu && make -f Makefile.slu extract
-	cd mlilu && make -f Makefile.mlilu extract
 
 xmc: extract all clean
Nur in ug-orig/np: mlilu.
diff -ru ug-orig/np/np.h ug-patched/np/np.h
--- ug-orig/np/np.h	2006-11-17 11:59:50.000000000 +0100
+++ ug-patched/np/np.h	2006-12-04 17:27:10.000000000 +0100
@@ -21,7 +21,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/np.h,v 1.73 2006/11/17 10:59:50 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/num.h ug-patched/np/num.h
--- ug-orig/np/num.h	1997-07-18 16:59:30.000000000 +0200
+++ ug-patched/np/num.h	1997-07-18 17:00:14.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/num.h,v 1.2 1997/07/18 14:59:30 birken Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/amgtransfer.c ug-patched/np/procs/amgtransfer.c
--- ug-orig/np/procs/amgtransfer.c	2006-06-02 17:30:20.000000000 +0200
+++ ug-patched/np/procs/amgtransfer.c	2006-06-02 17:38:35.000000000 +0200
@@ -83,7 +83,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/amgtransfer.c,v 1.35 2006/06/02 15:30:20 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*D
diff -ru ug-orig/np/procs/amgtransfer.h ug-patched/np/procs/amgtransfer.h
--- ug-orig/np/procs/amgtransfer.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/amgtransfer.h	2006-05-08 14:31:31.000000000 +0200
@@ -20,7 +20,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/amgtransfer.h,v 1.19 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/assemble.c ug-patched/np/procs/assemble.c
--- ug-orig/np/procs/assemble.c	2006-06-02 17:30:20.000000000 +0200
+++ ug-patched/np/procs/assemble.c	2006-06-02 17:38:35.000000000 +0200
@@ -145,7 +145,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/assemble.c,v 1.33 2006/06/02 15:30:20 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/procs/assemble.h ug-patched/np/procs/assemble.h
--- ug-orig/np/procs/assemble.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/assemble.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/assemble.h,v 1.27 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/basics.c ug-patched/np/procs/basics.c
--- ug-orig/np/procs/basics.c	2006-04-18 10:51:34.000000000 +0200
+++ ug-patched/np/procs/basics.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 
 #include "ugdevices.h"
@@ -144,7 +145,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/basics.c,v 1.17 2006/04/18 08:51:34 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/procs/basics.h ug-patched/np/procs/basics.h
--- ug-orig/np/procs/basics.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/basics.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/basics.h,v 1.5 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/bdf.c ug-patched/np/procs/bdf.c
--- ug-orig/np/procs/bdf.c	2005-07-18 10:48:22.000000000 +0200
+++ ug-patched/np/procs/bdf.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -68,7 +69,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/bdf.c,v 1.74 2005/07/18 08:48:22 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
diff -ru ug-orig/np/procs/bdf.h ug-patched/np/procs/bdf.h
--- ug-orig/np/procs/bdf.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/bdf.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/bdf.h,v 1.10 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/blocking.c ug-patched/np/procs/blocking.c
--- ug-orig/np/procs/blocking.c	2006-06-02 17:30:20.000000000 +0200
+++ ug-patched/np/procs/blocking.c	2006-06-02 17:38:35.000000000 +0200
@@ -122,7 +122,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/blocking.c,v 1.6 2006/06/02 15:30:20 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/procs/blocking.h ug-patched/np/procs/blocking.h
--- ug-orig/np/procs/blocking.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/blocking.h	2006-05-08 14:31:31.000000000 +0200
@@ -18,7 +18,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/blocking.h,v 1.4 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
Nur in ug-orig/np/procs: CVS.
Nur in ug-orig/np/procs: .cvsignore.
diff -ru ug-orig/np/procs/db.c ug-patched/np/procs/db.c
--- ug-orig/np/procs/db.c	2005-07-18 10:48:22.000000000 +0200
+++ ug-patched/np/procs/db.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <math.h>
 
@@ -91,7 +92,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/db.c,v 1.19 2005/07/18 08:48:22 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/procs/db.h ug-patched/np/procs/db.h
--- ug-orig/np/procs/db.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/db.h	2006-05-08 14:31:31.000000000 +0200
@@ -18,7 +18,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/db.h,v 1.9 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/eiter.c ug-patched/np/procs/eiter.c
--- ug-orig/np/procs/eiter.c	2006-06-02 17:30:20.000000000 +0200
+++ ug-patched/np/procs/eiter.c	2006-06-02 17:38:35.000000000 +0200
@@ -146,7 +146,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/eiter.c,v 1.9 2006/06/02 15:30:20 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
diff -ru ug-orig/np/procs/eiter.h ug-patched/np/procs/eiter.h
--- ug-orig/np/procs/eiter.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/eiter.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/eiter.h,v 1.5 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/els.c ug-patched/np/procs/els.c
--- ug-orig/np/procs/els.c	2005-07-18 10:49:16.000000000 +0200
+++ ug-patched/np/procs/els.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -145,7 +146,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/els.c,v 1.6 2005/07/18 08:49:16 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/procs/els.h ug-patched/np/procs/els.h
--- ug-orig/np/procs/els.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/els.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/els.h,v 1.6 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/enewton.c ug-patched/np/procs/enewton.c
--- ug-orig/np/procs/enewton.c	2006-04-18 10:51:34.000000000 +0200
+++ ug-patched/np/procs/enewton.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -77,7 +78,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/enewton.c,v 1.10 2006/04/18 08:51:34 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/enewton.h ug-patched/np/procs/enewton.h
--- ug-orig/np/procs/enewton.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/enewton.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/enewton.h,v 1.3 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/error.c ug-patched/np/procs/error.c
--- ug-orig/np/procs/error.c	2006-06-02 17:30:21.000000000 +0200
+++ ug-patched/np/procs/error.c	2006-06-02 17:38:35.000000000 +0200
@@ -100,7 +100,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/error.c,v 1.37 2006/06/02 15:30:21 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*D
diff -ru ug-orig/np/procs/error.h ug-patched/np/procs/error.h
--- ug-orig/np/procs/error.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/error.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/error.h,v 1.11 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/ew.c ug-patched/np/procs/ew.c
--- ug-orig/np/procs/ew.c	2006-06-02 17:30:21.000000000 +0200
+++ ug-patched/np/procs/ew.c	2006-06-02 17:38:35.000000000 +0200
@@ -132,7 +132,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/ew.c,v 1.47 2006/06/02 15:30:21 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/procs/ew.h ug-patched/np/procs/ew.h
--- ug-orig/np/procs/ew.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/ew.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/ew.h,v 1.8 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/ewn.c ug-patched/np/procs/ewn.c
--- ug-orig/np/procs/ewn.c	2006-06-02 17:30:21.000000000 +0200
+++ ug-patched/np/procs/ewn.c	2006-06-02 17:38:35.000000000 +0200
@@ -144,7 +144,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/ewn.c,v 1.19 2006/06/02 15:30:21 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/procs/fas.c ug-patched/np/procs/fas.c
--- ug-orig/np/procs/fas.c	2006-04-18 10:51:34.000000000 +0200
+++ ug-patched/np/procs/fas.c	2008-12-19 11:17:43.000000000 +0100
@@ -27,6 +27,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -85,7 +86,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/fas.c,v 1.16 2006/04/18 08:51:34 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
diff -ru ug-orig/np/procs/fas.h ug-patched/np/procs/fas.h
--- ug-orig/np/procs/fas.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/fas.h	2006-05-08 14:31:31.000000000 +0200
@@ -42,7 +42,7 @@
 
 
 /* RCS string 
-$Header: /home/cvsroot/UG/ug/np/procs/fas.h,v 1.4 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/freebnd.c ug-patched/np/procs/freebnd.c
--- ug-orig/np/procs/freebnd.c	2004-08-30 16:50:07.000000000 +0200
+++ ug-patched/np/procs/freebnd.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include "general.h"
 #include "compiler.h"
 
@@ -82,7 +83,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/freebnd.c,v 1.10 2004/08/30 14:50:07 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/procs/freebnd.h ug-patched/np/procs/freebnd.h
--- ug-orig/np/procs/freebnd.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/freebnd.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/freebnd.h,v 1.8 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/iter_2.c ug-patched/np/procs/iter_2.c
--- ug-orig/np/procs/iter_2.c	2006-06-02 17:30:21.000000000 +0200
+++ ug-patched/np/procs/iter_2.c	2006-06-02 17:38:35.000000000 +0200
@@ -149,7 +149,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/iter_2.c,v 1.12 2006/06/02 15:30:21 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/procs/iter.c ug-patched/np/procs/iter.c
--- ug-orig/np/procs/iter.c	2006-06-02 17:30:21.000000000 +0200
+++ ug-patched/np/procs/iter.c	2006-06-02 17:38:35.000000000 +0200
@@ -580,7 +580,7 @@
 
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/iter.c,v 1.164 2006/06/02 15:30:21 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/procs/iter.h ug-patched/np/procs/iter.h
--- ug-orig/np/procs/iter.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/iter.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/iter.h,v 1.11 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/ls.c ug-patched/np/procs/ls.c
--- ug-orig/np/procs/ls.c	2005-12-07 10:19:24.000000000 +0100
+++ ug-patched/np/procs/ls.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -280,7 +281,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/ls.c,v 1.80 2005/12/07 09:19:24 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/procs/ls.h ug-patched/np/procs/ls.h
--- ug-orig/np/procs/ls.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/ls.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/ls.h,v 1.11 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/Makefile.am ug-patched/np/procs/Makefile.am
--- ug-orig/np/procs/Makefile.am	2004-10-06 11:12:55.000000000 +0200
+++ ug-patched/np/procs/Makefile.am	2004-10-06 11:12:55.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.2 2004/10/06 09:12:55 thimo Exp $
+# $Id: Makefile.am 7834 2004-10-06 09:12:55Z thimo $
 
 SOURCES = nls.c ls.c assemble.c basics.c blocking.c iter.c transfer.c error.c newton.c ts.c bdf.c ew.c ewn.c amgtransfer.c freebnd.c db.c fas.c nliter.c project.c order.c tstep.c enewton.c pstep.c reinit.c els.c eiter.c iter_2.c amgtransfer.h assemble.h basics.h bdf.h blocking.h db.h eiter.h els.h enewton.h error.h ew.h fas.h freebnd.h iter.h ls.h newton.h nliter.h nls.h order.h project.h pstep.h reinit.h transfer.h ts.h tstep.h
 
diff -ru ug-orig/np/procs/newton.c ug-patched/np/procs/newton.c
--- ug-orig/np/procs/newton.c	2005-07-18 10:47:20.000000000 +0200
+++ ug-patched/np/procs/newton.c	2008-12-19 11:17:43.000000000 +0100
@@ -26,6 +26,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -79,7 +80,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/newton.c,v 1.51 2005/07/18 08:47:20 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/newton.h ug-patched/np/procs/newton.h
--- ug-orig/np/procs/newton.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/newton.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/newton.h,v 1.5 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/nliter.c ug-patched/np/procs/nliter.c
--- ug-orig/np/procs/nliter.c	2005-07-18 10:47:20.000000000 +0200
+++ ug-patched/np/procs/nliter.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stddef.h>
 #include <stdio.h>
@@ -85,7 +86,7 @@
 #define SET_CMPS_22(y,v,m,M,rt,ct,cp)	SET_MCMP_22(m,M,rt,ct,cp); SET_YCMP_2(y,v,ct,cp);
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/nliter.c,v 1.14 2005/07/18 08:47:20 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
diff -ru ug-orig/np/procs/nliter.h ug-patched/np/procs/nliter.h
--- ug-orig/np/procs/nliter.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/nliter.h	2006-05-08 14:31:31.000000000 +0200
@@ -51,7 +51,7 @@
 #define NPINL_b(p)                      (((NP_NL_ITER*)(p))->b)
 
 /* RCS string 
-$Header: /home/cvsroot/UG/ug/np/procs/nliter.h,v 1.7 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/nls.c ug-patched/np/procs/nls.c
--- ug-orig/np/procs/nls.c	2004-07-21 11:18:59.000000000 +0200
+++ ug-patched/np/procs/nls.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -74,7 +75,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/nls.c,v 1.19 2004/07/21 09:18:59 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
diff -ru ug-orig/np/procs/nls.h ug-patched/np/procs/nls.h
--- ug-orig/np/procs/nls.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/nls.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/nls.h,v 1.13 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/order.c ug-patched/np/procs/order.c
--- ug-orig/np/procs/order.c	2005-08-08 09:50:57.000000000 +0200
+++ ug-patched/np/procs/order.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 
 #include "ugdevices.h"
@@ -114,7 +115,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/order.c,v 1.16 2005/08/08 07:50:57 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/procs/order.h ug-patched/np/procs/order.h
--- ug-orig/np/procs/order.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/order.h	2006-05-08 14:31:31.000000000 +0200
@@ -18,7 +18,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/order.h,v 1.5 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/project.c ug-patched/np/procs/project.c
--- ug-orig/np/procs/project.c	2005-07-18 10:47:20.000000000 +0200
+++ ug-patched/np/procs/project.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -95,7 +96,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/project.c,v 1.9 2005/07/18 08:47:20 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/procs/project.h ug-patched/np/procs/project.h
--- ug-orig/np/procs/project.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/project.h	2006-05-08 14:31:31.000000000 +0200
@@ -18,7 +18,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/project.h,v 1.6 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/pstep.c ug-patched/np/procs/pstep.c
--- ug-orig/np/procs/pstep.c	2005-07-18 10:47:20.000000000 +0200
+++ ug-patched/np/procs/pstep.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -67,7 +68,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/pstep.c,v 1.13 2005/07/18 08:47:20 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
diff -ru ug-orig/np/procs/pstep.h ug-patched/np/procs/pstep.h
--- ug-orig/np/procs/pstep.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/pstep.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/pstep.h,v 1.5 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/reinit.c ug-patched/np/procs/reinit.c
--- ug-orig/np/procs/reinit.c	2004-07-21 11:18:59.000000000 +0200
+++ ug-patched/np/procs/reinit.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -66,7 +67,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/reinit.c,v 1.5 2004/07/21 09:18:59 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
diff -ru ug-orig/np/procs/reinit.h ug-patched/np/procs/reinit.h
--- ug-orig/np/procs/reinit.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/reinit.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/reinit.h,v 1.6 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/transfer.c ug-patched/np/procs/transfer.c
--- ug-orig/np/procs/transfer.c	2006-06-02 17:30:21.000000000 +0200
+++ ug-patched/np/procs/transfer.c	2006-06-02 17:38:35.000000000 +0200
@@ -168,7 +168,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/transfer.c,v 1.50 2006/06/02 15:30:21 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/procs/transfer.h ug-patched/np/procs/transfer.h
--- ug-orig/np/procs/transfer.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/transfer.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/transfer.h,v 1.17 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/ts.c ug-patched/np/procs/ts.c
--- ug-orig/np/procs/ts.c	2004-07-21 11:18:59.000000000 +0200
+++ ug-patched/np/procs/ts.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -59,7 +60,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/ts.c,v 1.8 2004/07/21 09:18:59 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
diff -ru ug-orig/np/procs/ts.h ug-patched/np/procs/ts.h
--- ug-orig/np/procs/ts.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/ts.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/ts.h,v 1.8 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/procs/tstep.c ug-patched/np/procs/tstep.c
--- ug-orig/np/procs/tstep.c	2005-07-18 10:47:20.000000000 +0200
+++ ug-patched/np/procs/tstep.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -66,7 +67,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/procs/tstep.c,v 1.11 2005/07/18 08:47:20 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
diff -ru ug-orig/np/procs/tstep.h ug-patched/np/procs/tstep.h
--- ug-orig/np/procs/tstep.h	2006-05-08 14:25:48.000000000 +0200
+++ ug-patched/np/procs/tstep.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/procs/tstep.h,v 1.7 2006/05/08 12:25:48 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
Nur in ug-orig/np: slu.
Nur in ug-orig/np/udm: CVS.
Nur in ug-orig/np/udm: .cvsignore.
diff -ru ug-orig/np/udm/data_io.c ug-patched/np/udm/data_io.c
--- ug-orig/np/udm/data_io.c	2005-07-18 15:38:01.000000000 +0200
+++ ug-patched/np/udm/data_io.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 #include <math.h>
@@ -96,7 +97,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/udm/data_io.c,v 1.50 2005/07/18 13:38:01 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/udm/data_io.h ug-patched/np/udm/data_io.h
--- ug-orig/np/udm/data_io.h	2006-05-08 14:23:18.000000000 +0200
+++ ug-patched/np/udm/data_io.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/udm/data_io.h,v 1.15 2006/05/08 12:23:18 sander Exp $
+$Header$
 */
 
 /* switch */
diff -ru ug-orig/np/udm/dio.c ug-patched/np/udm/dio.c
--- ug-orig/np/udm/dio.c	2004-05-17 15:29:23.000000000 +0200
+++ ug-patched/np/udm/dio.c	2008-12-19 11:17:43.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 
@@ -88,7 +89,7 @@
 /* RCS string */
 #ifdef __MGIO_USE_IN_UG__
 	
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/udm/dio.c,v 1.25 2004/05/17 13:29:23 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 #endif
 
diff -ru ug-orig/np/udm/dio.h ug-patched/np/udm/dio.h
--- ug-orig/np/udm/dio.h	2002-10-15 14:22:47.000000000 +0200
+++ ug-patched/np/udm/dio.h	2002-10-15 14:22:47.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/udm/dio.h,v 1.17 2002/10/15 12:22:47 lampe Exp $
+$Header$
 */
 
 /* switch */
diff -ru ug-orig/np/udm/disctools.c ug-patched/np/udm/disctools.c
--- ug-orig/np/udm/disctools.c	2006-06-02 17:32:14.000000000 +0200
+++ ug-patched/np/udm/disctools.c	2006-06-02 17:38:35.000000000 +0200
@@ -78,7 +78,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/udm/disctools.c,v 1.57 2006/06/02 15:32:14 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /** \brief Get function pointer
diff -ru ug-orig/np/udm/disctools.h ug-patched/np/udm/disctools.h
--- ug-orig/np/udm/disctools.h	2006-05-08 14:23:19.000000000 +0200
+++ ug-patched/np/udm/disctools.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/udm/disctools.h,v 1.34 2006/05/08 12:23:19 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/udm/formats.c ug-patched/np/udm/formats.c
--- ug-orig/np/udm/formats.c	2005-07-08 11:15:31.000000000 +0200
+++ ug-patched/np/udm/formats.c	2009-04-29 15:11:55.000000000 +0200
@@ -26,6 +26,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
@@ -106,7 +107,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/udm/formats.c,v 1.51 2005/07/08 09:15:31 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 /****************************************************************************/
@@ -703,7 +704,7 @@
 static VEC_TEMPLATE *CreateVecTemplate (const char *name)
 {
 	VEC_TEMPLATE *vt;
-	char *token;
+	const char *token;
 	INT j;
 	
 	if (name == NULL) REP_ERR_RETURN_PTR (NULL);
diff -ru ug-orig/np/udm/formats.h ug-patched/np/udm/formats.h
--- ug-orig/np/udm/formats.h	2006-05-08 14:23:19.000000000 +0200
+++ ug-patched/np/udm/formats.h	2006-05-08 14:31:31.000000000 +0200
@@ -21,7 +21,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/udm/formats.h,v 1.21 2006/05/08 12:23:19 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/udm/Makefile.am ug-patched/np/udm/Makefile.am
--- ug-orig/np/udm/Makefile.am	2004-09-02 14:22:16.000000000 +0200
+++ ug-patched/np/udm/Makefile.am	2004-09-02 14:22:17.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.1 2004/09/02 12:22:16 thimo Exp $
+# $Id: Makefile.am 7772 2004-09-02 12:22:17Z thimo $
 
 SOURCES = pcr.c disctools.c npscan.c udm.c formats.c numproc.c dio.c data_io.c data_io.h dio.h disctools.h formats.h npscan.h numproc.h pcr.h udm.h
 
diff -ru ug-orig/np/udm/npscan.c ug-patched/np/udm/npscan.c
--- ug-orig/np/udm/npscan.c	2006-06-02 17:32:14.000000000 +0200
+++ ug-patched/np/udm/npscan.c	2008-03-31 10:57:46.000000000 +0200
@@ -91,7 +91,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/udm/npscan.c,v 1.28 2006/06/02 15:32:14 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -949,7 +949,7 @@
 */
 /****************************************************************************/
 
-INT  NS_DIM_PREFIX ReadVecTypeNUMPROCs (const MULTIGRID *theMG, char *str, char *class_name, INT n, INT nNUMPROC[MAXVECTORS], NP_BASE *theNUMPROCs[][MAXVECTORS])
+INT  NS_DIM_PREFIX ReadVecTypeNUMPROCs (const MULTIGRID *theMG, char *str, const char *class_name, INT n, INT nNUMPROC[MAXVECTORS], NP_BASE *theNUMPROCs[][MAXVECTORS])
 {
 	FORMAT *fmt;
 	char *s,*tok,*typetok[MAXVECTORS];
diff -ru ug-orig/np/udm/npscan.h ug-patched/np/udm/npscan.h
--- ug-orig/np/udm/npscan.h	2006-05-08 14:23:19.000000000 +0200
+++ ug-patched/np/udm/npscan.h	2008-03-31 10:57:46.000000000 +0200
@@ -20,7 +20,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/udm/npscan.h,v 1.14 2006/05/08 12:23:19 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -102,7 +102,7 @@
 INT ReadVecTypeINTs             (const FORMAT *fmt, char *str, INT n, INT nINT[MAXVECTORS], INT theINTs[][MAXVECTORS]);
 INT ReadVecTypeDOUBLEs  (const FORMAT *fmt, char *str, INT n, INT nDOUBLE[MAXVECTORS], DOUBLE theDOUBLEs[][MAXVECTORS]);
 INT ReadVecTypeOrder    (const FORMAT *fmt, char *str, INT n, INT MaxPerType, INT *nOrder, INT theOrder[]);
-INT ReadVecTypeNUMPROCs (const MULTIGRID *theMG, char *str, char *class_name, INT n, INT nNUMPROC[MAXVECTORS], NP_BASE *theNUMPROCs[][MAXVECTORS]);
+INT ReadVecTypeNUMPROCs (const MULTIGRID *theMG, char *str, const char *class_name, INT n, INT nNUMPROC[MAXVECTORS], NP_BASE *theNUMPROCs[][MAXVECTORS]);
 
 /* tools for VEC_SCALAR */
 INT sc_read          (VEC_SCALAR x, const FORMAT *fmt, const VECDATA_DESC *theVD, const char *name, INT argc, char **argv);     
diff -ru ug-orig/np/udm/numproc.c ug-patched/np/udm/numproc.c
--- ug-orig/np/udm/numproc.c	2006-06-02 17:32:14.000000000 +0200
+++ ug-patched/np/udm/numproc.c	2006-06-02 17:38:35.000000000 +0200
@@ -77,7 +77,7 @@
 static INT ObjectVarID;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/udm/numproc.c,v 1.15 2006/06/02 15:32:14 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/np/udm/numproc.h ug-patched/np/udm/numproc.h
--- ug-orig/np/udm/numproc.h	2006-05-08 14:23:19.000000000 +0200
+++ ug-patched/np/udm/numproc.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/udm/numproc.h,v 1.15 2006/05/08 12:23:19 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/np/udm/pcr.c ug-patched/np/udm/pcr.c
--- ug-orig/np/udm/pcr.c	2005-07-08 11:15:32.000000000 +0200
+++ ug-patched/np/udm/pcr.c	2008-12-19 11:17:43.000000000 +0100
@@ -27,6 +27,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -82,7 +83,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/udm/pcr.c,v 1.21 2005/07/08 09:15:32 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -407,7 +408,7 @@
 */
 /*************************************************************************/
 
-INT  NS_DIM_PREFIX PostPCR (INT ID, char *path)
+INT  NS_DIM_PREFIX PostPCR (INT ID, const char *path)
 {
 	INT i;
 	char name[10];
diff -ru ug-orig/np/udm/pcr.h ug-patched/np/udm/pcr.h
--- ug-orig/np/udm/pcr.h	2006-05-08 14:23:19.000000000 +0200
+++ ug-patched/np/udm/pcr.h	2008-03-31 10:57:46.000000000 +0200
@@ -21,7 +21,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/udm/pcr.h,v 1.11 2006/05/08 12:23:19 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -78,7 +78,7 @@
 INT                     GetStrDOUBLEinRange                     (const char *str, DOUBLE min, DOUBLE max, DOUBLE *value);
 INT             PreparePCR                                      (VECDATA_DESC *Vsym, INT DispMode, const char *text, INT *ID);
 INT         PrepareEPCR                 (EVECDATA_DESC *Vsym, INT DispMode, const char *text, INT *ID);
-INT             PostPCR                                         (INT ID, char *path);
+INT             PostPCR                                         (INT ID, const char *path);
 INT             DoPCR                                           (INT ID, VEC_SCALAR Defect, INT PrintMode);
 
 END_UGDIM_NAMESPACE
diff -ru ug-orig/np/udm/udm.c ug-patched/np/udm/udm.c
--- ug-orig/np/udm/udm.c	2006-06-02 17:32:14.000000000 +0200
+++ ug-patched/np/udm/udm.c	2009-04-29 15:11:55.000000000 +0200
@@ -106,7 +106,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/np/udm/udm.c,v 1.61 2006/06/02 15:32:14 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -4810,7 +4810,7 @@
 
 INT  NS_DIM_PREFIX InitUserDataManager ()
 {	
-	char *names;
+	const char *names;
 	INT i;
 
 	MatrixDirID = GetNewEnvDirID();
diff -ru ug-orig/np/udm/udm.h ug-patched/np/udm/udm.h
--- ug-orig/np/udm/udm.h	2006-06-02 18:15:11.000000000 +0200
+++ ug-patched/np/udm/udm.h	2009-04-29 14:30:36.000000000 +0200
@@ -21,7 +21,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/np/udm/udm.h,v 1.42 2006/06/02 16:15:11 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -300,7 +300,7 @@
     SHORT *CmpsInType[NMATTYPES];
 
     /** \brief Pointers to sm form, if not full */
-    NS_PREFIX SPARSE_MATRIX *sm[NMATTYPES];
+    NS_DIM_PREFIX SPARSE_MATRIX *sm[NMATTYPES];
 
     /* redundant (but frequently used) information                          */
     /** \brief TRUE if sparse form should be used   */
Nur in ug-patched/parallel: chaco.
Nur in ug-orig/parallel: CVS.
Nur in ug-orig/parallel: .cvsignore.
Nur in ug-orig/parallel/ddd/analyser: CVS.
diff -ru ug-orig/parallel/ddd/analyser/inv.c ug-patched/parallel/ddd/analyser/inv.c
--- ug-orig/parallel/ddd/analyser/inv.c	2005-07-18 15:19:42.000000000 +0200
+++ ug-patched/parallel/ddd/analyser/inv.c	2009-04-29 14:30:36.000000000 +0200
@@ -26,6 +26,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdio.h>
 #include <math.h>
 
@@ -36,6 +37,8 @@
 USING_UG_NAMESPACE
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
+
 /****************************************************************************/
 /*                                                                          */
 /* data structures                                                          */
@@ -70,7 +73,7 @@
 /****************************************************************************/
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/analyser/inv.c,v 1.3 2005/07/18 13:19:42 sander Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 /* this array corresponds to theTypeDefs */
@@ -172,5 +175,4 @@
 	fclose(fp);
 }
 
-
-
+END_UGDIM_NAMESPACE
Nur in ug-orig/parallel/ddd/basic: CVS.
diff -ru ug-orig/parallel/ddd/basic/io.c ug-patched/parallel/ddd/basic/io.c
--- ug-orig/parallel/ddd/basic/io.c	2005-07-18 15:19:42.000000000 +0200
+++ ug-patched/parallel/ddd/basic/io.c	2009-04-29 15:11:55.000000000 +0200
@@ -21,6 +21,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 #include <math.h>
@@ -33,9 +34,9 @@
 /* PPIF namespace: */
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
 
-
-void (*DDD_UserLineOutFunction)(char *s);
+void (*DDD_UserLineOutFunction)(const char *s);
 
 
 
@@ -46,7 +47,7 @@
 /****************************************************************************/
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/basic/io.c,v 1.2 2005/07/18 13:19:42 sander Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 
@@ -62,7 +63,7 @@
 /*                                                                          */
 /****************************************************************************/
 
-void DDD_PrintLine (char *s)
+void DDD_PrintLine (const char *s)
 {
 	/* newline character will be included in s */
 
@@ -128,7 +129,7 @@
 /*                                                                          */
 /****************************************************************************/
 
-void DDD_PrintDebug (char *s)
+void DDD_PrintDebug (const char *s)
 {
 	/* newline character will be included in s */
 
@@ -152,7 +153,7 @@
 /*                                                                          */
 /****************************************************************************/
 
-void DDD_PrintError (char error_class, int error_no, char *text)
+void DDD_PrintError (char error_class, int error_no, const char *text)
 {
 	char buffer[256];
 	char classText[32];
@@ -179,6 +180,4 @@
 	DDD_PrintLine(buffer);
 }
 
-
-
-
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/basic/lowcomm.c ug-patched/parallel/ddd/basic/lowcomm.c
--- ug-orig/parallel/ddd/basic/lowcomm.c	2007-10-16 15:28:26.000000000 +0200
+++ ug-patched/parallel/ddd/basic/lowcomm.c	2009-04-29 15:11:55.000000000 +0200
@@ -57,6 +57,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -71,6 +72,8 @@
 /* PPIF namespace: */
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
+
 #define DebugLowComm  10  /* 0 is all, 10 is off */
 
 
@@ -111,7 +114,7 @@
 
 typedef struct _COMP_DESC
 {
-	char     *name;        /* textual description of component */
+	const  char *name;        /* textual description of component */
 	int      type;         /* type of this component */
 	size_t   entry_size;   /* size per entry (for tables) */
 } COMP_DESC;
@@ -119,7 +122,7 @@
 
 typedef struct _MSG_TYPE
 {
-	char       *name;                /* textual description of msgtype */
+	const char *name;                /* textual description of msgtype */
 	int        nComps;               /* number of components */
 	COMP_DESC  comp[MAX_COMPONENTS]; /* component array */
 
@@ -181,7 +184,7 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/basic/lowcomm.c,v 1.7 2007/10/16 13:28:26 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 
@@ -729,7 +732,7 @@
 	if (theRecvBuffer==NULL)
 	{
 		DDD_PrintError('E', 6610, STR_NOMEM " in LC_PrepareRecv");
-		sprintf(cBuffer, "(size of message buffer: %ld)", (long)sumSize);
+		sprintf(cBuffer, "(size of message buffer: %d)", sumSize);
 		DDD_PrintError('E', 6610, cBuffer);
 		RET_ON_ERROR;
 	}
@@ -785,7 +788,7 @@
 	and logging output.
 */
 
-LC_MSGTYPE LC_NewMsgType (char *aName)
+LC_MSGTYPE LC_NewMsgType (const char *aName)
 {
 	MSG_TYPE *mt;
 
@@ -830,7 +833,7 @@
 @param  aMsgType  previously declared message-type
 */
 
-LC_MSGCOMP LC_NewMsgChunk (char *aName, LC_MSGTYPE aMsgType)
+LC_MSGCOMP LC_NewMsgChunk (const char *aName, LC_MSGTYPE aMsgType)
 {
 	MSG_TYPE  *mtyp = (MSG_TYPE *)aMsgType;
 	LC_MSGCOMP id = mtyp->nComps++;
@@ -879,7 +882,7 @@
 @param  aSize     size of each table entry (in byte)
 */
 
-LC_MSGCOMP LC_NewMsgTable (char *aName, LC_MSGTYPE aMsgType, size_t aSize)
+LC_MSGCOMP LC_NewMsgTable (const char *aName, LC_MSGTYPE aMsgType, size_t aSize)
 {
 	MSG_TYPE  *mtyp = (MSG_TYPE *)aMsgType;
 	LC_MSGCOMP id = mtyp->nComps++;
@@ -1370,12 +1373,12 @@
 				sum = 0;
 				for(i=0; i<last_mt->nComps; i++)
 				{
-					sprintf(buf, "%9ld", (long)comp_size[i]);
+					sprintf(buf, "%9ld", comp_size[i]);
 					strcat(cBuffer, buf);
 
 					sum += comp_size[i];   /* horizontal sum */
 				}
-				sprintf(buf, "%9ld\n", (long)sum); strcat(cBuffer, buf);
+				sprintf(buf, "%9ld\n", sum); strcat(cBuffer, buf);
 				DDD_PrintLine(cBuffer);
 			}
 
@@ -1402,13 +1405,13 @@
 		{
 			size_t s = md->chunks[i].size;
 
-			sprintf(buf, "%9ld", (long)s);
+			sprintf(buf, "%9ld", s);
 			strcat(cBuffer, buf);
 
 			sum          += s;   /* horizontal sum */
 			comp_size[i] += s;   /* vertical sum */
 		}
-		sprintf(buf, "%9ld\n", (long)sum); strcat(cBuffer, buf);
+		sprintf(buf, "%9ld\n", sum); strcat(cBuffer, buf);
 		DDD_PrintLine(cBuffer);
 	}
 
@@ -1419,12 +1422,12 @@
 		sum = 0;
 		for(i=0; i<last_mt->nComps; i++)
 		{
-			sprintf(buf, "%9ld", (long)comp_size[i]);
+			sprintf(buf, "%9ld", comp_size[i]);
 			strcat(cBuffer, buf);
 
 			sum += comp_size[i];   /* horizontal sum */
 		}
-		sprintf(buf, "%9ld\n", (long)sum); strcat(cBuffer, buf);
+		sprintf(buf, "%9ld\n", sum); strcat(cBuffer, buf);
 		DDD_PrintLine(cBuffer);
 	}
 
@@ -1460,3 +1463,4 @@
 
 /****************************************************************************/
 
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/basic/lowcomm.h ug-patched/parallel/ddd/basic/lowcomm.h
--- ug-orig/parallel/ddd/basic/lowcomm.h	1998-09-22 15:27:05.000000000 +0200
+++ ug-patched/parallel/ddd/basic/lowcomm.h	2009-04-29 15:11:55.000000000 +0200
@@ -32,7 +32,7 @@
 #ifndef __DDD_LOWCOMM_H__
 #define __DDD_LOWCOMM_H__
 
-
+START_UGDIM_NAMESPACE
 
 /****************************************************************************/
 /*                                                                          */
@@ -86,9 +86,9 @@
 void  LC_SetMemMgrDefault (void);
 
 
-LC_MSGTYPE LC_NewMsgType (char *);
-LC_MSGCOMP LC_NewMsgTable (char *, LC_MSGTYPE, size_t);
-LC_MSGCOMP LC_NewMsgChunk (char *, LC_MSGTYPE);
+LC_MSGTYPE LC_NewMsgType (const char *);
+LC_MSGCOMP LC_NewMsgTable (const char *, LC_MSGTYPE, size_t);
+LC_MSGCOMP LC_NewMsgChunk (const char *, LC_MSGTYPE);
 
 void       LC_MsgSend (LC_MSGHANDLE);
 
@@ -118,5 +118,6 @@
 void LC_PrintSendMsgs (void);
 void LC_PrintRecvMsgs (void);
 
+END_UGDIM_NAMESPACE
 
 #endif
diff -ru ug-orig/parallel/ddd/basic/memutil.h ug-patched/parallel/ddd/basic/memutil.h
--- ug-orig/parallel/ddd/basic/memutil.h	1998-05-18 07:36:30.000000000 +0200
+++ ug-patched/parallel/ddd/basic/memutil.h	2009-04-29 14:30:36.000000000 +0200
@@ -21,7 +21,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/parallel/ddd/basic/memutil.h,v 1.1.1.2 1998/05/18 05:36:30 birken Exp $
+$Header$
 */
 
 
@@ -34,7 +34,9 @@
 #ifndef __DDD_MEMUTIL_H__
 #define __DDD_MEMUTIL_H__
 
+#include "namespace.h"
 
+START_UGDIM_NAMESPACE
 
 /****************************************************************************/
 /*                                                                          */
@@ -119,5 +121,6 @@
 
 /* memutil.c */
 
+END_UGDIM_NAMESPACE
 
 #endif
diff -ru ug-orig/parallel/ddd/basic/notify.c ug-patched/parallel/ddd/basic/notify.c
--- ug-orig/parallel/ddd/basic/notify.c	2005-07-18 15:19:42.000000000 +0200
+++ ug-patched/parallel/ddd/basic/notify.c	2009-04-29 14:30:36.000000000 +0200
@@ -29,6 +29,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 
@@ -40,6 +41,7 @@
 /* PPIF namespace: */
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
 
 #define DebugNotify   10  /* 0 is all, 10 is off */
 
@@ -94,7 +96,7 @@
 /****************************************************************************/
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/basic/notify.c,v 1.3 2005/07/18 13:19:42 sander Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 
@@ -535,5 +537,6 @@
 	return(nRecvMsgs);
 }
 
-
 /****************************************************************************/
+
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/basic/notify.h ug-patched/parallel/ddd/basic/notify.h
--- ug-orig/parallel/ddd/basic/notify.h	1998-09-22 15:27:09.000000000 +0200
+++ ug-patched/parallel/ddd/basic/notify.h	2009-04-29 14:30:36.000000000 +0200
@@ -35,6 +35,7 @@
 
 #include "include/ddd.h"
 
+START_UGDIM_NAMESPACE
 
 /****************************************************************************/
 /*                                                                          */
@@ -73,6 +74,7 @@
 void         DDD_NotifyEnd (void);
 int          DDD_Notify (void);
 
+END_UGDIM_NAMESPACE
 
 #endif
 
diff -ru ug-orig/parallel/ddd/basic/ooppcc.h ug-patched/parallel/ddd/basic/ooppcc.h
--- ug-orig/parallel/ddd/basic/ooppcc.h	2004-10-21 17:05:50.000000000 +0200
+++ ug-patched/parallel/ddd/basic/ooppcc.h	2004-10-21 17:05:50.000000000 +0200
@@ -23,7 +23,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/parallel/ddd/basic/ooppcc.h,v 1.2 2004/10/21 15:05:50 sander Exp $
+$Header$
 */
 
 
diff -ru ug-orig/parallel/ddd/basic/oopp.h ug-patched/parallel/ddd/basic/oopp.h
--- ug-orig/parallel/ddd/basic/oopp.h	1997-10-24 15:51:26.000000000 +0200
+++ ug-patched/parallel/ddd/basic/oopp.h	2009-04-29 14:30:36.000000000 +0200
@@ -21,13 +21,14 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/parallel/ddd/basic/oopp.h,v 1.1.1.2 1997/10/24 13:51:26 birken Exp $
+$Header$
 */
 
 
 #ifndef __OOPP_H__
 #define __OOPP_H__
 
+
 /****************************************************************************/
 /*                                                                          */
 /* very basic macros and constants                                          */
diff -ru ug-orig/parallel/ddd/basic/reduct.c ug-patched/parallel/ddd/basic/reduct.c
--- ug-orig/parallel/ddd/basic/reduct.c	2005-07-18 15:19:42.000000000 +0200
+++ ug-patched/parallel/ddd/basic/reduct.c	2009-04-29 14:30:36.000000000 +0200
@@ -29,15 +29,19 @@
 
 /* standard C library */
 /*
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 */
 
 #include "ppif.h"
 
+#include "namespace.h"
+
 /* PPIF namespace: */
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
 
 /****************************************************************************/
 /*                                                                          */
@@ -159,3 +163,4 @@
 }
 */
 
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/basic/topo.c ug-patched/parallel/ddd/basic/topo.c
--- ug-orig/parallel/ddd/basic/topo.c	2005-07-18 15:19:42.000000000 +0200
+++ ug-patched/parallel/ddd/basic/topo.c	2009-04-29 14:30:36.000000000 +0200
@@ -28,6 +28,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -43,7 +44,7 @@
 /* PPIF namespace: */
 USING_PPIF_NAMESPACE
 
-
+START_UGDIM_NAMESPACE
 
 /****************************************************************************/
 /*                                                                          */
@@ -81,7 +82,7 @@
 /****************************************************************************/
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/basic/topo.c,v 1.3 2005/07/18 13:19:42 sander Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 static DDD_PROC    *theProcArray;
@@ -282,6 +283,6 @@
 }
 
 
-
 /****************************************************************************/
 
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/ctrl/cons.c ug-patched/parallel/ddd/ctrl/cons.c
--- ug-orig/parallel/ddd/ctrl/cons.c	2007-10-16 14:46:55.000000000 +0200
+++ ug-patched/parallel/ddd/ctrl/cons.c	2009-04-29 14:30:36.000000000 +0200
@@ -27,6 +27,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -41,6 +42,7 @@
 /* PPIF namespace: */
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
 
 /****************************************************************************/
 /*                                                                          */
@@ -112,7 +114,7 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/ctrl/cons.c,v 1.6 2007/10/16 12:46:55 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 static LC_MSGTYPE consmsg_t;
@@ -262,7 +264,7 @@
 		{
 			if (OBJ_PRIO(locObjs[j])!=theCplBuf[i].prio)
 			{
-				sprintf(cBuffer, "    DDD-GCC Warning: obj %016llx type %d on %d"
+				sprintf(cBuffer, "    DDD-GCC Warning: obj %08x type %d on %d"
 					" has prio %d, cpl from %d has prio %d!\n",
 					OBJ_GID(locObjs[j]), OBJ_TYPE(locObjs[j]), me, OBJ_PRIO(locObjs[j]),
 					LC_MsgGetProc(xm), theCplBuf[i].prio);
@@ -273,7 +275,7 @@
 		}
 		else
 		{
-			sprintf(cBuffer, "    DDD-GCC Warning: obj %016llx type %d on %d for cpl"
+			sprintf(cBuffer, "    DDD-GCC Warning: obj %08x type %d on %d for cpl"
 				" from %3d missing!\n",
 				theCplBuf[i].gid, theCplBuf[i].typ, me, LC_MsgGetProc(xm));
 			DDD_PrintLine(cBuffer);
@@ -341,7 +343,7 @@
 			if ((DDD_PROC)CPL_PROC(cpl) >= procs)
 			{
 				error_cnt++;
-				sprintf(cBuffer, "%4d: DDD-GCC Warning: invalid proc=%d (%016llx/%016llx)\n",
+				sprintf(cBuffer, "%4d: DDD-GCC Warning: invalid proc=%d (%08x/%08x)\n",
 						me, CPL_PROC(cpl), OBJ_GID(cpl->obj),
 						OBJ_GID(ddd_ObjTable[i])
 				);
@@ -460,7 +462,7 @@
 			{
 				if (OBJ_PRIO(locObjs[j])!=theCplBuf[i].prio)
 				{
-					sprintf(cBuffer, "    DDD-GCC Warning: obj %016llx type %d on %d"
+					sprintf(cBuffer, "    DDD-GCC Warning: obj %08x type %d on %d"
 						" has prio %d, cpl from %d has prio %d!\n",
 						OBJ_GID(locObjs[j]), OBJ_TYPE(locObjs[j]), me, OBJ_PRIO(locObjs[j]),
 						LC_MsgGetProc(xm), theCplBuf[i].prio);
@@ -490,7 +492,7 @@
 
 					if (ifound==-1)
 					{
-						sprintf(cBuffer, "    DDD-GCC Warning: obj %016llx type %d on %d has cpl"
+						sprintf(cBuffer, "    DDD-GCC Warning: obj %08x type %d on %d has cpl"
 							" from%4d, but %d hasn't!\n",
 							theCplBuf[i].gid, theCplBuf[i].typ, me,
 							CPL_PROC(j2), LC_MsgGetProc(xm));
@@ -528,7 +530,7 @@
 
 						if (ifound==-1)
 						{
-							sprintf(cBuffer, "%4d: healing with AddCpl(%016llx, %4d, %d)\n",
+							sprintf(cBuffer, "%4d: healing with AddCpl(%08x, %4d, %d)\n",
 							me, theCplBuf[i].gid, theCplBuf[i2].proc, theCplBuf[i2].prio);
 							DDD_PrintLine(cBuffer);
 
@@ -699,7 +701,7 @@
 		if (OBJ_GID(locObjs[i-1])==OBJ_GID(locObjs[i]))
 		{
 			error_cnt++;
-			sprintf(cBuffer, "    DDD-GCC Warning: obj %016llx on %d doubled\n",
+			sprintf(cBuffer, "    DDD-GCC Warning: obj %08x on %d doubled\n",
 				OBJ_GID(locObjs[i]), me);
 			DDD_PrintLine(cBuffer);
 		}
@@ -805,3 +807,4 @@
 }
 
 
+END_UGDIM_NAMESPACE
Nur in ug-orig/parallel/ddd/ctrl: CVS.
diff -ru ug-orig/parallel/ddd/ctrl/debug.c ug-patched/parallel/ddd/ctrl/debug.c
--- ug-orig/parallel/ddd/ctrl/debug.c	2007-10-16 14:46:55.000000000 +0200
+++ ug-patched/parallel/ddd/ctrl/debug.c	2009-04-29 14:30:36.000000000 +0200
@@ -26,6 +26,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 
@@ -34,6 +35,7 @@
 /* PPIF namespace: */
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
 
 /****************************************************************************/
 /*                                                                          */
@@ -71,7 +73,7 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/ctrl/debug.c,v 1.3 2007/10/16 12:46:55 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 /****************************************************************************/
@@ -128,13 +130,13 @@
 	for(i=0; i<ddd_nObjs; i++)
 	{
 		o = locObjs[i];
-		sprintf(cBuffer, "%4d: #%04d gid=0x%016llx type=0x%02x"
+		sprintf(cBuffer, "%4d: #%04d  adr=0x%08x gid=0x%07x type=0x%02x"
 			" prio=%04d attr=%04d\n",
-			me, i, OBJ_GID(o), OBJ_TYPE(o), OBJ_PRIO(o), OBJ_ATTR(o));
+			me, i, o, OBJ_GID(o), OBJ_TYPE(o), OBJ_PRIO(o), OBJ_ATTR(o));
 		DDD_PrintLine(cBuffer);
 	}
 
 	FreeLocalObjectsList(locObjs);
 }
 
-
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/ctrl/stat.c ug-patched/parallel/ddd/ctrl/stat.c
--- ug-orig/parallel/ddd/ctrl/stat.c	1997-07-01 16:16:29.000000000 +0200
+++ ug-patched/parallel/ddd/ctrl/stat.c	2009-04-29 15:11:55.000000000 +0200
@@ -26,6 +26,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdarg.h>
@@ -68,7 +69,7 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/ctrl/stat.c,v 1.1.1.2 1997/07/01 14:16:29 birken Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 /****************************************************************************/
@@ -76,6 +77,7 @@
 /* routines                                                                 */
 /*                                                                          */
 /****************************************************************************/
+START_UGDIM_NAMESPACE
 
 void ddd_StatInit (void)
 {
@@ -107,13 +109,13 @@
 
 
 
-char *DDD_StatClockDesc (int module, int index)
+const char *DDD_StatClockDesc (int module, int index)
 {
 	STAT_SET_MODULE(module);
 	return("<NIY>");
 }
 
-char *DDD_StatCountDesc (int module, int index)
+const char *DDD_StatCountDesc (int module, int index)
 {
 	STAT_SET_MODULE(module);
 	return("<NIY>");
@@ -122,3 +124,4 @@
 
 /****************************************************************************/
 
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/ctrl/stat.h ug-patched/parallel/ddd/ctrl/stat.h
--- ug-orig/parallel/ddd/ctrl/stat.h	1997-07-01 16:16:27.000000000 +0200
+++ ug-patched/parallel/ddd/ctrl/stat.h	2009-04-29 14:30:36.000000000 +0200
@@ -30,6 +30,7 @@
 
 #include "dddaddon.h"
 
+START_UGDIM_NAMESPACE
 
 /****************************************************************************/
 /*                                                                          */
@@ -183,6 +184,7 @@
 
 #endif
 
+END_UGDIM_NAMESPACE
 
 #endif
 
Nur in ug-orig/parallel/ddd: CVS.
Nur in ug-orig/parallel/ddd: .cvsignore.
diff -ru ug-orig/parallel/ddd/ddd.c ug-patched/parallel/ddd/ddd.c
--- ug-orig/parallel/ddd/ddd.c	2005-07-18 15:19:41.000000000 +0200
+++ ug-patched/parallel/ddd/ddd.c	2009-04-29 15:11:55.000000000 +0200
@@ -29,6 +29,7 @@
 /****************************************************************************/
 
 /* standard C library  */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdarg.h>
@@ -42,6 +43,8 @@
 USING_UG_NAMESPACE
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE 
+
 /****************************************************************************/
 /*                                                                          */
 /* defines in the following order                                           */
@@ -63,7 +66,7 @@
 /****************************************************************************/
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/ddd.c,v 1.3 2005/07/18 13:19:41 sander Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 /****************************************************************************/
@@ -394,10 +397,10 @@
 #endif
 
 #ifdef C_FRONTEND
-void DDD_LineOutRegister (void (*func)(char *s))
+void DDD_LineOutRegister (void (*func)(const char *s))
 #endif
 #ifdef CPP_FRONTEND
-void DDD_Library::LineOutRegister (void (*func)(char *))
+void DDD_Library::LineOutRegister (void (*func)(const char *))
 #endif
 #if defined(C_FRONTEND) || defined(CPP_FRONTEND)
 {
@@ -581,3 +584,4 @@
 
 /****************************************************************************/
 
+END_UGDIM_NAMESPACE 
diff -ru ug-orig/parallel/ddd/dddi.h ug-patched/parallel/ddd/dddi.h
--- ug-orig/parallel/ddd/dddi.h	2008-07-02 19:05:48.000000000 +0200
+++ ug-patched/parallel/ddd/dddi.h	2009-04-29 15:11:55.000000000 +0200
@@ -20,7 +20,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/parallel/ddd/dddi.h,v 1.4 2008/07/02 17:05:48 lampe Exp $
+$Header$
 */
 
 
@@ -60,6 +60,7 @@
 #include "include/ddd.h"
 #include "include/dddio.h"
 
+START_UGDIM_NAMESPACE
 
 /****************************************************************************/
 
@@ -118,9 +119,9 @@
 
 
 
-#define MAX_TRIES 2000000000 /* max. number of tries til timeout in IF-comm */
+#define MAX_TRIES  50000000  /* max. number of tries til timeout in IF-comm */
 
-#define MAX_PROCBITS_IN_GID 13  /* this allows 2^13 procs and 2^51 objects  */
+#define MAX_PROCBITS_IN_GID 10  /* this allows 2^10 procs and 2^22 objects  */
 
 /* use maximum as default, if no Priomerge-matrix is available */
 #define PRIOMERGE_DEFAULT PRIOMERGE_MAXIMUM
@@ -270,7 +271,7 @@
 typedef struct _TYPE_DESC
 {
 	int      mode;                  /* current TypeMode (DECLARE/DEFINE)    */
-	char     *name;                 /* textual object description           */
+	const char  *name;                 /* textual object description           */
 	int      currTypeDefCall;       /* number of current call to TypeDefine */
 
 #ifdef CPP_FRONTEND
@@ -386,6 +387,11 @@
 #define CEIL(n) ((n)+((ALIGNMENT-((n)&(ALIGNMENT-1)))&(ALIGNMENT-1)))
 #endif
 
+/* round down to next alignment border */
+#ifndef FLOOR
+#define FLOOR(n) ((n)&ALIGNMASK)
+#endif
+
 #define YES     1
 #define ON      1
 #ifndef TRUE
@@ -609,7 +615,7 @@
 	(dummy_ptr = (mem_ptr=(char *)memmgr_AllocHMEM(SST+(size_t)(s), key)) != NULL ? \
 					mem_ptr+SST : NULL);                                     \
 	if (mem_ptr!=NULL) GET_SSTVAL(dummy_ptr) = s;                            \
-	printf("%4d: MALL Heap adr=%p size=%ld file=%s line=%d\n",               \
+	printf("%4d: MALL Heap adr=%08x size=%ld file=%s line=%d\n",             \
 		me,dummy_ptr,s,__FILE__,__LINE__)
 #else
 #define AllocHeap(s,key)    memmgr_AllocHMEM((size_t)(s), key)
@@ -621,7 +627,7 @@
 	(dummy_ptr = (mem_ptr=(char *)memmgr_AllocPMEM(SST+(size_t)s)) != NULL ? \
 					mem_ptr+SST : NULL);                                     \
 	if (mem_ptr!=NULL) GET_SSTVAL(dummy_ptr) = s;                            \
-	printf("%4d: MALL PFix adr=%p size=%ld file=%s line=%d\n",               \
+	printf("%4d: MALL PFix adr=%08x size=%ld file=%s line=%d\n",             \
 		me,dummy_ptr,s,__FILE__,__LINE__)
 #else
 #define AllocFix(s)       memmgr_AllocPMEM((size_t)s)
@@ -634,7 +640,7 @@
 		!= NULL ?                                                            \
 					mem_ptr+SST : NULL);                                     \
 	if (mem_ptr!=NULL) GET_SSTVAL(dummy_ptr) = s;                            \
-	printf("%4d: MALL TMsg adr=%p size=%ld file=%s line=%d\n",               \
+	printf("%4d: MALL TMsg adr=%08x size=%ld file=%s line=%d\n",             \
 		me,dummy_ptr,s,__FILE__,__LINE__)
 #else
 #define AllocMsg(s)       memmgr_AllocTMEM((size_t)s, TMEM_MSG)
@@ -647,7 +653,7 @@
 		!= NULL ?                                                            \
 					mem_ptr+SST : NULL);                                     \
 	if (mem_ptr!=NULL) GET_SSTVAL(dummy_ptr) = s;                            \
-	printf("%4d: MALL TTmp adr=%p size=%ld file=%s line=%d\n",               \
+	printf("%4d: MALL TTmp adr=%08x size=%ld file=%s line=%d\n",             \
 		me,dummy_ptr,s,__FILE__,__LINE__)
 
 #define AllocTmpReq(s,r)  \
@@ -655,7 +661,7 @@
 		!= NULL ?                                                            \
 					mem_ptr+SST : NULL);                                     \
 	if (mem_ptr!=NULL) GET_SSTVAL(dummy_ptr) = s;                            \
-	printf("%4d: MALL TTmp adr=%p size=%ld kind=%d file=%s line=%d\n",       \
+	printf("%4d: MALL TTmp adr=%08x size=%ld kind=%d file=%s line=%d\n",     \
 		me,dummy_ptr,s,r,__FILE__,__LINE__)
 #else
 #define AllocTmp(s)       memmgr_AllocTMEM((size_t)s, TMEM_ANY)
@@ -668,7 +674,7 @@
 	(dummy_ptr = (mem_ptr=(char *)memmgr_AllocAMEM(SST+(size_t)s)) != NULL ? \
 					mem_ptr+SST : NULL);                                     \
 	if (mem_ptr!=NULL) GET_SSTVAL(dummy_ptr) = s;                            \
-	printf("%4d: MALL ACpl adr=%p size=%ld file=%s line=%d\n",               \
+	printf("%4d: MALL ACpl adr=%08x size=%ld file=%s line=%d\n",             \
 		me,dummy_ptr,s,__FILE__,__LINE__)
 #else
 #define AllocCpl(s)       memmgr_AllocAMEM((size_t)s)
@@ -679,7 +685,7 @@
 	(dummy_ptr = (mem_ptr=(char *)memmgr_AllocAMEM(SST+(size_t)s)) != NULL ? \
 					mem_ptr+SST : NULL);                                     \
 	if (mem_ptr!=NULL) GET_SSTVAL(dummy_ptr) = s;                            \
-	printf("%4d: MALL AIF  adr=%p size=%ld file=%s line=%d\n",               \
+	printf("%4d: MALL AIF  adr=%08x size=%ld file=%s line=%d\n",             \
 		me,dummy_ptr,s,__FILE__,__LINE__)
 #else
 #define AllocIF(s)        memmgr_AllocAMEM((size_t)s)
@@ -701,7 +707,7 @@
 #define FreeFix(mem)      {               \
 					size_t s=GET_SSTVAL(mem); \
 					memmgr_FreePMEM(((char *)mem)-SST);  \
-					printf("%4d: FREE PFix adr=%p size=%ld file=%s line=%d\n",\
+					printf("%4d: FREE PFix adr=%08x size=%ld file=%s line=%d\n",\
 						me,mem,s,__FILE__,__LINE__); }
 #else
 #define FreeFix(mem)      memmgr_FreePMEM(mem)
@@ -711,7 +717,7 @@
 #define FreeMsg(mem,size)      {   \
 					size_t s=GET_SSTVAL(mem); \
 					memmgr_FreeTMEM(((char *)mem)-SST, TMEM_MSG);    \
-					printf("%4d: FREE TMsg adr=%p size=%ld file=%s line=%d\n",\
+					printf("%4d: FREE TMsg adr=%08x size=%ld file=%s line=%d\n",\
 						me,mem,s,__FILE__,__LINE__); }
 #else
 #define FreeMsg(mem,size)      memmgr_FreeTMEM(mem, TMEM_MSG)
@@ -722,12 +728,12 @@
 #define FreeTmp(mem,size)      {                  \
 					size_t s=GET_SSTVAL(mem); \
 					memmgr_FreeTMEM(((char *)mem)-SST,TMEM_ANY);       \
-					printf("%4d: FREE TTmp adr=%p size=%ld file=%s line=%d\n",\
+					printf("%4d: FREE TTmp adr=%08x size=%ld file=%s line=%d\n",\
 						me,mem,s,__FILE__,__LINE__); }
 #define FreeTmpReq(mem,size,r)      {                  \
 					size_t s=GET_SSTVAL(mem); \
 					memmgr_FreeTMEM(((char *)mem)-SST,r);       \
-					printf("%4d: FREE TTmp adr=%p size=%ld kind=%d file=%s line=%d\n",\
+					printf("%4d: FREE TTmp adr=%08x size=%ld kind=%d file=%s line=%d\n",\
 						me,mem,s,r,__FILE__,__LINE__); }
 #else
 #define FreeTmp(mem,size)      memmgr_FreeTMEM(mem,TMEM_ANY)
@@ -739,7 +745,7 @@
 #define FreeCpl(mem)      {                   \
 					size_t s=GET_SSTVAL(mem); \
 					memmgr_FreeAMEM(((char *)mem)-SST);     \
-					printf("%4d: FREE ACpl adr=%p size=%ld file=%s line=%d\n",\
+					printf("%4d: FREE ACpl adr=%08x size=%ld file=%s line=%d\n",\
 						me,mem,s,__FILE__,__LINE__); }
 #else
 #define FreeCpl(mem)      memmgr_FreeAMEM(mem)
@@ -749,7 +755,7 @@
 #define FreeIF(mem)       { \
 					size_t s=GET_SSTVAL(mem); \
 					memmgr_FreeAMEM(((char *)mem)-SST);    \
-					printf("%4d: FREE AIF  adr=%p size=%ld file=%s line=%d\n",\
+					printf("%4d: FREE AIF  adr=%08x size=%ld file=%s line=%d\n",\
 						me,mem,s,__FILE__,__LINE__); }
 #else
 #define FreeIF(mem)       memmgr_FreeAMEM(mem)
@@ -895,5 +901,7 @@
 void      ddd_StatExit (void);
 
 
+END_UGDIM_NAMESPACE
+
 #endif
 
diff -ru ug-orig/parallel/ddd/dddstr.h ug-patched/parallel/ddd/dddstr.h
--- ug-orig/parallel/ddd/dddstr.h	2007-10-16 14:46:54.000000000 +0200
+++ ug-patched/parallel/ddd/dddstr.h	1998-05-09 09:22:23.000000000 +0200
@@ -19,7 +19,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/parallel/ddd/dddstr.h,v 1.2 2007/10/16 12:46:54 lampe Exp $
+$Header$
 */
 
 
@@ -41,9 +41,9 @@
 #define ERR_ID_WRONG_MODE \
 	"wrong Ident-mode (currently in %s, expected %s)"
 #define ERR_ID_SAME_TUPEL \
-	"same identification tupel for objects %016llx and %016llx"
+	"same identification tupel for objects %08x and %08x"
 #define ERR_ID_OBJ_CYCLE \
-	"IdentifyObject-cycle, objects %016llx and %016llx"
+	"IdentifyObject-cycle, objects %08x and %08x"
 #define ERR_ID_NOMEM_RESOLV \
 	STR_NOMEM " in ResolveDependencies"
 #define ERR_ID_UNKNOWN_OPT \
@@ -53,7 +53,7 @@
 #define ERR_ID_DIFF_IDENT \
 	"Identify: no Ident-calls from proc %d, expected %d"
 #define ERR_ID_DIFF_N_IDENT \
-	"Identify: %ld Ident-calls from proc %d, expected %d"
+	"Identify: %d Ident-calls from proc %d, expected %d"
 #define ERR_ID_DIFF_N_OBJECTS \
 	"Identify: %d identified objects from proc %d, expected %d"
 #define ERR_ID_ERRORS \
@@ -65,15 +65,15 @@
 #define ERR_ID_NOMEM_IDENT_END \
 	STR_NOMEM " in DDD_IdentifyEnd"
 #define ERR_ID_INCONS_TUPELS \
-	"inconsistent tupels, gid %016llx on %d, gid %016llx on %d, in IdentifyEnd()"
+	"inconsistent tupels, gid %08x on %d, gid %08x on %d, in IdentifyEnd()"
 #define ERR_ID_CANT_RECV \
 	"couldn't receive message from %d in IdentifyEnd()"
 #define ERR_ID_NO_BEGIN \
 	"Missing DDD_IdentifyBegin(), aborted"
 #define ERR_ID_NOT_WITH_ME \
-	"cannot identify %016llx with myself"
+	"cannot identify %08x with myself"
 #define ERR_ID_NOT_WITH_PROC \
-	"cannot identify %016llx with processor %d"
+	"cannot identify %08x with processor %d"
 #define ERR_ID_NOMEM_IDENTRY \
 	STR_NOMEM "in IdentifyIdEntry"
 #define ERR_ID_NOMEM_IDNUMBER \
Nur in ug-orig/parallel/ddd/f77: CVS.
diff -ru ug-orig/parallel/ddd/f77/f2c.c ug-patched/parallel/ddd/f77/f2c.c
--- ug-orig/parallel/ddd/f77/f2c.c	1996-12-02 13:49:54.000000000 +0100
+++ ug-patched/parallel/ddd/f77/f2c.c	2008-12-19 11:12:24.000000000 +0100
@@ -27,6 +27,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <strings.h>
 #include <sys/types.h>
 #include <stdio.h>
@@ -45,7 +46,7 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/f77/f2c.c,v 1.1.1.1 1996/12/02 12:49:54 stefan Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 /****************************************************************************/
Nur in ug-orig/parallel/ddd/ident: CVS.
diff -ru ug-orig/parallel/ddd/ident/ident.c ug-patched/parallel/ddd/ident/ident.c
--- ug-orig/parallel/ddd/ident/ident.c	2007-10-16 14:46:55.000000000 +0200
+++ ug-patched/parallel/ddd/ident/ident.c	2009-04-29 15:11:55.000000000 +0200
@@ -46,6 +46,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -62,6 +63,8 @@
 /* PPIF namespace: */
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
+
 /****************************************************************************/
 /*                                                                          */
 /* defines in the following order                                           */
@@ -274,7 +277,7 @@
 /****************************************************************************/
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/ident/ident.c,v 1.10 2007/10/16 12:46:55 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 static ID_PLIST   *thePLists;
@@ -300,7 +303,7 @@
 	and recovery.
 */
 
-static char *IdentModeName (int mode)
+static const char *IdentModeName (int mode)
 {
 	switch(mode)
 	{
@@ -680,12 +683,12 @@
 	{
 		ID_REFDBY *rby;
 
-		printf("%4d: %016llx has loi %d\n",
+		printf("%4d: %08x has loi %d\n",
 			me, tupels[i].infos[0]->msg.gid, tupels[i].loi);
 
 		for(rby=tupels[i].refd; rby!=NULL; rby=rby->next)
 		{
-			printf("%4d: %016llx referenced by %016llx\n",
+			printf("%4d: %08x referenced by %08x\n",
 				me, tupels[i].infos[0]->msg.gid, rby->by->msg.gid);
 		}
 	}
@@ -1040,7 +1043,7 @@
 			if (msgs[j].size!=plist->nEntries)
 			{
 				sprintf(cBuffer, ERR_ID_DIFF_N_IDENT,
-						(long)msgs[j].size, plist->proc, plist->nEntries);
+					msgs[j].size, plist->proc, plist->nEntries);
 				DDD_PrintError('E', 3901, cBuffer);
 				err=TRUE;
 			}
@@ -1223,7 +1226,7 @@
 				for(i=0; i<plist->nEntries; i++, msgin++, msgout++)
 				{
 #					if DebugIdent<=1
-					printf("%4d: identifying %016llx with %016llx/%d to %016llx\n", me,
+					printf("%4d: identifying %08x with %08x/%d to %08x\n", me,
 						OBJ_GID(msgout->infos[0]->hdr), msgin->gid,
 						plist->proc,
 						MIN(OBJ_GID(msgout->infos[0]->hdr), msgin->gid));
@@ -1453,7 +1456,7 @@
 	id->msg.id.number = ident;
 
 	#if DebugIdent<=2
-	printf("%4d: IdentifyNumber %016llx %02d with %4d num %d\n", me,
+	printf("%4d: IdentifyNumber %08x %02d with %4d num %d\n", me,
 		OBJ_GID(hdr), OBJ_TYPE(hdr), proc, id->msg.id.number);
 	#endif
 }
@@ -1520,7 +1523,7 @@
 	id->msg.id.string = ident;
 
 	#if DebugIdent<=2
-	printf("%4d: IdentifyString %016llx %02d with %4d str %s\n", me,
+	printf("%4d: IdentifyString %08x %02d with %4d str %s\n", me,
 		OBJ_GID(hdr), OBJ_TYPE(hdr), proc, id->msg.id.string);
 	#endif
 }
@@ -1599,7 +1602,7 @@
 	id->msg.id.object = OBJ_GID(ident);
 
 	#if DebugIdent<=2
-	printf("%4d: IdentifyObject %016llx %02d with %4d gid %016llx\n", me,
+	printf("%4d: IdentifyObject %08x %02d with %4d gid %08x\n", me,
 		OBJ_GID(hdr), OBJ_TYPE(hdr), proc, id->msg.id.object);
 	#endif
 }
@@ -1675,7 +1678,6 @@
 {
 }
 
-
-
 /****************************************************************************/
 
+END_UGDIM_NAMESPACE
Nur in ug-orig/parallel/ddd/if: CVS.
diff -ru ug-orig/parallel/ddd/if/ifcheck.c ug-patched/parallel/ddd/if/ifcheck.c
--- ug-orig/parallel/ddd/if/ifcheck.c	2007-10-16 14:46:56.000000000 +0200
+++ ug-patched/parallel/ddd/if/ifcheck.c	2009-04-29 14:30:36.000000000 +0200
@@ -27,6 +27,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 
@@ -39,7 +40,7 @@
 /* general error string */
 #define ERRSTR "    DDD-IFC Warning: "
 
-
+START_UGDIM_NAMESPACE
 
 /****************************************************************************/
 /*                                                                          */
@@ -49,7 +50,7 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/if/ifcheck.c,v 1.3 2007/10/16 12:46:56 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 /****************************************************************************/
@@ -102,8 +103,8 @@
 					if (msgs[k].size!=h->nItems)
 					{
 						sprintf(cBuffer, ERRSTR
-							"IF %02d proc %d->%d has non-symmetric items (%d!=%ld)\n",
-							ifId, me, msgs[k].proc, h->nItems, (long)msgs[k].size);
+							"IF %02d proc %d->%d has non-symmetric items (%d!=%d)\n",
+							ifId, me, msgs[k].proc, h->nItems, msgs[k].size);
 						DDD_PrintLine(cBuffer);
 						errors++;
 					}
@@ -134,5 +135,6 @@
 	return(errors);
 }
 
-
 /****************************************************************************/
+
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/if/ifcmd.ct ug-patched/parallel/ddd/if/ifcmd.ct
--- ug-orig/parallel/ddd/if/ifcmd.ct	2002-04-16 19:03:14.000000000 +0200
+++ ug-patched/parallel/ddd/if/ifcmd.ct	2009-04-29 14:30:36.000000000 +0200
@@ -37,23 +37,23 @@
 
 
 #ifdef IF_WITH_XARGS
-	#define EXEC_LOOP(a,b,c)     IFExecLoopCplX(a,b,c)
-	#define COMM_LOOP(a,b,c,d,e) IFCommLoopCplX(a,b,c,d,e)
+	#define EXEC_LOOP(a,b,c)     NS_DIM_PREFIX IFExecLoopCplX(a,b,c)
+	#define COMM_LOOP(a,b,c,d,e) NS_DIM_PREFIX IFCommLoopCplX(a,b,c,d,e)
 	#define D_AB(p)              (p->cplAB)
 	#define D_BA(p)              (p->cplBA)
 	#define D_ABA(p)             (p->cplABA)
 #else
-	#define EXEC_LOOP(a,b,c)     IFExecLoopObj(a,b,c)
+	#define EXEC_LOOP(a,b,c)     NS_DIM_PREFIX IFExecLoopObj(a,b,c)
 	#ifdef CPP_FRONTEND
 	  #ifdef IF_CBR
 	    #define COMM_LOOP(a,b,c,d,e) \
-			CAT(IFCommLoopObj,a) (GatherScatter,b,c,d,e)
+			CAT(NS_DIM_PREFIX IFCommLoopObj,a) (GatherScatter,b,c,d,e)
 	  #else
 	    #define COMM_LOOP(a,b,c,d,e) \
-			CAT(IFCommLoopObj,a) (*GatherScatter,b,c,d,e)
+			CAT(NS_DIM_PREFIX IFCommLoopObj,a) (*GatherScatter,b,c,d,e)
 	  #endif
 	#else
-	#define COMM_LOOP(a,b,c,d,e) IFCommLoopObj(a,b,c,d,e)
+	#define COMM_LOOP(a,b,c,d,e) NS_DIM_PREFIX IFCommLoopObj(a,b,c,d,e)
 	#endif
 	#define D_AB(p)              (p->objAB)
 	#define D_BA(p)              (p->objBA)
@@ -196,34 +196,34 @@
 #if defined(C_FRONTEND) || defined(CPP_FRONTEND)
 void IF_FUNCNAME (
 #ifdef C_FRONTEND
-	DDD_IF aIF,
+	NS_DIM_PREFIX DDD_IF aIF,
 #endif
 	#ifdef IF_WITH_ATTR
-		DDD_ATTR aAttr,
+		NS_DIM_PREFIX DDD_ATTR aAttr,
 	#endif
 	#ifdef IF_EXECLOCAL
 		#ifdef IF_WITH_XARGS
-			ExecProcXPtr ExecProc)
+			NS_DIM_PREFIX ExecProcXPtr ExecProc)
 		#else
-			ExecProcPtr ExecProc)
+			NS_DIM_PREFIX ExecProcPtr ExecProc)
 		#endif
 	#else
 		#ifdef IF_ONEWAY
-			DDD_IF_DIR aDir,
+			NS_DIM_PREFIX DDD_IF_DIR aDir,
 		#endif
 		size_t aSize,
 #ifdef C_FRONTEND
 		#ifdef IF_WITH_XARGS
-			ComProcXPtr Gather, ComProcXPtr Scatter)
+			NS_DIM_PREFIX ComProcXPtr Gather, NS_DIM_PREFIX ComProcXPtr Scatter)
 		#else
-			ComProcPtr Gather, ComProcPtr Scatter)
+			NS_DIM_PREFIX ComProcPtr Gather, NS_DIM_PREFIX ComProcPtr Scatter)
 		#endif
 #endif
 #ifdef CPP_FRONTEND
 		#ifdef IF_WITH_XARGS
-			DDD_GatherScatterX REFDECL GatherScatter)
+			NS_DIM_PREFIX DDD_GatherScatterX REFDECL GatherScatter)
 		#else
-			DDD_GatherScatter  REFDECL GatherScatter)
+			NS_DIM_PREFIX DDD_GatherScatter  REFDECL GatherScatter)
 		#endif
 #endif
 	#endif
@@ -236,9 +236,9 @@
 #endif
 
 #ifdef F_FRONTEND
-void IF_FUNCNAME (DDD_IF *_aIF,
+void IF_FUNCNAME (NS_DIM_PREFIX DDD_IF *_aIF,
 	#ifdef IF_WITH_ATTR
-		DDD_ATTR *_aAttr,
+		NS_DIM_PREFIX DDD_ATTR *_aAttr,
 	#endif
 	#ifdef IF_EXECLOCAL
 		#ifdef IF_WITH_XARGS
@@ -252,9 +252,9 @@
 		#endif
 		size_t *_aSize,
 		#ifdef IF_WITH_XARGS
-			ComProcXPtr Gather, ComProcXPtr Scatter)
+			NS_DIM_PREFIX ComProcXPtr Gather, NS_DIM_PREFIX ComProcXPtr Scatter)
 		#else
-			ComProcPtr Gather, ComProcPtr Scatter)
+			NS_DIM_PREFIX ComProcPtr Gather, NS_DIM_PREFIX ComProcPtr Scatter)
 		#endif
 	#endif
 {
@@ -271,13 +271,13 @@
 	#endif
 #endif  /* F_FRONTEND */
 
-	IF_PROC		  *ifHead;
+	NS_DIM_PREFIX IF_PROC		  *ifHead;
 	unsigned long tries;
 	int           recv_mesgs;
 
 
 	/* prohibit using standard interface (IF0) */
-	if (aIF==STD_INTERFACE)
+	if (aIF==NS_DIM_PREFIX STD_INTERFACE)
 	{
 		DDD_PrintError('E', 4300,
 			CONCAT("cannot use standard interface in ",IF_FUNCNAME));
@@ -288,7 +288,7 @@
 	/* shortcuts can only be used without extended handler arguments */
 	#ifndef IF_WITH_XARGS
 		/* if shortcut tables are invalid -> recompute */
-		IFCheckShortcuts(aIF);
+		NS_DIM_PREFIX IFCheckShortcuts(aIF);
 	#endif
 
 
@@ -297,7 +297,7 @@
 	ForIF(aIF,ifHead)
 	{
 		#ifdef IF_WITH_ATTR
-			IF_ATTR	    *ifAttr;
+			NS_DIM_PREFIX IF_ATTR	    *ifAttr;
 			FIND_ATTR; /* find ifAttr */
 		#endif
 
@@ -320,7 +320,7 @@
 	ForIF(aIF,ifHead)
 	{
 		#ifdef IF_WITH_ATTR
-			IF_ATTR	    *ifAttr;
+			NS_DIM_PREFIX IF_ATTR	    *ifAttr;
 		#endif
 		#ifdef IF_ONEWAY
 			int      nOut, nIn;
@@ -335,11 +335,11 @@
 		#endif
 
 		#ifdef IF_EXCHANGE
-			IFGetMem(ifHead, aSize, PART->nItems, PART->nItems);
+			NS_DIM_PREFIX IFGetMem(ifHead, aSize, PART->nItems, PART->nItems);
 		#endif
 
 		#ifdef IF_ONEWAY
-			if (aDir==IF_FORWARD) {
+			if (aDir==NS_DIM_PREFIX IF_FORWARD) {
 				nOut = PART->nAB; nIn = PART->nBA;
 			}
 			else {
@@ -360,7 +360,7 @@
 
 
 	/* init communication, initiate receives */
-	recv_mesgs = IFInitComm(aIF);
+	recv_mesgs = NS_DIM_PREFIX IFInitComm(aIF);
 
 
 	/* build messages using gather-handler and send them away */
@@ -368,14 +368,14 @@
 	{
 		char   *buffer;
 		#ifdef IF_WITH_ATTR
-			IF_ATTR *ifAttr;
+			NS_DIM_PREFIX IF_ATTR *ifAttr;
 		#endif
 		#ifdef IF_ONEWAY
 			int      nOut;
 			#ifdef IF_WITH_XARGS
-			COUPLING **datOut;
+			NS_DIM_PREFIX COUPLING **datOut;
 			#else
-			IFObjPtr  *datOut;
+			NS_DIM_PREFIX IFObjPtr  *datOut;
 			#endif
 		#endif
 
@@ -392,7 +392,7 @@
 		#endif
 
 		#ifdef IF_ONEWAY
-			if (aDir==IF_FORWARD) {
+			if (aDir==NS_DIM_PREFIX IF_FORWARD) {
 				nOut = PART->nAB;  datOut = D_AB(PART);
 			}
 			else {
@@ -404,7 +404,7 @@
 
 		buffer= COMM_LOOP(Gather, D_ABA(PART), buffer, aSize, PART->nABA);
 
-		IFInitSend(ifHead);
+		NS_DIM_PREFIX IFInitSend(ifHead);
 	}
 
 
@@ -420,10 +420,10 @@
 				int error = InfoARecv(ifHead->vc, ifHead->msgIn);
 				if (error==-1)
 				{
-					sprintf(cBuffer,
+					sprintf(NS_DIM_PREFIX cBuffer,
 							"PPIF's InfoARecv() failed for recv to proc=%d in IF-Comm",
 						ifHead->proc);
-					DDD_PrintError('E', 4221, cBuffer);
+					DDD_PrintError('E', 4221, NS_DIM_PREFIX cBuffer);
 					HARD_EXIT;
 				}
 
@@ -433,13 +433,13 @@
 					#ifdef IF_ONEWAY
 						int      nIn;
 						#ifdef IF_WITH_XARGS
-						COUPLING **datIn;
+						NS_DIM_PREFIX COUPLING **datIn;
 						#else
-						IFObjPtr  *datIn;
+						NS_DIM_PREFIX IFObjPtr  *datIn;
 						#endif
 					#endif
 					#ifdef IF_WITH_ATTR
-						IF_ATTR  *ifAttr;
+						NS_DIM_PREFIX IF_ATTR  *ifAttr;
 					#endif
 
 					#ifdef CtrlTimeoutsDetailed
@@ -468,7 +468,7 @@
 					#endif
 
 					#ifdef IF_ONEWAY
-						if (aDir==IF_FORWARD) {
+						if (aDir==NS_DIM_PREFIX IF_FORWARD) {
 							nIn  = PART->nBA;  datIn = D_BA(PART);
 						}
 						else {
@@ -488,17 +488,17 @@
 	/* finally poll send completion */
 	if (recv_mesgs>0)
 	{
-		sprintf(cBuffer, CONCAT("receive-timeout for IF %02d in ",IF_FUNCNAME), aIF);
-		DDD_PrintError('E', 4200, cBuffer);
+		sprintf(NS_DIM_PREFIX cBuffer, CONCAT("receive-timeout for IF %02d in ",IF_FUNCNAME), aIF);
+		DDD_PrintError('E', 4200, NS_DIM_PREFIX cBuffer);
 
 		ForIF(aIF,ifHead)
 		{
 			if ((! BufferIsEmpty(ifHead->bufIn)) && ifHead->msgIn!=NO_MSGID)
 			{
-				sprintf(cBuffer,
+				sprintf(NS_DIM_PREFIX cBuffer,
 					"  waiting for message (from proc %d, size %ld)",
 					ifHead->proc, (unsigned long)BufferLen(ifHead->bufIn));
-				DDD_PrintError('E', 4201, cBuffer);
+				DDD_PrintError('E', 4201, NS_DIM_PREFIX cBuffer);
 			}
 		}
 	}
@@ -509,19 +509,19 @@
 			me, aIF, (unsigned long)tries);
 		#endif
 
-		if (! IFPollSend(aIF))
+		if (! NS_DIM_PREFIX IFPollSend(aIF))
 		{
-			sprintf(cBuffer, CONCAT("send-timeout for IF %02d in ",IF_FUNCNAME), aIF);
-			DDD_PrintError('E', 4210, cBuffer);
+			sprintf(NS_DIM_PREFIX cBuffer, CONCAT("send-timeout for IF %02d in ",IF_FUNCNAME), aIF);
+			DDD_PrintError('E', 4210, NS_DIM_PREFIX cBuffer);
 
 			ForIF(aIF,ifHead)
 			{
 				if ((! BufferIsEmpty(ifHead->bufOut)) && ifHead->msgOut!=NO_MSGID)
 				{
-					sprintf(cBuffer,
+					sprintf(NS_DIM_PREFIX cBuffer,
 						"  waiting for send completion (to proc %d, size %ld)",
 						ifHead->proc, (unsigned long)BufferLen(ifHead->bufOut));
-					DDD_PrintError('E', 4211, cBuffer);
+					DDD_PrintError('E', 4211, NS_DIM_PREFIX cBuffer);
 				}
 			}
 		}
@@ -529,7 +529,7 @@
 
 
 	/* free memory */
-	IFExitComm(aIF);
+	NS_DIM_PREFIX IFExitComm(aIF);
 
 	/*STAT_TIMER1(60);*/
 
diff -ru ug-orig/parallel/ddd/if/ifcmds.c ug-patched/parallel/ddd/if/ifcmds.c
--- ug-orig/parallel/ddd/if/ifcmds.c	2005-07-18 15:19:44.000000000 +0200
+++ ug-patched/parallel/ddd/if/ifcmds.c	2009-04-29 14:30:36.000000000 +0200
@@ -33,6 +33,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 
@@ -49,9 +50,10 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/if/ifcmds.c,v 1.2 2005/07/18 13:19:44 sander Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
+START_UGDIM_NAMESPACE
 
 /****************************************************************************/
 /*                                                                          */
@@ -204,4 +206,4 @@
 
 /****************************************************************************/
 
-
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/if/ifcreate.c ug-patched/parallel/ddd/if/ifcreate.c
--- ug-orig/parallel/ddd/if/ifcreate.c	2007-10-16 14:46:56.000000000 +0200
+++ ug-patched/parallel/ddd/if/ifcreate.c	2009-04-29 15:11:55.000000000 +0200
@@ -34,6 +34,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -47,6 +48,7 @@
 /* PPIF namespace: */
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
 
 /****************************************************************************/
 /*                                                                          */
@@ -66,7 +68,7 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/if/ifcreate.c,v 1.5 2007/10/16 12:46:56 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 
@@ -174,7 +176,7 @@
 static int sort_IFCouplings (const void *e1, const void *e2)
 {
 	COUPLING  *cp1, *cp2;
-	DDD_GID   gid1, gid2;
+	INT       gid1, gid2;
 	DDD_ATTR  attr1, attr2;
 
 	cp1 = *((COUPLING **)e1);
@@ -622,7 +624,7 @@
 {
 #endif
 #ifdef CPP_FRONTEND
-DDD_Interface::DDD_Interface (DDD_TYPE t, DDD_PRIO p1, DDD_PRIO p2, char* name)
+DDD_Interface::DDD_Interface (DDD_TYPE t, DDD_PRIO p1, DDD_PRIO p2, const char* name)
 {
 	Init(1, &t, 1, &p1, 1, &p2, name);
 }
@@ -631,7 +633,7 @@
 	int nO, DDD_TYPE O[],
 	int nA, DDD_PRIO A[],
 	int nB, DDD_PRIO B[],
-	char *name)
+	const char *name)
 {
 	Init(nO, O, nA, A, nB, B, name);
 }
@@ -640,7 +642,7 @@
 	int nO, DDD_TYPE O[],
 	int nA, DDD_PRIO A[],
 	int nB, DDD_PRIO B[],
-	char *name)
+	const char *name)
 {
 	_id = nIFs;
 #endif
@@ -776,23 +778,17 @@
 
 
 #ifdef C_FRONTEND
-void DDD_IFSetName (DDD_IF ifId, char *name)
+void DDD_IFSetName (DDD_IF ifId, const char *name)
 {
 #endif
 #ifdef CPP_FRONTEND
-void DDD_Interface::SetName (char *name)
+void DDD_Interface::SetName (const char *name)
 {
 	DDD_IF ifId = _id;
 #endif
 #if defined(C_FRONTEND) || defined(CPP_FRONTEND)
-	/* ensure maximum length */
-	if (strlen(name) > IF_NAMELEN-1)
-	{
-		name[IF_NAMELEN-1] = 0;
-	}
-
 	/* copy name string */
-	strcpy(theIF[ifId].name, name);
+	strncpy(theIF[ifId].name, name, IF_NAMELEN-1);
 }
 #endif
 
@@ -823,7 +819,7 @@
 		for(i=0; i<ifh->nAB; i++)
 		{
 			COUPLING *c = ifh->cplAB[i];
-			sprintf(cBuffer, "|         gid=%016llx proc=%04d prio=%02d "
+			sprintf(cBuffer, "|         gid=%08x proc=%04d prio=%02d "
 					"osc=%p/%p\n",
 				OBJ_GID(c->obj), CPL_PROC(c), c->prio,
 				ifh->objAB[i], OBJ_OBJ(c->obj)
@@ -836,7 +832,7 @@
 		for(i=0; i<ifh->nBA; i++)
 		{
 			COUPLING *c = ifh->cplBA[i];
-			sprintf(cBuffer, "|         gid=%016llx proc=%04d prio=%02d "
+			sprintf(cBuffer, "|         gid=%08x proc=%04d prio=%02d "
 					"osc=%p/%p\n",
 				OBJ_GID(c->obj), CPL_PROC(c), c->prio,
 				ifh->objBA[i], OBJ_OBJ(c->obj)
@@ -849,7 +845,7 @@
 		for(i=0; i<ifh->nABA; i++)
 		{
 			COUPLING *c = ifh->cplABA[i];
-			sprintf(cBuffer, "|         gid=%016llx proc=%04d prio=%02d "
+			sprintf(cBuffer, "|         gid=%08x proc=%04d prio=%02d "
 					"osc=%p/%p\n",
 				OBJ_GID(c->obj), CPL_PROC(c), c->prio,
 				ifh->objABA[i], OBJ_OBJ(c->obj)
@@ -1218,6 +1214,7 @@
 	return(sum);
 }
 
+END_UGDIM_NAMESPACE
 
 /****************************************************************************/
 
diff -ru ug-orig/parallel/ddd/if/if.h ug-patched/parallel/ddd/if/if.h
--- ug-orig/parallel/ddd/if/if.h	1998-09-22 15:30:47.000000000 +0200
+++ ug-patched/parallel/ddd/if/if.h	2009-04-29 14:30:36.000000000 +0200
@@ -19,7 +19,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/parallel/ddd/if/if.h,v 1.3 1998/09/22 13:30:47 birken Exp $
+$Header$
 */
 
 #ifndef __DDD_IF_H__
@@ -35,6 +35,7 @@
 #include "basic/memutil.h"
 
 
+
 /****************************************************************************/
 /*                                                                          */
 /* defines in the following order                                           */
@@ -45,6 +46,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+START_UGDIM_NAMESPACE
 
 /*
 #define CtrlTimeouts
@@ -74,7 +76,7 @@
 /* macros for easier coding of replicated source code */
 
 /* loop over one interface (all ifHeads) */
-#define ForIF(id,iter)  for((iter)=theIF[(id)].ifHead;  \
+#define ForIF(id,iter)  for((iter)=NS_DIM_PREFIX theIF[(id)].ifHead;  \
 							(iter)!=NULL;  \
 							(iter)=(iter)->next)
 
@@ -223,5 +225,7 @@
 
 /****************************************************************************/
 
+END_UGDIM_NAMESPACE
+
 #endif
 
diff -ru ug-orig/parallel/ddd/if/ifobjsc.c ug-patched/parallel/ddd/if/ifobjsc.c
--- ug-orig/parallel/ddd/if/ifobjsc.c	2004-10-22 11:50:11.000000000 +0200
+++ ug-patched/parallel/ddd/if/ifobjsc.c	2009-04-29 14:30:36.000000000 +0200
@@ -28,16 +28,17 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 
 #include "dddi.h"
 #include "if.h"
 
-
-
 USING_UG_NAMESPACE
 
+START_UGDIM_NAMESPACE
+
 /****************************************************************************/
 /*                                                                          */
 /* definition of static variables                                           */
@@ -45,7 +46,7 @@
 /****************************************************************************/
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/if/ifobjsc.c,v 1.2 2004/10/22 09:50:11 sander Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 /****************************************************************************/
@@ -198,7 +199,6 @@
 	}
 }
 
-
-
 /****************************************************************************/
 
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/if/ifstd.ct ug-patched/parallel/ddd/if/ifstd.ct
--- ug-orig/parallel/ddd/if/ifstd.ct	2002-04-16 19:03:14.000000000 +0200
+++ ug-patched/parallel/ddd/if/ifstd.ct	2009-04-29 14:30:36.000000000 +0200
@@ -74,21 +74,21 @@
 void IF_FUNCNAME (
 	#ifdef IF_EXECLOCAL
 		#ifdef IF_WITH_XARGS
-			ExecProcHdrXPtr ExecProc)
+			NS_DIM_PREFIX ExecProcHdrXPtr ExecProc)
 		#else
-			ExecProcHdrPtr ExecProc)
+			NS_DIM_PREFIX ExecProcHdrPtr ExecProc)
 		#endif
 	#else
 		size_t aSize,
 		#ifdef IF_WITH_XARGS
-			ComProcHdrXPtr Gather, ComProcHdrXPtr Scatter)
+			NS_DIM_PREFIX ComProcHdrXPtr Gather, NS_DIM_PREFIX ComProcHdrXPtr Scatter)
 		#else
-			ComProcHdrPtr Gather, ComProcHdrPtr Scatter)
+			NS_DIM_PREFIX ComProcHdrPtr Gather, NS_DIM_PREFIX ComProcHdrPtr Scatter)
 		#endif
 	#endif
 {
-	DDD_IF        aIF = STD_INTERFACE;
-	IF_PROC		  *ifHead;
+	NS_DIM_PREFIX DDD_IF        aIF = NS_DIM_PREFIX STD_INTERFACE;
+	NS_DIM_PREFIX IF_PROC		  *ifHead;
 	unsigned long tries;
 	int           recv_mesgs;
 
@@ -107,12 +107,12 @@
 	{
 
 		#ifdef IF_EXCHANGE
-			IFGetMem(ifHead, aSize, PART->nItems, PART->nItems);
+			NS_DIM_PREFIX IFGetMem(ifHead, aSize, PART->nItems, PART->nItems);
 		#endif
 	}
 
 	/* init communication, initiate receives */
-	recv_mesgs = IFInitComm(aIF);
+	recv_mesgs = NS_DIM_PREFIX IFInitComm(aIF);
 
 
 	/* build messages using gather-handler and send them away */
@@ -123,7 +123,7 @@
 
 		buffer= COMM_LOOP(Gather, D_ABA(PART), buffer, aSize, PART->nItems);
 
-		IFInitSend(ifHead);
+		NS_DIM_PREFIX IFInitSend(ifHead);
 	}
 
 
@@ -139,10 +139,10 @@
 				int error = InfoARecv(ifHead->vc, ifHead->msgIn);
 				if (error==-1)
 				{
-					sprintf(cBuffer,
+					sprintf(NS_DIM_PREFIX cBuffer,
 							"PPIF's InfoARecv() failed for recv to proc=%d in IF-Comm",
 						ifHead->proc);
-					DDD_PrintError('E', 4221, cBuffer);
+					DDD_PrintError('E', 4221, NS_DIM_PREFIX cBuffer);
 					HARD_EXIT;
 				}
 
@@ -174,17 +174,17 @@
 	/* finally poll send completion */
 	if (recv_mesgs>0)
 	{
-		sprintf(cBuffer, CONCAT("receive-timeout for IF %02d in ",IF_FUNCNAME), aIF);
-		DDD_PrintError('E', 4200, cBuffer);
+		sprintf(NS_DIM_PREFIX cBuffer, CONCAT("receive-timeout for IF %02d in ",IF_FUNCNAME), aIF);
+		DDD_PrintError('E', 4200, NS_DIM_PREFIX cBuffer);
 
 		ForIF(aIF,ifHead)
 		{
 			if ((! BufferIsEmpty(ifHead->bufIn)) && ifHead->msgIn!=NO_MSGID)
 			{
-				sprintf(cBuffer,
+				sprintf(NS_DIM_PREFIX cBuffer,
 					"  waiting for message (from proc %d, size %ld)",
 					ifHead->proc, (unsigned long)BufferLen(ifHead->bufIn));
-				DDD_PrintError('E', 4201, cBuffer);
+				DDD_PrintError('E', 4201, NS_DIM_PREFIX cBuffer);
 			}
 		}
 	}
@@ -195,19 +195,19 @@
 			me, aIF, (unsigned long)tries);
 		#endif
 
-		if (! IFPollSend(aIF))
+		if (! NS_DIM_PREFIX IFPollSend(aIF))
 		{
-			sprintf(cBuffer, CONCAT("send-timeout for IF %02d in ",IF_FUNCNAME), aIF);
-			DDD_PrintError('E', 4210, cBuffer);
+			sprintf(NS_DIM_PREFIX cBuffer, CONCAT("send-timeout for IF %02d in ",IF_FUNCNAME), aIF);
+			DDD_PrintError('E', 4210, NS_DIM_PREFIX cBuffer);
 
 			ForIF(aIF,ifHead)
 			{
 				if ((! BufferIsEmpty(ifHead->bufOut)) && ifHead->msgOut!=NO_MSGID)
 				{
-					sprintf(cBuffer,
+					sprintf(NS_DIM_PREFIX cBuffer,
 						"  waiting for send completion (to proc %d, size %ld)",
 						ifHead->proc, (unsigned long)BufferLen(ifHead->bufOut));
-					DDD_PrintError('E', 4211, cBuffer);
+					DDD_PrintError('E', 4211, NS_DIM_PREFIX cBuffer);
 				}
 			}
 		}
@@ -215,7 +215,7 @@
 
 
 	/* free memory */
-	IFExitComm(aIF);
+	NS_DIM_PREFIX IFExitComm(aIF);
 
 	/*STAT_TIMER1(60);*/
 
diff -ru ug-orig/parallel/ddd/if/ifuse.c ug-patched/parallel/ddd/if/ifuse.c
--- ug-orig/parallel/ddd/if/ifuse.c	2005-07-18 15:19:44.000000000 +0200
+++ ug-patched/parallel/ddd/if/ifuse.c	2009-04-29 14:30:36.000000000 +0200
@@ -32,6 +32,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -44,6 +45,8 @@
 /* PPIF namespace: */
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
+
 /****************************************************************************/
 /*                                                                          */
 /* variables global to this source file (static)                            */
@@ -52,7 +55,7 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/if/ifuse.c,v 1.6 2005/07/18 13:19:44 sander Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 static int send_mesgs;
@@ -544,3 +547,4 @@
 
 /****************************************************************************/
 
+END_UGDIM_NAMESPACE
Nur in ug-orig/parallel/ddd/include: CVS.
diff -ru ug-orig/parallel/ddd/include/dddaddon.h ug-patched/parallel/ddd/include/dddaddon.h
--- ug-orig/parallel/ddd/include/dddaddon.h	1997-07-01 16:16:34.000000000 +0200
+++ ug-patched/parallel/ddd/include/dddaddon.h	2009-04-29 15:11:55.000000000 +0200
@@ -27,11 +27,13 @@
 
 #include "dddresources.h"
 
+START_UGDIM_NAMESPACE
 
+/*
 #ifdef __cplusplus
 extern "C" {
 #endif
-
+*/
 
 /****************************************************************************/
 /*                                                                          */
@@ -124,13 +126,17 @@
 */
 double    DDD_StatClock (int module, int index);
 long      DDD_StatCount (int module, int index);
-char *    DDD_StatClockDesc (int module, int index);
-char *    DDD_StatCountDesc (int module, int index);
+const char *    DDD_StatClockDesc (int module, int index);
+const char *    DDD_StatCountDesc (int module, int index);
 
 
+/*
 #ifdef __cplusplus
 }
 #endif
+*/
+
+END_UGDIM_NAMESPACE
 
 #endif
 
diff -ru ug-orig/parallel/ddd/include/ddd.h ug-patched/parallel/ddd/include/ddd.h
--- ug-orig/parallel/ddd/include/ddd.h	2007-10-16 14:46:56.000000000 +0200
+++ ug-patched/parallel/ddd/include/ddd.h	2009-04-29 15:11:55.000000000 +0200
@@ -41,12 +41,18 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/parallel/ddd/include/ddd.h,v 1.2 2007/10/16 12:46:56 lampe Exp $
+$Header$
 */
 
 #ifndef __DDD__
 #define __DDD__
 
+/* for size_t */
+#include <stddef.h>
+
+#include "namespace.h"
+
+START_UGDIM_NAMESPACE
 
 #define DDD_VERSION    "1.9"
 
@@ -106,19 +112,13 @@
 
 /* F77SYM(lsym,usym) macro is defined in compiler.h. 961127 KB */
 
-
+/*
 #ifdef __cplusplus
  #ifndef CPP_FRONTEND
   extern "C" {
  #endif
 #endif
-
-
-
-/* for size_t */
-#include <stddef.h>
-
-
+*/
 
 /****************************************************************************/
 /*                                                                          */
@@ -317,8 +317,12 @@
 	unsigned char attr;
 	unsigned char flags;
 
-	unsigned int  myIndex;   /* global object array index */
-	unsigned long long gid;  /* global id */
+	unsigned int  myIndex;  /* global object array index */
+	unsigned int  gid;      /* global id */
+
+	#ifdef C_FRONTEND
+	char          empty[4];  /* 4 unused bytes in current impl. */
+	#endif
 } DDD_HEADER;
 
 
@@ -326,7 +330,7 @@
 /*
 	new DDD types, used during access of DDD functional interface
 */
-typedef unsigned long long DDD_GID;
+typedef unsigned int     DDD_GID;
 typedef unsigned int     DDD_TYPE;
 typedef unsigned int     DDD_IF;
 typedef unsigned short   DDD_PROC;
@@ -525,11 +529,11 @@
 		int IsMaster (void)  { return InfoMe()==InfoMaster(); }
 
 		/// redirect DDD stdout by registering callback function
-		void LineOutRegister (void (*func)(char *s));
+		void LineOutRegister (void (*func)(const char *s));
 
 		// from TypeManager
-		DDD_TYPE TypeDeclareStruct (char* n="");
-		DDD_TYPE TypeDeclare (char* n="")
+		DDD_TYPE TypeDeclareStruct (const char* n="");
+		DDD_TYPE TypeDeclare (const char* n="")
 			{ return TypeDeclareStruct(n); }
 
 		// for array-like objects
@@ -858,7 +862,7 @@
 		DDD_Interface (int, DDD_TYPE O[],
 			int, DDD_PRIO A[], int, DDD_PRIO B[], char* n="");
 		DDD_Interface (DDD_TYPE, DDD_PRIO, DDD_PRIO, char* n="");
-		void SetName (char *);
+		void SetName (const char *);
 
 		static void DisplayAll (void);
 		void Display (void);
@@ -919,7 +923,7 @@
 	Redirect line-oriented output, new in V1.2
 */
 #if defined(C_FRONTEND)
-void     DDD_LineOutRegister (void (*func)(char *s));
+void     DDD_LineOutRegister (void (*func)(const char *s));
 #endif
 
 
@@ -934,10 +938,10 @@
 #define  DDD_HandlerRegister F77SYM(ddd_handlerregister,DDD_HANDLERREGISTER)
 /* TODO hier fehlen DDD_SetHandler-umsetzungen fuer fortran */
 
-void	 DDD_TypeDeclare (char *name, int *size, DDD_TYPE *type);
+void	 DDD_TypeDeclare (const char *name, int *size, DDD_TYPE *type);
 #endif
 #ifdef C_FRONTEND
-DDD_TYPE DDD_TypeDeclare (char *name);
+DDD_TYPE DDD_TypeDeclare (const char *name);
 int      DDD_InfoHdrOffset (DDD_TYPE);
 #endif
 #if defined(C_FRONTEND) || defined(F_FRONTEND)
@@ -1048,7 +1052,7 @@
 
 #ifdef C_FRONTEND
 DDD_IF   DDD_IFDefine (int, DDD_TYPE O[], int, DDD_PRIO A[], int, DDD_PRIO B[]);
-void     DDD_IFSetName (DDD_IF, char *);
+void     DDD_IFSetName (DDD_IF, const char *);
 #endif
 
 #if defined(C_FRONTEND) || defined(F_FRONTEND)
@@ -1170,14 +1174,16 @@
 #undef _FPTR
 #undef _OBJREF
 
-
+/*
 #ifdef __cplusplus
  #ifndef CPP_FRONTEND
   }
  #endif
 #endif
-
+*/
 /****************************************************************************/
 
+END_UGDIM_NAMESPACE
+
 #endif
 
diff -ru ug-orig/parallel/ddd/include/dddio.h ug-patched/parallel/ddd/include/dddio.h
--- ug-orig/parallel/ddd/include/dddio.h	1996-12-02 13:49:58.000000000 +0100
+++ ug-patched/parallel/ddd/include/dddio.h	2009-04-29 15:11:55.000000000 +0200
@@ -27,6 +27,7 @@
 #ifndef __DDDIO__
 #define __DDDIO__
 
+START_UGDIM_NAMESPACE
 
 /****************************************************************************/
 /*                                                                          */
@@ -34,7 +35,7 @@
 /*                                                                          */
 /****************************************************************************/
 
-extern void (*DDD_UserLineOutFunction)(char *s);
+extern void (*DDD_UserLineOutFunction)(const char *s);
 
 
 /****************************************************************************/
@@ -43,11 +44,12 @@
 /*                                                                          */
 /****************************************************************************/
 
-void DDD_PrintLine (char *s);
-void DDD_PrintDebug (char *s);
-void DDD_PrintError (char error_class, int error_no, char *text);
+void DDD_PrintLine (const char *s);
+void DDD_PrintDebug (const char *s);
+void DDD_PrintError (char error_class, int error_no, const char *text);
 void DDD_Flush (void);
 void DDD_SyncAll (void);
 
+END_UGDIM_NAMESPACE
 
 #endif
diff -ru ug-orig/parallel/ddd/include/dddresources.h ug-patched/parallel/ddd/include/dddresources.h
--- ug-orig/parallel/ddd/include/dddresources.h	1996-12-02 13:49:58.000000000 +0100
+++ ug-patched/parallel/ddd/include/dddresources.h	2009-04-29 14:30:36.000000000 +0200
@@ -18,11 +18,13 @@
 #ifndef __DDD_RESOURCE_H__
 #define __DDD_RESOURCE_H__
 
+/*
 #ifdef __cplusplus
 extern "C" {
 #endif
+*/
 
-
+START_UGDIM_NAMESPACE
 
 /****************************************************************************/
 /*                                                                          */
@@ -56,9 +58,13 @@
 */
 DDD_RESOURCES *DDD_InfoResources (void);
 
+END_UGDIM_NAMESPACE
 
+/*
 #ifdef __cplusplus
 }
 #endif
+*/
+
 #endif
 
diff -ru ug-orig/parallel/ddd/include/memmgr.h ug-patched/parallel/ddd/include/memmgr.h
--- ug-orig/parallel/ddd/include/memmgr.h	2006-11-17 11:02:12.000000000 +0100
+++ ug-patched/parallel/ddd/include/memmgr.h	2009-04-29 14:30:36.000000000 +0200
@@ -19,7 +19,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/parallel/ddd/include/memmgr.h,v 1.4 2006/11/17 10:02:12 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -33,7 +33,7 @@
 
 #include "namespace.h"
 
-START_UG_NAMESPACE
+START_UGDIM_NAMESPACE
 /*
 #ifdef __cplusplus
 extern "C" {
@@ -121,6 +121,6 @@
 }
 #endif
 */
-END_NAMESPACE
+END_UGDIM_NAMESPACE
 
 #endif
Nur in ug-orig/parallel/ddd/join: CVS.
diff -ru ug-orig/parallel/ddd/join/jcmds.c ug-patched/parallel/ddd/join/jcmds.c
--- ug-orig/parallel/ddd/join/jcmds.c	2007-10-16 14:46:56.000000000 +0200
+++ ug-patched/parallel/ddd/join/jcmds.c	2009-04-29 14:30:36.000000000 +0200
@@ -28,6 +28,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h> 
 #include <stdio.h>
 #include <string.h>
@@ -40,6 +41,8 @@
 USING_UG_NAMESPACE
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
+
 /****************************************************************************/
 /*                                                                          */
 /* data structures                                                          */
@@ -79,7 +82,7 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/join/jcmds.c,v 1.4 2007/10/16 12:46:56 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 /****************************************************************************/
@@ -153,7 +156,7 @@
 	{
 		if (ObjHasCpl(itemsJ[i]->hdr))
 		{
-			sprintf(cBuffer, "cannot join %016llx, object already distributed",
+			sprintf(cBuffer, "cannot join %08x, object already distributed",
 				OBJ_GID(itemsJ[i]->hdr));
 			DDD_PrintError('E', 7006, cBuffer);
 			HARD_EXIT;
@@ -172,7 +175,7 @@
 		if (local_gid!=GID_INVALID && local_gid!=itemsJ[i]->new_gid)
 		{
 			sprintf(cBuffer,
-				"several (inconsistent) DDD_JoinObj-commands for local object %016llx",
+				"several (inconsistent) DDD_JoinObj-commands for local object %08x",
 				local_gid);
 			DDD_PrintError('E', 7007, cBuffer);
 			HARD_EXIT;
@@ -327,7 +330,7 @@
 						continue;
 
 #					if DebugJoin<=1
-					printf("%4d: Phase1 Join for %016llx from %d, "
+					printf("%4d: Phase1 Join for %08x from %d, "
 						"send AddCpl to %d.\n",
 						me, theJoin[i].gid, ji->te.proc, ji->dest);
 #					endif
@@ -349,7 +352,7 @@
 			}
 			else
 			{
-				sprintf(cBuffer, "no object %016llx for join from %d",
+				sprintf(cBuffer, "no object %08x for join from %d",
 					theJoin[i].gid, LC_MsgGetProc(jm));
 				DDD_PrintError('E', 7300, cBuffer);
 				HARD_EXIT;
@@ -567,7 +570,7 @@
 				AddCoupling(localCplObjs[j], theAC[i].proc, theAC[i].prio);
 
 #				if DebugJoin<=1
-				printf("%4d: Phase2 execute AddCpl(%016llx,%d,%d) (from %d).\n",
+				printf("%4d: Phase2 execute AddCpl(%08x,%d,%d) (from %d).\n",
 					me,
 					theAC[i].gid, theAC[i].proc, theAC[i].prio,
 					LC_MsgGetProc(jm));
@@ -584,7 +587,7 @@
 
 
 #					if DebugJoin<=1
-					printf("%4d: Phase2 forward AddCpl(%016llx,%d,%d) to %d.\n",
+					printf("%4d: Phase2 forward AddCpl(%08x,%d,%d) to %d.\n",
 						me,
 						theAC[i].gid, theAC[i].proc, theAC[i].prio,
 						ji->dest);
@@ -762,7 +765,7 @@
 				AddCoupling(itemsJ[j]->hdr, theAC[i].proc, theAC[i].prio);
 
 #				if DebugJoin<=1
-				printf("%4d: Phase3 execute AddCpl(%016llx,%d,%d) (from %d).\n",
+				printf("%4d: Phase3 execute AddCpl(%08x,%d,%d) (from %d).\n",
 					me,
 					OBJ_GID(itemsJ[j]->hdr), theAC[i].proc, theAC[i].prio,
 					LC_MsgGetProc(jm));
@@ -1230,7 +1233,7 @@
 
 	if (dest>=procs)
 	{
-		sprintf(cBuffer, "cannot join %016llx with %016llx on processor %d (procs=%d)",
+		sprintf(cBuffer, "cannot join %08x with %08x on processor %d (procs=%d)",
 			OBJ_GID(hdr), new_gid, dest, procs);
 		DDD_PrintError('E', 7003, cBuffer);
 		HARD_EXIT;
@@ -1238,14 +1241,14 @@
 
 	if (dest==me)
 	{
-		sprintf(cBuffer, "cannot join %016llx with myself", OBJ_GID(hdr));
+		sprintf(cBuffer, "cannot join %08x with myself", OBJ_GID(hdr));
 		DDD_PrintError('E', 7004, cBuffer);
 		HARD_EXIT;
 	}
 
 	if (ObjHasCpl(hdr))
 	{
-		sprintf(cBuffer, "cannot join %016llx, object already distributed",
+		sprintf(cBuffer, "cannot join %08x, object already distributed",
 			OBJ_GID(hdr));
 		DDD_PrintError('E', 7005, cBuffer);
 		HARD_EXIT;
@@ -1262,7 +1265,7 @@
 		return;
 
 #	if DebugJoin<=2
-		sprintf(cBuffer, "%4d: DDD_JoinObj %016llx, dest=%d, new_gid=%016llx\n",
+		sprintf(cBuffer, "%4d: DDD_JoinObj %08x, dest=%d, new_gid=%08x\n",
 			me, OBJ_GID(hdr), dest, new_gid);
 		DDD_PrintDebug(cBuffer);
 #	endif
@@ -1313,3 +1316,5 @@
 #undef _FADR
 
 /****************************************************************************/
+
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/join/join.c ug-patched/parallel/ddd/join/join.c
--- ug-orig/parallel/ddd/join/join.c	2007-10-16 14:46:56.000000000 +0200
+++ ug-patched/parallel/ddd/join/join.c	2009-04-29 15:11:55.000000000 +0200
@@ -28,6 +28,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -35,9 +36,10 @@
 
 #include "dddi.h"
 
-
 USING_UG_NAMESPACE
 
+START_UGDIM_NAMESPACE 
+
 /*
 	NOTE: all container-classes from ooppcc.h are implemented in this
 	      source file by setting the following define.
@@ -63,11 +65,11 @@
 	TmpMem_kind = kind;
 }
 
-
+END_UGDIM_NAMESPACE 
 
 #include "join.h"
 
-
+START_UGDIM_NAMESPACE 
 
 /****************************************************************************/
 /*                                                                          */
@@ -102,7 +104,7 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/join/join.c,v 1.3 2007/10/16 12:46:56 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 /****************************************************************************/
@@ -137,7 +139,7 @@
 
 void Method(Print) (ParamThis  _PRINTPARAMS)
 {
-	fprintf(fp, "JIJoin local_gid=%016llx dest=%d new_gid=%016llx\n",
+	fprintf(fp, "JIJoin local_gid=%08x dest=%d new_gid=%08x\n",
 		OBJ_GID(This->hdr), This->dest, This->new_gid);
 }
 
@@ -175,7 +177,7 @@
 
 void Method(Print) (ParamThis  _PRINTPARAMS)
 {
-	fprintf(fp, "JIAddCpl gid=%016llx dest=%d proc=%d prio=%d\n",
+	fprintf(fp, "JIAddCpl gid=%08x dest=%d proc=%d prio=%d\n",
 		This->te.gid, This->dest, This->te.proc, This->te.prio);
 }
 
@@ -200,7 +202,7 @@
 	and recovery.
 */
 
-char *JoinModeName (int mode)
+const char *JoinModeName (int mode)
 {
 	switch(mode)
 	{
@@ -308,5 +310,6 @@
 
 #undef _FADR
 
-
 /****************************************************************************/
+
+END_UGDIM_NAMESPACE 
diff -ru ug-orig/parallel/ddd/join/join.h ug-patched/parallel/ddd/join/join.h
--- ug-orig/parallel/ddd/join/join.h	1998-09-22 15:27:35.000000000 +0200
+++ ug-patched/parallel/ddd/join/join.h	2009-04-29 14:30:36.000000000 +0200
@@ -20,7 +20,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/parallel/ddd/join/join.h,v 1.1.1.3 1998/09/22 13:27:35 birken Exp $
+$Header$
 */
 
 
@@ -41,6 +41,7 @@
 #include "basic/oopp.h"    /* for object-orientated style via preprocessor */
 
 
+START_UGDIM_NAMESPACE 
 
 /****************************************************************************/
 /*                                                                          */
@@ -312,7 +313,7 @@
 void XferDisplayMsg (char *comment, LC_MSGHANDLE);
 */
 
-
+END_UGDIM_NAMESPACE 
 
 #endif
 
diff -ru ug-orig/parallel/ddd/Makefile.am ug-patched/parallel/ddd/Makefile.am
--- ug-orig/parallel/ddd/Makefile.am	2006-11-10 12:29:00.000000000 +0100
+++ ug-patched/parallel/ddd/Makefile.am	2009-06-04 13:10:11.000000000 +0200
@@ -1,12 +1,24 @@
-# $Id: Makefile.am,v 1.4 2006/11/10 11:29:00 sander Exp $
+# $Id: Makefile.am 8354 2009-06-04 11:10:11Z sander $
 
 if PARALLEL
-  LIB = libddd.la
+
+if BUILD2D
+  LIB_2D = libddd2.la 
+else
+  LIB_2D =
+endif
+if BUILD3D
+  LIB_3D = libddd3.la
+else
+  LIB_3D =
+endif
+
 else
-  LIB =
+  LIB_2D = 
+  LIB_3D = 
 endif
 
-noinst_LTLIBRARIES = $(LIB)
+noinst_LTLIBRARIES = $(LIB_2D) $(LIB_3D)
 
 # set options from Makefile.dddobj
 
@@ -14,34 +26,38 @@
 
 # reproduce the style of Makefile.ddd
 
-BASIC = basic/io.c basic/topo.c basic/notify.c basic/notify.h basic/reduct.c basic/lowcomm.c basic/lowcomm.h \
-        basic/oopp.h basic/ooppcc.h basic/memutil.h
+BASIC = basic/io.c basic/topo.c basic/notify.c basic/reduct.c basic/lowcomm.c
 
-CTRL = ctrl/debug.c ctrl/cons.c ctrl/stat.c ctrl/stat.h
+CTRL = ctrl/debug.c ctrl/cons.c ctrl/stat.c
 
-MGR = mgr/typemgr.c mgr/objmgr.c mgr/cplmgr.c mgr/prio.c mgr/attr.c mgr/handler.ct
+MGR = mgr/typemgr.c mgr/objmgr.c mgr/cplmgr.c mgr/prio.c mgr/attr.c
 
 IDENT = ident/ident.c
 
-IF = if/ifcreate.c if/ifuse.c if/ifcmds.c if/ifcheck.c if/ifobjsc.c if/if.h if/ifcmd.ct \
-     if/ifstd.ct
+IF = if/ifcreate.c if/ifuse.c if/ifcmds.c if/ifcheck.c if/ifobjsc.c
 
 XFER = xfer/xfer.c xfer/cmds.c xfer/pack.c xfer/unpack.c xfer/ctrl.c \
-       xfer/cplmsg.c xfer/cmdmsg.c xfer/supp.c xfer/xfer.h xfer/sll.h xfer/sll.ht xfer/sll.ct
+       xfer/cplmsg.c xfer/cmdmsg.c xfer/supp.c
 
 PRIO = prio/pcmds.c
 
-JOIN = join/join.c join/jcmds.c join/join.h
+JOIN = join/join.c join/jcmds.c
 
 MISC = analyser/inv.c
 
-DDD = ddd.c dddi.h dddstr.h 
+DDD = ddd.c dddi.h 
 
 # header files that are not explicitly used but need to be distributed
 EXTRA_DIST = include/dddaddon.h include/ddd.h include/memmgr.h include/dddio.h \
-             include/fddd.f include/dddresources.h
+             include/fddd.f include/dddresources.h join/join.h ctrl/stat.h \
+             xfer/xfer.h xfer/sll.ct xfer/sll.h xfer/sll.ht if/if.h if/ifstd.ct if/ifcmd.ct basic/notify.h basic/lowcomm.h \
+             dddstr.h mgr/handler.ct basic/oopp.h basic/ooppcc.h basic/memutil.h
+
+libddd2_la_SOURCES = $(BASIC) $(CTRL) $(MGR) $(IDENT) $(IF) $(XFER) \
+                    $(PRIO) $(JOIN) $(MISC) $(DDD) f77/f2c.c
+libddd2_la_CPPFLAGS = $(UG_2DFLAGS) $(DDDFLAGS)
 
-libddd_la_SOURCES = $(BASIC) $(CTRL) $(MGR) $(IDENT) $(IF) $(XFER) \
+libddd3_la_SOURCES = $(BASIC) $(CTRL) $(MGR) $(IDENT) $(IF) $(XFER) \
                     $(PRIO) $(JOIN) $(MISC) $(DDD) f77/f2c.c
-libddd_la_CPPFLAGS = $(UG_CPPFLAGS) $(DDDFLAGS)
+libddd3_la_CPPFLAGS = $(UG_3DFLAGS) $(DDDFLAGS)
 
Nur in ug-orig/parallel/ddd/memmgrs: CVS.
diff -ru ug-orig/parallel/ddd/memmgrs/memmgr_ctrl.c ug-patched/parallel/ddd/memmgrs/memmgr_ctrl.c
--- ug-orig/parallel/ddd/memmgrs/memmgr_ctrl.c	2007-10-16 14:46:57.000000000 +0200
+++ ug-patched/parallel/ddd/memmgrs/memmgr_ctrl.c	2009-04-29 14:30:36.000000000 +0200
@@ -30,6 +30,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <assert.h>
@@ -47,6 +48,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+START_UGDIM_NAMESPACE
 
 /* constants for hashing of alloc/free requests (for debugging) */
 #define HASHTAB_SIZE  15731
@@ -154,7 +156,7 @@
 
 		if (he->ptr==ptr)
 		{
-			printf("%4d: MEMMGR-ERROR, double alloc at %p, size %ld\n",
+			printf("%4d: MEMMGR-ERROR, double alloc at %08x, size %ld\n",
 				me, ptr, (unsigned long)size);
 			exit(1);
 		}
@@ -190,7 +192,7 @@
 		}
 	}
 
-	printf("%4d: MEMMGR-ERROR, no alloc for free at %p\n", me, ptr);
+	printf("%4d: MEMMGR-ERROR, no alloc for free at %08x\n", me, ptr);
 	assert(0);
 
 	return(0); /* never reached */
@@ -222,7 +224,7 @@
 		{
 			if (he->flags==0)
 			{
-				printf("%4d: MALLOC adr=%p size=%ld\n",
+				printf("%4d: MALLOC adr=%08x size=%ld\n",
 					me, he->ptr, (unsigned long) he->size);
 			}
 		}
@@ -344,3 +346,4 @@
 	memmgr_AllocatedTMEM = 0;
 }
 
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/memmgrs/memmgr_std.c ug-patched/parallel/ddd/memmgrs/memmgr_std.c
--- ug-orig/parallel/ddd/memmgrs/memmgr_std.c	1996-12-02 13:49:58.000000000 +0100
+++ ug-patched/parallel/ddd/memmgrs/memmgr_std.c	2009-04-29 14:30:36.000000000 +0200
@@ -28,6 +28,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 
@@ -76,6 +77,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+START_UGDIM_NAMESPACE
 
 void *memmgr_AllocPMEM (size_t size)
 {
@@ -171,3 +173,4 @@
 {
 }
 
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/mgr/attr.c ug-patched/parallel/ddd/mgr/attr.c
--- ug-orig/parallel/ddd/mgr/attr.c	1996-12-02 13:49:59.000000000 +0100
+++ ug-patched/parallel/ddd/mgr/attr.c	2009-04-29 14:30:36.000000000 +0200
@@ -27,11 +27,13 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 
 #include "dddi.h"
 
+START_UGDIM_NAMESPACE
 
 /****************************************************************************/
 /*                                                                          */
@@ -61,7 +63,7 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/mgr/attr.c,v 1.1.1.1 1996/12/02 12:49:59 stefan Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 
@@ -85,4 +87,4 @@
 	/* TODO: does attr has to be told the other copies via communication?? */
 }
 
-
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/mgr/cplmgr.c ug-patched/parallel/ddd/mgr/cplmgr.c
--- ug-orig/parallel/ddd/mgr/cplmgr.c	2007-10-16 14:46:57.000000000 +0200
+++ ug-patched/parallel/ddd/mgr/cplmgr.c	2009-04-29 14:30:36.000000000 +0200
@@ -27,6 +27,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -41,7 +42,7 @@
 
 #define DebugCoupling 10  /* 10 is off */
 
-
+START_UGDIM_NAMESPACE
 
 /****************************************************************************/
 /*                                                                          */
@@ -94,7 +95,7 @@
 /****************************************************************************/
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/mgr/cplmgr.c,v 1.4 2007/10/16 12:46:57 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 
@@ -354,7 +355,7 @@
 	assert(proc!=me);
 
 #	if DebugCoupling<=1
-		sprintf(cBuffer, "%4d: AddCoupling %016llx proc=%d prio=%d\n",
+		sprintf(cBuffer, "%4d: AddCoupling %08x proc=%d prio=%d\n",
 			me, OBJ_GID(hdr), proc, prio);
 		DDD_PrintDebug(cBuffer);
 #	endif
@@ -475,7 +476,7 @@
 	assert(proc!=me);
 
 #	if DebugCoupling<=1
-		sprintf(cBuffer, "%4d: ModCoupling %016llx proc=%d prio=%d\n",
+		sprintf(cBuffer, "%4d: ModCoupling %08x proc=%d prio=%d\n",
 			me, OBJ_GID(hdr), proc, prio);
 		DDD_PrintDebug(cBuffer);
 #	endif
@@ -485,7 +486,7 @@
 	if (! ObjHasCpl(hdr))
 	{
 		/* there are no couplings for this object! */
-		sprintf(cBuffer, "no couplings for %016llx in ModCoupling", OBJ_GID(hdr));
+		sprintf(cBuffer, "no couplings for %08x in ModCoupling", OBJ_GID(hdr));
 		DDD_PrintError('E', 2530, cBuffer);
 		return(NULL);
 	}
@@ -503,7 +504,7 @@
 	}
 
 	/* coupling not found */
-	sprintf(cBuffer, "no coupling from %d for %016llx in ModCoupling",
+	sprintf(cBuffer, "no coupling from %d for %08x in ModCoupling",
 		proc, OBJ_GID(hdr));
 	DDD_PrintError('E', 2531, cBuffer);
 	HARD_EXIT;
@@ -747,7 +748,7 @@
 	COUPLING *cpl;
 	int      objIndex = OBJ_INDEX(hdr);
 
-	sprintf(cBuffer, "%4d: InfoCoupling for object %016llx (%05d/%05d)\n",
+	sprintf(cBuffer, "%4d: InfoCoupling for object %07x (%05d/%05d)\n",
 		me, OBJ_GID(hdr), objIndex, NCpl_Get);
 	DDD_PrintLine(cBuffer);
 
@@ -755,7 +756,7 @@
 	{
 		for(cpl=IdxCplList(objIndex); cpl!=NULL; cpl=CPL_NEXT(cpl))
 		{
-			sprintf(cBuffer, "%4d:    cpl %p proc=%4d prio=%4d\n",
+			sprintf(cBuffer, "%4d:    cpl %08x proc=%4d prio=%4d\n",
 				me, cpl, CPL_PROC(cpl), cpl->prio);
 			DDD_PrintLine(cBuffer);
 		}
@@ -828,6 +829,6 @@
 	FreeTmp(ddd_NCplTable,0);
 }
 
-
-
 /****************************************************************************/
+
+END_UGDIM_NAMESPACE
Nur in ug-orig/parallel/ddd/mgr: CVS.
diff -ru ug-orig/parallel/ddd/mgr/objmgr.c ug-patched/parallel/ddd/mgr/objmgr.c
--- ug-orig/parallel/ddd/mgr/objmgr.c	2007-10-16 14:46:57.000000000 +0200
+++ ug-patched/parallel/ddd/mgr/objmgr.c	2009-04-29 14:30:36.000000000 +0200
@@ -28,6 +28,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -40,6 +41,8 @@
 /* PPIF namespace: */
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
+
 /*
 #define DebugCreation
 #define DebugDeletion
@@ -80,12 +83,12 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/mgr/objmgr.c,v 1.4 2007/10/16 12:46:57 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 
 /* local unique ID count */
-static long long theIdCount;
+static int       theIdCount;
 
 
 
@@ -307,7 +310,7 @@
 
 #	ifdef DebugCreation
 	sprintf(cBuffer, "%4d: DDD_ObjNew(aSize=%d, type=%d, prio=%d, attr=%d),"
-		" ADR=%p\n",
+		" ADR=%08x\n",
 		me, aSize, aType, aPrio, aAttr, obj);
 	DDD_PrintDebug(cBuffer);
 #	endif
@@ -469,7 +472,7 @@
 	if (! IsHdrInvalid(aHdr))
 	{
 		sprintf(cBuffer,
-			"cannot initialize DDD_Object %016llx twice in DDD_Object::Init",
+			"cannot initialize DDD_Object %08x twice in DDD_Object::Init",
 				OBJ_GID(aHdr));
 		DDD_PrintError('E', 2250, cBuffer);
 		HARD_EXIT;
@@ -530,9 +533,9 @@
 	}
 
 #	ifdef DebugCreation
-	sprintf(cBuffer, "%4d: DDD_HdrConstructor(adr=%p, "
+	sprintf(cBuffer, "%4d: DDD_HdrConstructor(adr=%08x, "
 			"type=%d, prio=%d, attr=%d), "
-			"GID=%016llx  INDEX=%d\n",
+			"GID=%08x  INDEX=%d\n",
 		me, aHdr, aType, aPrio, aAttr, OBJ_GID(aHdr), OBJ_INDEX(aHdr));
 	DDD_PrintDebug(cBuffer);
 #	endif
@@ -604,9 +607,9 @@
 	int        objIndex, xfer_active = ddd_XferActive();
 
 #	ifdef DebugDeletion
-	sprintf(cBuffer, "%4d: DDD_HdrDestructor(adr=%p, "
+	sprintf(cBuffer, "%4d: DDD_HdrDestructor(adr=%08x, "
 			"typ=%d, prio=%d, attr=%d), "
-			"GID=%016llx  INDEX=%d\n",
+			"GID=%08x  INDEX=%d\n",
 		me, hdr, OBJ_TYPE(hdr), OBJ_PRIO(hdr), OBJ_ATTR(hdr),
 		OBJ_GID(hdr), OBJ_INDEX(hdr));
 	DDD_PrintDebug(cBuffer);
@@ -642,7 +645,7 @@
 			if (DDD_GetOption(OPT_WARNING_DESTRUCT_HDR)==OPT_ON)
 			{
 				sprintf(cBuffer,
-					"inconsistency by deleting gid=%016llx in DDD_HdrDestructor",
+					"inconsistency by deleting gid=%08x in DDD_HdrDestructor",
 					OBJ_GID(hdr));
 				DDD_PrintError('W', 2230, cBuffer);
 			}
@@ -870,8 +873,8 @@
 
 
 #	ifdef DebugCreation
-	sprintf(cBuffer, "%4d: DDD_HdrConstructorCopy(adr=%p, prio=%d), "
-			"GID=%016llx  INDEX=%d  ATTR=%d\n",
+	sprintf(cBuffer, "%4d: DDD_HdrConstructorCopy(adr=%08x, prio=%d), "
+			"GID=%08x  INDEX=%d  ATTR=%d\n",
 		me, newhdr, prio, OBJ_GID(newhdr), OBJ_INDEX(newhdr), OBJ_ATTR(newhdr));
 	DDD_PrintDebug(cBuffer);
 #	endif
@@ -966,7 +969,7 @@
 	int  i;
 
 #	ifdef DebugCreation
-	sprintf(cBuffer, "%4d: CopyByMask(%s, size=%d, to=%p, from=%p)\n",
+	sprintf(cBuffer, "%4d: CopyByMask(%s, size=%d, to=%08x, from=%08x)\n",
 		me, desc->name, desc->size, target, source);
 	DDD_PrintDebug(cBuffer);
 #	endif
@@ -1003,8 +1006,8 @@
 	}
 
 #	ifdef DebugCreation
-	sprintf(cBuffer, "%4d: ObjCopyGlobalData(%p <- %p, size=%d),"
-		" TYP=%d  GID=%016llx  INDEX=%d\n",
+	sprintf(cBuffer, "%4d: ObjCopyGlobalData(%08x <- %08x, size=%d),"
+		" TYP=%d  GID=%08x  INDEX=%d\n",
 		me, OBJ2HDR(target,desc), source, size,
 		OBJ_TYPE(OBJ2HDR(target,desc)),
 		OBJ_GID(OBJ2HDR(target,desc)),
@@ -1027,7 +1030,8 @@
 	hdr->attr  = (unsigned char) *source++;
 	hdr->flags = (unsigned char) *source++;
 	source 	  += sizeof (unsigned int);	/* myIndex is local */
-	hdr->gid   = *((unsigned long long *)source); source += sizeof (unsigned long long);
+	hdr->gid   = *((unsigned int *)source); source += sizeof (unsigned int);
+	source    += 4;						/* is local */
 	
 	/* Copy the data */
 	for (i = 0; i < desc->nElements; i++)
@@ -1047,8 +1051,8 @@
     MsgToObj (desc, target, (char *) source);
 
 #	ifdef DebugCreation
-	sprintf(cBuffer, "%4d: ObjCopyGlobalData(%p <- %p),"
-		" TYP=%d  GID=%016llx  INDEX=%d\n",
+	sprintf(cBuffer, "%4d: ObjCopyGlobalData(%08x <- %08x),"
+		" TYP=%d  GID=%08x  INDEX=%d\n",
 		me, OBJ2HDR(target,desc), source,
 		OBJ_TYPE(OBJ2HDR(target,desc)),
 		OBJ_GID(OBJ2HDR(target,desc)),
@@ -1117,3 +1121,4 @@
 
 /****************************************************************************/
 
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/mgr/prio.c ug-patched/parallel/ddd/mgr/prio.c
--- ug-orig/parallel/ddd/mgr/prio.c	2007-10-16 14:46:57.000000000 +0200
+++ ug-patched/parallel/ddd/mgr/prio.c	2009-04-29 14:30:36.000000000 +0200
@@ -26,6 +26,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -37,6 +38,8 @@
 /* PPIF namespace: */
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
+
 /****************************************************************************/
 /*                                                                          */
 /* defines in the following order                                           */
@@ -82,7 +85,7 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/mgr/prio.c,v 1.4 2007/10/16 12:46:57 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 
@@ -115,7 +118,7 @@
 
 
 #	ifdef LogObjects
-		sprintf(cBuffer, "%4d: LOG DDD_PrioritySet %016llx old=%d new=%d\n",
+		sprintf(cBuffer, "%4d: LOG DDD_PrioritySet %08x old=%d new=%d\n",
 			me, OBJ_GID(hdr), OBJ_PRIO(hdr), prio);
 		DDD_PrintDebug(cBuffer);
 #	endif
@@ -143,7 +146,7 @@
 			if (DDD_GetOption(OPT_WARNING_PRIOCHANGE)==OPT_ON)
 			{
 				sprintf(cBuffer,
-					"creating inconsistency for gid=%016llx in DDD_PrioritySet",
+					"creating inconsistency for gid=%08x in DDD_PrioritySet",
 					OBJ_GID(hdr));
 				DDD_PrintError('W', 2300, cBuffer);
 			}
@@ -533,7 +536,6 @@
 }
 #undef FUNCNAME
 
-
-
 /****************************************************************************/
 
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/mgr/typemgr.c ug-patched/parallel/ddd/mgr/typemgr.c
--- ug-orig/parallel/ddd/mgr/typemgr.c	2007-10-16 14:46:57.000000000 +0200
+++ ug-patched/parallel/ddd/mgr/typemgr.c	2009-04-29 15:11:55.000000000 +0200
@@ -32,6 +32,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdarg.h>
@@ -44,6 +45,8 @@
 /* PPIF namespace: */
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
+
 /*
 #define DebugTypeDefine
 #define DebugCopyMask
@@ -114,7 +117,7 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/mgr/typemgr.c,v 1.4 2007/10/16 12:46:57 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 
@@ -165,7 +168,7 @@
 	error occurred during TypeDefine for desc, with argument argno
 */
 
-static char *RegisterError (TYPE_DESC *desc, int argno, char *txt)
+static char *RegisterError (TYPE_DESC *desc, int argno, const char *txt)
 {
 	if (argno==0)
 	{
@@ -969,7 +972,7 @@
 #if defined(F_FRONTEND) || defined(CPP_FRONTEND)
 				if (CPP_ARRAY(desc) CPP_AND TRUE)
 				{
-					sprintf(cBuffer,"    DAT, %p, %06d\n",
+					sprintf(cBuffer,"    DAT, %08x, %06d\n",
 						argp, argsize);
 				}
 #endif
@@ -1067,7 +1070,7 @@
 						if (i==ERROR) HARD_EXIT; /* return; */
 
 						#ifdef DebugTypeDefine
-						sprintf(cBuffer,"    %3d, %p, %06d\n",
+						sprintf(cBuffer,"    %3d, %08x, %06d\n",
 							argtyp, argp, theTypeDefs[argtyp].size);
 						DDD_PrintDebug(cBuffer);
 						#endif
@@ -1175,10 +1178,10 @@
 /****************************************************************************/
 
 #ifdef C_FRONTEND
-DDD_TYPE DDD_TypeDeclare (char *name)
+DDD_TYPE DDD_TypeDeclare(const char *name)
 #endif
 #ifdef CPP_FRONTEND
-DDD_TYPE DDD_Library::TypeDeclareStruct (char *name)
+DDD_TYPE DDD_Library::TypeDeclareStruct(const char *name)
 #endif
 #if defined(C_FRONTEND) || defined(CPP_FRONTEND)
 {
@@ -1323,9 +1326,9 @@
 #if defined(C_FRONTEND) || defined(CPP_FRONTEND)
 		if (CPP_STRUCT(desc) CPP_AND TRUE)
 		{
-    		sprintf(cBuffer, "/ Structure of %s--object '%s', id %d, %ld byte\n",
+    		sprintf(cBuffer, "/ Structure of %s--object '%s', id %d, %d byte\n",
 				desc->hasHeader ? "DDD" : "data",
-				desc->name, id, (long)desc->size);
+				desc->name, id, desc->size);
 		}
 #endif
 #if defined(F_FRONTEND) || defined(CPP_FRONTEND)
@@ -1371,7 +1374,7 @@
 				e->offset < desc->offsetHeader ||
 				e->offset >= desc->offsetHeader+theTypeDefs[EL_DDDHDR].size)
 			{
-        		sprintf(cBuffer, "|%5d %5ld    ", e->offset, (long)e->size);
+        		sprintf(cBuffer, "|%5d %5d    ", e->offset, e->size);
 
 
 				/* print one line according to type */
@@ -1424,8 +1427,8 @@
 				/* handle included DDD_HDR */
 				if (e->offset == desc->offsetHeader)
 				{
-        			sprintf(cBuffer, "|%5d %5ld    ddd-header\n",
-							e->offset, (long)theTypeDefs[EL_DDDHDR].size);
+        			sprintf(cBuffer, "|%5d %5d    ddd-header\n",
+						e->offset, theTypeDefs[EL_DDDHDR].size);
 					DDD_PrintLine(cBuffer);
 				}
 			}
@@ -1839,7 +1842,6 @@
 	}
 }
 
-
-
-
 /****************************************************************************/
+
+END_UGDIM_NAMESPACE
Nur in ug-orig/parallel/ddd/prio: CVS.
diff -ru ug-orig/parallel/ddd/prio/pcmds.c ug-patched/parallel/ddd/prio/pcmds.c
--- ug-orig/parallel/ddd/prio/pcmds.c	2007-10-16 14:46:58.000000000 +0200
+++ ug-patched/parallel/ddd/prio/pcmds.c	2009-04-29 15:11:55.000000000 +0200
@@ -28,6 +28,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h> 
 #include <stdio.h>
 #include <string.h>
@@ -35,6 +36,7 @@
 
 #include "dddi.h"
 
+START_UGDIM_NAMESPACE 
 
 #define DebugPrio     10   /* 0 is all, 10 is off */
 
@@ -114,7 +116,7 @@
 /****************************************************************************/
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/prio/pcmds.c,v 1.2 2007/10/16 12:46:58 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 /* one instance of PRIO_GLOBALS */
 static PRIO_GLOBALS prioGlobals;
@@ -137,7 +139,7 @@
 	and recovery.
 */
 
-char *PrioModeName (int mode)
+const char *PrioModeName (int mode)
 {
 	switch(mode)
 	{
@@ -273,7 +275,7 @@
 
 
 #	if DebugPrio<=2
-		sprintf(cBuffer, "%4d: DDD_PrioChange %016llx, old_prio=%d. new_prio=%d\n",
+		sprintf(cBuffer, "%4d: DDD_PrioChange %08x, old_prio=%d. new_prio=%d\n",
 			me, OBJ_GID(hdr), old_prio, OBJ_PRIO(hdr));
 		DDD_PrintDebug(cBuffer);
 #	endif
@@ -290,7 +292,7 @@
 static int GatherPrio (DDD_HDR obj, void *data, DDD_PROC proc, DDD_PRIO prio)
 {
 #	if DebugPrio<=1
-		sprintf(cBuffer, "%4d: DDD_PrioEnd/GatherPrio %016llx, prio=%d. Send to copy on proc %3d/p%d)\n",
+		sprintf(cBuffer, "%4d: DDD_PrioEnd/GatherPrio %08x, prio=%d. Send to copy on proc %3d/p%d)\n",
 			me, OBJ_GID(obj), OBJ_PRIO(obj), proc, prio);
 		DDD_PrintDebug(cBuffer);
 #	endif
@@ -307,7 +309,7 @@
 	if (real_prio!=prio)
 	{
 #		if DebugPrio<=1
-			sprintf(cBuffer, "%4d: DDD_PrioEnd/ScatterPrio %016llx/%d, "
+			sprintf(cBuffer, "%4d: DDD_PrioEnd/ScatterPrio %08x/%d, "
 					"copy on proc %3d/p%d changed prio %d -> %d\n",
 				me, OBJ_GID(obj), OBJ_PRIO(obj),
 				proc, prio, prio, real_prio);
@@ -319,7 +321,7 @@
 #	if DebugPrio<=1
 	else
 	{
-		sprintf(cBuffer, "%4d: DDD_PrioEnd/ScatterPrio %016llx/%d, "
+		sprintf(cBuffer, "%4d: DDD_PrioEnd/ScatterPrio %08x/%d, "
 				"copy on proc %3d/p%d keeps prio %d\n",
 			me, OBJ_GID(obj), OBJ_PRIO(obj),
 			proc, prio, prio);
@@ -417,3 +419,4 @@
 
 /****************************************************************************/
 
+END_UGDIM_NAMESPACE 
diff -ru ug-orig/parallel/ddd/xfer/cmdmsg.c ug-patched/parallel/ddd/xfer/cmdmsg.c
--- ug-orig/parallel/ddd/xfer/cmdmsg.c	2007-10-16 14:46:58.000000000 +0200
+++ ug-patched/parallel/ddd/xfer/cmdmsg.c	2009-04-29 15:11:55.000000000 +0200
@@ -31,6 +31,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -45,6 +46,8 @@
 USING_UG_NAMESPACE
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
+
 /****************************************************************************/
 /*                                                                          */
 /* data structures                                                          */
@@ -77,7 +80,7 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/xfer/cmdmsg.c,v 1.4 2007/10/16 12:46:58 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 
@@ -345,7 +348,7 @@
 				SET_OBJ_RESENT(localCplObjs[iLCO], 0);
 
 #				if DebugCmdMsg<=0
-					sprintf(cBuffer,"%4d: PruneDelCmds. %016llx without resent1.\n", me, OBJ_GID(localCplObjs[iLCO]));
+					sprintf(cBuffer,"%4d: PruneDelCmds. %08x without resent1.\n", me, OBJ_GID(localCplObjs[iLCO]));
 					DDD_PrintDebug(cBuffer);
 #				endif
 
@@ -357,7 +360,7 @@
 				SET_OBJ_RESENT(localCplObjs[iLCO], 1);
 
 #				if DebugCmdMsg<=1
-					sprintf(cBuffer,"%4d: PruneDelCmds. %016llx will be resent.\n", me, OBJ_GID(localCplObjs[iLCO]));
+					sprintf(cBuffer,"%4d: PruneDelCmds. %08x will be resent.\n", me, OBJ_GID(localCplObjs[iLCO]));
 					DDD_PrintDebug(cBuffer);
 #				endif
 
@@ -371,7 +374,7 @@
 			SET_OBJ_RESENT(localCplObjs[iLCO], 0);
 
 #			if DebugCmdMsg<=0
-				sprintf(cBuffer,"%4d: PruneDelCmds. %016llx without resent2.\n", me, OBJ_GID(localCplObjs[iLCO]));
+				sprintf(cBuffer,"%4d: PruneDelCmds. %08x without resent2.\n", me, OBJ_GID(localCplObjs[iLCO]));
 				DDD_PrintDebug(cBuffer);
 #			endif
 
@@ -397,7 +400,7 @@
 			SET_OBJ_PRUNED(itemsDC[iDC]->hdr, 1);
 
 #			if DebugCmdMsg<=1
-				sprintf(cBuffer,"%4d: PruneDelCmds. pruned %016llx\n", me, gidDC);
+				sprintf(cBuffer,"%4d: PruneDelCmds. pruned %08x\n", me, gidDC);
 				DDD_PrintDebug(cBuffer);
 #			endif
 		}
@@ -424,7 +427,7 @@
 /****************************************************************************/
 
 
-static void CmdMsgDisplay (char *comment, LC_MSGHANDLE xm)
+static void CmdMsgDisplay (const char *comment, LC_MSGHANDLE xm)
 {
 	DDD_GID      *theGid;
 	char         buf[30];
@@ -442,8 +445,8 @@
 
 	for(i=0; i<lenGid; i++)
 	{
-		sprintf(cBuffer, "%s 14 gid    %04d - %016llx\n",
-			buf, i, theGid[i]);
+		sprintf(cBuffer, "%s 14 gid    %04d - %08x\n",
+			buf, i, (unsigned long)theGid[i]);
 		DDD_PrintDebug(cBuffer);
 	}
 }
@@ -532,3 +535,4 @@
 
 /****************************************************************************/
 
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/xfer/cmds.c ug-patched/parallel/ddd/xfer/cmds.c
--- ug-orig/parallel/ddd/xfer/cmds.c	2008-06-09 19:38:44.000000000 +0200
+++ ug-patched/parallel/ddd/xfer/cmds.c	2009-04-29 14:30:36.000000000 +0200
@@ -30,6 +30,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h> 
 #include <stdio.h>
 #include <string.h>
@@ -42,6 +43,8 @@
 USING_UG_NAMESPACE
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
+
 /****************************************************************************/
 /*                                                                          */
 /* data structures                                                          */
@@ -83,7 +86,7 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/xfer/cmds.c,v 1.5 2008/06/09 17:38:44 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 /****************************************************************************/
@@ -315,7 +318,7 @@
 		&nSegms, &nItems, &nNodes, &memAllocated, &memUsed);
 	if (nSegms>0) {
 		printf("%4d: XferEnd, XICopyObj "
-			"segms=%d items=%d nodes=%d allocated=%ld used=%ld\n",
+			"segms=%d items=%d nodes=%ld allocated=%ld used=%ld\n",
 			me, nSegms, nItems, nNodes, (long)memAllocated, (long)memUsed);
 	}
 
@@ -340,7 +343,7 @@
 		&nSegms, &nItems, &nNodes, &memAllocated, &memUsed);
 	if (nSegms>0) {
 		printf("%4d: XferEnd, XISetPrio "
-			"segms=%d items=%d nodes=%d allocated=%ld used=%ld\n",
+			"segms=%d items=%d nodes=%ld allocated=%ld used=%ld\n",
 			me, nSegms, nItems, nNodes, (long)memAllocated, (long)memUsed);
 	}
 
@@ -908,8 +911,6 @@
 @param prio new priority of that local object.
 */
 
-
-
 void DDD_XferPrioChange (DDD_HDR hdr, DDD_PRIO prio)
 {
 	XISetPrio *xi = XISetPrioSet_NewItem(xferGlobals.setXISetPrio);
@@ -921,7 +922,7 @@
 		return;
 
 #	if DebugXfer<=2
-		sprintf(cBuffer, "%4d: DDD_XferPrioChange %016llx, prio=%d\n",
+		sprintf(cBuffer, "%4d: DDD_XferPrioChange %08x, prio=%d\n",
 			me, OBJ_GID(hdr), prio);
 		DDD_PrintDebug(cBuffer);
 #	endif
@@ -943,7 +944,7 @@
 
 	if (dest>=procs)
 	{
-		sprintf(cBuffer, "cannot transfer %016llx to processor %d (procs=%d)",
+		sprintf(cBuffer, "cannot transfer %08x to processor %d (procs=%d)",
 			OBJ_GID(hdr), dest, procs);
 		DDD_PrintError('E', 6003, cBuffer);
 		HARD_EXIT;
@@ -1124,7 +1125,7 @@
 	TYPE_DESC *desc =  &(theTypeDefs[OBJ_TYPE(hdr)]);
 
 #	if DebugXfer<=2
-		sprintf(cBuffer, "%4d: DDD_XferCopyObj %016llx, proc=%d prio=%d\n",
+		sprintf(cBuffer, "%4d: DDD_XferCopyObj %08x, proc=%d prio=%d\n",
 			me, OBJ_GID(hdr), proc, prio);
 		DDD_PrintDebug(cBuffer);
 #	endif
@@ -1142,7 +1143,7 @@
 	DDD_HDR	   hdr = OBJ2HDR(*obj,desc);
 
 #	if DebugXfer<=2
-		sprintf(cBuffer, "%4d: DDD_XferCopyObj %016llx(%d), proc=%d prio=%d\n",
+		sprintf(cBuffer, "%4d: DDD_XferCopyObj %08x(%d), proc=%d prio=%d\n",
 			me, OBJ_GID(hdr), *obj, *proc, *prio);
 		DDD_PrintDebug(cBuffer);
 #	endif
@@ -1185,7 +1186,7 @@
 	TYPE_DESC *desc =  &(theTypeDefs[OBJ_TYPE(hdr)]);
 
 #	if DebugXfer<=2
-		sprintf(cBuffer, "%4d: DDD_XferCopyObjX %016llx, proc=%d prio=%d size=%d\n",
+		sprintf(cBuffer, "%4d: DDD_XferCopyObjX %08x, proc=%d prio=%d size=%d\n",
 			me, OBJ_GID(hdr), proc, prio, size);
 		DDD_PrintDebug(cBuffer);
 #	endif
@@ -1322,8 +1323,7 @@
 	{
 		/* copy sizes array */
 		xa->sizes = AddDataAllocSizes(cnt);
-		//memcpy(xa->sizes, sizes, sizeof(int)*cnt);
-		for (i=0; i<cnt; i++) xa->sizes[i] = sizes[i];
+		memcpy(xa->sizes, sizes, sizeof(int)*cnt);
 
 		/* normal dependent object */
 		descDepTyp =  &(theTypeDefs[typ]);
@@ -1422,7 +1422,7 @@
 	dc->hdr = hdr;
 
 #	if DebugXfer<=2
-		sprintf(cBuffer,"%4d: DDD_XferDeleteObj %016llx\n",
+		sprintf(cBuffer,"%4d: DDD_XferDeleteObj %08x\n",
 			me, OBJ_GID(hdr));
 		DDD_PrintDebug(cBuffer);
 #	endif
@@ -1455,7 +1455,7 @@
 
 
 #	if DebugXfer<=2
-		sprintf(cBuffer,"%4d: DDD_XferDeleteObj %016llx(%d)\n",
+		sprintf(cBuffer,"%4d: DDD_XferDeleteObj %08x(%d)\n",
 			me, OBJ_GID(hdr), *obj);
 		DDD_PrintDebug(cBuffer);
 #	endif
@@ -1615,3 +1615,5 @@
 #undef _FADR
 
 /****************************************************************************/
+
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/xfer/cplmsg.c ug-patched/parallel/ddd/xfer/cplmsg.c
--- ug-orig/parallel/ddd/xfer/cplmsg.c	2008-04-02 19:04:41.000000000 +0200
+++ ug-patched/parallel/ddd/xfer/cplmsg.c	2009-04-29 15:11:55.000000000 +0200
@@ -28,6 +28,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 
@@ -39,6 +40,8 @@
 USING_UG_NAMESPACE
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
+
 /****************************************************************************/
 /*                                                                          */
 /* data structures                                                          */
@@ -78,7 +81,7 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/xfer/cplmsg.c,v 1.5 2008/04/02 17:04:41 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 
@@ -263,19 +266,17 @@
 		/* copy data into message */
 		for(i=0; i<m->nDelCpl; i++)
 		{
-			//arrayDC[i] = m->xferDelCpl[i]->te;
-			memcpy(&(arrayDC[i]), &(m->xferDelCpl[i]->te), sizeof(TEDelCpl));
+			arrayDC[i] = m->xferDelCpl[i]->te;
 		}
 		for(i=0; i<m->nModCpl; i++)
 		{
-			//arrayMC[i] = m->xferModCpl[i]->te;
-			memcpy(&(arrayMC[i]), &(m->xferModCpl[i]->te), sizeof(TEModCpl));
+			arrayMC[i] = m->xferModCpl[i]->te;
 
 #			ifdef SLL_DebugNew
 			{
 				XIModCpl *mc = m->xferModCpl[i];
 
-				sprintf(cBuffer, "%4d: send modcpl to %d (%016llx, %3d)  %s:%d\n",
+				sprintf(cBuffer, "%4d: send modcpl to %d (%08x, %3d)  %s:%d\n",
 					me, m->proc,
 					mc->te.gid, mc->te.prio, mc->sll_file, mc->sll_line);
 				DDD_PrintDebug(cBuffer);
@@ -284,8 +285,7 @@
 		}
 		for(i=0; i<m->nAddCpl; i++)
 		{
-			//arrayAC[i] = m->xferAddCpl[i]->te;
-			memcpy(&(arrayAC[i]), &(m->xferAddCpl[i]->te), sizeof(TEAddCpl));
+			arrayAC[i] = m->xferAddCpl[i]->te;
 		}
 
 		/* schedule message for send */
@@ -359,7 +359,7 @@
 /****************************************************************************/
 
 
-static void CplMsgDisplay (char *comment, LC_MSGHANDLE xm)
+static void CplMsgDisplay (const char *comment, LC_MSGHANDLE xm)
 {
 	TEDelCpl     *theDelCpl;
 	TEModCpl     *theModCpl;
@@ -388,21 +388,21 @@
 
 	for(i=0; i<lenDelCpl; i++)
 	{
-		sprintf(cBuffer, "%s 14 delcpl %04d - %016llx\n",
+		sprintf(cBuffer, "%s 14 delcpl %04d - %08x\n",
 			buf, i, theDelCpl[i].gid);
 		DDD_PrintDebug(cBuffer);
 	}
 
 	for(i=0; i<lenModCpl; i++)
 	{
-		sprintf(cBuffer, "%s 15 modcpl %04d - %016llx %3d\n",
+		sprintf(cBuffer, "%s 15 modcpl %04d - %08x %3d\n",
 			buf, i, theModCpl[i].gid, theModCpl[i].prio);
 		DDD_PrintDebug(cBuffer);
 	}
 
 	for(i=0; i<lenAddCpl; i++)
 	{
-		sprintf(cBuffer, "%s 16 addcpl %04d - %016llx %4d %3d\n",
+		sprintf(cBuffer, "%s 16 addcpl %04d - %08x %4d %3d\n",
 			buf, i, theAddCpl[i].gid, theAddCpl[i].proc, theAddCpl[i].prio);
 		DDD_PrintDebug(cBuffer);
 	}
@@ -504,3 +504,4 @@
 
 /****************************************************************************/
 
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/xfer/ctrl.c ug-patched/parallel/ddd/xfer/ctrl.c
--- ug-orig/parallel/ddd/xfer/ctrl.c	2007-10-16 14:46:58.000000000 +0200
+++ ug-patched/parallel/ddd/xfer/ctrl.c	2009-04-29 15:11:55.000000000 +0200
@@ -27,6 +27,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 
@@ -35,6 +36,8 @@
 
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE 
+
 /* #define DebugAllPointers */
 
 
@@ -46,7 +49,7 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/xfer/ctrl.c,v 1.3 2007/10/16 12:46:58 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 /****************************************************************************/
@@ -109,8 +112,8 @@
 						/* get corresponding symtab entry */
 						SYMTAB_ENTRY *st = &(theSymTab[stIdx]);
 
-						sprintf(cBuffer, "%s 20        obj=%03d %03d st=%p"
-							" gid=%016llx (%p==%p)\n",
+						sprintf(cBuffer, "%s 20        obj=%03d %03d st=%08x"
+							" gid=%08x (%08x==%08x)\n",
 							buf, theObjTab[i].offset, stIdx,
 							st, st->gid, st->adr.hdr, st->adr.ref);
 						DDD_PrintDebug(cBuffer);
@@ -123,7 +126,7 @@
 #endif
 
 
-void XferDisplayMsg (char *comment, LC_MSGHANDLE xm)
+void XferDisplayMsg (const char *comment, LC_MSGHANDLE xm)
 {
 	SYMTAB_ENTRY *theSymTab;
 	OBJTAB_ENTRY *theObjTab;
@@ -178,16 +181,16 @@
 #if defined(C_FRONTEND) || defined(CPP_FRONTEND)
 		DDD_OBJ obj = OTE_OBJ(theObjects, &(theObjTab[i]));
 
-        sprintf(cBuffer, "%s 10 objtab    %06ld typ=%1d gid=%016llx "
-				"hdr=%p size=%05ld add=%05d\n",
-				buf, (long)(((char *)obj)-theObjects), OTE_TYPE(theObjects,&(theObjTab[i])),
+        sprintf(cBuffer, "%s 10 objtab    %06d typ=%1d gid=%08x "
+				"hdr=%08x size=%05d add=%05d\n",
+			buf, (((char *)obj)-theObjects), OTE_TYPE(theObjects,&(theObjTab[i])),
 			OTE_GID(theObjects,&(theObjTab[i])),
-				theObjTab[i].hdr, (long)theObjTab[i].size, theObjTab[i].addLen);
+			theObjTab[i].hdr, theObjTab[i].size, theObjTab[i].addLen);
 #else
 		DDD_HDR hdr = (DDD_HDR)(theObjects + theObjTab[i].offset);
 
-        sprintf(cBuffer, "%s 10 objtab    %06d typ=%1d gid=%016llx "
-				"hdr=%p size=%05d add=%05d\n",
+        sprintf(cBuffer, "%s 10 objtab    %06d typ=%1d gid=%08x "
+				"hdr=%08x size=%05d add=%05d\n",
 			buf, theObjTab[i].offset, theObjTab[i].typ,
 			OBJ_GID(hdr),
 			theObjTab[i].hdr, theObjTab[i].size, theObjTab[i].addLen);
@@ -197,7 +200,7 @@
 
 	for(i=0; i<lenSymTab; i++)
 	{
-		sprintf(cBuffer, "%s 11 symtab %04d - %016llx (%p==%p)\n",
+		sprintf(cBuffer, "%s 11 symtab %04d - %08x (%08x==%08x)\n",
 			buf, i,
 			theSymTab[i].gid, theSymTab[i].adr.hdr, theSymTab[i].adr.ref);
 		DDD_PrintDebug(cBuffer);
@@ -205,7 +208,7 @@
 
 	for(i=0; i<lenNewCpl; i++)
 	{
-		sprintf(cBuffer, "%s 12 newcpl %04d - %016llx %4d %4d\n",
+		sprintf(cBuffer, "%s 12 newcpl %04d - %08x %4d %4d\n",
 			buf, i,
 			NewCpl_GetGid(theNewCpl[i]),
 			NewCpl_GetDest(theNewCpl[i]),
@@ -215,7 +218,7 @@
 
 	for(i=0; i<lenOldCpl; i++)
 	{
-		sprintf(cBuffer, "%s 13 oldcpl %04d - %016llx %4d %4d\n",
+		sprintf(cBuffer, "%s 13 oldcpl %04d - %08x %4d %4d\n",
 			buf, i,
 			theOldCpl[i].gid, theOldCpl[i].proc, theOldCpl[i].prio);
 		DDD_PrintDebug(cBuffer);
@@ -226,9 +229,4 @@
 #	endif
 }
 
-
-
-
-
-
-
+END_UGDIM_NAMESPACE 
Nur in ug-orig/parallel/ddd/xfer: CVS.
diff -ru ug-orig/parallel/ddd/xfer/pack.c ug-patched/parallel/ddd/xfer/pack.c
--- ug-orig/parallel/ddd/xfer/pack.c	2008-04-02 19:02:40.000000000 +0200
+++ ug-patched/parallel/ddd/xfer/pack.c	2009-04-29 14:30:36.000000000 +0200
@@ -27,6 +27,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -39,6 +40,8 @@
 
 USING_UG_NAMESPACE
 
+START_UGDIM_NAMESPACE
+
 /****************************************************************************/
 /*                                                                          */
 /* defines in the following order                                           */
@@ -89,7 +92,7 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/xfer/pack.c,v 1.3 2008/04/02 17:02:40 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 
@@ -614,19 +617,18 @@
 		}
 	}
 
+
 	/* for all XINewCpl items in this message */
 	for(i=0; i<msg->nNewCpl; i++)
 	{
-		//theNewCpl[actNewCpl]  = msg->xferNewCpl[i]->te;
-		memcpy(&(theNewCpl[actNewCpl]), &(msg->xferNewCpl[i]->te), sizeof(TENewCpl));
+		theNewCpl[actNewCpl]  = msg->xferNewCpl[i]->te;
 		actNewCpl++;
 	}
 
 	/* for all XIOldCpl items in this message */
 	for(i=0; i<msg->nOldCpl; i++)
 	{
-		//theOldCpl[actOldCpl]  = msg->xferOldCpl[i]->te;
-		memcpy(&(theOldCpl[actOldCpl]), &(msg->xferOldCpl[i]->te), sizeof(TEOldCpl));
+		theOldCpl[actOldCpl]  = msg->xferOldCpl[i]->te;
 		actOldCpl++;
 	}
 
@@ -769,7 +771,7 @@
 
 #undef _FADR
 
-
 /****************************************************************************/
 
 
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/xfer/sll.h ug-patched/parallel/ddd/xfer/sll.h
--- ug-orig/parallel/ddd/xfer/sll.h	1998-09-22 15:27:53.000000000 +0200
+++ ug-patched/parallel/ddd/xfer/sll.h	1998-09-22 15:28:02.000000000 +0200
@@ -18,7 +18,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/parallel/ddd/xfer/sll.h,v 1.1.1.6 1998/09/22 13:27:53 birken Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/parallel/ddd/xfer/supp.c ug-patched/parallel/ddd/xfer/supp.c
--- ug-orig/parallel/ddd/xfer/supp.c	2007-10-16 14:46:58.000000000 +0200
+++ ug-patched/parallel/ddd/xfer/supp.c	2009-04-29 14:30:36.000000000 +0200
@@ -28,14 +28,13 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <assert.h>
 
-
 #include "dddi.h"
 
-
 USING_UG_NAMESPACE
 
 /*
@@ -48,6 +47,7 @@
 */
 #define _CHECKALLOC(ptr)   if (ptr==NULL) return(NULL)
 
+START_UGDIM_NAMESPACE 
 
 static int TmpMem_kind = TMEM_ANY;
 
@@ -73,10 +73,11 @@
 void *xfer_AllocHeap (size_t);
 void xfer_FreeHeap (void *);
 
+END_UGDIM_NAMESPACE
 
 #include "xfer.h"
 
-
+START_UGDIM_NAMESPACE
 
 #ifdef XferMemFromHeap
 void *xfer_AllocHeap (size_t size)
@@ -172,14 +173,13 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/xfer/supp.c,v 1.3 2007/10/16 12:46:58 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 static AddDataSegm *segmAddData = NULL;
 static SizesSegm   *segmSizes   = NULL;
 
 
-
 /****************************************************************************/
 /*                                                                          */
 /* class member function implementations                                    */
@@ -237,7 +237,7 @@
 
 void Method(Print) (ParamThis  _PRINTPARAMS)
 {
-	fprintf(fp, "XICopyObj dest=%d gid=%016llx prio=%d\n",
+	fprintf(fp, "XICopyObj dest=%d gid=%08x prio=%d\n",
 		This->dest, This->gid, This->prio);
 }
 
@@ -297,7 +297,7 @@
 
 void Method(Print) (ParamThis  _PRINTPARAMS)
 {
-	fprintf(fp, "XISetPrio gid=%016llx prio=%d\n", This->gid, This->prio);
+	fprintf(fp, "XISetPrio gid=%08x prio=%d\n", This->gid, This->prio);
 }
 
 #undef ClassName
@@ -506,3 +506,4 @@
 
 /****************************************************************************/
 
+END_UGDIM_NAMESPACE 
diff -ru ug-orig/parallel/ddd/xfer/unpack.c ug-patched/parallel/ddd/xfer/unpack.c
--- ug-orig/parallel/ddd/xfer/unpack.c	2007-10-16 14:46:58.000000000 +0200
+++ ug-patched/parallel/ddd/xfer/unpack.c	2009-04-29 14:30:36.000000000 +0200
@@ -28,6 +28,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -42,6 +43,7 @@
 USING_UG_NAMESPACE
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
 
 /* TODO kb 961210
 #define DEBUG_MERGE_MODE
@@ -119,7 +121,7 @@
 /****************************************************************************/
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/xfer/unpack.c,v 1.4 2007/10/16 12:46:58 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 
@@ -280,7 +282,7 @@
 					/* if we are in merge_mode, we do not update
 					   existing references. */
 					#ifdef DEBUG_MERGE_MODE
-					printf("%4d: loc-merge curr=%016llx keep     e=%d l=%d\n",
+					printf("%4d: loc-merge curr=%08x keep     e=%d l=%d\n",
 						me, OBJ_GID(OBJ2HDR(*ref,refdesc)), e,l);
 					#endif
 
@@ -298,8 +300,8 @@
 						if (theSymTab[stIdx].adr.hdr!=OBJ2HDR(*ref,refdesc))
 						{
 							sprintf(cBuffer,
-								"reference collision in %016llx "
-								"(old=%016llx, inc=%016llx) in LocalizeObject\n",
+								"reference collision in %08x "
+								"(old=%08x, inc=%08x) in LocalizeObject\n",
 								OBJ_GID(OBJ2HDR(obj,desc)),
 								OBJ_GID(OBJ2HDR(*ref,refdesc)),
 								OBJ_GID(theSymTab[stIdx].adr.hdr));
@@ -512,7 +514,7 @@
 			chunk += CEIL(sizeof(int)*addCnt);
 			for(i=0, adr=chunk; i<addCnt; i++)
 			{
-				table[i] = ((INT)table[i])+adr;
+				table[i] = ((long int)table[i])+adr;
 
 				/* insert pointers into copy using SymTab */
 				if (addTyp<DDD_USER_DATA || addTyp>DDD_USER_DATA_MAX)
@@ -595,7 +597,7 @@
 			{
 #				if DebugUnpack<=1
 					sprintf(cBuffer, "%4d: NewPrio wins due to PruneDel. "
-						"%016llx\n", me, OBJ_GID(ote->hdr));
+						"%08x\n", me, OBJ_GID(ote->hdr));
 					DDD_PrintDebug(cBuffer);
 #				endif
 
@@ -662,7 +664,7 @@
 			DDD_PRIO new_prio = OBJ_PRIO(ote->hdr);
 
 #			if DebugUnpack<=1
-				sprintf(cBuffer, "%4d: NewObject       %016llx, prio=%d\n",me,
+				sprintf(cBuffer, "%4d: NewObject       %08x, prio=%d\n",me,
 					OBJ_GID(ote->hdr), new_prio);
 				DDD_PrintDebug(cBuffer);
 #			endif
@@ -1259,7 +1261,7 @@
 			if (desc->nPointers>0)
 			{
 				#ifdef DEBUG_MERGE_MODE
-				printf("%4d: LocalizeObject in merge_mode, %016llx prio %d\n",
+				printf("%4d: LocalizeObject in merge_mode, %08x prio %d\n",
 					me, OBJ_GID(theObjTab[i].hdr), OBJ_PRIO(theObjTab[i].hdr));
 				#endif
 
@@ -1737,7 +1739,7 @@
 #	if DebugUnpack<=2
 		for(i=0; i<nNewCpl; i++)
 		{
-			sprintf(cBuffer, "%4d: TAB allNewCpl %016llx on %4d/%d\n",me,
+			sprintf(cBuffer, "%4d: TAB allNewCpl %08x on %4d/%d\n",me,
 				NewCpl_GetGid(allNewCpl[i]),NewCpl_GetDest(allNewCpl[i]),NewCpl_GetPrio(allNewCpl[i]));
 			DDD_PrintDebug(cBuffer);
 		}
@@ -1873,4 +1875,4 @@
 
 /****************************************************************************/
 
-
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/ddd/xfer/xfer.c ug-patched/parallel/ddd/xfer/xfer.c
--- ug-orig/parallel/ddd/xfer/xfer.c	2007-10-16 14:46:58.000000000 +0200
+++ ug-patched/parallel/ddd/xfer/xfer.c	2009-04-29 15:11:55.000000000 +0200
@@ -31,6 +31,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -41,6 +42,7 @@
 
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE 
 
 /****************************************************************************/
 /*                                                                          */
@@ -75,7 +77,7 @@
 
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ddd/xfer/xfer.c,v 1.3 2007/10/16 12:46:58 lampe Exp $",DDD_RCS_STRING)
+RCSID("$Header$",DDD_RCS_STRING)
 
 
 
@@ -402,7 +404,7 @@
 
 #		if DebugXfer<=0
 			sprintf(cBuffer, "%4d: PrepareObjMsgs, proc=%d"
-					" i=%d/%d (%016llx)\n",
+					" i=%d/%d (%08x)\n",
 					me, dest, i, nmax, xi->gid);
 			DDD_PrintDebug(cBuffer);
 #		endif
@@ -455,7 +457,7 @@
 		{
 			XINewCpl *xi = items[i];
 			sprintf(cBuffer, "%4d: PrepareObjMsgs, proc=%d"
-					" i=%d/%d (%016llx)\n",
+					" i=%d/%d (%08x)\n",
 					me, dest, i, nmax, NewCpl_GetGid(xi->te));
 			DDD_PrintDebug(cBuffer);
 		}
@@ -499,7 +501,7 @@
 		{
 			XIOldCpl *xi = items[i];
 			sprintf(cBuffer, "%4d: PrepareObjMsgs, proc=%d"
-					" i=%d/%d (%016llx)\n",
+					" i=%d/%d (%08x)\n",
 					me, dest, i, nmax, xi->te.gid);
 			DDD_PrintDebug(cBuffer);
 		}
@@ -980,7 +982,7 @@
 	and recovery.
 */
 
-char *XferModeName (int mode)
+const char *XferModeName (int mode)
 {
 	switch(mode)
 	{
@@ -1114,3 +1116,5 @@
 
 
 /****************************************************************************/
+
+END_UGDIM_NAMESPACE 
diff -ru ug-orig/parallel/ddd/xfer/xfer.h ug-patched/parallel/ddd/xfer/xfer.h
--- ug-orig/parallel/ddd/xfer/xfer.h	1998-09-22 15:28:02.000000000 +0200
+++ ug-patched/parallel/ddd/xfer/xfer.h	2009-04-29 15:11:55.000000000 +0200
@@ -21,7 +21,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/parallel/ddd/xfer/xfer.h,v 1.1.1.16 1998/09/22 13:28:02 birken Exp $
+$Header$
 */
 
 
@@ -48,7 +48,7 @@
 #include "basic/oopp.h"    /* for object-orientated style via preprocessor */
 #include "sll.h"           /* TODO: remove this in future versions */
 
-
+START_UGDIM_NAMESPACE 
 
 #define SUPPORT_RESENT_FLAG
 
@@ -658,9 +658,9 @@
 
 
 /* ctrl.c */
-void XferDisplayMsg (char *comment, LC_MSGHANDLE);
-
+void XferDisplayMsg (const char *comment, LC_MSGHANDLE);
 
+END_UGDIM_NAMESPACE 
 
 #endif
 
Nur in ug-orig/parallel/dddif: CVS.
Nur in ug-orig/parallel/dddif: .cvsignore.
diff -ru ug-orig/parallel/dddif/debugger.c ug-patched/parallel/dddif/debugger.c
--- ug-orig/parallel/dddif/debugger.c	2007-10-16 14:46:58.000000000 +0200
+++ ug-patched/parallel/dddif/debugger.c	2008-12-19 11:12:24.000000000 +0100
@@ -3,6 +3,7 @@
 
 #ifdef ModelP
 
+#include "config.h"
 #include <stdio.h>
 
 #include "parallel.h"
@@ -18,7 +19,7 @@
 USING_PPIF_NAMESPACE
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/parallel/dddif/debugger.c,v 1.28 2007/10/16 12:46:58 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 /****************************************************************************/
@@ -281,22 +282,22 @@
 		ID(e), LEVEL(e), CORNERS_OF_ELEM(e));
 
 	if (EFATHER(e))
-		printf("%4d:    father=%016llx\n", me,
+		printf("%4d:    father=%08x\n", me,
 			DDD_InfoGlobalId(PARHDRE(EFATHER(e))));
 
 	if (PREDE(e))
-		printf("%4d:    pred=%016llx\n", me,
+		printf("%4d:    pred=%08x\n", me,
 			DDD_InfoGlobalId(PARHDRE(PREDE(e))));
 
 	if (SUCCE(e))
-		printf("%4d:    succ=%016llx\n", me,
+		printf("%4d:    succ=%08x\n", me,
 			DDD_InfoGlobalId(PARHDRE(SUCCE(e))));
 
 	for(i=0; i<SIDES_OF_ELEM(e); i++)
 	{
 		if (NBELEM(e,i)!=NULL)
 		{
-			printf("%4d:    nb[%d]=%016llx\n", me,
+			printf("%4d:    nb[%d]=%08x\n", me,
 				i, DDD_InfoGlobalId(PARHDRE(NBELEM(e,i))));
 		}
 	}
@@ -305,7 +306,7 @@
 	{
 		for(i=0; SonList[i]!=NULL; i++)
 		{
-			printf("%4d:    son[%d]=%016llx prio=%d\n", me,
+			printf("%4d:    son[%d]=%08x prio=%d\n", me,
 				i,
 				DDD_InfoGlobalId(PARHDRE(SonList[i])),
 				DDD_InfoPriority(PARHDRE(SonList[i]))
@@ -350,15 +351,15 @@
 
 
 	if (NFATHER(n))
-		printf("%4d:    father=%016llx\n", me,
+		printf("%4d:    father=%08x\n", me,
 			DDD_InfoGlobalId(PARHDR((NODE *)NFATHER(n))));
 
 	if (PREDN(n))
-		printf("%4d:    pred=%016llx\n", me,
+		printf("%4d:    pred=%08x\n", me,
 			DDD_InfoGlobalId(PARHDR(PREDN(n))));
 
 	if (SUCCN(n))
-		printf("%4d:    succ=%016llx\n", me,
+		printf("%4d:    succ=%08x\n", me,
 			DDD_InfoGlobalId(PARHDR(SUCCN(n))));
 }
 
@@ -397,7 +398,7 @@
 		{
 			if (DDD_InfoGlobalId(PARHDRE(e))==gid)
 			{
-				printf("%4d: ELEMENT gid=%016llx, adr=%p, level=%d\n",
+				printf("%4d: ELEMENT gid=%08x, adr=%p, level=%d\n",
 					me, gid, e, level);
 				buggy_ShowCopies(PARHDRE(e));
 				buggy_ElemShow(e);
@@ -411,7 +412,7 @@
 		{
 			if (DDD_InfoGlobalId(PARHDR(n))==gid)
 			{
-				printf("%4d: NODE gid=%016llx, adr=%p, level=%d\n",
+				printf("%4d: NODE gid=%08x, adr=%p, level=%d\n",
 					me, gid, n, level);
 				buggy_ShowCopies(PARHDR(n));
 				buggy_NodeShow(n);
@@ -426,13 +427,13 @@
 
 		if (hdr!=NULL)
 		{
-			printf("%4d: DDDOBJ gid=%016llx, typ=%d, level=%d\n",
+			printf("%4d: DDDOBJ gid=%08x, typ=%d, level=%d\n",
 				me, gid, DDD_InfoType(hdr), DDD_InfoAttr(hdr));
 			buggy_ShowCopies(hdr);
 		}
 		else
 		{
-			printf("%4d: unknown gid=%016llx\n", me, gid);
+			printf("%4d: unknown gid=%08x\n", me, gid);
 		}
 	}
 }
@@ -447,7 +448,7 @@
 	char  fname[30];
 	FILE  *f;
 
-	sprintf(fname,"buggy%016llx.%03d.gnu",item->InfoGlobalId(),me);
+	sprintf(fname,"buggy%08x.%03d.gnu",item->InfoGlobalId(),me);
 	f = fopen(fname,"w");
 	if (f==0)
 	{
@@ -482,7 +483,7 @@
 }
 
 
-static void bug_elem_graphics (GridSegment &target, DDD_GID gid)
+static void bug_elem_graphics (GridSegment &target, unsigned int gid)
 {
 	Elem  *item=0;
 
@@ -628,13 +629,13 @@
 
 				default:
 					cmd = 3;
-					gid = (DDD_GID) strtoll(buff, 0, 0);
+					gid = (DDD_GID) strtol(buff, 0, 0);
 			}
 		}
 
 		Broadcast(&cmd, sizeof(int));
 		Broadcast(&proc, sizeof(int));
-		Broadcast(&gid, sizeof(DDD_GID));
+		Broadcast(&gid, sizeof(unsigned int));
 
 		if (me==proc)
 		{
@@ -685,14 +686,14 @@
 	SYNC_CONTEXT;
 	for(e=FIRSTELEMENT(theGrid); e!=NULL; e=SUCCE(e))
 	{
-		printf(PREFIX "master(e%016llx, p%04d).\n", EGID(e), me);
+		printf(PREFIX "master(e%07x, p%02d).\n", EGID(e), me);
 
 		for(j=0; j<SIDES_OF_ELEM(e); j++)
 		{
 			enb = NBELEM(e,j);
 			if (enb!=NULL)
 			{
-				printf(PREFIX "nb(e%016llx, e%016llx).\n", EGID(e), EGID(enb));
+				printf(PREFIX "nb(e%07x, e%07x).\n", EGID(e), EGID(enb));
 			}
 		}
 	}
diff -ru ug-orig/parallel/dddif/gridcons.c ug-patched/parallel/dddif/gridcons.c
--- ug-orig/parallel/dddif/gridcons.c	2006-07-25 10:43:11.000000000 +0200
+++ ug-patched/parallel/dddif/gridcons.c	2008-12-19 11:12:24.000000000 +0100
@@ -26,6 +26,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 
 #include "debug.h"
@@ -82,7 +83,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/parallel/dddif/gridcons.c,v 1.56 2006/07/25 08:43:11 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 /****************************************************************************/
diff -ru ug-orig/parallel/dddif/handler.c ug-patched/parallel/dddif/handler.c
--- ug-orig/parallel/dddif/handler.c	2008-06-09 19:34:32.000000000 +0200
+++ ug-patched/parallel/dddif/handler.c	2009-04-29 14:30:36.000000000 +0200
@@ -30,6 +30,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 #include <assert.h>
@@ -102,7 +103,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/parallel/dddif/handler.c,v 1.103 2008/06/09 17:34:32 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 
@@ -234,7 +235,7 @@
 	GRID		*theGrid	= GRID_ON_LEVEL(dddctrl.currMG,level);
 	/* TODO: define this static global                    */
 	/* TODO: take size as maximum of possible connections */
-	size_t	sizeArray[4096];
+	size_t	sizeArray[256];
 	INT flag;
 
 	PRINTDEBUG(dddif,1,(PFMT " VectorXferCopy(): v=" VINDEX_FMTX " proc=%d "
@@ -252,7 +253,7 @@
 	if (flag) {
 	    if (DDD_XferWithAddData()) {
 		    for(mat=VSTART(pv); mat!=NULL; mat=MNEXT(mat)) {
-			    ASSERT(nmat<4096);
+			    ASSERT(nmat<256);
 				sizeArray[nmat++] = MSIZE(mat);
 			}
 			PRINTDEBUG(dddif,2,(PFMT " VectorXferCopy(): v=" VINDEX_FMTX 
@@ -675,7 +676,7 @@
 /*																			*/
 /****************************************************************************/
 #ifdef USE_FAMG
-void NS_PREFIX VectorDelete (DDD_OBJ obj)
+void NS_DIM_PREFIX VectorDelete (DDD_OBJ obj)
 {
 	VECTOR		*pv			= (VECTOR *)obj;
 	INT			level		= ATTR_TO_GLEVEL(DDD_InfoAttr(PARHDR(pv)));
@@ -1387,7 +1388,7 @@
 
 			#ifdef __THREEDIM__
 			PRINTDEBUG(dddif,2,(PFMT " ElementXferCopy():  e=" EID_FMTX 
-				" EDGE=%x/%016llx proc=%d prio=%d\n",
+				" EDGE=%x/%08x proc=%d prio=%d\n",
 				me,EID_PRTX(pe),edge,DDD_InfoGlobalId(PARHDR(edge)),
 				proc,prio))
 
@@ -1488,7 +1489,7 @@
 
 		
 		PRINTDEBUG(dddif,2,(PFMT " ElemGatherEdge(): pe=" EID_FMTX " i=%d n1=" 
-			ID_FMTX " n2=" ID_FMTX " nmid=%p\n",me,EID_PRTX(pe),i,
+			ID_FMTX " n2=" ID_FMTX " nmid=%08x\n",me,EID_PRTX(pe),i,
 			ID_PRTX(NBNODE(LINK0(edge))),ID_PRTX(NBNODE(LINK1(edge))),
 			MIDNODE(edge)))
 	}
@@ -1570,7 +1571,7 @@
 			if (edge0 != edge1) 
 			{
 				PRINTDEBUG(dddif,1,(PFMT " ElemScatterEdge(): n0=" ID_FMTX
-					" n1=" ID_FMTX " edge0=%p BUT edge1=%p\n",me,
+					" n1=" ID_FMTX " edge0=%08x BUT edge1=%08x\n",me,
 					ID_PRTX(NBNODE(LINK0(ecopy))),
 					ID_PRTX(NBNODE(LINK1(ecopy))),
 					edge0,edge1));
@@ -2114,7 +2115,7 @@
 	INT		level		= LEVEL(NBNODE(LINK0(pe)));
 	GRID	*theGrid	= GetGridOnDemand(dddctrl.currMG,level);
 
-	PRINTDEBUG(dddif,1,(PFMT " EdgeUpdate(): edge=%x/%p EDOBJT=%016llx "
+	PRINTDEBUG(dddif,1,(PFMT " EdgeUpdate(): edge=%x/%08x EDOBJT=%d "
 		" NO_OF_ELEM=%d\n",
 		me,pe,DDD_InfoGlobalId(PARHDR(pe)),OBJT(pe),NO_OF_ELEM(pe)))
 
@@ -2126,7 +2127,7 @@
 		link0 = LINK0(pe);
 		link1 = LINK1(pe);
 
-		PRINTDEBUG(dddif,2,(PFMT " EdgeUpdate(): edge=%x/%p node0="
+		PRINTDEBUG(dddif,2,(PFMT " EdgeUpdate(): edge=%x/%08x node0="
 			ID_FMTX " node1=" ID_FMTX "\n",
 			me,pe,DDD_InfoGlobalId(PARHDR(pe)),
 			ID_PRTX(NBNODE(link1)),ID_PRTX(NBNODE(link0))))
@@ -2186,7 +2187,7 @@
 {
 	EDGE *pe	=	(EDGE *)obj;
 
-	PRINTDEBUG(dddif,1,(PFMT " EdgeXferCopy(): edge=%x/%016llx proc=%d prio=%d\n",
+	PRINTDEBUG(dddif,1,(PFMT " EdgeXferCopy(): edge=%x/%08x proc=%d prio=%d\n",
 		me,pe,DDD_InfoGlobalId(PARHDR(pe)),proc,prio));
 
 	ASSERT(OBJT(pe) == EDOBJ);
diff -ru ug-orig/parallel/dddif/header.h ug-patched/parallel/dddif/header.h
--- ug-orig/parallel/dddif/header.h	1997-07-18 13:01:57.000000000 +0200
+++ ug-patched/parallel/dddif/header.h	1997-07-18 13:05:17.000000000 +0200
@@ -21,7 +21,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/parallel/dddif/header.h,v 1.2 1997/07/18 11:01:57 birken Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/parallel/dddif/identify.c ug-patched/parallel/dddif/identify.c
--- ug-orig/parallel/dddif/identify.c	2006-07-25 10:43:11.000000000 +0200
+++ ug-patched/parallel/dddif/identify.c	2009-11-26 17:56:40.000000000 +0100
@@ -27,6 +27,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 
 #include "general.h"
@@ -107,7 +108,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/parallel/dddif/identify.c,v 1.50 2006/07/25 08:43:11 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /* this function is called for low level identification */
 static INT (*Ident_FctPtr) (DDD_HDR *IdentObjectHdr, INT nobject, 
@@ -1104,11 +1105,7 @@
 
 			#ifdef __THREEDIM__
 			if (VEC_DEF_IN_OBJ_OF_GRID(theGrid,SIDEVEC))
-			{
-				IdentifySideVector(theElement,theNeighbor,SonList[j],SonSides[j]);
-				/* this is not debugged */
-				assert(0);
-			}
+                            IdentifySideVector(theElement,theNeighbor,SonList[j],SonSides[j]);
 			#endif
 		}
 	}
diff -ru ug-orig/parallel/dddif/identify.h ug-patched/parallel/dddif/identify.h
--- ug-orig/parallel/dddif/identify.h	2006-07-12 14:54:07.000000000 +0200
+++ ug-patched/parallel/dddif/identify.h	2006-12-04 17:20:45.000000000 +0100
@@ -18,7 +18,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/parallel/dddif/identify.h,v 1.8 2006/07/12 12:54:07 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/parallel/dddif/initddd.c ug-patched/parallel/dddif/initddd.c
--- ug-orig/parallel/dddif/initddd.c	2006-11-17 11:02:12.000000000 +0100
+++ ug-patched/parallel/dddif/initddd.c	2009-04-29 14:30:36.000000000 +0200
@@ -26,6 +26,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 
 #include "debug.h"
@@ -131,7 +132,6 @@
 /* DDD global controls */
 DDD_CTRL NS_DIM_PREFIX dddctrl;
 
-
 /****************************************************************************/
 /*																			*/
 /* definition of variables global to this source file only (static!)		*/
@@ -139,7 +139,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/parallel/dddif/initddd.c,v 1.60 2006/11/17 10:02:12 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/parallel/dddif/lb.c ug-patched/parallel/dddif/lb.c
--- ug-orig/parallel/dddif/lb.c	2006-07-25 10:43:11.000000000 +0200
+++ ug-patched/parallel/dddif/lb.c	2009-04-29 15:11:55.000000000 +0200
@@ -27,6 +27,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 
 #include "parallel.h"
@@ -42,6 +43,7 @@
 /* PPIF namespaces: */
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
 
 /****************************************************************************/
 /*																			*/
@@ -78,7 +80,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/parallel/dddif/lb.c,v 1.37 2006/07/25 08:43:11 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -527,7 +529,7 @@
 */
 /****************************************************************************/
 
-void NS_DIM_PREFIX lbs (char *argv, MULTIGRID *theMG)
+void lbs (const char *argv, MULTIGRID *theMG)
 {
 	int n,mode,param,fromlevel,tolevel,part,hor_boxes,vert_boxes,dest;
 
@@ -661,4 +663,6 @@
 		DDD_SetOption(OPT_INFO_XFER, XFER_SHOW_NONE);
 }
 
+END_UGDIM_NAMESPACE
+
 #endif /* ModelP */
diff -ru ug-orig/parallel/dddif/lbrcb.c ug-patched/parallel/dddif/lbrcb.c
--- ug-orig/parallel/dddif/lbrcb.c	2006-07-25 10:43:11.000000000 +0200
+++ ug-patched/parallel/dddif/lbrcb.c	2008-12-19 11:12:24.000000000 +0100
@@ -28,6 +28,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include "parallel.h"
 #include "evm.h"
 #include "general.h"
@@ -82,7 +83,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/parallel/dddif/lbrcb.c,v 1.30 2006/07/25 08:43:11 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 /****************************************************************************/
diff -ru ug-orig/parallel/dddif/Makefile.am ug-patched/parallel/dddif/Makefile.am
--- ug-orig/parallel/dddif/Makefile.am	2006-11-17 11:02:12.000000000 +0100
+++ ug-patched/parallel/dddif/Makefile.am	2009-06-04 13:10:11.000000000 +0200
@@ -1,17 +1,12 @@
-# $Id: Makefile.am,v 1.5 2006/11/17 10:02:12 sander Exp $
+# $Id: Makefile.am 8354 2009-06-04 11:10:11Z sander $
 
-noinst_LTLIBRARIES = libdddif.la libdddif2.la libdddif3.la
+noinst_LTLIBRARIES = libdddif2.la libdddif3.la
 
-# dimension-independent stuff
-libdddif_la_SOURCES = 
+SOURCES = initddd.c memmgr.c handler.c lb.c debugger.c lbrcb.c gridcons.c support.c \
+          identify.c identify.h trans.c priority.c pgmcheck.c overlap.c partition.c pamg.c parallel.h debugger.h
 
-libdddif_la_CPPFLAGS = $(UG_CPPFLAGS)
-
-# Sources for the libraries that are dimension-dependent
-DIMDEPSOURCES = initddd.c handler.c lb.c debugger.c lbrcb.c gridcons.c identify.c trans.c priority.c pgmcheck.c overlap.c partition.c parallel.h debugger.h identify.h memmgr.c pamg.c support.c
-
-libdddif2_la_SOURCES = $(DIMDEPSOURCES)
+libdddif2_la_SOURCES = $(SOURCES)
 libdddif2_la_CPPFLAGS = $(UG_2DFLAGS)
 
-libdddif3_la_SOURCES = $(DIMDEPSOURCES)
+libdddif3_la_SOURCES = $(SOURCES)
 libdddif3_la_CPPFLAGS = $(UG_3DFLAGS)
diff -ru ug-orig/parallel/dddif/memmgr.c ug-patched/parallel/dddif/memmgr.c
--- ug-orig/parallel/dddif/memmgr.c	2007-10-16 14:46:59.000000000 +0200
+++ ug-patched/parallel/dddif/memmgr.c	2009-04-29 14:30:36.000000000 +0200
@@ -28,6 +28,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 
@@ -53,6 +54,8 @@
 /* PPIF namespace */
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
+
 /****************************************************************************/
 
 /* define this to protocol all alloc/free requests via hashtable */
@@ -140,7 +143,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/parallel/dddif/memmgr.c,v 1.27 2007/10/16 12:46:59 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 #ifdef GENERAL_HEAP
@@ -158,8 +161,8 @@
 #ifdef WITH_HASH_CONTROL
 /* hashing of alloc/free requests: hashtable and allocated entries */
 /* (from ddd/memmgrs/memmgr_ctrl.c)                   */
-HASH_ENTRY * NS_PREFIX htab[HASHTAB_SIZE];
-int        NS_PREFIX nHashEntries;
+HASH_ENTRY *htab[HASHTAB_SIZE];
+int         nHashEntries;
 #endif
 
 
@@ -281,7 +284,7 @@
 
 		if (he->ptr==ptr)
 		{
-			UserWriteF("%4d: MEMMGR-ERROR, double alloc at %p, size %ld (%c, %c)\n",
+			UserWriteF("%4d: MEMMGR-ERROR, double alloc at %08x, size %ld (%c, %c)\n",
 				me, ptr, (unsigned long)size,
 				he->info, info);
 			HARD_EXIT;
@@ -343,7 +346,7 @@
 		}
 	}
 
-	UserWriteF("%4d: MEMMGR-ERROR, no alloc for free %c at %p\n", me, info, ptr);
+	UserWriteF("%4d: MEMMGR-ERROR, no alloc for free %c at %08x\n", me, info, ptr);
 	HARD_EXIT;
 
 	return(0); /* never reached */
@@ -408,7 +411,7 @@
 		{
 			if (he->flags==0 && he->info==info)
 			{
-				UserWriteF("%4d: MALLOC %c adr=%p size=%ld\n",
+				UserWriteF("%4d: MALLOC %c adr=%08x size=%ld\n",
 					me, he->info, he->ptr, (unsigned long) he->size);
 			}
 		}
@@ -438,7 +441,7 @@
 */
 /****************************************************************************/
 
-void NS_PREFIX memmgr_Report (void)
+void memmgr_Report (void)
 {
 	#ifdef WITH_HASH_CONTROL
 	UserWriteF("%04d memmgr_Report.  P=%9ld   A=%9ld   T=%9ld    SUM=%9ld\n",
@@ -480,7 +483,7 @@
 */
 /****************************************************************************/
 	
-void * NS_PREFIX memmgr_AllocOMEM (size_t size, int ddd_type, int prio, int attr)
+void * memmgr_AllocOMEM (size_t size, int ddd_type, int prio, int attr)
 {
 	void   *buffer;
 
@@ -518,7 +521,7 @@
 */
 /****************************************************************************/
 
-void NS_PREFIX memmgr_FreeOMEM (void *buffer, size_t size, int ddd_type)
+void memmgr_FreeOMEM (void *buffer, size_t size, int ddd_type)
 {
 /*
 printf("%d: memmgr_FreeOMEM(): buffer=%x, ddd_type=%d\n", me, buffer, ddd_type);
@@ -549,7 +552,7 @@
 */
 /****************************************************************************/
 
-void * NS_PREFIX memmgr_AllocPMEM (unsigned long size)
+void * memmgr_AllocPMEM (unsigned long size)
 {
 	void   *buffer;
 
@@ -587,7 +590,7 @@
 */
 /****************************************************************************/
 
-void NS_PREFIX memmgr_FreePMEM (void *buffer)
+void memmgr_FreePMEM (void *buffer)
 {
 	#ifdef WITH_HASH_CONTROL
 	{
@@ -623,7 +626,7 @@
 */
 /****************************************************************************/
 
-void * NS_PREFIX memmgr_AllocAMEM (unsigned long size)
+void * memmgr_AllocAMEM (unsigned long size)
 {
 	void   *buffer;
 
@@ -661,7 +664,7 @@
 */
 /****************************************************************************/
 
-void NS_PREFIX memmgr_FreeAMEM (void *buffer)
+void memmgr_FreeAMEM (void *buffer)
 {
 	#ifdef WITH_HASH_CONTROL
 	{
@@ -696,7 +699,7 @@
 */
 /****************************************************************************/
 
-void * NS_PREFIX memmgr_AllocTMEM (unsigned long size, int kind)
+void * memmgr_AllocTMEM (unsigned long size, int kind)
 {
 	void   *buffer;
 
@@ -769,7 +772,7 @@
 */
 /****************************************************************************/
 
-void NS_PREFIX memmgr_FreeTMEM (void *buffer, int kind)
+void memmgr_FreeTMEM (void *buffer, int kind)
 {
 	#ifdef WITH_HASH_CONTROL
 	{
@@ -820,14 +823,14 @@
 
 /****************************************************************************/
 
-void NS_PREFIX memmgr_MarkHMEM (long *theMarkKey)
+void memmgr_MarkHMEM (long *theMarkKey)
 {
 	INT myMarkKey;
 	MarkTmpMem(MGHEAP(dddctrl.currMG), &myMarkKey);
 	*theMarkKey = (long)myMarkKey;
 }
 
-void* NS_PREFIX memmgr_AllocHMEM (size_t size, long theMarkKey)
+void* memmgr_AllocHMEM (size_t size, long theMarkKey)
 {
 	void *buffer;
 	buffer = GetTmpMem(MGHEAP(dddctrl.currMG), size, (INT)theMarkKey);
@@ -839,7 +842,7 @@
 	return(buffer);
 }
 
-void NS_PREFIX memmgr_ReleaseHMEM (long theMarkKey)
+void memmgr_ReleaseHMEM (long theMarkKey)
 {
 	ReleaseTmpMem(MGHEAP(dddctrl.currMG), (INT)theMarkKey);
 }
@@ -915,7 +918,7 @@
 */
 /****************************************************************************/
 
-void NS_PREFIX memmgr_Init (void)
+void memmgr_Init (void)
 {
 	#ifdef WITH_GENERAL_HEAP
 	{
@@ -956,5 +959,7 @@
 
 /****************************************************************************/
 
+END_UGDIM_NAMESPACE
+
 #endif /* ModelP */
 
diff -ru ug-orig/parallel/dddif/overlap.c ug-patched/parallel/dddif/overlap.c
--- ug-orig/parallel/dddif/overlap.c	2006-07-25 10:43:11.000000000 +0200
+++ ug-patched/parallel/dddif/overlap.c	2009-04-29 14:30:36.000000000 +0200
@@ -25,6 +25,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <assert.h>
 #include <math.h>
 #include <stdio.h>
@@ -63,6 +64,7 @@
 /* PPIF namespace: */
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
 
 /****************************************************************************/
 /*																			*/
@@ -103,7 +105,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/parallel/dddif/overlap.c,v 1.15 2006/07/25 08:43:11 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -229,7 +231,7 @@
 */
 /****************************************************************************/
 
-INT NS_DIM_PREFIX UpdateGridOverlap (GRID *theGrid)
+INT UpdateGridOverlap (GRID *theGrid)
 {
 	ELEMENT *theElement;
 
@@ -334,7 +336,7 @@
 */
 /****************************************************************************/
 
-INT NS_DIM_PREFIX ConnectGridOverlap (GRID *theGrid)
+INT ConnectGridOverlap (GRID *theGrid)
 {
 	INT		i,j,Sons_of_Side,prio;
 	INT		SonSides[MAX_SIDE_NODES];
@@ -555,7 +557,7 @@
 	return((k == m));
 }
 
-INT NS_DIM_PREFIX ConnectVerticalOverlap (MULTIGRID *theMG)
+INT ConnectVerticalOverlap (MULTIGRID *theMG)
 {
 	INT l;
 	
@@ -779,5 +781,7 @@
 	return(GM_OK);
 }
 
+END_UGDIM_NAMESPACE
+
 #endif
 
diff -ru ug-orig/parallel/dddif/pamg.c ug-patched/parallel/dddif/pamg.c
--- ug-orig/parallel/dddif/pamg.c	2007-10-16 14:46:59.000000000 +0200
+++ ug-patched/parallel/dddif/pamg.c	2009-04-29 14:30:36.000000000 +0200
@@ -28,6 +28,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <assert.h>
 
 #include "parallel.h"
@@ -77,7 +78,9 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/parallel/dddif/pamg.c,v 1.10 2007/10/16 12:46:59 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
+
+START_UGDIM_NAMESPACE
 
 #define NBARRAYSIZE	40	/* only temp. for pamg check */
 static INT MaximumMatrices;	/* only temp. for pamg check */
@@ -92,7 +95,7 @@
 /****************************************************************************/
 
 /* TODO:remove*/
-void NS_PREFIX printall(GRID *grid, char *text)
+void NS_DIM_PREFIX printall(GRID *grid, char *text)
 {
 	VECTOR *v;
 	for( v=PFIRSTVECTOR(grid); v!=NULL; v = SUCCVC(v))
@@ -196,8 +199,8 @@
 	VECTOR  *v = (VECTOR *)obj;
 	MATRIX *m, *m2;
 	DDD_GID *buf = (DDD_GID *)data;
-	DDD_GID gid, sender_gid, loc_gids[NBARRAYSIZE*NBARRAYSIZE];
-	INT i, nr_local_gids, sender_pe;
+	DDD_GID gid,loc_gids[NBARRAYSIZE*NBARRAYSIZE];
+	INT i, nr_local_gids, sender_gid, sender_pe;
 
 	/* the assertions must be valid only for masters */
 	if( PRIO(v)!=PrioMaster )
@@ -212,13 +215,13 @@
 	
 	/*qsort( loc_gid, nr_local_gids, sizeof(DDD_GID), sort_Gids); makes only sense for bisection search */
 	
-	sender_gid = buf[1];
-	sender_pe = buf[2];
-	for( i=3; i<buf[0]; i++ )
+	sender_gid = (INT)buf[1];
+	sender_pe = (INT)buf[2];
+	for( i=3; i<(INT)buf[0]; i++ )
 		if( !isAlocalGID(buf[i],loc_gids,nr_local_gids) )
 		{
 			pamgerrors++;
-			UserWriteF("\nERROR GID %016llx on PE %d had NB with GID %08x", sender_gid, sender_pe, buf[i]);
+			UserWriteF("\nERROR GID %08x on PE %d had NB with GID %08x", sender_gid, sender_pe, buf[i]);
 		}
 	
 	return 0;
@@ -229,8 +232,8 @@
 	VECTOR  *v = (VECTOR *)obj;
 	MATRIX *m, *m2;
 	DDD_GID *buf = (DDD_GID *)data;
-	DDD_GID gid, sender_gid, loc_gids[NBARRAYSIZE*NBARRAYSIZE];
-	INT i, nr_local_gids, sender_pe;
+	DDD_GID gid,loc_gids[NBARRAYSIZE*NBARRAYSIZE];
+	INT i, nr_local_gids, sender_gid, sender_pe;
 	/* INT in_overlap2;	not necessary any longer because scatter is called only for matsers if using BorderVectorIF and IF_FORWARD*/
 	
 	assert(PRIO(v)==PrioMaster);
@@ -250,19 +253,19 @@
 	
 	/*qsort( loc_gid, nr_local_gids, sizeof(DDD_GID), sort_Gids); makes only sense for bisection search */
 	
-	sender_gid = buf[1];
-	sender_pe = buf[2];
-	for( i=3; i<buf[0]; i++ )
+	sender_gid = (INT)buf[1];
+	sender_pe = (INT)buf[2];
+	for( i=3; i<(INT)buf[0]; i++ )
 		if( !isAlocalGID(buf[i],loc_gids,nr_local_gids) )
 		{
 			pamgerrors++;
-			UserWriteF("\nERROR GID %016llx on PE %d had NB with GID %016llx", sender_gid, sender_pe, buf[i]);
+			UserWriteF("\nERROR GID %08x on PE %d had NB with GID %08x", sender_gid, sender_pe, buf[i]);
 		}
 	
 	return 0;
 }
 
-INT NS_PREFIX pamgCheckDo( MULTIGRID *theMG, INT level )
+INT NS_DIM_PREFIX pamgCheckDo( MULTIGRID *theMG, INT level )
 {
 	GRID *grid;
 	size_t sizePerVector;
@@ -292,7 +295,9 @@
 	
 	return 0;
 }
+
+END_UGDIM_NAMESPACE
+
 #endif /* USE_FAMG */
 
 #endif  /* ModelP */
-
diff -ru ug-orig/parallel/dddif/parallel.h ug-patched/parallel/dddif/parallel.h
--- ug-orig/parallel/dddif/parallel.h	2006-11-17 11:02:12.000000000 +0100
+++ ug-patched/parallel/dddif/parallel.h	2009-04-29 15:11:55.000000000 +0200
@@ -20,7 +20,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/parallel/dddif/parallel.h,v 1.59 2006/11/17 10:02:12 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -292,7 +292,7 @@
 void    ddd_DisplayContext      (void);
 
 /* from lb.c */
-void lbs (char *argv, MULTIGRID *theMG);
+void lbs (const char *argv, MULTIGRID *theMG);
 
 /* from handler.c */
 void            ddd_HandlerInit                 (INT);
diff -ru ug-orig/parallel/dddif/partition.c ug-patched/parallel/dddif/partition.c
--- ug-orig/parallel/dddif/partition.c	2006-07-25 10:43:11.000000000 +0200
+++ ug-patched/parallel/dddif/partition.c	2008-12-19 11:12:24.000000000 +0100
@@ -26,6 +26,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <assert.h>
 #include <math.h>
 #include <stdio.h>
@@ -110,7 +111,7 @@
 static INT coarsen_marks = 0;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/parallel/dddif/partition.c,v 1.10 2006/07/25 08:43:11 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/parallel/dddif/pgmcheck.c ug-patched/parallel/dddif/pgmcheck.c
--- ug-orig/parallel/dddif/pgmcheck.c	2007-10-16 14:46:59.000000000 +0200
+++ ug-patched/parallel/dddif/pgmcheck.c	2008-12-19 11:12:24.000000000 +0100
@@ -29,6 +29,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 
 #include "debug.h"
@@ -116,7 +117,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/parallel/dddif/pgmcheck.c,v 1.16 2007/10/16 12:46:59 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /* count for errors to report from communication scatter functions */
 static INT check_distributed_objects_errors = 0;
@@ -572,7 +573,7 @@
 	/* copy node gids into buffer */
 	for (i=0; i<CORNERS_OF_ELEM(theElement); i++)
 	{
-		((DDD_GID *)data)[i] = GID(CORNER(theElement,i));
+		((unsigned int *)data)[i] = GID(CORNER(theElement,i));
 	}
 
 	#ifdef __THREEDIM__
@@ -582,7 +583,7 @@
 		EDGE *theEdge = GetEdge(CORNER_OF_EDGE_PTR(theElement,j,0),
 								CORNER_OF_EDGE_PTR(theElement,j,1));
 		assert(theEdge!=NULL);
-		((DDD_GID *)data)[i] = GID(theEdge);
+		((unsigned int *)data)[i] = GID(theEdge);
 	}
 	#endif
 }
@@ -598,11 +599,11 @@
 	for (i=0; i<CORNERS_OF_ELEM(theElement); i++)
 	{
 		theNode = CORNER(theElement,i);
-		if (((DDD_GID *)data)[i] != GID(theNode))
+		if (((unsigned int *)data)[i] != GID(theNode))
 		{
 			UserWriteF(PFMT "ELEM=" EID_FMTX " #ERROR#: NODE=" ID_FMTX " gids don't match "
-				"local=%016llx remote=%016llx remoteproc/prio=%d/%d\n",me,EID_PRTX(theElement),ID_PRTX(theNode),
-				GID(theNode),((DDD_GID *)data)[i],proc,prio);
+				"local=%08x remote=%08x remoteproc/prio=%d/%d\n",me,EID_PRTX(theElement),ID_PRTX(theNode),
+				GID(theNode),((unsigned int *)data)[i],proc,prio);
 			check_distributed_objects_errors++;
 			assert(0);
 		}
@@ -615,11 +616,11 @@
 		theEdge = GetEdge(CORNER_OF_EDGE_PTR(theElement,j,0),
 						  CORNER_OF_EDGE_PTR(theElement,j,1));
 		assert(theEdge!=NULL);
-		if (((DDD_GID *)data)[i] != GID(theEdge))
+		if (((unsigned int *)data)[i] != GID(theEdge))
 		{
 			UserWriteF(PFMT "ELEM=" EID_FMTX " #ERROR#: EDGE=" ID_FMTX " gids don't match "
-				"local=%016llx remote=%016llx remoteproc/prio=%d/%d\n",me,EID_PRTX(theElement),ID_PRTX(theEdge),
-				GID(theEdge),((DDD_GID *)data)[i],proc,prio);
+				"local=%08x remote=%08x remoteproc/prio=%d/%d\n",me,EID_PRTX(theElement),ID_PRTX(theEdge),
+				GID(theEdge),((unsigned int *)data)[i],proc,prio);
 			check_distributed_objects_errors++;
 			assert(0);
 		}
@@ -641,19 +642,18 @@
 	MidNode  = MIDNODE(theEdge);
 
 	/* copy node gids into buffer */
-	((DDD_GID *)data)[i++] = GID(theNode0);
-	((DDD_GID *)data)[i++] = GID(theNode1);
+	((unsigned int *)data)[i++] = GID(theNode0);
+	((unsigned int *)data)[i++] = GID(theNode1);
 	if (MidNode != NULL)
-		((DDD_GID *)data)[i++] = GID(MidNode)+1;
+		((unsigned int *)data)[i++] = GID(MidNode)+1;
 	else
-		((DDD_GID *)data)[i++] = 0;
+		((unsigned int *)data)[i++] = 0;
 
 }
 
 static int Scatter_EdgeObjectGids (DDD_OBJ obj, void *data, DDD_PROC proc, DDD_PRIO prio)
 {
-	INT		i;
-	DDD_GID remotegid;
+	INT		i,remotegid;
 	EDGE *theEdge = (EDGE *)obj;
 	NODE *theNode0, *theNode1, *MidNode;
 	int *proclist = PROCLIST(theEdge);
@@ -674,39 +674,39 @@
 	MidNode  = MIDNODE(theEdge);
 
 	/* compare node0 gids with buffer gids */
-	if (((DDD_GID *)data)[i] != GID(theNode0))
+	if (((unsigned int *)data)[i] != GID(theNode0))
 	{
 		UserWriteF(PFMT "EDGE=" ID_FMTX " #ERROR#: NODE0=" ID_FMTX " gids don't match "
-			"local=%016llx remote=%016llx remoteproc/prio=%d/%d\n",
+			"local=%08x remote=%08x remoteproc/prio=%d/%d\n",
 			me,ID_PRTX(theEdge),ID_PRTX(theNode0),
-			GID(theNode0),((DDD_GID *)data)[i],proc,prio);
+			GID(theNode0),((unsigned int *)data)[i],proc,prio);
 		check_distributed_objects_errors++;
 		assert(0);
 	}
 	i++;
 
 	/* compare node1 gids with buffer gids */
-	if (((DDD_GID *)data)[i] != GID(theNode1))
+	if (((unsigned int *)data)[i] != GID(theNode1))
 	{
 		UserWriteF(PFMT "EDGE=" ID_FMTX " #ERROR#: NODE1=" ID_FMTX " gids don't match "
-			"local=%016llx remote=%016llx remoteproc/prio=%d/%d\n",
+			"local=%08x remote=%08x remoteproc/prio=%d/%d\n",
 			me,ID_PRTX(theEdge),ID_PRTX(theNode1),
-			GID(theNode1),((DDD_GID *)data)[i],proc,prio);
+			GID(theNode1),((unsigned int *)data)[i],proc,prio);
 		check_distributed_objects_errors++;
 		assert(0);
 	}
 	i++;
 
 	/* compare node0 gids with buffer gids */
-	if (((DDD_GID *)data)[i]>0)
-		remotegid = ((DDD_GID *)data)[i]-1;
+	if (((unsigned int *)data)[i]>0)
+		remotegid = ((unsigned int *)data)[i]-1;
 		
 	if (MidNode != NULL)
 	{
 		if (remotegid != GID(MidNode))
 		{
 			UserWriteF(PFMT "EDGE=" ID_FMTX " #ERROR#: MIDNODE=" ID_FMTX " gids don't match "
-				"local=%016llx remote=%016llx remoteproc/prio=%d/%d\n",
+				"local=%08x remote=%08x remoteproc/prio=%d/%d\n",
 				me,ID_PRTX(theEdge),ID_PRTX(MidNode),
 				GID(MidNode),remotegid,proc,prio);
 			check_distributed_objects_errors++;
@@ -719,7 +719,7 @@
 		if (remotegid != 0)
 		{
 			UserWriteF(PFMT "EDGE=" ID_FMTX " #ERROR#: MIDNODE=NULL gids don't match "
-				"local=%016llx remote=%016llx remoteproc/prio=%d/%d\n",
+				"local=%08x remote=%08x remoteproc/prio=%d/%d\n",
 				me,ID_PRTX(theEdge),0,remotegid,proc,prio);
 			check_distributed_objects_errors++;
 			assert(0);
@@ -741,12 +741,12 @@
 
 	check_distributed_objects_errors = 0;
 
-	DDD_IFAOnewayX(ElementSymmVHIF,GRID_ATTR(theGrid),IF_BACKWARD,size*sizeof(DDD_GID),
+	DDD_IFAOnewayX(ElementSymmVHIF,GRID_ATTR(theGrid),IF_BACKWARD,size*sizeof(unsigned int),
 				Gather_ElemObjectGids, Scatter_ElemObjectGids);
 
 	#ifdef __THREEDIM__
 if (0)
-	DDD_IFAOnewayX(BorderEdgeSymmIF,GRID_ATTR(theGrid),IF_BACKWARD,3*sizeof(DDD_GID),
+	DDD_IFAOnewayX(BorderEdgeSymmIF,GRID_ATTR(theGrid),IF_BACKWARD,3*sizeof(unsigned int),
 				Gather_EdgeObjectGids, Scatter_EdgeObjectGids);
 	#endif
 
diff -ru ug-orig/parallel/dddif/priority.c ug-patched/parallel/dddif/priority.c
--- ug-orig/parallel/dddif/priority.c	2006-07-25 10:43:11.000000000 +0200
+++ ug-patched/parallel/dddif/priority.c	2008-12-19 11:12:24.000000000 +0100
@@ -27,6 +27,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 
 #include "debug.h"
@@ -124,7 +125,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/parallel/dddif/priority.c,v 1.8 2006/07/25 08:43:11 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 /****************************************************************************/
diff -ru ug-orig/parallel/dddif/source.c ug-patched/parallel/dddif/source.c
--- ug-orig/parallel/dddif/source.c	1996-04-01 12:53:10.000000000 +0200
+++ ug-patched/parallel/dddif/source.c	1996-04-01 12:53:09.000000000 +0200
@@ -66,7 +66,7 @@
 /****************************************************************************/
 
 /* data for CVS */
-static char rcsid[] = "$Header: /home/cvsroot/UG/ug/parallel/dddif/Attic/source.c,v 1.1.1.1 1996/04/01 10:53:10 wieners Exp $";
+static char rcsid[] = "$Header$";
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/parallel/dddif/support.c ug-patched/parallel/dddif/support.c
--- ug-orig/parallel/dddif/support.c	2007-10-16 14:46:59.000000000 +0200
+++ ug-patched/parallel/dddif/support.c	2009-04-29 14:30:36.000000000 +0200
@@ -29,6 +29,7 @@
 
 /* standard C library */
 #if defined(__SR2201__) || defined(__CC__)
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #endif
@@ -50,6 +51,8 @@
 /* PPIF namespaces: */
 USING_PPIF_NAMESPACE
 
+START_UGDIM_NAMESPACE
+
 /****************************************************************************/
 /*                                                                          */
 /* macros                                                                   */
@@ -67,7 +70,7 @@
 
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/parallel/dddif/support.c,v 1.17 2007/10/16 12:46:59 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 /****************************************************************************/
@@ -99,7 +102,7 @@
    
 D*/
 /****************************************************************************/
-INT NS_PREFIX UG_GlobalMaxINT (INT i)
+INT UG_GlobalMaxINT (INT i)
 {
 	int l;
 	INT n;
@@ -133,7 +136,7 @@
 D*/
 /****************************************************************************/
 
-INT NS_PREFIX UG_GlobalMinINT (INT i)
+INT UG_GlobalMinINT (INT i)
 {
 	int l;
 	INT n;
@@ -167,7 +170,7 @@
 D*/
 /****************************************************************************/
 
-INT NS_PREFIX UG_GlobalSumINT (INT x)
+INT UG_GlobalSumINT (INT x)
 {
 	int l;
 	INT y;
@@ -203,7 +206,7 @@
 D*/
 /****************************************************************************/
 
-void NS_PREFIX UG_GlobalMaxNINT (INT n, INT *x)
+void UG_GlobalMaxNINT (INT n, INT *x)
 {
 	int i,l,size;
 	INT *y;
@@ -246,7 +249,7 @@
 D*/
 /****************************************************************************/
 
-void NS_PREFIX UG_GlobalMinNINT (INT n, INT *x)
+void UG_GlobalMinNINT (INT n, INT *x)
 {
 	int i,l,size;
 	INT *y;
@@ -289,7 +292,7 @@
 D*/
 /****************************************************************************/
 
-void NS_PREFIX UG_GlobalSumNINT (INT n, INT *xs)
+void UG_GlobalSumNINT (INT n, INT *xs)
 {
 	int l, i, size=sizeof(INT)*n;
 	INT *ys;
@@ -328,7 +331,7 @@
 D*/
 /****************************************************************************/
 
-DOUBLE NS_PREFIX UG_GlobalMaxDOUBLE (DOUBLE x)
+DOUBLE UG_GlobalMaxDOUBLE (DOUBLE x)
 {
     int l;
 	DOUBLE n;
@@ -362,7 +365,7 @@
 D*/
 /****************************************************************************/
 
-DOUBLE NS_PREFIX UG_GlobalMinDOUBLE (DOUBLE x)
+DOUBLE UG_GlobalMinDOUBLE (DOUBLE x)
 {
     int l;
 	DOUBLE y;
@@ -396,7 +399,7 @@
 D*/
 /****************************************************************************/
 
-DOUBLE NS_PREFIX UG_GlobalSumDOUBLE (DOUBLE x)
+DOUBLE UG_GlobalSumDOUBLE (DOUBLE x)
 {
 	int l;
 	DOUBLE y;
@@ -432,7 +435,7 @@
 D*/
 /****************************************************************************/
 
-void NS_PREFIX UG_GlobalMaxNDOUBLE (INT n, DOUBLE *x)
+void UG_GlobalMaxNDOUBLE (INT n, DOUBLE *x)
 {
 	int i,l,size;
 	DOUBLE *y;
@@ -475,7 +478,7 @@
 D*/
 /****************************************************************************/
 
-void NS_PREFIX UG_GlobalMinNDOUBLE (INT n, DOUBLE *x)
+void UG_GlobalMinNDOUBLE (INT n, DOUBLE *x)
 {
 	int i,l,size;
 	DOUBLE *y;
@@ -518,7 +521,7 @@
 D*/
 /****************************************************************************/
 
-void NS_PREFIX UG_GlobalSumNDOUBLE (INT n, DOUBLE *x)
+void UG_GlobalSumNDOUBLE (INT n, DOUBLE *x)
 {
 	int l, i, size=sizeof(DOUBLE)*n;
 	DOUBLE *y;
@@ -537,22 +540,6 @@
 	memmgr_FreeTMEM(y, TMEM_STD);
 }
 
-/* extra hack for GID */
-
-DDD_GID NS_PREFIX UG_GlobalMaxGID (DDD_GID i)
-{
-    int l;
-    DDD_GID n;
-
-    for (l=degree-1; l>=0; l--)
-    {
-        GetConcentrate(l,&n,sizeof(DDD_GID));
-        i = MAX(i,n);
-    }
-    Concentrate(&i,sizeof(DDD_GID));
-    Broadcast(&i,sizeof(DDD_GID));
-    return(i);
-}
-
-
 #endif  /* ModelP */
+
+END_UGDIM_NAMESPACE
diff -ru ug-orig/parallel/dddif/trans.c ug-patched/parallel/dddif/trans.c
--- ug-orig/parallel/dddif/trans.c	2006-07-25 10:43:11.000000000 +0200
+++ ug-patched/parallel/dddif/trans.c	2008-12-19 11:12:24.000000000 +0100
@@ -29,6 +29,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <assert.h>
 
 #include "parallel.h"
@@ -101,7 +102,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/parallel/dddif/trans.c,v 1.37 2006/07/25 08:43:11 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
Nur in ug-orig/parallel/dddobj: CVS.
diff -ru ug-orig/parallel/initparallel.c ug-patched/parallel/initparallel.c
--- ug-orig/parallel/initparallel.c	2004-10-22 11:49:39.000000000 +0200
+++ ug-patched/parallel/initparallel.c	2009-04-06 15:03:54.000000000 +0200
@@ -28,6 +28,7 @@
 /****************************************************************************/
 
 /* ANSI includes */
+#include "config.h"
 #include <stdio.h>
 
 /* low module */
@@ -66,7 +67,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/parallel/initparallel.c,v 1.6 2004/10/22 09:49:39 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*D																		
@@ -89,7 +90,7 @@
 D*/																			
 /****************************************************************************/
 
-INT NS_PREFIX InitParallel (int *argcp, char ***argvp)
+INT NS_DIM_PREFIX InitParallel (int *argcp, char ***argvp)
 {
 	INT err;
 
@@ -138,7 +139,7 @@
 D*/																			
 /****************************************************************************/
 
-INT NS_PREFIX ExitParallel (void)
+INT NS_DIM_PREFIX ExitParallel (void)
 {
 	INT err;
 	
diff -ru ug-orig/parallel/initparallel.h ug-patched/parallel/initparallel.h
--- ug-orig/parallel/initparallel.h	2004-07-28 16:08:34.000000000 +0200
+++ ug-patched/parallel/initparallel.h	2009-04-06 15:03:54.000000000 +0200
@@ -20,7 +20,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/parallel/initparallel.h,v 1.3 2004/07/28 14:08:34 stefan Exp $
+$Header$
 */
 
 #ifndef __INITPARALLEL_H__
@@ -29,7 +29,7 @@
 #include "compiler.h"
 #include "namespace.h"
 
-START_UG_NAMESPACE
+START_UGDIM_NAMESPACE
 	
 /****************************************************************************/
 /*																			*/
@@ -41,6 +41,6 @@
 INT InitParallel (int *argcp, char ***argvp);
 INT ExitParallel (void);
 
-END_NAMESPACE
+END_UGDIM_NAMESPACE
 
 #endif
diff -ru ug-orig/parallel/Makefile.am ug-patched/parallel/Makefile.am
--- ug-orig/parallel/Makefile.am	2006-08-28 16:27:17.000000000 +0200
+++ ug-patched/parallel/Makefile.am	2009-04-29 14:30:36.000000000 +0200
@@ -1,7 +1,9 @@
-# $Id: Makefile.am,v 1.5 2006/08/28 14:27:17 sander Exp $
+# $Id: Makefile.am 8348 2009-04-29 12:30:36Z sander $
 
-# Hack: Don't compile the chaco part because it is not included
-#       in the anonymous cvs
+# Build the following subdirectories.  The chaco subdir
+# is not built because it is not available in the anonymous
+# Heidelberg CVS and not in the set of patches we provide
+# either.  AFAIK it doesn't work anyways.
 SUBDIRS = dddif ddd util ppif #chaco
 
 if PARALLEL
@@ -14,7 +16,7 @@
 
 SOURCES = initparallel.c initparallel.h
 
-SUBLIBS = ddd/libddd.la ppif/MPI/libppifmpi.la 
+SUBLIBS = ddd/libddd2.la ddd/libddd3.la ppif/MPI/libppifmpi.la 
 
 libparallel2_la_SOURCES = $(SOURCES)
 libparallel2_la_CPPFLAGS = $(UG_2DFLAGS)
Nur in ug-orig/parallel/ppif: CVS.
Nur in ug-orig/parallel/ppif: .cvsignore.
Nur in ug-orig/parallel/ppif/DUMMY: CVS.
diff -ru ug-orig/parallel/ppif/DUMMY/ppif.c ug-patched/parallel/ppif/DUMMY/ppif.c
--- ug-orig/parallel/ppif/DUMMY/ppif.c	1996-06-24 16:32:41.000000000 +0200
+++ ug-patched/parallel/ppif/DUMMY/ppif.c	2008-12-19 11:12:24.000000000 +0100
@@ -42,6 +42,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <time.h>
@@ -69,7 +70,7 @@
 /****************************************************************************/
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ppif/DUMMY/ppif.c,v 1.5 1996/06/24 14:32:41 stefan Exp $",PPIF_RCS_STRING)
+RCSID("$Header$",PPIF_RCS_STRING)
 
 
 /****************************************************************************/
diff -ru ug-orig/parallel/ppif/Makefile.am ug-patched/parallel/ppif/Makefile.am
--- ug-orig/parallel/ppif/Makefile.am	2005-08-09 09:39:06.000000000 +0200
+++ ug-patched/parallel/ppif/Makefile.am	2005-08-09 09:39:06.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.3 2005/08/09 07:39:06 sander Exp $
+# $Id: Makefile.am 8092 2005-08-09 07:39:06Z sander $
 
 SUBDIRS = MPI
 
Nur in ug-orig/parallel/ppif/MPI: CVS.
Nur in ug-orig/parallel/ppif/MPI: .cvsignore.
diff -ru ug-orig/parallel/ppif/MPI/Makefile.am ug-patched/parallel/ppif/MPI/Makefile.am
--- ug-orig/parallel/ppif/MPI/Makefile.am	2004-10-19 17:12:28.000000000 +0200
+++ ug-patched/parallel/ppif/MPI/Makefile.am	2004-10-19 17:12:28.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.2 2004/10/19 15:12:28 thimo Exp $
+# $Id: Makefile.am 7858 2004-10-19 15:12:28Z thimo $
 
 if MPI
   MLIB = libppifmpi.la
diff -ru ug-orig/parallel/ppif/MPI/ppif.c ug-patched/parallel/ppif/MPI/ppif.c
--- ug-orig/parallel/ppif/MPI/ppif.c	2007-10-16 14:46:59.000000000 +0200
+++ ug-patched/parallel/ppif/MPI/ppif.c	2009-04-29 15:11:55.000000000 +0200
@@ -45,6 +45,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <sys/types.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -87,7 +88,7 @@
 #define RAND_MSG_SIZE	128	/* max size of random messages              */
 #define MAXT		15	/* maximum number of downtree nodes max     */
 				/* log2(P)                                  */
-#define MAXVCHAN	8192 /* maximum number of channels               */
+#define MAXVCHAN	1024 /* maximum number of channels               */
 #define PTYPE_ANY	-1L	/* process type: any process                */
 
 #define ID_ARRAY	100	/* channel id: array                        */
@@ -132,7 +133,7 @@
 /****************************************************************************/
 
 /* Revision Control System string */
-/*RCSID("$Header: /home/cvsroot/UG/ug/parallel/ppif/MPI/ppif.c,v 1.22 2007/10/16 12:46:59 lampe Exp $",PPIF_RCS_STRING)*/
+/*RCSID("$Header$",PPIF_RCS_STRING)*/
 
 
 /****************************************************************************/
@@ -787,7 +788,7 @@
    return ((int)(100.0*((float)vc_count)/((float)MAXVCHAN)));
 }
 
-void PPIF_NS_PREFIX PrintHostMessage (char *s)
+void PPIF_NS_PREFIX PrintHostMessage (const char *s)
 
 {
    printf ("%s", s);
Nur in ug-orig/parallel/ppif/NX: CVS.
diff -ru ug-orig/parallel/ppif/NX/ppif.c ug-patched/parallel/ppif/NX/ppif.c
--- ug-orig/parallel/ppif/NX/ppif.c	1997-10-13 14:50:41.000000000 +0200
+++ ug-patched/parallel/ppif/NX/ppif.c	2008-12-19 11:12:24.000000000 +0100
@@ -55,6 +55,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <time.h>
@@ -154,7 +155,7 @@
 /****************************************************************************/
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ppif/NX/ppif.c,v 1.10 1997/10/13 12:50:41 birken Exp $",PPIF_RCS_STRING)
+RCSID("$Header$",PPIF_RCS_STRING)
 
 
 /****************************************************************************/
Nur in ug-orig/parallel/ppif/NXLIB: CVS.
diff -ru ug-orig/parallel/ppif/NXLIB/ppif.c ug-patched/parallel/ppif/NXLIB/ppif.c
--- ug-orig/parallel/ppif/NXLIB/ppif.c	1996-06-24 16:32:52.000000000 +0200
+++ ug-patched/parallel/ppif/NXLIB/ppif.c	2008-12-19 11:12:24.000000000 +0100
@@ -43,6 +43,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <time.h>
@@ -129,7 +130,7 @@
 /****************************************************************************/
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ppif/NXLIB/ppif.c,v 1.5 1996/06/24 14:32:52 stefan Exp $",PPIF_RCS_STRING)
+RCSID("$Header$",PPIF_RCS_STRING)
 
 
 /****************************************************************************/
Nur in ug-orig/parallel/ppif/PARIX: CVS.
diff -ru ug-orig/parallel/ppif/PARIX/ppif.c ug-patched/parallel/ppif/PARIX/ppif.c
--- ug-orig/parallel/ppif/PARIX/ppif.c	1998-08-20 13:43:28.000000000 +0200
+++ ug-patched/parallel/ppif/PARIX/ppif.c	2008-12-19 11:12:24.000000000 +0100
@@ -43,6 +43,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -152,7 +153,7 @@
 /****************************************************************************/
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ppif/PARIX/ppif.c,v 1.7 1998/08/20 11:43:28 stefan Exp $",PPIF_RCS_STRING)
+RCSID("$Header$",PPIF_RCS_STRING)
 
 
 /****************************************************************************/
diff -ru ug-orig/parallel/ppif/ppif_general.h ug-patched/parallel/ppif/ppif_general.h
--- ug-orig/parallel/ppif/ppif_general.h	1997-07-18 13:04:24.000000000 +0200
+++ ug-patched/parallel/ppif/ppif_general.h	1997-07-18 13:05:17.000000000 +0200
@@ -18,7 +18,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/parallel/ppif/ppif_general.h,v 1.8 1997/07/18 11:04:24 birken Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/parallel/ppif/ppif.h ug-patched/parallel/ppif/ppif.h
--- ug-orig/parallel/ppif/ppif.h	2005-07-18 15:15:50.000000000 +0200
+++ ug-patched/parallel/ppif/ppif.h	2009-04-29 15:11:55.000000000 +0200
@@ -17,7 +17,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/parallel/ppif/ppif.h,v 1.11 2005/07/18 13:15:50 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -172,7 +172,7 @@
 
 /* miscellaneous */
 int         UsedSpace        (void);
-void        PrintHostMessage (char *s);
+void        PrintHostMessage (const char *s);
 double      CurrentTime      (void);
 int         Distance		 (int p, int q);
 int         aid_to_pid       (int x, int y, int z);
@@ -265,7 +265,7 @@
 		int    UsedSpace (void) {
 			return ::UsedSpace();
 		}
-		void   PrintHostMessage (char *s) {
+		void   PrintHostMessage (const char *s) {
 			::PrintHostMessage(s);
 		}
 		double CurrentTime (void) {
Nur in ug-orig/parallel/ppif/PVM: CVS.
diff -ru ug-orig/parallel/ppif/PVM/ppif.c ug-patched/parallel/ppif/PVM/ppif.c
--- ug-orig/parallel/ppif/PVM/ppif.c	2000-11-17 14:57:51.000000000 +0100
+++ ug-patched/parallel/ppif/PVM/ppif.c	2008-12-19 11:12:24.000000000 +0100
@@ -42,6 +42,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -122,7 +123,7 @@
 
 /* Revision Control System string */
 /*
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ppif/PVM/ppif.c,v 1.12 2000/11/17 13:57:51 lampe Exp $",PPIF_RCS_STRING)
+RCSID("$Header$",PPIF_RCS_STRING)
 */
 
 
Nur in ug-orig/parallel/ppif/SEQ: CVS.
Nur in ug-orig/parallel/ppif/SHMEM: CVS.
diff -ru ug-orig/parallel/ppif/SHMEM/ppif.c ug-patched/parallel/ppif/SHMEM/ppif.c
--- ug-orig/parallel/ppif/SHMEM/ppif.c	1997-12-15 11:14:31.000000000 +0100
+++ ug-patched/parallel/ppif/SHMEM/ppif.c	2008-12-19 11:12:24.000000000 +0100
@@ -66,6 +66,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -282,7 +283,7 @@
 /****************************************************************************/
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ppif/SHMEM/ppif.c,v 1.3 1997/12/15 10:14:31 stefan Exp $",PPIF_RCS_STRING)
+RCSID("$Header$",PPIF_RCS_STRING)
 
 
 /****************************************************************************/
Nur in ug-orig/parallel/ppif/SHMEMT3D: CVS.
diff -ru ug-orig/parallel/ppif/SHMEMT3D/ppif.c ug-patched/parallel/ppif/SHMEMT3D/ppif.c
--- ug-orig/parallel/ppif/SHMEMT3D/ppif.c	1996-11-29 14:33:10.000000000 +0100
+++ ug-patched/parallel/ppif/SHMEMT3D/ppif.c	2008-12-19 11:12:24.000000000 +0100
@@ -66,6 +66,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -287,7 +288,7 @@
 /****************************************************************************/
 
 /* Revision Control System string */
-RCSID("$Header: /home/cvsroot/UG/ug/parallel/ppif/SHMEMT3D/ppif.c,v 1.7 1996/11/29 13:33:10 birken Exp $",PPIF_RCS_STRING)
+RCSID("$Header$",PPIF_RCS_STRING)
 
 
 /****************************************************************************/
Nur in ug-orig/parallel/util: CVS.
Nur in ug-orig/parallel/util: .cvsignore.
diff -ru ug-orig/parallel/util/Makefile.am ug-patched/parallel/util/Makefile.am
--- ug-orig/parallel/util/Makefile.am	2004-09-09 19:50:27.000000000 +0200
+++ ug-patched/parallel/util/Makefile.am	2004-09-09 19:50:27.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.1 2004/09/09 17:50:27 thimo Exp $
+# $Id: Makefile.am 7795 2004-09-09 17:50:27Z thimo $
 
 noinst_LTLIBRARIES = libparutil.la
 
diff -ru ug-orig/parallel/util/xbc.c ug-patched/parallel/util/xbc.c
--- ug-orig/parallel/util/xbc.c	2005-07-18 15:19:47.000000000 +0200
+++ ug-patched/parallel/util/xbc.c	2008-12-19 11:12:24.000000000 +0100
@@ -6,9 +6,10 @@
 */
 
 /*
-$Header: /home/cvsroot/UG/ug/parallel/util/xbc.c,v 1.5 2005/07/18 13:19:47 sander Exp $
+$Header$
 */
 
+#include "config.h"
 #include <stddef.h>
 #include <stdarg.h>
 #include <string.h>
diff -ru ug-orig/parallel/util/xbc.h ug-patched/parallel/util/xbc.h
--- ug-orig/parallel/util/xbc.h	2003-01-13 15:56:13.000000000 +0100
+++ ug-patched/parallel/util/xbc.h	2003-01-13 15:56:13.000000000 +0100
@@ -6,7 +6,7 @@
 */
 
 /*
-$Header: /home/cvsroot/UG/ug/parallel/util/xbc.h,v 1.2 2003/01/13 14:56:13 lampe Exp $
+$Header$
 */
 
 #ifndef __XBC__
Nur in ug-orig/pm: CVS.
diff -ru ug-orig/README.autotools ug-patched/README.autotools
--- ug-orig/README.autotools	2004-09-02 14:22:03.000000000 +0200
+++ ug-patched/README.autotools	2004-09-02 14:22:17.000000000 +0200
@@ -86,4 +86,4 @@
 
 -- snip --
 
-$Id: README.autotools,v 1.1 2004/09/02 12:22:03 thimo Exp $
+$Id: README.autotools 7772 2004-09-02 12:22:17Z thimo $
Nur in ug-orig/tools: CVS.
Nur in ug-orig/tools: .cvsignore.
diff -ru ug-orig/tools/m2ps.c ug-patched/tools/m2ps.c
--- ug-orig/tools/m2ps.c	2005-07-08 11:11:57.000000000 +0200
+++ ug-patched/tools/m2ps.c	2008-12-19 11:12:59.000000000 +0100
@@ -28,6 +28,7 @@
 /****************************************************************************/
 
 
+#include "config.h"
 #include <string.h>
 #include <strings.h>
 #include <math.h>
@@ -124,7 +125,7 @@
 static int swap_bytes;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/tools/m2ps.c,v 1.8 2005/07/08 09:11:57 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
diff -ru ug-orig/tools/Makefile.am ug-patched/tools/Makefile.am
--- ug-orig/tools/Makefile.am	2005-07-18 11:41:02.000000000 +0200
+++ ug-patched/tools/Makefile.am	2007-02-14 21:27:52.000000000 +0100
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.3 2005/07/18 09:41:02 thimo Exp $
+# $Id: Makefile.am 8267 2007-02-14 20:27:52Z christi $
 
 AM_CFLAGS = $(UG_CPPFLAGS)
 
@@ -17,13 +17,13 @@
 TOOLS = ugnetgen ugstl $(XUGV) ugmesh m2ps
 
 if BUILD2D
-  TOOLS_2D = ugmgs2 ugpfm2 ugmarc2
+  TOOLS_2D = ugmgs2 ugpfm2
 else
   TOOLS_2D =
 endif
 
 if BUILD3D
-  TOOLS_3D = ugmgs3 ugpfm3 ugmarc3
+  TOOLS_3D = ugmgs3 ugpfm3
 else
   TOOLS_3D =
 endif
@@ -33,9 +33,9 @@
 xugv_LDFLAGS = $(UG_XLIBS)
 
 # !!! std-domain / device SIF ok?
-UG_2DLIBS = $(top_builddir)/lib/libug2.la $(top_builddir)/dom/std/libdomS2.la \
+UG_2DLIBS = $(top_builddir)/lib/libugS2.la \
   $(top_builddir)/dev/sif/libdevS.la
-UG_3DLIBS = $(top_builddir)/lib/libug3.la $(top_builddir)/dom/std/libdomS3.la \
+UG_3DLIBS = $(top_builddir)/lib/libugS3.la \
   $(top_builddir)/dev/sif/libdevS.la
 
 ugpfm2_SOURCES = ugpfm.c
@@ -56,13 +56,3 @@
 ugmgs3_CPPFLAGS = $(UG_2DFLAGS)
 ugmgs3_LDFLAGS = $(UG_LDFLAGS)
 ugmgs3_LDADD = $(UG_2DLIBS)
-
-ugmarc2_SOURCES = ugmarc.c
-ugmarc2_CPPFLAGS = $(UG_2DFLAGS)
-ugmarc2_LDFLAGS = $(UG_LDFLAGS)
-ugmarc2_LDADD = $(UG_2DLIBS)
-
-ugmarc3_SOURCES = ugmarc.c
-ugmarc3_CPPFLAGS = $(UG_3DFLAGS)
-ugmarc3_LDFLAGS = $(UG_LDFLAGS)
-ugmarc3_LDADD = $(UG_3DLIBS)
diff -ru ug-orig/tools/Makefile.tools ug-patched/tools/Makefile.tools
--- ug-orig/tools/Makefile.tools	2004-09-01 19:39:02.000000000 +0200
+++ ug-patched/tools/Makefile.tools	2007-01-23 20:46:10.000000000 +0100
@@ -20,13 +20,12 @@
 			  $(UGROOT)/lib/libgrape$(GRAPE)$(DIM).a \
 			  $(UGROOT)/lib/libgg$(DIM).a 
 
-OBJECTS = ugnetgen.o ugstl.o xugv.o m2ps.o ugmgs.o ugpfm.o ugmarc.o ugmesh.o
+OBJECTS = ugnetgen.o ugstl.o xugv.o m2ps.o ugmgs.o ugpfm.o ugmesh.o
 
 all : $(OBJECTS) Makefile.tools
 	$(UG_LINK) m2ps.o  -o $(UGROOT)/bin/m2ps  $(UG_LFLAGS) 
 	$(UG_LINK) ugmgs.o -o $(UGROOT)/bin/ugmgs $(UGLIBS) $(UG_LFLAGS) $(UGLIBS) 
 	$(UG_LINK) ugpfm.o -o $(UGROOT)/bin/ugpfm $(UGLIBS) $(UG_LFLAGS) $(UGLIBS)
-	$(UG_LINK) ugmarc.o -o $(UGROOT)/bin/ugmarc  $(UGLIBS) $(UG_LFLAGS) 
 	$(UG_LINK) ugnetgen.o -o $(UGROOT)/bin/ugnetgen  $(UGLIBS) $(UG_LFLAGS) 
 	$(UG_LINK) ugstl.o -o $(UGROOT)/bin/ugstl  $(UGLIBS) $(UG_LFLAGS) 
 	$(UG_LINK) ugmesh.o -o $(UGROOT)/bin/ugmesh $(UGLIBS) $(UG_LFLAGS) 
@@ -38,4 +37,4 @@
 clean:
 	rm -f $(OBJECTS)
 	rm -f $(UGROOT)/bin/xugv $(UGROOT)/bin/m2ps $(UGROOT)/bin/ugmgs
-	rm -f $(UGROOT)/bin/ugmarc $(UGROOT)/bin/ugstl $(UGROOT)/bin/ugmesh
+	rm -f $(UGROOT)/bin/ugstl $(UGROOT)/bin/ugmesh
diff -ru ug-orig/tools/ugansis.c ug-patched/tools/ugansis.c
--- ug-orig/tools/ugansis.c	2000-03-01 14:49:49.000000000 +0100
+++ ug-patched/tools/ugansis.c	2008-12-19 11:12:59.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -49,7 +50,7 @@
 /****************************************************************************/
 
 /*  UG_RCS_STRING 
-$Header: /home/cvsroot/UG/ug/tools/ugansis.c,v 1.1 2000/03/01 13:49:49 wieners Exp $
+$Header$
 */
 
 #include "gen.h"
Nur in ug-orig/tools: ugmarc.c.
diff -ru ug-orig/tools/ugmesh.c ug-patched/tools/ugmesh.c
--- ug-orig/tools/ugmesh.c	1999-12-03 12:07:41.000000000 +0100
+++ ug-patched/tools/ugmesh.c	2008-12-19 11:12:59.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -52,7 +53,7 @@
 /****************************************************************************/
 
 /* UG_RCS_STRING
-$Header: /home/cvsroot/UG/ug/tools/ugmesh.c,v 1.2 1999/12/03 11:07:41 wieners Exp $
+$Header$
 */
 
 typedef struct {
diff -ru ug-orig/tools/ugmgs.c ug-patched/tools/ugmgs.c
--- ug-orig/tools/ugmgs.c	2005-07-08 11:11:57.000000000 +0200
+++ ug-patched/tools/ugmgs.c	2008-12-19 11:12:59.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -87,7 +88,7 @@
 /****************************************************************************/
 
 /* RCS string */
-/*static char RCS_ID("$Header: /home/cvsroot/UG/ug/tools/ugmgs.c,v 1.19 2005/07/08 09:11:57 sander Exp $",UG_RCS_STRING);*/
+/*static char RCS_ID("$Header$",UG_RCS_STRING);*/
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/tools/ugnetgen.c ug-patched/tools/ugnetgen.c
--- ug-orig/tools/ugnetgen.c	1999-12-06 13:58:56.000000000 +0100
+++ ug-patched/tools/ugnetgen.c	2008-12-19 11:12:59.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -49,7 +50,7 @@
 /****************************************************************************/
 
 /*  UG_RCS_STRING 
-$Header: /home/cvsroot/UG/ug/tools/ugnetgen.c,v 1.3 1999/12/06 12:58:56 wieners Exp $
+$Header$
 */
 
 int main (int argc, char **argv)
diff -ru ug-orig/tools/ugpfm.c ug-patched/tools/ugpfm.c
--- ug-orig/tools/ugpfm.c	2006-11-10 11:26:14.000000000 +0100
+++ ug-patched/tools/ugpfm.c	2009-04-29 15:11:55.000000000 +0200
@@ -25,8 +25,11 @@
 /*																			*/
 /****************************************************************************/
 
+#ifndef ModelP
 #define ModelP
+#endif
 
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -156,15 +159,13 @@
 /*																			*/
 /****************************************************************************/
 
-static int debug=0;
-
 #ifdef MERGE_DEBUG
 	static HASH_TABLE *ht_nodes=NULL;
 #endif
 HASH_TABLE *ht_mem=NULL;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/tools/ugpfm.c,v 1.27 2006/11/10 10:26:14 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -179,7 +180,7 @@
 /****************************** ugpfm-low ***********************************/
 /****************************************************************************/
 
-void *ht_malloc (size_t size, char *ident)
+void *ht_malloc (size_t size, const char *ident)
 {
 	int i,key[MAX_KEY_LEN+1];
 	void *mem,*obj;
@@ -491,9 +492,9 @@
 	return (0);
 }
 
-int HashTablePrint (HASH_TABLE *ht, char *name)
+int HashTablePrint (HASH_TABLE *ht, const char *name)
 {
-	printf("######### %s #########\n");	
+    printf("######### %s #########\n", name);	
 	if (ht!=NULL)
 	{
 		printf("n_obj: %d\n",ht->n_obj);
@@ -802,7 +803,7 @@
 
 	/* allocate ProcList */
     ProcList = (unsigned short*)ht_malloc(PROCLISTSIZE(map->nparfiles)*sizeof(unsigned short),"const");
-    if (ProcList==NULL) {printf("ERROR in 'MergeMultigrid': cannot allocate 'ProcList'\n",i);return (1);}
+    if (ProcList==NULL) {printf("ERROR in 'MergeMultigrid': cannot allocate 'ProcList'\n");return (1);}
 
 	/* allocate dynamic lists */
 	mg_general_list=(MGIO_MG_GENERAL*)ht_malloc(map->nparfiles*sizeof(MGIO_MG_GENERAL),"const");
@@ -1333,7 +1334,7 @@
 	strcpy(buffer,data);
 	strcat(buffer,"/data.0000");
 	if (Read_OpenDTFile(buffer)) 				{printf("cannot open file '%s' in 'GetMgFromData'\n",buffer); return (1);}
-	if (Read_DT_General(&dio_general))			{printf("cannot read 'dio_general' in 'GetMgFromData'\n",buffer); return (1);}
+	if (Read_DT_General(&dio_general))			{printf("cannot read 'dio_general' in 'GetMgFromData'\n"); return (1);}
 	strcpy(mgdesc->mgname,dio_general.mgfile);
 	mgdesc->mgname[strlen(mgdesc->mgname)-8]='\0';
 	mgdesc->magic_cookie=dio_general.magic_cookie;
@@ -1363,7 +1364,7 @@
 	strcpy(buffer,data);
 	strcat(buffer,"/data.0000");
 	if (Read_OpenDTFile(buffer))                {printf("cannot open file '%s' in 'MergeData'\n",buffer); return (1);}
-	if (Read_DT_General(&dio_general_out))      {printf("cannot read 'dio_general_out' in 'MergeData'\n",buffer); return (1);}
+	if (Read_DT_General(&dio_general_out))      {printf("cannot read 'dio_general_out' in 'MergeData'\n"); return (1);}
 	if (CloseDTFile())                          {printf("cannot close file '%s' in 'MergeData'\n",buffer); return (1);}
 	strcpy(dio_general_out.mgfile,data_map->out);
 	ndata_pn=0;
@@ -1393,7 +1394,7 @@
 		else						 printf("[%d]\n",i);
 		fflush(stdout);
 		if (Read_OpenDTFile(buffer))            {printf("cannot open file '%s' in 'MergeData'\n",buffer); return (1);}
-		if (Read_DT_General(&dio_general))      {printf("cannot read 'dio_general' in 'MergeData'\n",buffer); return (1);}
+		if (Read_DT_General(&dio_general))      {printf("cannot read 'dio_general' in 'MergeData'\n"); return (1);}
 		data_in=(double*)ht_malloc(dio_general.ndata*sizeof(double),"procloc");
 		if (data_in==NULL)						{printf("cannot allocate %d bytes for data_in in 'MergeData'\n",dio_general.ndata*sizeof(double)); return (1);}
 		if (Bio_Read_mdouble(dio_general.ndata,data_in))	{printf("cannot read data from %s in 'MergeData'\n",buffer); return (1);}
diff -ru ug-orig/tools/ugstl.c ug-patched/tools/ugstl.c
--- ug-orig/tools/ugstl.c	2005-07-08 11:11:57.000000000 +0200
+++ ug-patched/tools/ugstl.c	2009-04-29 15:11:55.000000000 +0200
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -67,7 +68,7 @@
 /****************************************************************************/
 
 /* UG_RCS_STRING
-$Header: /home/cvsroot/UG/ug/tools/ugstl.c,v 1.3 2005/07/08 09:11:57 sander Exp $
+$Header$
 */
 
 int Marc_Extended = 0;
@@ -132,7 +133,7 @@
 	return(0);	
 }
 
-static int file_readline (FILE *f, char *key)
+static int file_readline (FILE *f, const char *key)
 {
     char theLine[MAX_LEN];
 
diff -ru ug-orig/tools/ugv.c ug-patched/tools/ugv.c
--- ug-orig/tools/ugv.c	1998-02-23 16:44:30.000000000 +0100
+++ ug-patched/tools/ugv.c	2008-12-19 11:12:59.000000000 +0100
@@ -26,6 +26,7 @@
 /****************************************************************************/
 
 
+#include "config.h"
 #include <string.h>
 #include <strings.h>
 #include <math.h>
diff -ru ug-orig/tools/ugView.c ug-patched/tools/ugView.c
--- ug-orig/tools/ugView.c	1998-05-06 16:38:07.000000000 +0200
+++ ug-patched/tools/ugView.c	2008-12-19 11:12:59.000000000 +0100
@@ -27,6 +27,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <Types.h>
 #include <Memory.h>
 #include <Quickdraw.h>
diff -ru ug-orig/tools/xugv.c ug-patched/tools/xugv.c
--- ug-orig/tools/xugv.c	2006-11-08 16:04:49.000000000 +0100
+++ ug-patched/tools/xugv.c	2009-04-29 15:11:55.000000000 +0200
@@ -30,11 +30,12 @@
 
 
 /* general header files */
+#include "config.h"
 #include <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include <math.h>
-#ifndef __MACOSX__
+#ifdef HAVE_MALLOC_H
 #include <malloc.h>
 #endif
 #include <X11/Intrinsic.h>
@@ -123,7 +124,7 @@
 #define APPL_KLASSE    "Xugview"
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/tools/xugv.c,v 1.21 2006/11/08 15:04:49 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 XtAppContext kontext;		 	  /* application kontext */	
@@ -142,7 +143,7 @@
 FILE	 *stream;		      
 FILE *mstream[MAX_FILES];
 char	 *newfile;
-char	 *option;
+const char	 *option;
 short	fx, fy;	       /* dimensions of drawing object */
 short	mfx[MAX_FILES], mfy[MAX_FILES];	/* dimensions of drawing object */
 short fx_max, fy_max;
@@ -532,7 +533,7 @@
 	XPoint xy[SIZE]; 
 	char s[CSIZE];
 	unsigned char c,ac;
-	char *fn;
+	const char *fn;
 	char string[10];
 	char **list;
 	XGCValues gcv;
@@ -1101,7 +1102,7 @@
 	XPoint xy[SIZE]; 
 	char s[CSIZE];
 	unsigned char c,ac;
-	char *fn;
+	const char *fn;
 	char string[10];
 	char **list;
 	XGCValues gcv;
diff -ru ug-orig/ug.conf ug-patched/ug.conf
--- ug-orig/ug.conf	2008-08-19 15:17:28.000000000 +0200
+++ ug-patched/ug.conf	2003-02-06 15:12:32.000000000 +0100
@@ -129,10 +129,6 @@
 CAD = OFF
 
 
-# edit MLILU to use REB's mlilu solver
-#    - choose one of ON or OFF
-MLILU = OFF
-
 
 ######################################################################
 
@@ -143,3 +139,5 @@
 
 
 ######################################################################
+
+
diff -ru ug-orig/ugd.c ug-patched/ugd.c
--- ug-orig/ugd.c	2004-07-15 15:00:12.000000000 +0200
+++ ug-patched/ugd.c	2008-12-19 11:18:36.000000000 +0100
@@ -31,6 +31,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 
 /* low module */
@@ -59,7 +60,7 @@
 
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/ugd.c,v 1.12 2004/07/15 13:00:12 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 static char buf[MAXLINE];
diff -ru ug-orig/ui/avs.c ug-patched/ui/avs.c
--- ug-orig/ui/avs.c	2006-04-18 10:52:50.000000000 +0200
+++ ug-patched/ui/avs.c	2008-12-19 11:01:32.000000000 +0100
@@ -27,6 +27,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
@@ -86,7 +87,7 @@
 /****************************************************************************/
 
 /* data for CVS */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/ui/avs.c,v 1.26 2006/04/18 08:52:50 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 #ifdef ModelP
diff -ru ug-orig/ui/avs.h ug-patched/ui/avs.h
--- ug-orig/ui/avs.h	2006-05-08 14:17:51.000000000 +0200
+++ ug-patched/ui/avs.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/ui/avs.h,v 1.5 2006/05/08 12:17:51 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/ui/cmdint.c ug-patched/ui/cmdint.c
--- ug-orig/ui/cmdint.c	2005-07-20 09:05:20.000000000 +0200
+++ ug-patched/ui/cmdint.c	2009-04-29 15:11:55.000000000 +0200
@@ -30,6 +30,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <ctype.h>
 #include <string.h>
 #include <stdio.h>
@@ -81,7 +82,7 @@
 /*																			*/
 /****************************************************************************/
 
-#define VERSION 	"This is "UG_VERSION" from $Date: 2005/07/20 07:05:20 $\n"
+#define VERSION 	"This is "UG_VERSION" from $Date: 2009-04-29 15:11:55 +0200 (Mi, 29. Apr 2009) $\n"
 
 /* for interpreter */
 #define DONE				0
@@ -131,12 +132,12 @@
 
 struct stringOp {
 	INT type;
-	char *sptr;
+	const char *sptr;
 };
 
 struct lstringOp {
 	INT type;
-	char *sptr;
+	const char *sptr;
 	int length;
 };
 
@@ -174,7 +175,7 @@
 #endif
 
 /* variables for command interpreter */
-static char *cmdPtr,*cmdStart;
+static const char *cmdPtr,*cmdStart;
 static long executePos=0;
 static char *cmdBuffer;
 static char *executeBuffer;
@@ -192,7 +193,7 @@
 #endif
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/ui/cmdint.c,v 1.60 2005/07/20 07:05:20 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -501,7 +502,7 @@
 */
 /****************************************************************************/
 
-static INT ConvertStringToDouble(char *strAdr, int maxLen, char **endAdr, INT *type, DOUBLE *valuePtr)
+static INT ConvertStringToDouble(const char *strAdr, int maxLen, const char **endAdr, INT *type, DOUBLE *valuePtr)
 {
 	char c;
 	int endPos,anfPos,k;
@@ -686,7 +687,7 @@
 */
 /****************************************************************************/
 
-static INT StringCompare(DOUBLE *Diff, char *str1, char *str2, int maxLen1, int maxLen2)
+static INT StringCompare(DOUBLE *Diff, const char *str1, const char *str2, int maxLen1, int maxLen2)
 {
 	DOUBLE value1,value2;
 	int maxLen;
@@ -772,15 +773,15 @@
 {
 	char c,c1;
 	char buffer[MAXTOKENLENGTH];
-	char *stringAdr;
-	char *savedCmdPtr;
+	const char *stringAdr;
+	const char *savedCmdPtr;
 	int k;
 	INT error;
 	int itemType;
 	int signflag;
 	DOUBLE sign,t;
 	OPERAND newResult;
-	char *lastname;
+	const char *lastname;
 	ENVDIR *theDir;
 	
 	/* set error value */
@@ -1663,11 +1664,11 @@
 */
 /****************************************************************************/
 
-INT NS_DIM_PREFIX InterpretCommand (char *cmds)
+INT NS_DIM_PREFIX InterpretCommand (const char *cmds)
 {
 	int pLength;
 	INT error;
-	char *oldCmdPtr,*oldCmdStart;
+	const char *oldCmdPtr,*oldCmdStart;
 	
 	mutelevel = GetMuteLevel();
 	
@@ -1770,15 +1771,15 @@
 	
 	int StatusStack[BUFSIZE];
 	int RepeatStatusPos[MAXREPEAT];
-	char *RepeatPtr[MAXREPEAT];
+	const char *RepeatPtr[MAXREPEAT];
 	char buffer[MAXTOKENLENGTH];
 	char filename[MAXTOKENLENGTH];
 	char valueStr[32];
 	char *sptr;
 	
 	int StatusPos,RepeatPos;
-	char *cmdStart;
-	char *cmdEnd;
+	const char *cmdStart;
+	const char *cmdEnd;
 	
 	COMMAND *commandItem;
 	
@@ -2497,7 +2498,7 @@
 	int i,kerr;
 	char c,errLine[256],spcLine[256],buffer[256];
 	char *inpLine;
-	char *strStart;
+	const char *strStart;
 	int batch = FALSE;
 
 	/* reset doneFlag */
diff -ru ug-orig/ui/cmdint.h ug-patched/ui/cmdint.h
--- ug-orig/ui/cmdint.h	2006-05-08 14:17:51.000000000 +0200
+++ ug-patched/ui/cmdint.h	2009-04-29 15:11:55.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/ui/cmdint.h,v 1.13 2006/05/08 12:17:51 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -83,7 +83,7 @@
 int		GetDoneFlag 			(void);
 FILE   *FOpenScript				(const char *script, const char *mode);
 
-INT 	InterpretCommand		(char *cmds);
+INT 	InterpretCommand		(const char *cmds);
 
 INT 	InitCommandInterpreter	(INT argc, char **argv);
 INT     ExitCommandInterpreter       ();
diff -ru ug-orig/ui/cmdline.c ug-patched/ui/cmdline.c
--- ug-orig/ui/cmdline.c	2004-07-21 11:20:49.000000000 +0200
+++ ug-patched/ui/cmdline.c	2008-12-19 11:01:32.000000000 +0100
@@ -25,6 +25,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -84,7 +85,7 @@
 static INT optionCount=0;				/* number of options incl. cmd name */
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/ui/cmdline.c,v 1.22 2004/07/21 09:20:49 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -93,28 +94,22 @@
 /****************************************************************************/
 
 /****************************************************************************/
-/*D
-   CreateCommand - Register the commands exported by this module in the environ
+/** \brief Register the commands exported by this module in the environ
 
-   SYNOPSIS:
-   COMMAND *CreateCommand (const char *name, CommandProcPtr cmdProc);
-
-   PARAMETERS:
-.  name - Name of the command
-.  cmdProc - Pointer to a function of type 'CommandProcPtr'
+ \param name - Name of the command
+ \param cmdProc - Pointer to a function of type 'CommandProcPtr'
 
-   DESCRIPTION:
    This function registers a new command that can be executed from the UG
    shell. This process is described in detail on the page 'commands'.
 
-   SEE ALSO:
+   \sa
    'commands'.
 
-   RETURN VALUE:
-   COMMAND *
-.n   pointer to new 'COMMAND' structure if o.k.
-.n   NULL pointer in case of an error.
-D*/
+   \return <ul>
+   <li> pointer to new 'COMMAND' structure if o.k </li>
+   <li> NULL pointer in case of an error </li>
+   </ul>
+*/
 /****************************************************************************/
 
 COMMAND * NS_DIM_PREFIX CreateCommand (const char *name, CommandProcPtr cmdProc)
@@ -136,24 +131,18 @@
 }
 
 /****************************************************************************/
-/*D
-   GetCommand - Return pointer to command structure with name name
+/** \brief Return pointer to command structure with name name
 
-   SYNOPSIS:
-   COMMAND *GetCommand (const char *name);
-
-   PARAMETERS:
-.  name - Name of the command.
+ \param name - Name of the command.
 
-   DESCRIPTION:
    This function returns pointer to command structure with name 'name'. If
    it does not exist a 'NULL' pointer is returned.
 
-   RETURN VALUE:
-   COMMAND *
-.n      POINTER to 'COMMAND' structure
-.n      NULL if not found
-D*/
+   \return <ul>
+   <li> POINTER to 'COMMAND' structure </li>
+   <li> NULL if not found </li>
+   </ul>
+*/
 /****************************************************************************/
 
 COMMAND * NS_DIM_PREFIX GetCommand (const char *name)
@@ -166,24 +155,16 @@
 }
 
 /****************************************************************************/
-/*D
-   GetFirstCommand - Return pointer to first command structure of /Menu dir
-
-   SYNOPSIS:
-   COMMAND *GetFirstCommand ();
-
-   PARAMETERS:
-.  void - no arguments
+/** \brief Return pointer to first command structure of /Menu dir
 
-   DESCRIPTION:
    This function returns pointer to first command structure of the '/Menu' 
    environment directory.
 
-   RETURN VALUE:
-   COMMAND *
-.n      POINTER to 'COMMAND' structure
- .n     NULL if not found
-D*/
+   \return <ul>
+   <li> POINTER to 'COMMAND' structure </li>
+   <li> NULL if not found </li>
+   </ul>
+*/
 /****************************************************************************/
 
 COMMAND * NS_DIM_PREFIX GetFirstCommand ()
@@ -199,24 +180,18 @@
 }
 
 /****************************************************************************/
-/*D
-   GetNextCommand - Return pointer to command structure of /Menu dir following cmd
-
-   SYNOPSIS:
-   COMMAND *GetNextCommand (const COMMAND *cmd);
+/** \brief Return pointer to command structure of /Menu dir following cmd
 
-   PARAMETERS:
-.  cmd - pointer to a 'COMMAND'
+ \param cmd - pointer to a 'COMMAND'
   
-   DESCRIPTION:
    This function returns a pointer to the next command after 'cmd' in the
    list of commands.
 
-   RETURN VALUE:
-   COMMAND *
-.n      POINTER to
-.n      NULL if not found
-D*/
+   \return <ul>
+   <li> POINTER to next command </li>
+   <li> NULL if not found </li>
+   </ul>
+*/
 /****************************************************************************/
 
 COMMAND * NS_DIM_PREFIX GetNextCommand (const COMMAND *cmd)
@@ -236,8 +211,8 @@
    static int Str1inStr2 (const char *name1, const char *name2);
 
    PARAMETERS:
-.  name1 -
-.  name2 -
+ \param name1 -
+ \param name2 -
 
    DESCRIPTION:
    This function
@@ -258,25 +233,19 @@
 	return (0);
 }
 /****************************************************************************/
-/*D
-   SearchUgCmd - Find a UG command by (part of) name
+/** \brief Find a UG command by (part of) name
 
-   SYNOPSIS:
-   COMMAND *SearchUgCmd (const char *cmdName);
+ \param cmdName - name of command
 
-   PARAMETERS:
-.  cmdName - name of command
-
-   DESCRIPTION:
    This function searches for a command with name 'name'. The difference
    to 'GetCommand' is that the name need not be complete. Only the first few
    characters must be supplied that make the name unique.
 
-   RETURN VALUE:
-   COMMAND *
-.n      pointer to 'COMMAND' if found and unique
-.n      NULL if not found or ambiguos
-D*/
+   \return <ul>
+   <li> pointer to 'COMMAND' if found and unique </li>
+   <li> NULL if not found or ambiguous </li>
+   </ul>
+*/
 /********************************************************************************/
 
 COMMAND * NS_DIM_PREFIX SearchUgCmd (const char *cmdName)
@@ -319,25 +288,19 @@
 }
 
 /****************************************************************************/
-/*D
-   ReplaceCommand - Change an existing command or create a new one
-
-   SYNOPSIS:
-   COMMAND *ReplaceCommand (const char *name, CommandProcPtr cmdProc)
+/** \brief Change an existing command or create a new one
 
-   PARAMETERS:
-.  name - name of a command
-.  cmdProc - new command function
+ \param name - name of a command
+ \param cmdProc - new command function
 
-   DESCRIPTION:
    This function changes the execution function of an existing command 
    or creates a new one in case it does not exist already.
 
-   RETURN VALUE:
-   COMMAND *
-.n     pointer to new or replaced command
-.n     NULL in case of an error
-D*/
+   \return </ul>
+   <li> pointer to new or replaced command </li>
+   <li> NULL in case of an error </li>
+   </ul>
+*/
 /****************************************************************************/
 
 COMMAND * NS_DIM_PREFIX ReplaceCommand (const char *name, CommandProcPtr cmdProc)
@@ -361,24 +324,18 @@
 
 
 /****************************************************************************/
-/*D
-   ExecCommand - Processes the command line  and execute command
+/** \brief Processes the command line  and execute command
 
-   SYNOPSIS:
-   INT ExecCommand (char *cmdLine)
+ \param cmdLine - character string containing a complete command line
 
-   PARAMETERS:
-.  cmdLine - character string containing a complete command line
-
-   DESCRIPTION:
    This function processes the command line, i.e. it constructs the 'argc'
    'argv' arrays and calls the execution function of the command.
 
-   RETURN VALUE:
-   INT
-.n    0 if ok
-.n    1 if error occured.
-D*/
+   \return <ul>
+   <li> 0 if ok </li>
+   <li> 1 if error occured </li>
+   </ul>
+*/
 /****************************************************************************/
 
 INT  NS_DIM_PREFIX ExecCommand (char *cmdLine)
diff -ru ug-orig/ui/cmdline.h ug-patched/ui/cmdline.h
--- ug-orig/ui/cmdline.h	2006-06-02 18:14:17.000000000 +0200
+++ ug-patched/ui/cmdline.h	2006-06-02 18:15:49.000000000 +0200
@@ -22,7 +22,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/ui/cmdline.h,v 1.13 2006/06/02 16:14:17 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/ui/commands.c ug-patched/ui/commands.c
--- ug-orig/ui/commands.c	2005-08-26 12:31:10.000000000 +0200
+++ ug-patched/ui/commands.c	2008-12-19 11:01:32.000000000 +0100
@@ -47,6 +47,7 @@
 /****************************************************************************/
 
 /* standard C library */
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -215,7 +216,7 @@
 
 struct MarkRule
 {
-	char *RuleName;	/*!< what you type in the mark cmdline	*/
+	const char *RuleName;	/*!< what you type in the mark cmdline	*/
 	INT   RuleId;	/*!< corresponding rule ID for refine 	*/
 };
 
@@ -316,7 +317,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/ui/commands.c,v 1.341 2005/08/26 10:31:10 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 
 /****************************************************************************/
@@ -590,7 +591,7 @@
 static INT DateCommand (INT argc, char **argv)
 {
 	time_t Time;
-	char *fmt;
+	const char *fmt;
 	INT i,svopt;
 	
 	/* check options */
@@ -2405,7 +2406,7 @@
 		
 
 
-static INT ReadSaveDataInput (MULTIGRID *theMG, INT argc, char **argv, char *VDSym, char EvalChar, VECDATA_DESC **theVD, EVALUES **theEVal, EVECTOR **theEVec)
+static INT ReadSaveDataInput (MULTIGRID *theMG, INT argc, char **argv, const char *VDSym, char EvalChar, VECDATA_DESC **theVD, EVALUES **theEVal, EVECTOR **theEVec)
 {
 	INT i;
 	
diff -ru ug-orig/ui/commands.doc ug-patched/ui/commands.doc
--- ug-orig/ui/commands.doc	2005-02-16 16:33:15.000000000 +0100
+++ ug-patched/ui/commands.doc	2007-01-21 15:36:08.000000000 +0100
@@ -608,21 +608,22 @@
 \section Syntax
    'open \<filename> [$t \<type>] [$m \<mg name>] [$b \<problem>] [$f \<format>] [$h \<heapsize>]'
 
-  <li> \<filename>             		- the name of the multigrid file (the fule name will be composed
-									to: \<filename>.ug.mg.\<type>
-  <li> $t~\<type>					- file was saved with type: asc (default) or bin
-  <li> \<mg~name>					- grid will be created with this name
-  <li> $p~\<boundary~value~problem>	- a boundary value problem
-									(overrides saved one)
-  <li> $f~\<format>            		- one of the enroled formats matching with \<boundary value problem>
-									(overrides saved one)
-  <li> $h~\<heapsize>          		- the heapsize to be allocated
-									(overrides saved one)
-   
+  <ul>
+  <li> \<filename>             		- the name of the multigrid file (the full name will be composed
+					to: \<filename>.ug.mg.\<type> </li>
+  <li> $t \<type>			- file was saved with type: asc (default) or bin </li>
+  <li> $m \<mg name>			- grid will be created with this name </li>
+  <li> $p \<boundary value problem>	- a boundary value problem (overrides saved one) </li>
+  <li> $f \<format>            		- one of the enroled formats matching with \<boundary value problem>
+									(overrides saved one) </li>
+  <li> $h \<heapsize>          		- the heapsize to be allocated
+									(overrides saved one) </li>
+  </ul>   
+
  \section Keywords
    multigrid, new, open, file
 
-   SEE ALSO:
+   \sa
    'new', 'save'
 */
 /****************************************************************************/
@@ -636,19 +637,21 @@
 \section Syntax
    'save [\<name>] [$t \<type>] [$r [0|1]] [$c \<comment>]'
 
-  <li> \<name>                  - name to save with (default is the mgname)
+  <ul>
+  <li> \<name>                  - name to save with (default is the mgname) </li>
 .n								if name is ending in .scr a script file is saved which
 								will generate the surface of the grid as level 0 on execution
   <li> $t~\<type>			   - type can be asc (default> or bin. asc and bin can be opened with
-								the open command
-  <li> $c~\<comment>            - optionally specify a comment string
-  <li> $r~[0|1]                - 0: replace (default), 1: rename existing mg file (using modification date)
-   
+								the open command </li>
+  <li> $c~\<comment>            - optionally specify a comment string </li>
+  <li> $r~[0|1]                - 0: replace (default), 1: rename existing mg file (using modification date) </li>
+  </ul>   
+
  \section Keywords
    multigrid, save, write, data, file, output
 
-   SEE ALSO:
-   'open'
+   \sa
+   open
 */
 /****************************************************************************/
 
diff -ru ug-orig/ui/commands.h ug-patched/ui/commands.h
--- ug-orig/ui/commands.h	2006-06-02 18:14:17.000000000 +0200
+++ ug-patched/ui/commands.h	2007-01-08 14:59:31.000000000 +0100
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/ui/commands.h,v 1.14 2006/06/02 16:14:17 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
@@ -38,11 +38,6 @@
 #include "gm.h"
 #include "namespace.h"
 
-/* include defines like OKCODE. Not directly needed here but many
-   UG-applications assume that the defines exist when commands.h is
-   used */
-#include "cmdline.h"
-
 START_UGDIM_NAMESPACE
 
 
Nur in ug-orig/ui: CVS.
Nur in ug-orig/ui: .cvsignore.
diff -ru ug-orig/ui/dataexplorer.c ug-patched/ui/dataexplorer.c
--- ug-orig/ui/dataexplorer.c	2008-03-10 15:16:53.000000000 +0100
+++ ug-patched/ui/dataexplorer.c	2008-12-19 11:01:32.000000000 +0100
@@ -30,6 +30,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
@@ -84,7 +85,7 @@
 
 
 /* data for CVS	*/
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/ui/dataexplorer.c,v 1.36 2008/03/10 14:16:53 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -145,7 +146,7 @@
 				if (USED(vx)) continue;
 				if (DDD_InfoPriority(PARHDR(CORNER(el,i)))!=PrioMaster) continue;
 				SETUSED(vx,1);
-				EXTRA(vx) = nv++;
+				ID(vx) = nv++;
 			}
 		}
 
@@ -157,24 +158,24 @@
 				vx = MYVERTEX(CORNER(el,i));
 				if (USED(vx)) continue;
 				SETUSED(vx,1);
-				EXTRA(vx) = nv++;
+				ID(vx) = nv++;
 			}
 		}
 }
 
 static int Gather_VertexID (DDD_OBJ obj, void *data)
 {
-	NODE *theNode = (NODE *)obj;
+	VECTOR *pv = (VECTOR *)obj;
 
-	((INT *)data)[0] = EXTRA(MYVERTEX(theNode));
+	((INT *)data)[0] = ID(MYVERTEX((NODE *)VOBJECT(pv)));
 
 	return (NUM_OK);
 }
 static int Scatter_VertexID (DDD_OBJ obj, void *data)
 {
-	NODE *theNode = (NODE *)obj;
+	VECTOR *pv = (VECTOR *)obj;
 
-	EXTRA(MYVERTEX(theNode)) = ((INT *)data)[0];
+	ID(MYVERTEX((NODE *)VOBJECT(pv))) = ((INT *)data)[0];
 
 	return (NUM_OK);
 }
@@ -202,7 +203,7 @@
 
    'dataexplorer <filename> [$ns <nep> $s <vd> [$v <ref>]]* [$nv <nep> $s <vd> [$v <ref>]]*
    				            [$cs <eep> $s <vd> [$v <ref>]]* [$cv <eep> $s <vd> [$v <ref>]]*
-							[$b 0|1|2]* [$asc]* [$fgrid]* [$s [+|-]id]*'
+							[$b 0|1|2]* [$bin]* [$fgrid]* [$s [+|-]id]*'
  
 .  $ns...			- plot function for scalar nodal values
 .  $nv...			- plot function for vector nodal values
@@ -210,7 +211,7 @@
 .  $cv...			- plot function for vector element values
 .  $v...            - variable name to be used in DataExplorer
 .  $b...            - write boundary data 0=no (default) | 1=inner | 2=all
-.  $asc...          - write grid and data in ascii format
+.  $bin...          - write grid and data in binary format
 .  $fgrid...        - if not initial time step grid is not written
 .  $s...        	- write only specified subdomains. Positive id means that the
 					subdomain is written.  Negative id means that the subdomain is
@@ -306,10 +307,10 @@
 	INT nobnd;                  /* number of outer boundary faces/lines     */
 	INT gnobnd;                 /* global number of outer bndary faces/lines*/
 	INT writeBnds=0;            /* flag: write boundaries? (1=Inner, 2=All) */
-	INT binaryOutput=1;         /* flag: write data in binary? (0=No|1=Yes) */
+	INT binaryOutput=0;         /* flag: write data in binary? (0=No|1=Yes) */
 	INT writeGrid=1;            /* flag: write grid? (0=No|1=Yes)           */
-	int buffer_int[8];
-	float buffer_float[8];
+	INT buffer_INT[8];
+	FLOAT buffer_FLOAT[8];
 	INT usedBuf;
 	INT *subdom=NULL;			/* which subdomains to draw					*/
 	INT subdomains=0;			/* flag: draw only some subdomains			*/
@@ -349,7 +350,7 @@
 								   "eval proc %s\n",s);
    	 			break;
 			}
-			if (i+1 < argc && sscanf(argv[i+1],"s %s", s) == 1) 
+			if (sscanf(argv[i+1],"s %s", s) == 1) 
 			{
 				strcpy(es_name[ns],s);
 				i++;
@@ -357,7 +358,7 @@
 			else
 				strcpy(es_name[ns],es[ns]->v.name); 
 
-			if (i+1 < argc && sscanf(argv[i+1],"v %s", s) == 1) 
+			if (sscanf(argv[i+1],"v %s", s) == 1) 
 			{
 				strcpy(es_var[ns],s);
 				i++;
@@ -384,7 +385,7 @@
 								   "eval proc %s\n",s);
    	 			break;
 			}
-			if (i+1 < argc && sscanf(argv[i+1],"s %s", s) == 1) 
+			if (sscanf(argv[i+1],"s %s", s) == 1) 
 			{
 				strcpy(ev_name[nv],s);
 				i++;
@@ -392,7 +393,7 @@
 			else
 				strcpy(ev_name[nv],ev[nv]->v.name); 
 
-			if (i+1 < argc && sscanf(argv[i+1],"v %s", s) == 1) 
+			if (sscanf(argv[i+1],"v %s", s) == 1) 
 			{
 				strcpy(ev_var[nv],s);
 				i++;
@@ -419,7 +420,7 @@
 								   "eval proc %s\n",s);
    	 			break;
 			}
-			if (i+1 < argc && sscanf(argv[i+1],"s %s", s) == 1) 
+			if (sscanf(argv[i+1],"s %s", s) == 1) 
 			{
 				strcpy(es_cell_name[ns_cell],s);
 				i++;
@@ -427,7 +428,7 @@
 			else
 				strcpy(es_cell_name[ns_cell],es_cell[ns_cell]->v.name); 
 
-			if (i+1 < argc && sscanf(argv[i+1],"v %s", s) == 1) 
+			if (sscanf(argv[i+1],"v %s", s) == 1) 
 			{
 				strcpy(es_cell_var[ns_cell],s);
 				i++;
@@ -454,7 +455,7 @@
 								   "eval proc %s\n",s);
    	 			break;
 			}
-			if (i+1 < argc && sscanf(argv[i+1],"s %s", s) == 1) 
+			if (sscanf(argv[i+1],"s %s", s) == 1) 
 			{
 				strcpy(ev_cell_name[nv_cell],s);
 				i++;
@@ -462,7 +463,7 @@
 			else
 				strcpy(ev_cell_name[nv_cell],ev_cell[nv_cell]->v.name); 
 
-			if (i+1 < argc && sscanf(argv[i+1],"v %s", s) == 1) 
+			if (sscanf(argv[i+1],"v %s", s) == 1) 
 			{
 				strcpy(ev_cell_var[nv_cell],s);
 				i++;
@@ -492,7 +493,7 @@
 								   "eval proc %s in bv argument\n",s);
    	 			break;
 			}
-			if (i+1 < argc && sscanf(argv[i+1],"s %s", s) == 1) 
+			if (sscanf(argv[i+1],"s %s", s) == 1) 
 			{
 				strcpy(ev_bcell_name[nv_bcell],s);
 				i++;
@@ -500,7 +501,7 @@
 			else
 				strcpy(ev_bcell_name[nv_bcell],ev_bcell[nv_bcell]->v.name); 
 
-			if (i+1 < argc && sscanf(argv[i+1],"v %s", s) == 1) 
+			if (sscanf(argv[i+2],"v %s", s) == 1) 
 			{
 				strcpy(ev_bcell_var[nv_bcell],s);
 				i++;
@@ -513,8 +514,8 @@
 		}
 
 		/* write data in binary format? */
-		if (strncmp(argv[i],"asc",3)==0)
-			binaryOutput=0;
+		if (strncmp(argv[i],"bin",3)==0)
+			binaryOutput=1;
 
 		/* write grid or use existing data file as reference? */
 		if (strncmp(argv[i],"fgrid",5)==0)
@@ -582,13 +583,7 @@
 			PrintErrorMessage('E',"dataexplorer","could not open data file");
 			return(PARAMERRORCODE);
 		}
-		sprintf(out_form, "%s binary",
-#ifdef __SWAPBYTES__
-				"lsb"
-#else
-				"msb"
-#endif
-			   );
+		strcpy(out_form,"binary");
 	} else {
 		strcpy(filename_dat,filename);
 		c_ptr=strrchr(filename_dat,'.');
@@ -752,14 +747,12 @@
 #ifdef ModelP
 			  if (DDD_InfoPriority(PARHDR(CORNER(el,i)))==PrioMaster) {
 #endif
-				EXTRA(vx) = counter;
+				ID(vx) = counter;
 				/* write the thing */
 				if (binaryOutput) {
-				  buffer_float[0]=clampf(XC(vx));
-				  buffer_float[1]=clampf(YC(vx));
-#ifdef __THREEDIM__
-				  buffer_float[2]=clampf(ZC(vx));
-#endif
+				  buffer_FLOAT[0]=clampf(XC(vx));
+				  buffer_FLOAT[1]=clampf(YC(vx));
+				  buffer_FLOAT[2]=clampf(ZC(vx));
 				} else {
 #ifdef __TWODIM__
 				  sprintf(it,"\t%g\t%g\n", clampf(XC(vx)), clampf(YC(vx)));
@@ -769,7 +762,7 @@
 #endif
 				}
 				if (binaryOutput)
-				  pfile_tagged_write_float(pf_bin, buffer_float, DIM, counter);
+				  pfile_tagged_write_FLOAT(pf_bin, buffer_FLOAT, DIM, counter);
 				else {
 				  if (writeGrid)
 					pfile_tagged_puts(pf_txt,it,counter);
@@ -779,7 +772,7 @@
 #ifdef ModelP
 			  }
 			  else {
-				EXTRA(vx) = ov+numVertices+count_rest;
+				ID(vx) = ov+numVertices+count_rest;
 				count_rest++;
 			  }
 #endif
@@ -803,7 +796,7 @@
 	{
 	  /* communicate local IDs */
 	  for (k=0; k<=TOPLEVEL(mg); k++) {
-		DDD_IFAOneway(BorderNodeIF,GRID_ATTR(GRID_ON_LEVEL(mg,k)),IF_BACKWARD,sizeof(INT),Gather_VertexID, Scatter_VertexID);
+		DDD_IFAOneway(BorderVectorIF,GRID_ATTR(GRID_ON_LEVEL(mg,k)),IF_BACKWARD,sizeof(INT),Gather_VertexID, Scatter_VertexID);
 	  }
 	}
 #endif
@@ -844,12 +837,12 @@
 		sprintf(it,"object \"connections\" class array type int rank 1 shape %d items %d %s\ndata file %s,%d\n",
 				4*(DIM-1), gnumElements, out_form, filename_grid, dat_pos);
 		if (binaryOutput)
-			dat_pos+=4*(DIM-1)*gnumElements*sizeof(int);
+			dat_pos+=4*(DIM-1)*gnumElements*sizeof(INT);
 	} else {		
 		sprintf(it,"object \"connections\" class array type int rank 1 shape %d items %d %s\ndata file %s,%d\n",
 				DIM+1, gnumElements, out_form, filename_grid, dat_pos);
 		if (binaryOutput)
-			dat_pos+=(DIM+1)*gnumElements*sizeof(int);
+			dat_pos+=(DIM+1)*gnumElements*sizeof(INT);
 	}
 	strcpy(item+ic,it); ic+=strlen(it);
 	pfile_master_puts(pf,item); ic=0;
@@ -869,162 +862,162 @@
 			case 3:
 				if (notOnlyTetra) {       /* in 2D and NOT only triangles */
 					if (binaryOutput) {
-						buffer_int[0]=EXTRA(MYVERTEX(CORNER(el,0)));
-						buffer_int[1]=EXTRA(MYVERTEX(CORNER(el,1)));
-						buffer_int[2]=EXTRA(MYVERTEX(CORNER(el,2)));
-						buffer_int[3]=EXTRA(MYVERTEX(CORNER(el,2)));
+						buffer_INT[0]=ID(MYVERTEX(CORNER(el,0)));
+						buffer_INT[1]=ID(MYVERTEX(CORNER(el,1)));
+						buffer_INT[2]=ID(MYVERTEX(CORNER(el,2)));
+						buffer_INT[3]=ID(MYVERTEX(CORNER(el,2)));
 						usedBuf=4;
 					} else
 						sprintf(it,"\t%d\t%d\t%d\t%d\n",
-								EXTRA(MYVERTEX(CORNER(el,0))),
-								EXTRA(MYVERTEX(CORNER(el,1))),
-								EXTRA(MYVERTEX(CORNER(el,2))),
-								EXTRA(MYVERTEX(CORNER(el,2))));
+								ID(MYVERTEX(CORNER(el,0))),
+								ID(MYVERTEX(CORNER(el,1))),
+								ID(MYVERTEX(CORNER(el,2))),
+								ID(MYVERTEX(CORNER(el,2))));
 				} else {                  /* in 2D and only triangles */
 					if (binaryOutput) {
-						buffer_int[0]=EXTRA(MYVERTEX(CORNER(el,0)));
-						buffer_int[1]=EXTRA(MYVERTEX(CORNER(el,1)));
-						buffer_int[2]=EXTRA(MYVERTEX(CORNER(el,2)));
+						buffer_INT[0]=ID(MYVERTEX(CORNER(el,0)));
+						buffer_INT[1]=ID(MYVERTEX(CORNER(el,1)));
+						buffer_INT[2]=ID(MYVERTEX(CORNER(el,2)));
 						usedBuf=3;
 					} else
 						sprintf(it,"\t%d\t%d\t%d\n",
-								EXTRA(MYVERTEX(CORNER(el,0))),
-								EXTRA(MYVERTEX(CORNER(el,1))),
-								EXTRA(MYVERTEX(CORNER(el,2))));
+								ID(MYVERTEX(CORNER(el,0))),
+								ID(MYVERTEX(CORNER(el,1))),
+								ID(MYVERTEX(CORNER(el,2))));
 				}
 				break;
 					
 			case 4:
 #ifdef __TWODIM__
 				if (binaryOutput) {
-					buffer_int[0]=EXTRA(MYVERTEX(CORNER(el,0)));
-					buffer_int[1]=EXTRA(MYVERTEX(CORNER(el,1)));
-					buffer_int[2]=EXTRA(MYVERTEX(CORNER(el,3)));
-					buffer_int[3]=EXTRA(MYVERTEX(CORNER(el,2)));
+					buffer_INT[0]=ID(MYVERTEX(CORNER(el,0)));
+					buffer_INT[1]=ID(MYVERTEX(CORNER(el,1)));
+					buffer_INT[2]=ID(MYVERTEX(CORNER(el,3)));
+					buffer_INT[3]=ID(MYVERTEX(CORNER(el,2)));
 					usedBuf=4;
 				} else
 					sprintf(it,"\t%d\t%d\t%d\t%d\n",
-							EXTRA(MYVERTEX(CORNER(el,0))),
-							EXTRA(MYVERTEX(CORNER(el,1))),
-							EXTRA(MYVERTEX(CORNER(el,3))),
-							EXTRA(MYVERTEX(CORNER(el,2))));
+							ID(MYVERTEX(CORNER(el,0))),
+							ID(MYVERTEX(CORNER(el,1))),
+							ID(MYVERTEX(CORNER(el,3))),
+							ID(MYVERTEX(CORNER(el,2))));
 #else
 				if (notOnlyTetra) {       /* in 3D and NOT only Tetrahedrons */
 					if (binaryOutput) {
-						buffer_int[0]=EXTRA(MYVERTEX(CORNER(el,0)));
-						buffer_int[1]=EXTRA(MYVERTEX(CORNER(el,1)));
-						buffer_int[2]=EXTRA(MYVERTEX(CORNER(el,2)));
-						buffer_int[3]=EXTRA(MYVERTEX(CORNER(el,2)));
-						buffer_int[4]=EXTRA(MYVERTEX(CORNER(el,3)));
-						buffer_int[5]=EXTRA(MYVERTEX(CORNER(el,3)));
-						buffer_int[6]=EXTRA(MYVERTEX(CORNER(el,3)));
-						buffer_int[7]=EXTRA(MYVERTEX(CORNER(el,3)));
+						buffer_INT[0]=ID(MYVERTEX(CORNER(el,0)));
+						buffer_INT[1]=ID(MYVERTEX(CORNER(el,1)));
+						buffer_INT[2]=ID(MYVERTEX(CORNER(el,2)));
+						buffer_INT[3]=ID(MYVERTEX(CORNER(el,2)));
+						buffer_INT[4]=ID(MYVERTEX(CORNER(el,3)));
+						buffer_INT[5]=ID(MYVERTEX(CORNER(el,3)));
+						buffer_INT[6]=ID(MYVERTEX(CORNER(el,3)));
+						buffer_INT[7]=ID(MYVERTEX(CORNER(el,3)));
 						usedBuf=8;
 					} else
 						sprintf(it,"\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n",
-								EXTRA(MYVERTEX(CORNER(el,0))),
-								EXTRA(MYVERTEX(CORNER(el,1))),
-								EXTRA(MYVERTEX(CORNER(el,2))),
-								EXTRA(MYVERTEX(CORNER(el,2))),
-								EXTRA(MYVERTEX(CORNER(el,3))),
-								EXTRA(MYVERTEX(CORNER(el,3))),
-								EXTRA(MYVERTEX(CORNER(el,3))),
-								EXTRA(MYVERTEX(CORNER(el,3))));
+								ID(MYVERTEX(CORNER(el,0))),
+								ID(MYVERTEX(CORNER(el,1))),
+								ID(MYVERTEX(CORNER(el,2))),
+								ID(MYVERTEX(CORNER(el,2))),
+								ID(MYVERTEX(CORNER(el,3))),
+								ID(MYVERTEX(CORNER(el,3))),
+								ID(MYVERTEX(CORNER(el,3))),
+								ID(MYVERTEX(CORNER(el,3))));
 				} else {                 /* in 3D and only Tetrahedrons in grid */
-/*  					if ((EXTRA(MYVERTEX(CORNER(el,0))) > numVerticesTot+1) || */
-/*  						(EXTRA(MYVERTEX(CORNER(el,1))) > numVerticesTot+1) || */
-/*  						(EXTRA(MYVERTEX(CORNER(el,2))) > numVerticesTot+1) || */
-/*  					    (EXTRA(MYVERTEX(CORNER(el,3))) > numVerticesTot+1)) { */
+/*  					if ((ID(MYVERTEX(CORNER(el,0))) > numVerticesTot+1) || */
+/*  						(ID(MYVERTEX(CORNER(el,1))) > numVerticesTot+1) || */
+/*  						(ID(MYVERTEX(CORNER(el,2))) > numVerticesTot+1) || */
+/*  					    (ID(MYVERTEX(CORNER(el,3))) > numVerticesTot+1)) { */
 /*  						assert(0); */
 /*  					} */
 					
 					if (binaryOutput) {
-						buffer_int[0]=EXTRA(MYVERTEX(CORNER(el,0)));
-						buffer_int[1]=EXTRA(MYVERTEX(CORNER(el,1)));
-						buffer_int[2]=EXTRA(MYVERTEX(CORNER(el,2)));
-						buffer_int[3]=EXTRA(MYVERTEX(CORNER(el,3)));
+						buffer_INT[0]=ID(MYVERTEX(CORNER(el,0)));
+						buffer_INT[1]=ID(MYVERTEX(CORNER(el,1)));
+						buffer_INT[2]=ID(MYVERTEX(CORNER(el,2)));
+						buffer_INT[3]=ID(MYVERTEX(CORNER(el,3)));
 						usedBuf=4;
 					} else
 						sprintf(it,"\t%d\t%d\t%d\t%d\n",
-								EXTRA(MYVERTEX(CORNER(el,0))),
-								EXTRA(MYVERTEX(CORNER(el,1))),
-								EXTRA(MYVERTEX(CORNER(el,2))),
-								EXTRA(MYVERTEX(CORNER(el,3))));
+								ID(MYVERTEX(CORNER(el,0))),
+								ID(MYVERTEX(CORNER(el,1))),
+								ID(MYVERTEX(CORNER(el,2))),
+								ID(MYVERTEX(CORNER(el,3))));
 				}
 #endif
 				break;
 				
 			case 5:
 				if (binaryOutput) {
-					buffer_int[0]=EXTRA(MYVERTEX(CORNER(el,0)));
-					buffer_int[1]=EXTRA(MYVERTEX(CORNER(el,1)));
-					buffer_int[2]=EXTRA(MYVERTEX(CORNER(el,3)));
-					buffer_int[3]=EXTRA(MYVERTEX(CORNER(el,2)));
-					buffer_int[4]=EXTRA(MYVERTEX(CORNER(el,4)));
-					buffer_int[5]=EXTRA(MYVERTEX(CORNER(el,4)));
-					buffer_int[6]=EXTRA(MYVERTEX(CORNER(el,4)));
-					buffer_int[7]=EXTRA(MYVERTEX(CORNER(el,4)));
+					buffer_INT[0]=ID(MYVERTEX(CORNER(el,0)));
+					buffer_INT[1]=ID(MYVERTEX(CORNER(el,1)));
+					buffer_INT[2]=ID(MYVERTEX(CORNER(el,3)));
+					buffer_INT[3]=ID(MYVERTEX(CORNER(el,2)));
+					buffer_INT[4]=ID(MYVERTEX(CORNER(el,4)));
+					buffer_INT[5]=ID(MYVERTEX(CORNER(el,4)));
+					buffer_INT[6]=ID(MYVERTEX(CORNER(el,4)));
+					buffer_INT[7]=ID(MYVERTEX(CORNER(el,4)));
 					usedBuf=8;
 				} else
 					sprintf(it,"\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n",
-							EXTRA(MYVERTEX(CORNER(el,0))),
-							EXTRA(MYVERTEX(CORNER(el,1))),
-							EXTRA(MYVERTEX(CORNER(el,3))),
-							EXTRA(MYVERTEX(CORNER(el,2))),
-							EXTRA(MYVERTEX(CORNER(el,4))),
-							EXTRA(MYVERTEX(CORNER(el,4))),
-							EXTRA(MYVERTEX(CORNER(el,4))),
-							EXTRA(MYVERTEX(CORNER(el,4))));
+							ID(MYVERTEX(CORNER(el,0))),
+							ID(MYVERTEX(CORNER(el,1))),
+							ID(MYVERTEX(CORNER(el,3))),
+							ID(MYVERTEX(CORNER(el,2))),
+							ID(MYVERTEX(CORNER(el,4))),
+							ID(MYVERTEX(CORNER(el,4))),
+							ID(MYVERTEX(CORNER(el,4))),
+							ID(MYVERTEX(CORNER(el,4))));
 				break;
 				
 			case 6:
 				if (binaryOutput) {
-					buffer_int[0]=EXTRA(MYVERTEX(CORNER(el,0)));
-					buffer_int[1]=EXTRA(MYVERTEX(CORNER(el,1)));
-					buffer_int[2]=EXTRA(MYVERTEX(CORNER(el,2)));
-					buffer_int[3]=EXTRA(MYVERTEX(CORNER(el,2)));
-					buffer_int[4]=EXTRA(MYVERTEX(CORNER(el,3)));
-					buffer_int[5]=EXTRA(MYVERTEX(CORNER(el,4)));
-					buffer_int[6]=EXTRA(MYVERTEX(CORNER(el,5)));
-					buffer_int[7]=EXTRA(MYVERTEX(CORNER(el,5)));
+					buffer_INT[0]=ID(MYVERTEX(CORNER(el,0)));
+					buffer_INT[1]=ID(MYVERTEX(CORNER(el,1)));
+					buffer_INT[2]=ID(MYVERTEX(CORNER(el,2)));
+					buffer_INT[3]=ID(MYVERTEX(CORNER(el,2)));
+					buffer_INT[4]=ID(MYVERTEX(CORNER(el,3)));
+					buffer_INT[5]=ID(MYVERTEX(CORNER(el,4)));
+					buffer_INT[6]=ID(MYVERTEX(CORNER(el,5)));
+					buffer_INT[7]=ID(MYVERTEX(CORNER(el,5)));
 					usedBuf=8;
 				} else
 					sprintf(it,"\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n",
-							EXTRA(MYVERTEX(CORNER(el,0))),
-							EXTRA(MYVERTEX(CORNER(el,1))),
-							EXTRA(MYVERTEX(CORNER(el,2))),
-							EXTRA(MYVERTEX(CORNER(el,2))),
-							EXTRA(MYVERTEX(CORNER(el,3))),
-							EXTRA(MYVERTEX(CORNER(el,4))),
-							EXTRA(MYVERTEX(CORNER(el,5))),
-							EXTRA(MYVERTEX(CORNER(el,5))));
+							ID(MYVERTEX(CORNER(el,0))),
+							ID(MYVERTEX(CORNER(el,1))),
+							ID(MYVERTEX(CORNER(el,2))),
+							ID(MYVERTEX(CORNER(el,2))),
+							ID(MYVERTEX(CORNER(el,3))),
+							ID(MYVERTEX(CORNER(el,4))),
+							ID(MYVERTEX(CORNER(el,5))),
+							ID(MYVERTEX(CORNER(el,5))));
 				break;
 				
 			case 8:
 				if (binaryOutput) {
-					buffer_int[0]=EXTRA(MYVERTEX(CORNER(el,0)));
-					buffer_int[1]=EXTRA(MYVERTEX(CORNER(el,1)));
-					buffer_int[2]=EXTRA(MYVERTEX(CORNER(el,3)));
-					buffer_int[3]=EXTRA(MYVERTEX(CORNER(el,2)));
-					buffer_int[4]=EXTRA(MYVERTEX(CORNER(el,4)));
-					buffer_int[5]=EXTRA(MYVERTEX(CORNER(el,5)));
-					buffer_int[6]=EXTRA(MYVERTEX(CORNER(el,7)));
-					buffer_int[7]=EXTRA(MYVERTEX(CORNER(el,6)));
+					buffer_INT[0]=ID(MYVERTEX(CORNER(el,0)));
+					buffer_INT[1]=ID(MYVERTEX(CORNER(el,1)));
+					buffer_INT[2]=ID(MYVERTEX(CORNER(el,3)));
+					buffer_INT[3]=ID(MYVERTEX(CORNER(el,2)));
+					buffer_INT[4]=ID(MYVERTEX(CORNER(el,4)));
+					buffer_INT[5]=ID(MYVERTEX(CORNER(el,5)));
+					buffer_INT[6]=ID(MYVERTEX(CORNER(el,7)));
+					buffer_INT[7]=ID(MYVERTEX(CORNER(el,6)));
 					usedBuf=8;
 				} else
 					sprintf(it,"\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n",
-							EXTRA(MYVERTEX(CORNER(el,0))),
-							EXTRA(MYVERTEX(CORNER(el,1))),
-							EXTRA(MYVERTEX(CORNER(el,3))),
-							EXTRA(MYVERTEX(CORNER(el,2))),
-							EXTRA(MYVERTEX(CORNER(el,4))),
-							EXTRA(MYVERTEX(CORNER(el,5))),
-							EXTRA(MYVERTEX(CORNER(el,7))),
-							EXTRA(MYVERTEX(CORNER(el,6))));
+							ID(MYVERTEX(CORNER(el,0))),
+							ID(MYVERTEX(CORNER(el,1))),
+							ID(MYVERTEX(CORNER(el,3))),
+							ID(MYVERTEX(CORNER(el,2))),
+							ID(MYVERTEX(CORNER(el,4))),
+							ID(MYVERTEX(CORNER(el,5))),
+							ID(MYVERTEX(CORNER(el,7))),
+							ID(MYVERTEX(CORNER(el,6))));
 				break;
 			}
 			if (binaryOutput)
-				pfile_tagged_write_int(pf_bin, buffer_int, usedBuf, counter+oe);
+				pfile_tagged_write_INT(pf_bin, buffer_INT, usedBuf, counter+oe);
 			else {
 				if (writeGrid)
 					pfile_tagged_puts(pf_txt,it,counter+oe);
@@ -1129,18 +1122,18 @@
 		sprintf(it,"object \"ibndconnections\" class array type int rank 1 shape %d items %d %s\ndata file %s,%d\n",
 				2, gnibnd, out_form, filename_grid, dat_pos);
 		if (binaryOutput)
-			dat_pos+=2*gnibnd*sizeof(int);
+			dat_pos+=2*gnibnd*sizeof(INT);
 #else
 		if (notOnlyTriang) {
 			sprintf(it,"object \"ibndconnections\" class array type int rank 1 shape %d items %d %s\ndata file %s,%d\n",
 				4, gnibnd, out_form, filename_grid, dat_pos);
 			if (binaryOutput)
-				dat_pos+=4*gnibnd*sizeof(int);
+				dat_pos+=4*gnibnd*sizeof(INT);
 		} else {
 			sprintf(it,"object \"ibndconnections\" class array type int rank 1 shape %d items %d %s\ndata file %s,%d\n",
 					3, gnibnd, out_form, filename_grid, dat_pos);
 			if (binaryOutput)
-				dat_pos+=3*gnibnd*sizeof(int);
+				dat_pos+=3*gnibnd*sizeof(INT);
 		}
 #endif
 		strcpy(item+ic,it); ic+=strlen(it);
@@ -1166,58 +1159,58 @@
 						{
 						case 2:     /* in 2D sides are edges => only two points */
 							if (binaryOutput) {
-								buffer_int[0]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0))));
-								buffer_int[1]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1))));
+								buffer_INT[0]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0))));
+								buffer_INT[1]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1))));
 								usedBuf=2;
 							} else
 								sprintf(it,"\t%d\t%d\n",
-										EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0)))),
-										EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1)))));
+										ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0)))),
+										ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1)))));
 							break;
 						case 3:     /* has to be 3D */
 							if (notOnlyTriang) {    /* not only faces with 3 corners */
 								if (binaryOutput) {
-									buffer_int[0]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0))));
-									buffer_int[1]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1))));
-									buffer_int[2]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2))));
-									buffer_int[3]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2))));
+									buffer_INT[0]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0))));
+									buffer_INT[1]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1))));
+									buffer_INT[2]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2))));
+									buffer_INT[3]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2))));
 									usedBuf=4;
 								} else
 									sprintf(it,"\t%d\t%d\t%d\t%d\n",
-											EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0)))),
-											EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1)))),
-											EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2)))),
-											EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2)))));
+											ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0)))),
+											ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1)))),
+											ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2)))),
+											ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2)))));
 							} else {                /* only triangles as faces */
 								if (binaryOutput) {
-									buffer_int[0]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0))));
-									buffer_int[1]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1))));
-									buffer_int[2]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2))));
+									buffer_INT[0]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0))));
+									buffer_INT[1]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1))));
+									buffer_INT[2]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2))));
 									usedBuf=3;
 								} else
 									sprintf(it,"\t%d\t%d\t%d\n",
-											EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0)))),
-											EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1)))),
-											EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2)))));
+											ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0)))),
+											ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1)))),
+											ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2)))));
 							}
 							break;
 						case 4:     /* has to be 3D and quads */
 							if (binaryOutput) {
-								buffer_int[0]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0))));
-								buffer_int[1]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1))));
-								buffer_int[2]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,3))));
-								buffer_int[3]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2))));
+								buffer_INT[0]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0))));
+								buffer_INT[1]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1))));
+								buffer_INT[2]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,3))));
+								buffer_INT[3]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2))));
 								usedBuf=4;
 							} else
 								sprintf(it,"\t%d\t%d\t%d\t%d\n",
-										EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0)))),
-										EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1)))),
-										EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,3)))),
-										EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2)))));
+										ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0)))),
+										ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1)))),
+										ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,3)))),
+										ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2)))));
 							break;
 						}
 						if (binaryOutput)
-							pfile_tagged_write_int(pf_bin, buffer_int, usedBuf, counter+oibnd);
+							pfile_tagged_write_INT(pf_bin, buffer_INT, usedBuf, counter+oibnd);
 						else {
 							if (writeGrid)
 								pfile_tagged_puts(pf_txt,it,counter+oibnd);
@@ -1267,18 +1260,18 @@
 		sprintf(it,"object \"obndconnections\" class array type int rank 1 shape %d items %d %s\ndata file %s,%d\n",
 				2, gnobnd, out_form, filename_grid, dat_pos);
 		if (binaryOutput)
-			dat_pos+=2*gnobnd*sizeof(int);
+			dat_pos+=2*gnobnd*sizeof(INT);
 #else
 		if (notOnlyTriang) {
 			sprintf(it,"object \"obndconnections\" class array type int rank 1 shape %d items %d %s\ndata file %s,%d\n",
 				4, gnobnd, out_form, filename_grid, dat_pos);
 			if (binaryOutput)
-				dat_pos+=4*gnobnd*sizeof(int);
+				dat_pos+=4*gnobnd*sizeof(INT);
 		} else {
 			sprintf(it,"object \"obndconnections\" class array type int rank 1 shape %d items %d %s\ndata file %s,%d\n",
 				3, gnobnd, out_form, filename_grid, dat_pos);
 			if (binaryOutput)
-				dat_pos+=3*gnobnd*sizeof(int);
+				dat_pos+=3*gnobnd*sizeof(INT);
 		}
 #endif
 		strcpy(item+ic,it); ic+=strlen(it);
@@ -1300,58 +1293,58 @@
 						{
 						case 2:     /* in 2D sides are edges => only two points */
 							if (binaryOutput) {
-								buffer_int[0]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0))));
-								buffer_int[1]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1))));
+								buffer_INT[0]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0))));
+								buffer_INT[1]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1))));
 								usedBuf=2;
 							} else
 								sprintf(it,"\t%d\t%d\n",
-										EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0)))),
-										EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1)))));
+										ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0)))),
+										ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1)))));
 							break;
 						case 3:     /* has to be 3D */
 							if (notOnlyTriang) {    /* not only faces with 3 corners */
 								if (binaryOutput) {
-									buffer_int[0]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0))));
-									buffer_int[1]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1))));
-									buffer_int[2]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2))));
-									buffer_int[3]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2))));
+									buffer_INT[0]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0))));
+									buffer_INT[1]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1))));
+									buffer_INT[2]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2))));
+									buffer_INT[3]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2))));
 									usedBuf=4;
 								} else
 									sprintf(it,"\t%d\t%d\t%d\t%d\n",
-											EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0)))),
-											EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1)))),
-											EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2)))),
-											EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2)))));
+											ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0)))),
+											ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1)))),
+											ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2)))),
+											ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2)))));
 							} else {                /* only triangles as faces */
 								if (binaryOutput) {
-									buffer_int[0]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0))));
-									buffer_int[1]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1))));
-									buffer_int[2]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2))));
+									buffer_INT[0]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0))));
+									buffer_INT[1]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1))));
+									buffer_INT[2]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2))));
 									usedBuf=3;
 								} else
 									sprintf(it,"\t%d\t%d\t%d\n",
-											EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0)))),
-											EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1)))),
-											EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2)))));
+											ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0)))),
+											ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1)))),
+											ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2)))));
 							}
 							break;
 						case 4:     /* has to be 3D and quads */
 							if (binaryOutput) {
-								buffer_int[0]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0))));
-								buffer_int[1]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1))));
-								buffer_int[2]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,3))));
-								buffer_int[3]=EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2))));
+								buffer_INT[0]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0))));
+								buffer_INT[1]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1))));
+								buffer_INT[2]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,3))));
+								buffer_INT[3]=ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2))));
 								usedBuf=4;
 							} else
 								sprintf(it,"\t%d\t%d\t%d\t%d\n",
-										EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0)))),
-										EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1)))),
-										EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,3)))),
-										EXTRA(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2)))));
+										ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,0)))),
+										ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,1)))),
+										ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,3)))),
+										ID(MYVERTEX(CORNER(el, CORNER_OF_SIDE(el,i,2)))));
 							break;
 						}
 						if (binaryOutput)
-							pfile_tagged_write_int(pf_bin, buffer_int, usedBuf, counter+oobnd);
+							pfile_tagged_write_INT(pf_bin, buffer_INT, usedBuf, counter+oobnd);
 						else {
 							if (writeGrid)
 								pfile_tagged_puts(pf_txt,it,counter+oobnd);
@@ -1410,7 +1403,7 @@
 		sprintf(it,"object \"%s_data\" class array type float rank 0 items %d %s\ndata file %s,%d\n",
 				es_var[v], gnumVertices, out_form, filename_dat, dat_pos);
 		if (binaryOutput)
-			dat_pos+=gnumVertices*sizeof(float);
+			dat_pos+=gnumVertices*sizeof(FLOAT);
 		strcpy(item+ic,it); ic+=strlen(it);
 		pfile_master_puts(pf,item); ic=0;
 		pfile_sync(pf);
@@ -1445,8 +1438,8 @@
 					eval_s = es[v]->EvalProc;
 					value = eval_s(el,(const DOUBLE **)CornersCoord,LocalCoord);
 					if (binaryOutput) {
-						buffer_float[0]=clampf(value);
-						pfile_tagged_write_float(pf_bin, buffer_float, 1, counter+ov);
+						buffer_FLOAT[0]=clampf(value);
+						pfile_tagged_write_FLOAT(pf_bin, buffer_FLOAT, 1, counter+ov);
 					} else {
 						sprintf(it,"\t%g\n",clampf(value));
 						pfile_tagged_puts(pf_txt,it,counter+ov);
@@ -1538,7 +1531,7 @@
 		sprintf(it,"object \"%s_data\" class array type float rank 1 shape %d items %d %s\ndata file %s,%d\n",
 				ev_var[v], DIM, gnumVertices, out_form, filename_dat, dat_pos);	
 		if (binaryOutput)
-			dat_pos+=DIM*gnumVertices*sizeof(float);
+			dat_pos+=DIM*gnumVertices*sizeof(FLOAT);
 		strcpy(item+ic,it); ic+=strlen(it);
 		pfile_master_puts(pf,item); ic=0;
 		pfile_sync(pf);
@@ -1573,21 +1566,21 @@
 					eval_v(el,(const DOUBLE **)CornersCoord,LocalCoord,vval);
 #ifdef __TWODIM__
 					if (binaryOutput) {
-						buffer_float[0]=clampf(vval[0]);
-						buffer_float[1]=clampf(vval[1]);
+						buffer_FLOAT[0]=clampf(vval[0]);
+						buffer_FLOAT[1]=clampf(vval[1]);
 					} else
 						sprintf(it,"\t%g\t%g\n",clampf(vval[0]),clampf(vval[1]));
 #else
 					if (binaryOutput) {
-						buffer_float[0]=clampf(vval[0]);
-						buffer_float[1]=clampf(vval[1]);
-						buffer_float[2]=clampf(vval[2]);
+						buffer_FLOAT[0]=clampf(vval[0]);
+						buffer_FLOAT[1]=clampf(vval[1]);
+						buffer_FLOAT[2]=clampf(vval[2]);
 					} else
 						sprintf(it,"\t%g\t%g\t%g\n",clampf(vval[0]),clampf(vval[1]),
 							                    clampf(vval[2]));
 #endif
 					if (binaryOutput)
-						pfile_tagged_write_float(pf_bin, buffer_float, DIM, counter+ov);
+						pfile_tagged_write_FLOAT(pf_bin, buffer_FLOAT, DIM, counter+ov);
 					else {
 						pfile_tagged_puts(pf_txt,it,counter+ov);
 						old_pos+=strlen(it);
@@ -1682,7 +1675,7 @@
 		sprintf(it,"object \"%s_data\" class array type float rank 0 items %d %s\ndata file %s,%d\n",
 				es_cell_var[v], gnumElements, out_form, filename_dat, dat_pos);	
 		if (binaryOutput)
-			dat_pos+=gnumElements*sizeof(float);
+			dat_pos+=gnumElements*sizeof(FLOAT);
 		strcpy(item+ic,it); ic+=strlen(it);
 		pfile_master_puts(pf,item); ic=0;
 		pfile_sync(pf);
@@ -1709,8 +1702,8 @@
 				eval_s = es_cell[v]->EvalProc;
 				value = eval_s(el,(const DOUBLE **)CornersCoord,LocalCoord);
 				if (binaryOutput) {
-					buffer_float[0]=clampf(value);
-					pfile_tagged_write_float(pf_bin, buffer_float, 1, counter+oe);
+					buffer_FLOAT[0]=clampf(value);
+					pfile_tagged_write_FLOAT(pf_bin, buffer_FLOAT, 1, counter+oe);
 				} else {
 					sprintf(it,"\t%g\n",clampf(value));
 					pfile_tagged_puts(pf_txt,it,counter+oe);
@@ -1805,7 +1798,7 @@
 		sprintf(it,"object \"%s_data\" class array type float rank 1 shape %d items %d %s\ndata file %s,%d\n",
 				ev_cell_var[v], DIM, gnumElements, out_form, filename_dat, dat_pos);		
 		if (binaryOutput)
-			dat_pos+=DIM*gnumElements*sizeof(float);
+			dat_pos+=DIM*gnumElements*sizeof(FLOAT);
 		strcpy(item+ic,it); ic+=strlen(it);
 		pfile_master_puts(pf,item); ic=0;
 		pfile_sync(pf);
@@ -1830,21 +1823,21 @@
 					eval_v(el,(const DOUBLE **)CornersCoord,LocalCoord,vval);
 #ifdef __TWODIM__
 					if (binaryOutput) {
-						buffer_float[0]=clampf(vval[0]);
-						buffer_float[1]=clampf(vval[1]);
+						buffer_FLOAT[0]=clampf(vval[0]);
+						buffer_FLOAT[1]=clampf(vval[1]);
 					} else
 						sprintf(it,"\t%g\t%g\n",clampf(vval[0]),clampf(vval[1]));
 #else
 					if (binaryOutput) {
-						buffer_float[0]=clampf(vval[0]);
-						buffer_float[1]=clampf(vval[1]);
-						buffer_float[2]=clampf(vval[2]);
+						buffer_FLOAT[0]=clampf(vval[0]);
+						buffer_FLOAT[1]=clampf(vval[1]);
+						buffer_FLOAT[2]=clampf(vval[2]);
 					} else
 						sprintf(it,"\t%g\t%g\t%g\n",clampf(vval[0]),clampf(vval[1]),
 							                    clampf(vval[2]));
 #endif
 					if (binaryOutput)
-						pfile_tagged_write_float(pf_bin, buffer_float, DIM, counter+ov);
+						pfile_tagged_write_FLOAT(pf_bin, buffer_FLOAT, DIM, counter+ov);
 					else {
 						pfile_tagged_puts(pf_txt,it,counter+ov);
 						old_pos+=strlen(it);
diff -ru ug-orig/ui/dataexplorer.h ug-patched/ui/dataexplorer.h
--- ug-orig/ui/dataexplorer.h	2006-05-08 14:17:51.000000000 +0200
+++ ug-patched/ui/dataexplorer.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/ui/dataexplorer.h,v 1.3 2006/05/08 12:17:51 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/ui/fieldio.c ug-patched/ui/fieldio.c
--- ug-orig/ui/fieldio.c	2008-05-05 15:30:22.000000000 +0200
+++ ug-patched/ui/fieldio.c	2008-12-19 11:01:32.000000000 +0100
@@ -25,9 +25,10 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#if !defined __MWCW__ && !defined __BGP__
+#ifndef __MWCW__
 #include <rpc/rpc.h>
 #endif
 
@@ -62,10 +63,10 @@
 /*																			*/
 /****************************************************************************/
 
-#if defined __MWCW__ || defined __BGP__
-#define ASCII  /* ASCII only */
+#ifdef __MWCW__
+#define ASCII  /* only ASCII */
 #else
-#undef ASCII   /* use XDR (or define for ASCII) */
+#undef ASCII   /* use ACSII or XDR */
 #endif
 
 #define MAGIC    "UGFI"
@@ -151,7 +152,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/ui/fieldio.c,v 1.24 2008/05/05 13:30:22 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*                                                                          */
diff -ru ug-orig/ui/fieldio.h ug-patched/ui/fieldio.h
--- ug-orig/ui/fieldio.h	2006-05-08 14:17:51.000000000 +0200
+++ ug-patched/ui/fieldio.h	2006-05-08 14:31:31.000000000 +0200
@@ -18,7 +18,7 @@
 /****************************************************************************/
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/ui/fieldio.h,v 1.4 2006/05/08 12:17:51 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/ui/helpmsg.c ug-patched/ui/helpmsg.c
--- ug-orig/ui/helpmsg.c	2006-05-08 14:17:51.000000000 +0200
+++ ug-patched/ui/helpmsg.c	2008-12-19 11:01:32.000000000 +0100
@@ -27,6 +27,7 @@
 /*																			*/
 /****************************************************************************/
 
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -114,7 +115,7 @@
 REP_ERR_FILE;
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/ui/helpmsg.c,v 1.24 2006/05/08 12:17:51 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/ui/helpmsg.h ug-patched/ui/helpmsg.h
--- ug-orig/ui/helpmsg.h	2006-05-08 14:17:51.000000000 +0200
+++ ug-patched/ui/helpmsg.h	2006-05-08 14:31:31.000000000 +0200
@@ -21,7 +21,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/ui/helpmsg.h,v 1.6 2006/05/08 12:17:51 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/ui/initui.c ug-patched/ui/initui.c
--- ug-orig/ui/initui.c	2008-03-06 16:30:09.000000000 +0100
+++ ug-patched/ui/initui.c	2006-06-02 17:38:35.000000000 +0200
@@ -46,7 +46,6 @@
 #include "tecplot.h"
 #include "avs.h"
 #include "dataexplorer.h"
-#include "vtk.h"
 #include "fieldio.h"
 
 /* own header */
@@ -90,7 +89,7 @@
 /****************************************************************************/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/ui/initui.c,v 1.21 2008/03/06 15:30:09 lampe Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
@@ -169,13 +168,6 @@
         return (err);
     }
 
-	/* vtk output */
-	if ((err=InitVtk())!=0)
-    {
-        SetHiWrd(err,__LINE__);
-        return (err);
-    }
-
     /* matrix market input/output */
     if ((err=InitMMIO())!=0)
     {
diff -ru ug-orig/ui/initui.h ug-patched/ui/initui.h
--- ug-orig/ui/initui.h	2006-05-08 14:17:51.000000000 +0200
+++ ug-patched/ui/initui.h	2006-05-08 14:31:31.000000000 +0200
@@ -26,7 +26,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/ui/initui.h,v 1.11 2006/05/08 12:17:51 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/ui/Makefile.am ug-patched/ui/Makefile.am
--- ug-orig/ui/Makefile.am	2008-03-06 16:30:09.000000000 +0100
+++ ug-patched/ui/Makefile.am	2004-09-02 14:22:17.000000000 +0200
@@ -1,6 +1,6 @@
-# $Id: Makefile.am,v 1.2 2008/03/06 15:30:09 lampe Exp $
+# $Id: Makefile.am 7772 2004-09-02 12:22:17Z thimo $
 
-SOURCES = uginterface.c initui.c cmdint.c cmdline.c dataexplorer.c commands.c helpmsg.c avs.c tecplot.c mmio.c fieldio.c vtk.c avs.h cmdint.h cmdline.h commands.h dataexplorer.h fieldio.h helpmsg.h initui.h mmio.h tecplot.h uginterface.h vtk.h
+SOURCES = uginterface.c initui.c cmdint.c cmdline.c dataexplorer.c commands.c helpmsg.c avs.c tecplot.c mmio.c fieldio.c avs.h cmdint.h cmdline.h commands.h dataexplorer.h fieldio.h helpmsg.h initui.h mmio.h tecplot.h uginterface.h
 
 include_HEADERS = cmdint.h cmdline.h commands.h
 
diff -ru ug-orig/ui/Makefile.ui ug-patched/ui/Makefile.ui
--- ug-orig/ui/Makefile.ui	2008-03-06 16:30:09.000000000 +0100
+++ ug-patched/ui/Makefile.ui	2004-09-01 19:39:03.000000000 +0200
@@ -10,8 +10,7 @@
 include ../ug.conf
 
 OBJECTS = uginterface.o initui.o cmdint.o cmdline.o dataexplorer.o\
-		  commands.o helpmsg.o avs.o tecplot.o mmio.o fieldio.o\
-		  vtk.o	
+		  commands.o helpmsg.o avs.o tecplot.o mmio.o fieldio.o
 
 # allow for nicer global inclusion of xbc.h
 LCFLAGS = -I ..
diff -ru ug-orig/ui/mmio.c ug-patched/ui/mmio.c
--- ug-orig/ui/mmio.c	2006-06-02 18:13:59.000000000 +0200
+++ ug-patched/ui/mmio.c	2009-04-29 15:11:55.000000000 +0200
@@ -402,7 +402,7 @@
 char* NS_DIM_PREFIX mm_typecode_to_str(MM_typecode matcode)
 {
     char buffer[MM_MAX_LINE_LENGTH];
-    char *types[4];
+    const char *types[4];
     int error =0;
 
     /* check for MTX type */
Nur in ug-patched/ui: paraview.c.
Nur in ug-patched/ui: paraview.h.
diff -ru ug-orig/ui/tecplot.c ug-patched/ui/tecplot.c
--- ug-orig/ui/tecplot.c	2006-04-18 10:52:51.000000000 +0200
+++ ug-patched/ui/tecplot.c	2008-12-19 11:01:32.000000000 +0100
@@ -28,6 +28,7 @@
 /*                                                                          */
 /****************************************************************************/
 
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
@@ -87,7 +88,7 @@
 
 
 /* data for CVS */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/ui/tecplot.c,v 1.25 2006/04/18 08:52:51 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*																			*/
diff -ru ug-orig/ui/tecplot.h ug-patched/ui/tecplot.h
--- ug-orig/ui/tecplot.h	2006-05-08 14:17:51.000000000 +0200
+++ ug-patched/ui/tecplot.h	2006-05-08 14:31:31.000000000 +0200
@@ -19,7 +19,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/ui/tecplot.h,v 1.6 2006/05/08 12:17:51 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
diff -ru ug-orig/ui/uginterface.c ug-patched/ui/uginterface.c
--- ug-orig/ui/uginterface.c	2006-06-02 17:31:48.000000000 +0200
+++ ug-patched/ui/uginterface.c	2008-03-05 16:10:41.000000000 +0100
@@ -110,7 +110,7 @@
 static INT use_bullet = NO;             /* whether auto refresh uses bullet */
 static DOUBLE offset_factor = 1.0;      /* offset factor for bullet         */
 
-static char *ArrowToolFuncs[N_ARROW_FUNCS]={"pointer",
+static const char *ArrowToolFuncs[N_ARROW_FUNCS]={"pointer",
 											"pan",
 											"zoom",
 											"rotate",
@@ -124,7 +124,7 @@
 static OUTPUTDEVICE *DefaultDevice; 	/* our default ouput device 		*/
 
 /* RCS string */
-static char RCS_ID("$Header: /home/cvsroot/UG/ug/ui/uginterface.c,v 1.35 2006/06/02 15:31:48 sander Exp $",UG_RCS_STRING);
+static char RCS_ID("$Header$",UG_RCS_STRING);
 
 /****************************************************************************/
 /*D
diff -ru ug-orig/ui/uginterface.h ug-patched/ui/uginterface.h
--- ug-orig/ui/uginterface.h	2006-05-08 14:17:51.000000000 +0200
+++ ug-patched/ui/uginterface.h	2006-05-08 14:31:31.000000000 +0200
@@ -18,7 +18,7 @@
 
 
 /* RCS_ID
-$Header: /home/cvsroot/UG/ug/ui/uginterface.h,v 1.12 2006/05/08 12:17:51 sander Exp $
+$Header$
 */
 
 /****************************************************************************/
Nur in ug-orig/ui: vtk.c.
Nur in ug-orig/ui: vtk.h.

