[SCM] an open source computer algebra system branch, cleanedupstream, updated. 6125e540ca6d66c307958938a9d53b245507c323

Bernhard R. Link brlink at debian.org
Tue Apr 24 15:54:07 UTC 2012


The following commit has been merged in the cleanedupstream branch:
commit 5e7e36774e5366b1e00a41af3239e4af549fa624
Author: Hans Schoenemann <hannes at mathematik.uni-kl.de>
Date:   Mon Mar 12 15:34:51 2012 +0100

    add: --cpus: set semaphore 0, use semaphare 0 in waitfirst/waitall

diff --git a/Singular/configure b/Singular/configure
index adee155..22e3cb1 100755
--- a/Singular/configure
+++ b/Singular/configure
@@ -1419,13 +1419,11 @@ cross_compiling=$ac_cv_prog_cc_cross
 fi
 
 # check whether the compiler accepts -pipe
-if test x$ac_cv_c_cpp = xgcc2 -o  x$ac_cv_c_cpp = xgcc3
-then
-  echo $ac_n "checking whether compiler accepts -pipe""... $ac_c" 1>&6
+echo $ac_n "checking whether compiler accepts -pipe""... $ac_c" 1>&6
 echo "configure:1448: checking whether compiler accepts -pipe" >&5
-  temp_cflags="${CFLAGS}"
-  CFLAGS="${CFLAGS} -pipe"
-  if eval "test \"`echo '$''{'ac_cv_cxx_have_pipe'+set}'`\" = set"; then
+temp_cflags="${CFLAGS}"
+CFLAGS="${CFLAGS} -pipe"
+if eval "test \"`echo '$''{'ac_cv_cxx_have_pipe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
@@ -1448,11 +1446,8 @@ fi
 rm -f conftest*
 fi
 
-  echo "$ac_t""${ac_cv_cxx_have_pipe}" 1>&6
-  CFLAGS=${temp_cflags}
-else
-  ac_cv_cxx_have_pipe="no"
-fi
+echo "$ac_t""${ac_cv_cxx_have_pipe}" 1>&6
+CFLAGS=${temp_cflags}
 
 if test "${ac_cv_cxx_have_pipe}" != yes; then
   PIPE=
@@ -5865,9 +5860,9 @@ fi
 
 NEED_LIBSG="${NEED_LIBS}"
 if test "$ac_cv_sizeof_voidp" != 4; then
-  NEED_LIBS="${NEED_LIBS} -lomalloc"
+  NEED_LIBS="${NEED_LIBS} -lomalloc -lrt -lpthread"
 else
-  NEED_LIBS="${NEED_LIBS} -lomalloc_ndebug"
+  NEED_LIBS="${NEED_LIBS} -lomalloc_ndebug -lrt -lpthread"
 fi
 
 
diff --git a/Singular/configure.in b/Singular/configure.in
index 2bed0ec..f58305a 100644
--- a/Singular/configure.in
+++ b/Singular/configure.in
@@ -445,18 +445,13 @@ if test "${GXX}" = yes && test "${ac_cxx_set}" = no; then
 fi
 
 # check whether the compiler accepts -pipe
-if test x$ac_cv_c_cpp = xgcc2 -o  x$ac_cv_c_cpp = xgcc3
-then
-  AC_MSG_CHECKING(whether compiler accepts -pipe)
-  temp_cflags="${CFLAGS}"
-  CFLAGS="${CFLAGS} -pipe"
-  AC_CACHE_VAL(ac_cv_cxx_have_pipe,
-  AC_TRY_COMPILE(,,ac_cv_cxx_have_pipe=yes,ac_cv_cxx_have_pipe=no))
-  AC_MSG_RESULT(${ac_cv_cxx_have_pipe})
-  CFLAGS=${temp_cflags}
-else
-  ac_cv_cxx_have_pipe="no"
-fi
+AC_MSG_CHECKING(whether compiler accepts -pipe)
+temp_cflags="${CFLAGS}"
+CFLAGS="${CFLAGS} -pipe"
+AC_CACHE_VAL(ac_cv_cxx_have_pipe,
+AC_TRY_COMPILE(,,ac_cv_cxx_have_pipe=yes,ac_cv_cxx_have_pipe=no))
+AC_MSG_RESULT(${ac_cv_cxx_have_pipe})
+CFLAGS=${temp_cflags}
 
 if test "${ac_cv_cxx_have_pipe}" != yes; then
   PIPE=
@@ -1314,9 +1309,9 @@ fi
 
 NEED_LIBSG="${NEED_LIBS}"
 if test "$ac_cv_sizeof_voidp" != 4; then
-  NEED_LIBS="${NEED_LIBS} -lomalloc"
+  NEED_LIBS="${NEED_LIBS} -lomalloc -lrt -lpthread"
 else
-  NEED_LIBS="${NEED_LIBS} -lomalloc_ndebug"
+  NEED_LIBS="${NEED_LIBS} -lomalloc_ndebug -lrt -lpthread"
 fi
 
 
diff --git a/Singular/feOpt.cc b/Singular/feOpt.cc
index 3b2785d..a77ffad 100644
--- a/Singular/feOpt.cc
+++ b/Singular/feOpt.cc
@@ -1,7 +1,6 @@
 /****************************************
 *  Computer Algebra System SINGULAR     *
 ****************************************/
-/* $Id$ */
 /*
 * ABSTRACT: Implementation of option buisness
 */
@@ -138,6 +137,9 @@ struct fe_option feOptSpec[] =
   {"min-time",          required_argument,  LONG_OPTION_RETURN,
   "SECS",     "Do not display times smaller than SECS (in seconds)",   feOptString, (void*) "0.5",  0},
 
+  {"cpus",            required_argument,    LONG_OPTION_RETURN,
+   "#CPUs",   "maximal number of CPUs to use",                         feOptInt,    (void*)2,      0},
+
   {"MPport",           required_argument,   LONG_OPTION_RETURN,
    "PORT",     "Use PORT number for conections",                       feOptString,    0,      0},
 
@@ -397,7 +399,7 @@ static const char* feOptAction(feOptIndex opt)
 
       case FE_OPT_RANDOM:
         siRandomStart = (unsigned int) ((unsigned long)
-			                  (feOptSpec[FE_OPT_RANDOM].value));
+                                          (feOptSpec[FE_OPT_RANDOM].value));
         siSeed=siRandomStart;
 #ifdef HAVE_FACTORY
         factoryseed(siRandomStart);
diff --git a/Singular/mod2.h.in b/Singular/mod2.h.in
index 02dfd56..39b1b46 100644
--- a/Singular/mod2.h.in
+++ b/Singular/mod2.h.in
@@ -196,7 +196,7 @@
 
 /* procedures to compute groebner bases with the f5 implementation */
 /* still testing */
-#undef HAVE_F5 
+#undef HAVE_F5
 
 /* procedures to compute groebner bases with the f5c implementation */
 /* still testing */
@@ -243,7 +243,7 @@
 
 #define BIT_SIZEOF_LONG CHAR_BIT*SIZEOF_LONG
 
-#define SINGULAR_PATCHLEVEL 0
+#define SINGULAR_PATCHLEVEL 3
 #define SINGULAR_VERSION ((SINGULAR_MAJOR_VERSION*1000 + SINGULAR_MINOR_VERSION*100 + SINGULAR_SUB_VERSION*10)+SINGULAR_PATCHLEVEL)
 
 /*******************************************************************
@@ -251,7 +251,7 @@
  ******************************************************************/
 /* Under HPUX 9, system(...) returns -1 if SIGCHLD does not equal
    SIG_DFL. However, if it stays at SIG_DFL we get zombie processes
-   for terminated childs generated by fork. Therefors some special treatment 
+   for terminated childs generated by fork. Therefors some special treatment
    is necessary */
 #ifdef HPUX_9
 #include <stdlib.h>
@@ -293,6 +293,9 @@ int hpux9_system(const char* system);
 
 #define HALT() m2_end(2)
 
+/* include simpleipc/semaphore code, link against librt/libpthread */
+#define HAVE_SIMPLEIPC 1
+
 /* define OLD_RES for res/sres/mres(i,j,k) */
 #undef OLD_RES
 
@@ -349,10 +352,10 @@ int hpux9_system(const char* system);
        #include "mod2.h"
        ...
 
-       makes sure that all poly operations in your file are done with 
+       makes sure that all poly operations in your file are done with
        PDEBUG == 2
  To break after an error occured, set a debugger breakpoint on
- dErrorBreak. 
+ dErrorBreak.
 */
 #ifndef PDEBUG
 #define PDEBUG 0
@@ -386,31 +389,31 @@ int hpux9_system(const char* system);
      0     : addresses are really freed
      1     : addresses are only marked as free and not really freed.
 
-   OM_CHECK, OM_TRACK, and OM_KEEP can be set on a per-file basis 
+   OM_CHECK, OM_TRACK, and OM_KEEP can be set on a per-file basis
    (as can OM_NDEBUG),  e.g.:
      #define OM_CHECK 3
      #define OM_TRACK 5
      #define OM_KEEP  1
      #include "mod2.h"
      #include "omalloc.h"
-   ensures that all memory allocs/free in this file are done with 
-   OM_CHECK==3 and OM_TRACK==5, and that all addresses allocated/freed 
+   ensures that all memory allocs/free in this file are done with
+   OM_CHECK==3 and OM_TRACK==5, and that all addresses allocated/freed
    in this file are only marked as free and never really freed.
- 
-   To set OM_CHECK, OM_TRACK and OM_KEEP under dynamic scope, set 
-   om_Opts.MinCheck, om_Opts.MinTrack to the respectiv values and 
-   om_Opts.Keep to the number of addresses which are kept before they are 
+
+   To set OM_CHECK, OM_TRACK and OM_KEEP under dynamic scope, set
+   om_Opts.MinCheck, om_Opts.MinTrack to the respectiv values and
+   om_Opts.Keep to the number of addresses which are kept before they are
    actually freed. E.g.:
      int check=om_Opts.MinCheck, track=om_Opts.MinTrack, keep= m_OPts.Keep;
      om_Opts.MinCheck = 3; om_Opts.MinTrack = 5; omOpts.Keep = LONG_MAX;
      ExternalRoutine();
      om_Opts.MinCheck = check; omOpts.MinTrack = track; omOpts.Keep = keep;
    ensures that all calls omDebug routines  occuring during the computation of
-   ExternalRoutine() are done with OM_CHECK==3 and OM_TRACK==5, and 
+   ExternalRoutine() are done with OM_CHECK==3 and OM_TRACK==5, and
    calls to omFree only mark addresses as free and not really free them.
 
-   Furthermore, the value of OM_SING_KEEP (resp. om_Opts.Keep) specifies 
-   how many addresses are kept before they are actually freed, independently 
+   Furthermore, the value of OM_SING_KEEP (resp. om_Opts.Keep) specifies
+   how many addresses are kept before they are actually freed, independently
    of the value of OM_KEEP.
 
    Some tips on possible values of OM_TRACK, OM_CHECK, OM_KEEP:
@@ -423,31 +426,31 @@ int hpux9_system(const char* system);
        #include "omalloc.h"
      Under dynamic scope, do (e.g., from within the debugger):
        om_Opts.MinCheck = 3; om_Opts.MinTrack = 5; omOpts.Keep = LONG_MAX;
-   + to find out where "memory corruption" occured, increase value of 
-     OM_CHECK - the higher this value is, the more consistency checks are 
-     done (However a value > 3 checks the entire memory each time an omalloc 
+   + to find out where "memory corruption" occured, increase value of
+     OM_CHECK - the higher this value is, the more consistency checks are
+     done (However a value > 3 checks the entire memory each time an omalloc
      routine is used!)
-   
+
    Some more tips on the usage of omalloc:
-   + omAlloc*, omRealloc*, omFree*, omCheck* omDebug* omTest* rotuines 
+   + omAlloc*, omRealloc*, omFree*, omCheck* omDebug* omTest* rotuines
      assume that sizes are > 0 and pointers are != NULL
    + omalloc*, omrealloc*, omfree* omcheck*, omdebug* omtest* routines allow
      NULL pointers and sizes == 0
-   + You can safely use any free/realloc routine in combination with any alloc 
+   + You can safely use any free/realloc routine in combination with any alloc
      routine (including the debug versions): E.g., an address allocated with
-     omAllocBin can be freed with omfree, or an adress allocated with 
+     omAllocBin can be freed with omfree, or an adress allocated with
      om(Debug)Alloc can be freed with omfree, or omFree, or omFreeSize, etc.
-     However, keep in mind that the efficiency decreases from 
+     However, keep in mind that the efficiency decreases from
      Bin over Size to General routines (i.e., omFreeBin is more efficient than
      omFreeSize which is more efficient than omFree, likewise with the alloc
      routines).
    + if OM_CHECK is undefined or 0, then all omCheck routines do nothing
-   + if OM_CHECK and OM_TRACK are both undefined (or 0), or if OM_NDEBUG is 
-     defined, then the "real" alloc/realloc/free macros are used, and all 
+   + if OM_CHECK and OM_TRACK are both undefined (or 0), or if OM_NDEBUG is
+     defined, then the "real" alloc/realloc/free macros are used, and all
      omTest, omDebug and omCheck routines are undefined
-   + to break after an omError occured within a debugger, 
+   + to break after an omError occured within a debugger,
      set a breakpoint on dErrorBreak
-   + to do checks from within the debugger, or to do checks with explicit 
+   + to do checks from within the debugger, or to do checks with explicit
      check level, use omTest routines.
 */
 
@@ -459,13 +462,13 @@ int hpux9_system(const char* system);
 #ifndef OM_CHECK
 #define OM_CHECK 1
 #endif
-/* Do actually free memory: 
-   (be careful: if this is set, memory is never really freed, 
+/* Do actually free memory:
+   (be careful: if this is set, memory is never really freed,
     but only marked as free) */
 #ifndef OM_KEEP
 #define OM_KEEP 0
 #endif
-/* but only after you have freed 1000 more addresses 
+/* but only after you have freed 1000 more addresses
    (this is actually independent of the value of OM_KEEP and used
    to initialize om_Opts.Keep) */
 #ifndef OM_SING_KEEP
@@ -475,12 +478,12 @@ int hpux9_system(const char* system);
 #endif /* MDEBUG */
 
 
-/* undef KDEBUG for check of data during std computations 
+/* undef KDEBUG for check of data during std computations
  *
  * define KDEBUG to
  * 0 for basic tests
- * 1 for tests in kSpoly 
- * NOTE: You can locally enable tests in kspoly by setting the 
+ * 1 for tests in kSpoly
+ * NOTE: You can locally enable tests in kspoly by setting the
  *       define at the beginning of kspoly.cc
  */
 #define KDEBUG 0
@@ -602,7 +605,7 @@ while (0)
 /* do have RDEBUG, unless we are doing the very real thing */
 #ifdef HAVE_ASSUME
 #ifndef RDEBUG
-#define RDEBUG 
+#define RDEBUG
 #endif
 #endif
 
diff --git a/Singular/ssiLink.cc b/Singular/ssiLink.cc
index 3d464d7..1605433 100644
--- a/Singular/ssiLink.cc
+++ b/Singular/ssiLink.cc
@@ -47,6 +47,9 @@
 #include <Singular/mpsr.h>
 #endif
 
+#ifdef HAVE_SIMPLEIPC
+#include <Singular/simpleipc.h>
+#endif
 //#if (_POSIX_C_SOURCE >= 200112L) || (_XOPEN_SOURCE >= 600)
 //#define HAVE_PSELECT
 //#endif
@@ -1515,6 +1518,9 @@ do_select:
   }
 
   /* check with select: chars waiting: no -> not ready */
+  #ifdef HAVE_SIMPLEIPC
+  sipc_semaphore_release(0);
+  #endif
   #ifdef HAVE_PSELECT
   s = pselect(max_fd, &mask, NULL, NULL, wt_ptr, &sigmask);
   #else
@@ -1522,6 +1528,9 @@ do_select:
   s = select(max_fd, &mask, NULL, NULL, wt_ptr);
   SSI_UNBLOCK_CHLD;
   #endif
+  #ifdef HAVE_SIMPLEIPC
+  sipc_semaphore_acquire(0);
+  #endif
 
   if (s==-1)
   {
diff --git a/Singular/tesths.cc b/Singular/tesths.cc
index 5ec59c7..9796e4c 100644
--- a/Singular/tesths.cc
+++ b/Singular/tesths.cc
@@ -1,8 +1,6 @@
 /****************************************
 *  Computer Algebra System SINGULAR     *
 ****************************************/
-/* $Id$ */
-
 /*
 * ABSTRACT - initialize SINGULARs components, run Script and start SHELL
 */
@@ -46,6 +44,11 @@
 #include <factory/factory.h>
 #endif
 
+#ifdef HAVE_SIMPLEIPC
+#include <Singular/simpleipc.h>
+#endif
+
+
 extern int siInit(char *);
 
 #if ! defined(LIBSINGULAR)
@@ -122,6 +125,12 @@ int main(          /* main entry to Singular */
     if (optc == 'h') exit(0);
   }
 
+// semaphore0: CPUs --------------------------------------------------
+#ifdef HAVE_SIMPLEIPC
+  feOptIndex cpu_opt = feGetOptIndex("cpus");
+  int cpus = (int)(long)feOptValue(FE_OPT_CPUS);
+  sipc_semaphore_init(0, cpus);
+#endif
   /* say hello */
   //for official version: not active
   //bigintm_setup();
diff --git a/doc/general.doc b/doc/general.doc
index 7bc8408..c1b8094 100644
--- a/doc/general.doc
+++ b/doc/general.doc
@@ -1,5 +1,4 @@
 @comment -*-texinfo-*-
- at comment $Id$
 @comment this file contains the general information about Singular
 
 @c The following directives are necessary for proper compilation
@@ -567,6 +566,8 @@ Set unit of timer to @code{TICKS} ticks per second (i.e., the value
 reported by the @code{timer} and @code{rtimer} variable divided by
 @code{TICKS} gives the time in seconds).  By default, this value is 1.
 
+ at item @code{--cpus=CPUs}
+set the maximal number of CPUs to use.
 @end table
 
 The next three options are of interest for the use with MP links:
@@ -3059,14 +3060,14 @@ data bases).
 @cindex Procedures
 
 Procedures contain sequences of commands in the @sc{Singular} language.
-They are used to extend the set of commands by user defined commands.  
-In a @sc{Singular} session, procedures are defined by either typing them 
-on the command line or by loading them from a library file with the 
+They are used to extend the set of commands by user defined commands.
+In a @sc{Singular} session, procedures are defined by either typing them
+on the command line or by loading them from a library file with the
 @code{LIB} or @code{load}  command (@pxref{Libraries}).  A procedure
 is invoked like normal built-in commands, i.e., by typing its name
 followed by the list of arguments in parentheses. The invocation then
 executes the sequence of commands constituting the procedure. All
-procedures defined in a @sc{Singular} session can be displayed by 
+procedures defined in a @sc{Singular} session can be displayed by
 entering @code{listvar(proc);} .
 
 @menu
@@ -3108,25 +3109,25 @@ See also @xref{Procedures in a library}.
 @end tex
    <sequence_of_commands>
 @*@code{@}}]
- at item Purpose:  
+ at item Purpose:
 @itemize @bullet
 @item
-Defines a new function, the @code{proc} proc_name. 
+Defines a new function, the @code{proc} proc_name.
 @item
 The help string, the parameter list, and the example section are optional.
 They are, however, mandatory for the procedures listed in the header of a library.
 The help string is ignored and no example section is allowed if the procedure is defined
-interactively, i.e., if it is not loaded from a file by the @code{LIB} or @code{load}  
+interactively, i.e., if it is not loaded from a file by the @code{LIB} or @code{load}
 command (@pxref{LIB} and @pxref{load} ).
 @item
-Once loaded from a file into a  @sc{Singular} session, the information provided in the help 
-string will be displayed upon entering @code{help proc_name;}, while the @code{example} 
+Once loaded from a file into a  @sc{Singular} session, the information provided in the help
+string will be displayed upon entering @code{help proc_name;}, while the @code{example}
 section will be executed  upon entering @code{example proc_name;}.
- at xref{Parameter list}, @ref{Help string}, and the example in 
+ at xref{Parameter list}, @ref{Help string}, and the example in
 @ref{Procedures in a library}.
 @item
-In the body of a library, each procedure not meant to be accessible by 
-users should be declared static. @xref{Procedures in a library}. 
+In the body of a library, each procedure not meant to be accessible by
+users should be declared static. @xref{Procedures in a library}.
 @end itemize
 @end table
 
@@ -3186,15 +3187,15 @@ Defines the number, type and names of the arguments of a procedure.
 @item
 The parameter_list is optional.
 @item
-Adding @code{list #} as argument to a parameter list means to allow 
-optional parameters. Furthermore, @code{(list #)} is the default for a 
-parameter list (in case no list is explicitly given). Inside the procedure 
-body, the arguments of @code{list #}  are referenced by @code{#[1], #[2]}, 
+Adding @code{list #} as argument to a parameter list means to allow
+optional parameters. Furthermore, @code{(list #)} is the default for a
+parameter list (in case no list is explicitly given). Inside the procedure
+body, the arguments of @code{list #}  are referenced by @code{#[1], #[2]},
 etc.
 @item
-If a procedure has optional parameters, the attribute @code{default_arg} 
+If a procedure has optional parameters, the attribute @code{default_arg}
 gives the default values for the optional arguments. This provides in
-particular the possibility to also change the behaviour of all procedures 
+particular the possibility to also change the behaviour of all procedures
 nested inside the given procedure.
 @end itemize
 
@@ -3238,7 +3239,7 @@ x5(2,3);
 @item @strong{Note:}
 @* The parameter_list may stretch across multiple lines.
 @* A parameter may have any type (including the types @code{proc}
-   and @code{ring}). 
+   and @code{ring}).
 @*If a parameter is of type ring, then it
    can only be specified by name, but not with a type. For instance:
 @smallexample
@@ -3264,9 +3265,9 @@ proc x7 (ring r)
 @item @strong{Syntax:}
   string_constant;
 @item @strong{Purpose:}
-  Constitutes the help text of a procedure.  
- at item @strong{Format:}  
- at smallexample  
+  Constitutes the help text of a procedure.
+ at item @strong{Format:}
+ at smallexample
 USAGE:    <proc_name>(<parameter list>);   <explanation of parameters>
 ASSUME:  <description of assumptions made>
 RETURN:   <description of what is returned>
@@ -3276,9 +3277,9 @@ REMARKS: <information on theory and implemented  algorithms,references>
 NOTE:    <particularities, limitations, additional details>
 KEYWORDS: <semicolon-separated phrases of index keys>
 SEE ALSO: <comma-separated names of related procedures/cross references>
-EXAMPLE:  example <proc_name>; shows an example  
+EXAMPLE:  example <proc_name>; shows an example
 @end smallexample
- at item @strong{NOTE:}  
+ at item @strong{NOTE:}
 @itemize @bullet
 @item
 ASSUME, SIDE EFFECTS, KEYWORDS, and SEE ALSO are optional.
@@ -3286,9 +3287,9 @@ No help string is required for static procedures.
 @item
 EXAMPLE: refers to the example section of the procedure.
 In a @sc{Singular} session, the example will be carried out upon
-entering @code{example <proc_name>;} if the procedure is loaded 
-from a file by the @code{LIB} or @code{load}  command (@pxref{LIB} 
-and @pxref{load} ). No example section is allowed if the procedure 
+entering @code{example <proc_name>;} if the procedure is loaded
+from a file by the @code{LIB} or @code{load}  command (@pxref{LIB}
+and @pxref{load} ). No example section is allowed if the procedure
 is defined interactively.
 @item
 See @ref{Typesetting of help and info strings} for help strings
@@ -3308,13 +3309,13 @@ illustration.
 @itemize @bullet
 @item
 All variables defined inside a procedure are local to the procedure and their
-names cannot interfere with names in other procedures. Without further action, 
+names cannot interfere with names in other procedures. Without further action,
 they are automatically deleted after leaving the procedure.
 @item
-To keep local variables and their value after leaving the procedure, they have 
-to be exported (i.e. made global) by a command like @code{export} or 
- at code{exportto} (@pxref{export}, at pxref{exportto}, @pxref{importfrom}; 
- at pxref{package}). To return the value of a local variable, use the 
+To keep local variables and their value after leaving the procedure, they have
+to be exported (i.e. made global) by a command like @code{export} or
+ at code{exportto} (@pxref{export}, at pxref{exportto}, @pxref{importfrom};
+ at pxref{package}). To return the value of a local variable, use the
 @code{return} command (@pxref{return}).
 @end itemize
 
@@ -3365,8 +3366,8 @@ procedures in a file.
 @item
 To load a library into a @sc{Singular} session, use the @code{LIB} or
 @code{load} command.
-Having loaded a library, its procedures can be used like any built-in 
- at sc{Singular} function, and information on the library is obtained 
+Having loaded a library, its procedures can be used like any built-in
+ at sc{Singular} function, and information on the library is obtained
 by entering @code{help libname.lib;}
 @item
 @xref{SINGULAR libraries}, for all libraries currently distributed
@@ -3390,7 +3391,7 @@ No line of a library should consist of more than 60 characters.
 @end itemize
 
 @menu
-* Libraries in the SINGULAR  Documentation::	  	
+* Libraries in the SINGULAR  Documentation::	
 * Version string::
 * Category string::
 * Info string::
@@ -3411,24 +3412,24 @@ No line of a library should consist of more than 60 characters.
 @itemize @bullet
 @item
 The typesetting language in which the @sc{Singular} documentation
-is written is @code{texinfo}. The info string of a library included in the 
+is written is @code{texinfo}. The info string of a library included in the
 @sc{Singular} distribution will be parsed and automatically
-translated to the @code{texinfo} format. The same applies to the 
-help string of each procedure listed in the PROCEDURE: section of 
+translated to the @code{texinfo} format. The same applies to the
+help string of each procedure listed in the PROCEDURE: section of
 the info string.
 @item
-Based on various tools, @code{info}, @code{dvi}, @code{p}, and 
- at code{html} versions of the @code{texinfo} documentation are generated.  
+Based on various tools, @code{info}, @code{dvi}, @code{p}, and
+ at code{html} versions of the @code{texinfo} documentation are generated.
 @item
-For texinfo markup elements and other information facilitating optimal 
-typesetting, see @ref{Typesetting of help and info strings}. 
+For texinfo markup elements and other information facilitating optimal
+typesetting, see @ref{Typesetting of help and info strings}.
 @item
-For the convenience of users checking directly the source code, the 
- at code{texinfo}  tools should be used economically. That is, the info 
+For the convenience of users checking directly the source code, the
+ at code{texinfo}  tools should be used economically. That is, the info
 and  help texts should be well readable verbatim.
 @item
-The example of each procedure listed in the PROCEDURE: section of the 
-info string is computed and its output is included in the documentation. 
+The example of each procedure listed in the PROCEDURE: section of the
+info string is computed and its output is included in the documentation.
 @end itemize
 
 
@@ -3444,7 +3445,7 @@ A version string is part of the header of a library.
   version = string_constant;
 @item @strong{Purpose:}
   Defines the version number of a library. It is displayed when the library is loaded.
- at item @strong{Example:}  
+ at item @strong{Example:}
 @code{version="$}@code{Id: sample.lib 13320 2010-09-29 09:31:38Z someone $";}
 @item @strong{Note:}
 It is common practice to simply define the version string to be
@@ -3463,7 +3464,7 @@ A category string is part of the header of a library.
   category = string_constant;
 @item @strong{Purpose:}
   Defines the category of a library.
- at item @strong{Example:}  
+ at item @strong{Example:}
   category="Algebraic geometry";
 @item @strong{Note:}
   Reserved for sorting the libraries into categories.
@@ -3482,9 +3483,9 @@ A category string is part of the header of a library.
   Constitutes the help text of a library. Will be displayed in a
   @sc{Singular}  session upon entering @code{help libname.lib;} .
   Will be part of the @sc{Singular} documentation if the library
-  is distributed with @sc{Singular}. @xref{Libraries in the 
-  SINGULAR  Documentation}. 
- at item @strong{Format:}  
+  is distributed with @sc{Singular}. @xref{Libraries in the
+  SINGULAR  Documentation}.
+ at item @strong{Format:}
 @smallexample
 info="
 LIBRARY: <library_name> <one line description of the purpose>
@@ -3501,26 +3502,26 @@ PROCEDURES:
 ";
 @end smallexample
 
- at item @strong{NOTE:}  
+ at item @strong{NOTE:}
 @itemize @bullet
 @item
-In the documentation, the one line description of the purpose following 
+In the documentation, the one line description of the purpose following
 LIBRARY: will be printed in its own line, starting with the prefix PURPOSE: .
 @item
 REFERENCES, KEYWORDS, and SEE ALSO are optional.
 @item
 Only non-static procedures should be listed in the PROCEDURES: section.
-A procedure parameter should be included between the brackets 
- at code{()} only if the corresponding one line description of the purpose 
+A procedure parameter should be included between the brackets
+ at code{()} only if the corresponding one line description of the purpose
 refers to it. @xref{Procedures in a library}.
 @item
-In the documentation,  separate nodes (subsections in printed documents) 
+In the documentation,  separate nodes (subsections in printed documents)
 are created precisely for those  procedures of the library appearing
-n the PROCEDURES: section (that is, for some if not all non-static 
+n the PROCEDURES: section (that is, for some if not all non-static
 procedures of the library).
 @end itemize
 
- at item @strong{Example:}  
+ at item @strong{Example:}
 @smallexample
 info="
 LIBRARY: absfact.lib   Absolute factorization for characteristic 0
@@ -3549,7 +3550,7 @@ PROCEDURES:
 ";
 @end smallexample
 
-To see how this infostring appears in the documentation after 
+To see how this infostring appears in the documentation after
 typesetting, check @ref{absfact_lib}:
 @end table
 
@@ -3582,66 +3583,66 @@ LIB commands are part of the header of a library.
 @subsection  Procedures in a library
 @cindex  Procedures in a library
 
-Here asre hints and requirements on how procedures contained in a 
-library should be implemented. For more on procedures, 
+Here asre hints and requirements on how procedures contained in a
+library should be implemented. For more on procedures,
 see @ref{Procedures}.
 @enumerate
 @item
 Each procedure not meant to be accessible by users should be declared static.
 @item
-The header of each procedure not declared static must comply with the guidelines 
-described in @ref{Procedure definition} and @ref{Help string}. 
-In particular, it must have a help and example section, and assumptions made 
-should be carefully explained. If the assumptions are checked by the procedure 
+The header of each procedure not declared static must comply with the guidelines
+described in @ref{Procedure definition} and @ref{Help string}.
+In particular, it must have a help and example section, and assumptions made
+should be carefully explained. If the assumptions are checked by the procedure
 on run-time, errors may be reported using the @ref{ERROR} function.
 @item
-Names of procedures should not be shorter than 4 characters and should not 
-contain any special characters. In particular, the use of @code{_} in names of 
-procedures is discourraged. If the name of the procedure is composed of 
-more than one word, each new word should start with a capital letter, all 
+Names of procedures should not be shorter than 4 characters and should not
+contain any special characters. In particular, the use of @code{_} in names of
+procedures is discourraged. If the name of the procedure is composed of
+more than one word, each new word should start with a capital letter, all
 other letters should be lower case (e.g. linearMapKernel).
 @item
 No procedures should be defined within the body of another procedure.
 @item
-A procedure may print out comments, for instance to explain results or to 
-display intermediate computations. This is often helpful when calling the 
-procedure directly, but it may also cause confusions in cases where the 
-procedure is called by another procedure. The @sc{Singular}  solution to 
-this problem makes use of the function @code{dbprint} (@pxref{dbprint}) 
+A procedure may print out comments, for instance to explain results or to
+display intermediate computations. This is often helpful when calling the
+procedure directly, but it may also cause confusions in cases where the
+procedure is called by another procedure. The @sc{Singular}  solution to
+this problem makes use of the function @code{dbprint} (@pxref{dbprint})
 and the reserved variables @code{printlevel} and @code{voice}
-(@pxref{printlevel} and @pxref{voice}). Note that @code{printlevel} is a 
-predefined, global variable whose value can be changed by the user, while 
- at code{voice} is an internal variable, representing the nesting level of 
-procedures. Accordingly, the value of @ref{voice} is 1 on the top level, 
-2 inside the first procedure, and so on. The default value of 
- at code{printlevel}  is 0, but @code{printlevel}  can be set to 
+(@pxref{printlevel} and @pxref{voice}). Note that @code{printlevel} is a
+predefined, global variable whose value can be changed by the user, while
+ at code{voice} is an internal variable, representing the nesting level of
+procedures. Accordingly, the value of @ref{voice} is 1 on the top level,
+2 inside the first procedure, and so on. The default value of
+ at code{printlevel}  is 0, but @code{printlevel}  can be set to
 any integer value by the user.
 @end enumerate
 
 @table @asis
 @item @strong{Example:}
-If the procedure @code{Test} below is called directly from 
-the top level, then `comment1' is displayed, but not `comment2'. 
-By default, nothing is displayed if @code{Test} is called from within any 
-other procedure. However, if @code{printlevel} is set to a value k 
-with k>0, then `comment1' (resp. `comment2') is displayed -- provided 
- at code{Test} is called from another procedure with nesting level at 
+If the procedure @code{Test} below is called directly from
+the top level, then `comment1' is displayed, but not `comment2'.
+By default, nothing is displayed if @code{Test} is called from within any
+other procedure. However, if @code{printlevel} is set to a value k
+with k>0, then `comment1' (resp. `comment2') is displayed -- provided
+ at code{Test} is called from another procedure with nesting level at
 most k (resp. k-1).
 
-The example part of a procedure behaves in this respect like the 
-procedure on top level (the nesting level is 1, that is, the value of 
+The example part of a procedure behaves in this respect like the
+procedure on top level (the nesting level is 1, that is, the value of
 @code{voice} is 2). Therefore, due to the command @code{printlevel=1;},
-`comment1' will be displayed when entering @code{example Test;}. 
+`comment1' will be displayed when entering @code{example Test;}.
 However, since printlevel is a global variable, it should be reset to
-its old value at the end of the example part.  
+its old value at the end of the example part.
 
 The predefined variable @code{echo}  controls whether input lines are
-echoed or not. Its default is 0, but it can be reset by the user. Input 
-is echoed if @code{echo>=voice}. At the beginning of the example 
-part, @code{echo} is set to the value 2. In this way, the input lines 
+echoed or not. Its default is 0, but it can be reset by the user. Input
+is echoed if @code{echo>=voice}. At the beginning of the example
+part, @code{echo} is set to the value 2. In this way, the input lines
 of the example will be displayed when entering @code{example Test;}.
 
- at smallexample       	
+ at smallexample
       proc Test
       "USAGE:   ...
                ...
@@ -3669,11 +3670,11 @@ of the example will be displayed when entering @code{example Test;}.
 @sc{Singular}  functions such as @code{pause} or @code{read}  allow
 and require interactive user-input. They are, thus, in particular useful
 for debugging purposes. If such a command is used inside the procedure
-of a library to be distributed with @sc{Singular}, the example section of 
-the procedure has to be written with some care -- the procedure should 
-only be called from within the example if the value of @code{printlevel}  
-is 0. Otherwise,  the automatic build process of @sc{Singular} will not 
-run through since the examples are carried out during the build process. 
+of a library to be distributed with @sc{Singular}, the example section of
+the procedure has to be written with some care -- the procedure should
+only be called from within the example if the value of @code{printlevel}
+is 0. Otherwise,  the automatic build process of @sc{Singular} will not
+run through since the examples are carried out during the build process.
 They are, thus, tested against changes in the code.
 @end table
 
@@ -3721,26 +3722,26 @@ and errors which may help you to improve your library.
 @subsection  Typesetting of help and info strings
 @cindex  Typesetting of help and info strings
 
-The info strings of the libraries which are included in the distribution 
-of @sc{Singular} and the help strings of the corresponding procedures 
-are parsed and automatically converted into the @code{texinfo} format 
-(the typesetting language in which the documentation  of @sc{Singular} 
-is written). 
+The info strings of the libraries which are included in the distribution
+of @sc{Singular} and the help strings of the corresponding procedures
+are parsed and automatically converted into the @code{texinfo} format
+(the typesetting language in which the documentation  of @sc{Singular}
+is written).
 
 The illustrative example given in @ref{template_lib} should provide
-sufficient information on how this works. For more details, check the 
+sufficient information on how this works. For more details, check the
 following items:
 
 @itemize @bullet
 @item
 Users familiar with @code{texinfo} may write help and info strings
-directly in the @code{texinfo} format. The string should, then, 
+directly in the @code{texinfo} format. The string should, then,
 start with the @code{@@} sign. In this case, no parsing will be done.
 @item
 Help and info strings are typeset within a @code{@@table @@asis} environment
 (which is similar to the @code{latex} @code{description} environment).
 @item
-If a line starts with uppercase words up to a colon, then the text up to 
+If a line starts with uppercase words up to a colon, then the text up to
 the colon is taken to be the description-string of an item, and the
 text following the colon is taken to be the content of the item.
 @item
@@ -3748,10 +3749,10 @@ If the description-string of an item matches
 @table @asis
 @item @code{SEE ALSO}
 then the
-content of the item is assumed to consist of comma-separated words 
-which are valid references to other @code{texinfo}  nodes of the manual 
+content of the item is assumed to consist of comma-separated words
+which are valid references to other @code{texinfo}  nodes of the manual
 (e.g., all procedure and command names are also @code{texinfo}  nodes).
- at item  @code{KEYWORDS} 
+ at item  @code{KEYWORDS}
 then the content of the item is assumed to be a
 semicolon-separated list of phrases which are taken as keys for the
 index of the manual (the name of a procedure/library is
@@ -3763,23 +3764,23 @@ library} matches
 @table @asis
 @item @code{LIBRARY}
 then the content of the item is assumed to be a one-line description of
-the library. If this one-line description consists of uppercase characters 
+the library. If this one-line description consists of uppercase characters
 only, then it is typeset in lowercase characters (otherwise it is left as is).
 @item @code{PROCEDURES}
 then the content of the item is assumed to consist of lines of type
 @smallexample
-<proc_name>();     <one line description of the purpose> 
+<proc_name>();     <one line description of the purpose>
 @end smallexample
-Separate @code{texinfo} nodes (subsections in printed documents) 
+Separate @code{texinfo} nodes (subsections in printed documents)
 are created precisely for those  procedures of the library appearing
 here (that is, for some if not all non-static procedures of the library).
 @end table
 @end itemize
 
-With respect to the content of an item, the following @code{texinfo} 
-markup elements are recognized: 
+With respect to the content of an item, the following @code{texinfo}
+markup elements are recognized:
 
- at itemize 
+ at itemize
 @item @code{@@*}
 Enforces a line-break.
 @table @asis
@@ -3790,8 +3791,8 @@ Enforces a line-break.
 @end table
 
 @item @code{@@ref@{...@}}
-For references to other parts of the @sc{Singular} manual, use one of 
-the following @code{@@ref@{node@}} constructs. Here, @code{node} 
+For references to other parts of the @sc{Singular} manual, use one of
+the following @code{@@ref@{node@}} constructs. Here, @code{node}
 must be the name of a section of the @sc{Signular} manual. In
 particular,  it may be the name of a function, library or procedure
 in a library.
@@ -3834,7 +3835,7 @@ not contain the characters @code{@{}, at code{@}}, and @code{@@}.
 @end table
 
 @item @code{@@code@{..@}}
-Typeset short strings in typewriter font (short: does not cause 
+Typeset short strings in typewriter font (short: does not cause
 expansion over multiple lines).
 @table @asis
 @item Example:
@@ -3842,7 +3843,7 @@ expansion over multiple lines).
 @*@expansion{}
 @*@code{typewriter font}
 @item Note:
-The string inside @code{@@code@{..@}} must not contain the 
+The string inside @code{@@code@{..@}} must not contain the
 characters @code{@{}, at code{@}}, and @code{@@}.
 @end table
 
@@ -3871,8 +3872,8 @@ notice escape of special characters like @{,@},@@
 @end example
 after example
 @item Note:
-Inside an @@example environment, the characters @{,@},@@ have 
-to be escaped by an @@ sign. 
+Inside an @@example environment, the characters @{,@},@@ have
+to be escaped by an @@ sign.
 @end table
 
 @item
@@ -3900,8 +3901,8 @@ escape of special characters like @{,@},@@
 @end format
 after format
 @item Note:
-Inside an @@format environment, the characters @{,@},@@ have 
-to be escaped by an @@ sign. 
+Inside an @@format environment, the characters @{,@},@@ have
+to be escaped by an @@ sign.
 @end table
 
 @item
@@ -3943,7 +3944,7 @@ texinfo markup elements.
 @subsection   Loading a library
 @cindex   Loading a library
 
-Libraries can be loaded with the @code{LIB}  or the @code{load}  command 
+Libraries can be loaded with the @code{LIB}  or the @code{load}  command
 (@pxref{LIB} and @pxref{load}).
 
 @c ------------------------------------------------------------
@@ -3959,10 +3960,10 @@ Libraries can be loaded with the @code{LIB}  or the @code{load}  command
 @item @strong{Type:}
 none
 @item @strong{Purpose:}
-Reads a library from a file. If the given filename does not start with 
- at kbd{.} or @kbd{/}  and if the file cannot be located in the current 
-directory,  the @code{SearchPath} is checked for a  directory containing 
-a file with this name. 
+Reads a library from a file. If the given filename does not start with
+ at kbd{.} or @kbd{/}  and if the file cannot be located in the current
+directory,  the @code{SearchPath} is checked for a  directory containing
+a file with this name.
 @item @strong{Note on SearchPath:}
 The @code{SearchPath} for a library is constructed at @sc{Singular}
 start-up time as follows:
@@ -4007,17 +4008,17 @@ library @code{standard.lib} is automatically loaded at start-up time.
 
 @end table
 
-Following a @code{LIB}  or @code{load}  command, only the names 
-of the procedures in the library are loaded. The body of a particular 
-procedure is only read upon the first call of the procedure. This 
-minimizes memory consumption by unused procedures. Starting 
-a @sc{Singular}  session with the @code{-q} or @code{--quiet} 
- at code{option} unsets the @code{option} @code{loadLib} and 
+Following a @code{LIB}  or @code{load}  command, only the names
+of the procedures in the library are loaded. The body of a particular
+procedure is only read upon the first call of the procedure. This
+minimizes memory consumption by unused procedures. Starting
+a @sc{Singular}  session with the @code{-q} or @code{--quiet}
+ at code{option} unsets the @code{option} @code{loadLib} and
 inhibits, thus, the monitoring of library loading (see @code{option}).
 
-All libraries loaded in a @sc{Singular}  session are displayed upon 
+All libraries loaded in a @sc{Singular}  session are displayed upon
 entering @code{listvar(package);} :
- 	
+
 @smallexample
 @c example
  option(loadLib);   // show loading of libraries;
diff --git a/doc/singular.man b/doc/singular.man
index 4d446ef..4ab71a7 100644
--- a/doc/singular.man
+++ b/doc/singular.man
@@ -81,6 +81,9 @@ Use RSH for MP connections
 .TP
 \fB\-\-ticks\-per\-sec\fR=\fITICKS\fR
 Sets unit of timer to TICKS per second
+.TP
+\fB\-\-cpus\fR=\fICPUS\fR
+maximal number of CPUs to use
 .PP
 For more information, type `help;' from within Singular or visit
 http://www.singular.uni\-kl.de or consult the
diff --git a/kernel/mod2.h.in b/kernel/mod2.h.in
index efc436e..39b1b46 100644
--- a/kernel/mod2.h.in
+++ b/kernel/mod2.h.in
@@ -5,7 +5,6 @@
  *  mod2.h: Main configuration file for Singular
  *          DO NOT EDIT!
  *
- *  Version: $Id$
  *******************************************************************/
 #ifndef MOD2_H
 #define MOD2_H
@@ -145,6 +144,8 @@
 #undef HAVE_DYNAMIC_LOADING
 /* Define to enable plural */
 #undef HAVE_PLURAL
+/* Define to enable fans/cones */
+#undef HAVE_FANS
 /* Define to enable ratGB/ ratGRING */
 #undef HAVE_RATGRING
 /* Define to enable shiftbba */
@@ -195,7 +196,7 @@
 
 /* procedures to compute groebner bases with the f5 implementation */
 /* still testing */
-#undef HAVE_F5 
+#undef HAVE_F5
 
 /* procedures to compute groebner bases with the f5c implementation */
 /* still testing */
@@ -250,7 +251,7 @@
  ******************************************************************/
 /* Under HPUX 9, system(...) returns -1 if SIGCHLD does not equal
    SIG_DFL. However, if it stays at SIG_DFL we get zombie processes
-   for terminated childs generated by fork. Therefors some special treatment 
+   for terminated childs generated by fork. Therefors some special treatment
    is necessary */
 #ifdef HPUX_9
 #include <stdlib.h>
@@ -292,6 +293,9 @@ int hpux9_system(const char* system);
 
 #define HALT() m2_end(2)
 
+/* include simpleipc/semaphore code, link against librt/libpthread */
+#define HAVE_SIMPLEIPC 1
+
 /* define OLD_RES for res/sres/mres(i,j,k) */
 #undef OLD_RES
 
@@ -348,10 +352,10 @@ int hpux9_system(const char* system);
        #include "mod2.h"
        ...
 
-       makes sure that all poly operations in your file are done with 
+       makes sure that all poly operations in your file are done with
        PDEBUG == 2
  To break after an error occured, set a debugger breakpoint on
- dErrorBreak. 
+ dErrorBreak.
 */
 #ifndef PDEBUG
 #define PDEBUG 0
@@ -385,31 +389,31 @@ int hpux9_system(const char* system);
      0     : addresses are really freed
      1     : addresses are only marked as free and not really freed.
 
-   OM_CHECK, OM_TRACK, and OM_KEEP can be set on a per-file basis 
+   OM_CHECK, OM_TRACK, and OM_KEEP can be set on a per-file basis
    (as can OM_NDEBUG),  e.g.:
      #define OM_CHECK 3
      #define OM_TRACK 5
      #define OM_KEEP  1
      #include "mod2.h"
      #include "omalloc.h"
-   ensures that all memory allocs/free in this file are done with 
-   OM_CHECK==3 and OM_TRACK==5, and that all addresses allocated/freed 
+   ensures that all memory allocs/free in this file are done with
+   OM_CHECK==3 and OM_TRACK==5, and that all addresses allocated/freed
    in this file are only marked as free and never really freed.
- 
-   To set OM_CHECK, OM_TRACK and OM_KEEP under dynamic scope, set 
-   om_Opts.MinCheck, om_Opts.MinTrack to the respectiv values and 
-   om_Opts.Keep to the number of addresses which are kept before they are 
+
+   To set OM_CHECK, OM_TRACK and OM_KEEP under dynamic scope, set
+   om_Opts.MinCheck, om_Opts.MinTrack to the respectiv values and
+   om_Opts.Keep to the number of addresses which are kept before they are
    actually freed. E.g.:
      int check=om_Opts.MinCheck, track=om_Opts.MinTrack, keep= m_OPts.Keep;
      om_Opts.MinCheck = 3; om_Opts.MinTrack = 5; omOpts.Keep = LONG_MAX;
      ExternalRoutine();
      om_Opts.MinCheck = check; omOpts.MinTrack = track; omOpts.Keep = keep;
    ensures that all calls omDebug routines  occuring during the computation of
-   ExternalRoutine() are done with OM_CHECK==3 and OM_TRACK==5, and 
+   ExternalRoutine() are done with OM_CHECK==3 and OM_TRACK==5, and
    calls to omFree only mark addresses as free and not really free them.
 
-   Furthermore, the value of OM_SING_KEEP (resp. om_Opts.Keep) specifies 
-   how many addresses are kept before they are actually freed, independently 
+   Furthermore, the value of OM_SING_KEEP (resp. om_Opts.Keep) specifies
+   how many addresses are kept before they are actually freed, independently
    of the value of OM_KEEP.
 
    Some tips on possible values of OM_TRACK, OM_CHECK, OM_KEEP:
@@ -422,31 +426,31 @@ int hpux9_system(const char* system);
        #include "omalloc.h"
      Under dynamic scope, do (e.g., from within the debugger):
        om_Opts.MinCheck = 3; om_Opts.MinTrack = 5; omOpts.Keep = LONG_MAX;
-   + to find out where "memory corruption" occured, increase value of 
-     OM_CHECK - the higher this value is, the more consistency checks are 
-     done (However a value > 3 checks the entire memory each time an omalloc 
+   + to find out where "memory corruption" occured, increase value of
+     OM_CHECK - the higher this value is, the more consistency checks are
+     done (However a value > 3 checks the entire memory each time an omalloc
      routine is used!)
-   
+
    Some more tips on the usage of omalloc:
-   + omAlloc*, omRealloc*, omFree*, omCheck* omDebug* omTest* rotuines 
+   + omAlloc*, omRealloc*, omFree*, omCheck* omDebug* omTest* rotuines
      assume that sizes are > 0 and pointers are != NULL
    + omalloc*, omrealloc*, omfree* omcheck*, omdebug* omtest* routines allow
      NULL pointers and sizes == 0
-   + You can safely use any free/realloc routine in combination with any alloc 
+   + You can safely use any free/realloc routine in combination with any alloc
      routine (including the debug versions): E.g., an address allocated with
-     omAllocBin can be freed with omfree, or an adress allocated with 
+     omAllocBin can be freed with omfree, or an adress allocated with
      om(Debug)Alloc can be freed with omfree, or omFree, or omFreeSize, etc.
-     However, keep in mind that the efficiency decreases from 
+     However, keep in mind that the efficiency decreases from
      Bin over Size to General routines (i.e., omFreeBin is more efficient than
      omFreeSize which is more efficient than omFree, likewise with the alloc
      routines).
    + if OM_CHECK is undefined or 0, then all omCheck routines do nothing
-   + if OM_CHECK and OM_TRACK are both undefined (or 0), or if OM_NDEBUG is 
-     defined, then the "real" alloc/realloc/free macros are used, and all 
+   + if OM_CHECK and OM_TRACK are both undefined (or 0), or if OM_NDEBUG is
+     defined, then the "real" alloc/realloc/free macros are used, and all
      omTest, omDebug and omCheck routines are undefined
-   + to break after an omError occured within a debugger, 
+   + to break after an omError occured within a debugger,
      set a breakpoint on dErrorBreak
-   + to do checks from within the debugger, or to do checks with explicit 
+   + to do checks from within the debugger, or to do checks with explicit
      check level, use omTest routines.
 */
 
@@ -458,13 +462,13 @@ int hpux9_system(const char* system);
 #ifndef OM_CHECK
 #define OM_CHECK 1
 #endif
-/* Do actually free memory: 
-   (be careful: if this is set, memory is never really freed, 
+/* Do actually free memory:
+   (be careful: if this is set, memory is never really freed,
     but only marked as free) */
 #ifndef OM_KEEP
 #define OM_KEEP 0
 #endif
-/* but only after you have freed 1000 more addresses 
+/* but only after you have freed 1000 more addresses
    (this is actually independent of the value of OM_KEEP and used
    to initialize om_Opts.Keep) */
 #ifndef OM_SING_KEEP
@@ -474,12 +478,12 @@ int hpux9_system(const char* system);
 #endif /* MDEBUG */
 
 
-/* undef KDEBUG for check of data during std computations 
+/* undef KDEBUG for check of data during std computations
  *
  * define KDEBUG to
  * 0 for basic tests
- * 1 for tests in kSpoly 
- * NOTE: You can locally enable tests in kspoly by setting the 
+ * 1 for tests in kSpoly
+ * NOTE: You can locally enable tests in kspoly by setting the
  *       define at the beginning of kspoly.cc
  */
 #define KDEBUG 0
@@ -601,7 +605,7 @@ while (0)
 /* do have RDEBUG, unless we are doing the very real thing */
 #ifdef HAVE_ASSUME
 #ifndef RDEBUG
-#define RDEBUG 
+#define RDEBUG
 #endif
 #endif
 

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list