]> www.ginac.de Git - ginac.git/commitdiff
#ifndef around namespace GiNaC { }
authorAlexander Frink <Alexander.Frink@uni-mainz.de>
Thu, 2 Dec 1999 18:44:55 +0000 (18:44 +0000)
committerAlexander Frink <Alexander.Frink@uni-mainz.de>
Thu, 2 Dec 1999 18:44:55 +0000 (18:44 +0000)
84 files changed:
check/differentiation.cpp
check/expand_subs.cpp
check/inifcns_consist.cpp
check/lsolve_onedim.cpp
check/matrix_checks.cpp
check/normalization.cpp
check/numeric_consist.cpp
check/numeric_output.cpp
check/paranoia_check.cpp
check/poly_gcd.cpp
check/powerlaws.cpp
check/series_expansion.cpp
ginac/add.cpp
ginac/add.h
ginac/basic.cpp
ginac/basic.h
ginac/clifford.cpp
ginac/clifford.h
ginac/color.cpp
ginac/color.h
ginac/coloridx.cpp
ginac/coloridx.h
ginac/constant.cpp
ginac/constant.h
ginac/container.pl
ginac/diff.cpp
ginac/ex.cpp
ginac/ex.h
ginac/expair.h
ginac/expairseq.cpp
ginac/expairseq.h
ginac/exprseq_suppl.cpp
ginac/fail.cpp
ginac/fail.h
ginac/flags.h
ginac/function.pl
ginac/idx.cpp
ginac/idx.h
ginac/indexed.cpp
ginac/indexed.h
ginac/inifcns.cpp
ginac/inifcns.h
ginac/inifcns_gamma.cpp
ginac/inifcns_trans.cpp
ginac/inifcns_zeta.cpp
ginac/isospin.cpp
ginac/isospin.h
ginac/lorentzidx.cpp
ginac/lorentzidx.h
ginac/lst_suppl.cpp
ginac/matrix.cpp
ginac/matrix.h
ginac/mul.cpp
ginac/mul.h
ginac/ncmul.cpp
ginac/ncmul.h
ginac/normal.cpp
ginac/normal.h
ginac/numeric.cpp
ginac/numeric.h
ginac/operators.cpp
ginac/operators.h
ginac/power.cpp
ginac/power.h
ginac/print.cpp
ginac/printcsrc.cpp
ginac/printraw.cpp
ginac/printtree.cpp
ginac/relational.cpp
ginac/relational.h
ginac/series.cpp
ginac/series.h
ginac/simp_lor.cpp
ginac/simp_lor.h
ginac/structure.cpp
ginac/structure.h
ginac/structure.pl
ginac/symbol.cpp
ginac/symbol.h
ginac/tinfos.h
ginac/utils.cpp
ginac/utils.h
ginsh/ginsh.h
ginsh/ginsh_parser.yy

index 0d963fed8b0f6d830a56063f71859a9a6786d561..348b5fd5bd2121c6853f5cdacc2d6412726fae58 100644 (file)
  */
 
 #include <ginac/ginac.h>
  */
 
 #include <ginac/ginac.h>
+
+#ifndef NO_GINAC_NAMESPACE
 using namespace GiNaC;
 using namespace GiNaC;
+#endif // ndef NO_GINAC_NAMESPACE
 
 static unsigned check_diff(const ex &e, const symbol &x,
                            const ex &d, unsigned nth=1)
 
 static unsigned check_diff(const ex &e, const symbol &x,
                            const ex &d, unsigned nth=1)
index b6ff16f074596dfdf60ba0c3b58b5836a80fc404..4d78708b1573648c822c33b66b24204a13a9f8b9 100644 (file)
 
 
 #include <ginac/ginac.h>
 
 
 #include <ginac/ginac.h>
+
+#ifndef NO_GINAC_NAMESPACE
 using namespace GiNaC;
 using namespace GiNaC;
+#endif // ndef NO_GINAC_NAMESPACE
 
 #define VECSIZE 100
 
 
 #define VECSIZE 100
 
index cabecc6ac08155dc0c2104f83630126ea957c9ff..024dad79917382849d191f334fca34c00b9f0ebb 100644 (file)
  */
 
 #include <ginac/ginac.h>
  */
 
 #include <ginac/ginac.h>
+
+#ifndef NO_GINAC_NAMESPACE
 using namespace GiNaC;
 using namespace GiNaC;
+#endif // ndef NO_GINAC_NAMESPACE
 
 /* Simple tests on the sine trigonometric function. */
 static unsigned inifcns_consist_sin(void)
 
 /* Simple tests on the sine trigonometric function. */
 static unsigned inifcns_consist_sin(void)
index 448a16372ba40464ad66f89474a5aa83f9a860ee..be113c2dde50c7d654be847da629c60fe66d7014 100644 (file)
  */
 
 #include <ginac/ginac.h>
  */
 
 #include <ginac/ginac.h>
+
+#ifndef NO_GINAC_NAMESPACE
 using namespace GiNaC;
 using namespace GiNaC;
+#endif // ndef NO_GINAC_NAMESPACE
 
 unsigned lsolve_onedim(void)
 {
 
 unsigned lsolve_onedim(void)
 {
index 80d8bf95a718d9f2d9b961bb82d8e3c1fd638a0e..3da30af85fcf3870c532e601af2ff3d284d44267 100644 (file)
 
 #include <stdexcept>
 #include <ginac/ginac.h>
 
 #include <stdexcept>
 #include <ginac/ginac.h>
+
+#ifndef NO_GINAC_NAMESPACE
 using namespace GiNaC;
 using namespace GiNaC;
+#endif // ndef NO_GINAC_NAMESPACE
 
 static unsigned matrix_determinants(void)
 {
 
 static unsigned matrix_determinants(void)
 {
index 3f814fde3ce124aaacad5a6702d05b208416078c..bf761ffe09a9a3c7c3f3315ede527e9990afb31c 100644 (file)
  */
 
 #include <ginac/ginac.h>
  */
 
 #include <ginac/ginac.h>
+
+#ifndef NO_GINAC_NAMESPACE
 using namespace GiNaC;
 using namespace GiNaC;
+#endif // ndef NO_GINAC_NAMESPACE
 
 static symbol x("x"), y("y"), z("z");
 
 
 static symbol x("x"), y("y"), z("z");
 
index 6c5fd6be6efbd916655f609163f516812de49cb9..d6a3ffca7ee376acd504a3bd008de1e47025ab3c 100644 (file)
 
 #include <stdlib.h>
 #include <ginac/ginac.h>
 
 #include <stdlib.h>
 #include <ginac/ginac.h>
+
+#ifndef NO_GINAC_NAMESPACE
 using namespace GiNaC;
 using namespace GiNaC;
+#endif // ndef NO_GINAC_NAMESPACE
 
 /* Simple and maybe somewhat pointless consistency tests of assorted tests and
  * conversions. */
 
 /* Simple and maybe somewhat pointless consistency tests of assorted tests and
  * conversions. */
index 99f3afdca892527bdac2ead99390d075467ebfb2..50dd8c1ff6acd441fd065cefed156b6491b421a4 100644 (file)
  */
 
 #include <ginac/ginac.h>
  */
 
 #include <ginac/ginac.h>
+
+#ifndef NO_GINAC_NAMESPACE
 using namespace GiNaC;
 using namespace GiNaC;
+#endif // ndef NO_GINAC_NAMESPACE
 
 unsigned numeric_output(void)
 {
 
 unsigned numeric_output(void)
 {
index d84946f20af732802a71d62ed4b588e2212b5e2e..b42225ca3c75facf0ab4707682219a0b16d96646 100644 (file)
  */
 
 #include <ginac/ginac.h>
  */
 
 #include <ginac/ginac.h>
+
+#ifndef NO_GINAC_NAMESPACE
 using namespace GiNaC;
 using namespace GiNaC;
+#endif // ndef NO_GINAC_NAMESPACE
 
 // The very first pair of historic problems had its roots in power.cpp and was
 // finally resolved on April 27th. (Fixing the first on April 23rd actually
 
 // The very first pair of historic problems had its roots in power.cpp and was
 // finally resolved on April 27th. (Fixing the first on April 23rd actually
index 484eb2d27c93aebfd8e7224e14693ee8fe1f4aab..1448ae3cc815dd0a9c06ac6f1353b7cc4d339c79 100644 (file)
  */
 
 #include <ginac/ginac.h>
  */
 
 #include <ginac/ginac.h>
+
+#ifndef NO_GINAC_NAMESPACE
 using namespace GiNaC;
 using namespace GiNaC;
+#endif // ndef NO_GINAC_NAMESPACE
 
 const int MAX_VARIABLES = 5;
 
 
 const int MAX_VARIABLES = 5;
 
index c51bff8e596ef52a7977c68b281161fe87e09ba1..b7fdd60c554ade490f6add40b772126bd12a90a2 100644 (file)
  */
 
 #include <ginac/ginac.h>
  */
 
 #include <ginac/ginac.h>
+
+#ifndef NO_GINAC_NAMESPACE
 using namespace GiNaC;
 using namespace GiNaC;
+#endif // ndef NO_GINAC_NAMESPACE
 
 static unsigned powerlaws1(void)
 {
 
 static unsigned powerlaws1(void)
 {
index 292f5b922751d6a832f2a28168192376d6092643..b648f9d71c7d154fc3aa61768c33efdab875d1f5 100644 (file)
  */
 
 #include <ginac/ginac.h>
  */
 
 #include <ginac/ginac.h>
+
+#ifndef NO_GINAC_NAMESPACE
 using namespace GiNaC;
 using namespace GiNaC;
+#endif // ndef NO_GINAC_NAMESPACE
 
 static symbol x("x");
 
 
 static symbol x("x");
 
index 6f5380cce2393042caff5f8def7e00f967ff239a..553b8272c4861b910e784ac6fe465512f09d9770 100644 (file)
@@ -27,7 +27,9 @@
 #include "mul.h"
 #include "debugmsg.h"
 
 #include "mul.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -653,4 +655,6 @@ unsigned add::precedence=40;
 const add some_add;
 type_info const & typeid_add=typeid(some_add);
 
 const add some_add;
 type_info const & typeid_add=typeid(some_add);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 37d502a0bfe77925ba55c55743a6264d54762267..1acb03d17200b5cdeb1c8323957e3dd41312247f 100644 (file)
@@ -25,7 +25,9 @@
 
 #include <ginac/expairseq.h>
 
 
 #include <ginac/expairseq.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 /** Sum of expressions. */
 class add : public expairseq
 
 /** Sum of expressions. */
 class add : public expairseq
@@ -112,6 +114,8 @@ inline const add &ex_to_add(const ex &e)
        return static_cast<const add &>(*e.bp);
 }
 
        return static_cast<const add &>(*e.bp);
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_ADD_H__
 
 #endif // ndef __GINAC_ADD_H__
index eb4a72e034192e9e53cb478cfe0650b91a9f00be..96fa259d0409b5db4de12c196e735a2df5846fab 100644 (file)
@@ -34,7 +34,9 @@
 #include "utils.h"
 #include "debugmsg.h"
 
 #include "utils.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -417,4 +419,6 @@ type_info const & typeid_basic=typeid(some_basic);
 
 int max_recursion_level=1024;
 
 
 int max_recursion_level=1024;
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index a0e3f6ed94021f9012118bd3b248c1bd43c161fe..ae8104769fcfc4e043b6848649e6a020c2b65319 100644 (file)
 #include <typeinfo>
 #include <vector>
 
 #include <typeinfo>
 #include <vector>
 
+// CINT needs <algorithm> to work properly with <vector> 
+#include <algorithm>
+
 #include <ginac/flags.h>
 #include <ginac/tinfos.h>
 #include <ginac/assertion.h>
 
 #include <ginac/flags.h>
 #include <ginac/tinfos.h>
 #include <ginac/assertion.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 class basic;
 class ex;
 
 class basic;
 class ex;
@@ -39,7 +44,8 @@ class symbol;
 class lst;
 class numeric;
 
 class lst;
 class numeric;
 
-typedef vector<ex> exvector;
+//typedef vector<ex> exvector;
+typedef vector<ex,malloc_alloc> exvector; // CINT does not like vector<...,default_alloc>
 
 #define INLINE_BASIC_CONSTRUCTORS
 
 
 #define INLINE_BASIC_CONSTRUCTORS
 
@@ -180,6 +186,8 @@ extern int max_recursion_level;
 
 // convenience macros
 
 
 // convenience macros
 
+#ifndef NO_GINAC_NAMESPACE
+
 #define is_of_type(OBJ,TYPE) \
     (dynamic_cast<TYPE *>(const_cast<GiNaC::basic *>(&OBJ))!=0)
 
 #define is_of_type(OBJ,TYPE) \
     (dynamic_cast<TYPE *>(const_cast<GiNaC::basic *>(&OBJ))!=0)
 
@@ -192,6 +200,25 @@ extern int max_recursion_level;
 #define is_ex_exactly_of_type(OBJ,TYPE) \
     ((*(OBJ).bp).tinfo()==GiNaC::TINFO_##TYPE)
 
 #define is_ex_exactly_of_type(OBJ,TYPE) \
     ((*(OBJ).bp).tinfo()==GiNaC::TINFO_##TYPE)
 
+#else // ndef NO_GINAC_NAMESPACE
+
+#define is_of_type(OBJ,TYPE) \
+    (dynamic_cast<TYPE *>(const_cast<basic *>(&OBJ))!=0)
+
+#define is_exactly_of_type(OBJ,TYPE) \
+    ((OBJ).tinfo()==TINFO_##TYPE)
+
+#define is_ex_of_type(OBJ,TYPE) \
+    (dynamic_cast<TYPE *>(const_cast<basic *>((OBJ).bp))!=0)
+
+#define is_ex_exactly_of_type(OBJ,TYPE) \
+    ((*(OBJ).bp).tinfo()==TINFO_##TYPE)
+
+#endif // ndef NO_GINAC_NAMESPACE
+
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_BASIC_H__
 
 #endif // ndef __GINAC_BASIC_H__
+
index 16f9a4d4c9822e30137f6a074de614c94dabf8e2..ff98011fb39739ae827443ede2f395a08e57d8b5 100644 (file)
@@ -29,7 +29,9 @@
 #include "utils.h"
 #include "debugmsg.h"
 
 #include "utils.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -211,4 +213,6 @@ unsigned clifford::next_serial=0;
 const clifford some_clifford;
 type_info const & typeid_clifford=typeid(some_clifford);
 
 const clifford some_clifford;
 type_info const & typeid_clifford=typeid(some_clifford);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 49a3613b13f9424f68f143d98735655b89a88592..3302f461505e9a78c4be7a97e30c40216adba74a 100644 (file)
@@ -27,7 +27,9 @@
 #include <ginac/indexed.h>
 #include <ginac/ex.h>
 
 #include <ginac/indexed.h>
 #include <ginac/ex.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 /** Base class for clifford object */
 class clifford : public indexed
 
 /** Base class for clifford object */
 class clifford : public indexed
@@ -90,6 +92,8 @@ inline const clifford &ex_to_clifford(const ex &e)
        return static_cast<const clifford &>(*e.bp);
 }
 
        return static_cast<const clifford &>(*e.bp);
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_CLIFFORD_H__
 
 #endif // ndef __GINAC_CLIFFORD_H__
index 095a3b0c13564820cacdf328b529fec2ce1bf3a0..468645ddadfaa5e87912c16eb13b9e71469e0de7 100644 (file)
@@ -35,7 +35,9 @@
 #include "relational.h"
 #include "debugmsg.h"
 
 #include "relational.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -965,4 +967,7 @@ void append_exvector_to_exvector(exvector & dest, exvector const & source)
     }
 }
 
     }
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
+
index 9967f4517e02082ae4878fc1adbc927aeff41518..f72034d8a3a8382546c6f82349b5c5d7b7938af5 100644 (file)
@@ -28,7 +28,9 @@
 #include <ginac/indexed.h>
 #include <ginac/ex.h>
 
 #include <ginac/indexed.h>
 #include <ginac/ex.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 const unsigned MAX_REPRESENTATION_LABELS = 4;
 const unsigned COLOR_EIGHT = 8; // N*N-1
 
 const unsigned MAX_REPRESENTATION_LABELS = 4;
 const unsigned COLOR_EIGHT = 8; // N*N-1
@@ -162,6 +164,8 @@ ex brute_force_sum_color_indices(ex const & e);
 
 void append_exvector_to_exvector(exvector & dest, exvector const & source);
 
 
 void append_exvector_to_exvector(exvector & dest, exvector const & source);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_COLOR_H__
 
 #endif // ndef __GINAC_COLOR_H__
index dc8eed7d9c35533c574ff5a90187d4a8ec337ace..383e8bb0d7fc755a4ef093e85459b62db8347d53 100644 (file)
@@ -26,7 +26,9 @@
 #include "utils.h"
 #include "debugmsg.h"
 
 #include "utils.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -213,4 +215,6 @@ bool coloridx::info(unsigned inf) const
 const coloridx some_coloridx;
 type_info const & typeid_coloridx=typeid(some_coloridx);
 
 const coloridx some_coloridx;
 type_info const & typeid_coloridx=typeid(some_coloridx);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 7861c899cb9242cac9f118ab3cbbb47fcc3a52b0..105f4a3592e12fc0a668e56ac1ddfd96158e2ea6 100644 (file)
@@ -28,7 +28,9 @@
 #include <ginac/idx.h>
 #include <ginac/ex.h>
 
 #include <ginac/idx.h>
 #include <ginac/ex.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 class coloridx : public idx
 {
 
 class coloridx : public idx
 {
@@ -82,6 +84,8 @@ inline const coloridx &ex_to_coloridx(const ex &e)
        return static_cast<const coloridx &>(*e.bp);
 }
 
        return static_cast<const coloridx &>(*e.bp);
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_COLORIDX_H__
 
 #endif // ndef __GINAC_COLORIDX_H__
index f21c05e8027b03349152863f9934d72fd07b5397..12e9dde44f6d734bfda71c56b453c9b0cdc674b3 100644 (file)
@@ -28,7 +28,9 @@
 #include "ex.h"
 #include "debugmsg.h"
 
 #include "ex.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -165,4 +167,6 @@ const constant EulerGamma("EulerGamma", EulerGammaEvalf);
  *  Diverts straight into CLN for evalf(). */
 const constant Catalan("Catalan", CatalanEvalf);
 
  *  Diverts straight into CLN for evalf(). */
 const constant Catalan("Catalan", CatalanEvalf);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 89cb7ebae83576c0d1e02cf0c33666e9ddbf30ab..04fdc50a067c4eaf53009085118a6982215f812b 100644 (file)
@@ -26,7 +26,9 @@
 #include <string>
 #include <ginac/basic.h>
 
 #include <string>
 #include <ginac/basic.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 /** This class holds constants, symbols with specific numerical value. Each
  *  object of this class must either provide their own function to evaluate it
 
 /** This class holds constants, symbols with specific numerical value. Each
  *  object of this class must either provide their own function to evaluate it
@@ -90,6 +92,8 @@ extern const constant Pi;
 extern const constant Catalan;
 extern const constant EulerGamma;
 
 extern const constant Catalan;
 extern const constant EulerGamma;
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_CONSTANT_H__
 
 #endif // ndef __GINAC_CONSTANT_H__
index 798d68680a30742ed46e797e83fd6a24460eec40..02893995da07e588f1346624f536799d72a48269 100755 (executable)
@@ -123,12 +123,19 @@ $interface=<<END_OF_INTERFACE;
 #define __GINAC_${CONTAINER_UC}_H__
 
 #include <${STLHEADER}>
 #define __GINAC_${CONTAINER_UC}_H__
 
 #include <${STLHEADER}>
+
+// CINT needs <algorithm> to work properly with <vector> and <list> 
+#include <algorithm>
+
 #include <ginac/basic.h>
 #include <ginac/ex.h>
 
 #include <ginac/basic.h>
 #include <ginac/ex.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 
-typedef ${STLHEADER}<ex> ${STLT};
+// typedef ${STLHEADER}<ex> ${STLT};
+typedef ${STLHEADER}<ex,malloc_alloc> ${STLT}; // CINT does not like ${STLHEADER}<...,default_alloc>
 
 class ${CONTAINER} : public basic
 {
 
 class ${CONTAINER} : public basic
 {
@@ -223,7 +230,9 @@ inline const ${CONTAINER} &ex_to_${CONTAINER}(const ex &e)
     return static_cast<const ${CONTAINER} &>(*e.bp);
 }
 
     return static_cast<const ${CONTAINER} &>(*e.bp);
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_${CONTAINER_UC}_H__
 
 
 #endif // ndef __GINAC_${CONTAINER_UC}_H__
 
@@ -269,7 +278,9 @@ $implementation=<<END_OF_IMPLEMENTATION;
 #include "ex.h"
 #include "debugmsg.h"
 
 #include "ex.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 ${RESERVE_IMPLEMENTATION}
 
 
 ${RESERVE_IMPLEMENTATION}
 
@@ -847,7 +858,9 @@ unsigned ${CONTAINER}::precedence=10;
 const ${CONTAINER} some_${CONTAINER};
 type_info const & typeid_${CONTAINER}=typeid(some_${CONTAINER});
 
 const ${CONTAINER} some_${CONTAINER};
 type_info const & typeid_${CONTAINER}=typeid(some_${CONTAINER});
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 END_OF_IMPLEMENTATION
 
 
 END_OF_IMPLEMENTATION
 
index 2661fddb849bbab612c2aabf1a0bfec25d5c1333..1820dbcb5b8eb716741bcb15be33ed7edf88188b 100644 (file)
@@ -37,7 +37,9 @@
 #include "series.h"
 #include "symbol.h"
 
 #include "series.h"
 #include "symbol.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 /** Default implementation of ex::diff(). It prints and error message and returns a fail object.
  *  @see ex::diff */
 
 /** Default implementation of ex::diff(). It prints and error message and returns a fail object.
  *  @see ex::diff */
@@ -245,4 +247,6 @@ ex ex::diff(symbol const & s, unsigned nth) const
     return ndiff;
 }
 
     return ndiff;
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index a5a2445cb2dd8ddd71cee5f492b4b45c98ac75af..a8b7b2f2808b2bcef7f7f4668f537e783c5a610d 100644 (file)
@@ -30,7 +30,9 @@
 #include "power.h"
 #include "debugmsg.h"
 
 #include "power.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -514,4 +516,6 @@ ex const & exMINUSHALF(void)
     return *eMINUSHALF;
 }
 
     return *eMINUSHALF;
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index a2517a50601a4ded86af1e6632f5aa55a4aa43a8..29b9b077f0f82a45c0b1fe6c470e5c2b85ea8f30 100644 (file)
@@ -27,7 +27,9 @@
 #include <ginac/basic.h>
 #include <ginac/operators.h>
 
 #include <ginac/basic.h>
 #include <ginac/operators.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 class ex;
 class expand_options;
 
 class ex;
 class expand_options;
@@ -36,7 +38,7 @@ class status_flags;
 class symbol;
 class lst;
 
 class symbol;
 class lst;
 
-typedef vector<ex> exvector;
+// typedef vector<ex> exvector;
 
 // enum definitions
 
 
 // enum definitions
 
@@ -284,6 +286,9 @@ inline ex subs(ex const & thisex, lst const & ls, lst const & lr)
 inline void swap(ex & e1, ex & e2)
 { e1.swap(e2); }
 
 inline void swap(ex & e1, ex & e2)
 { e1.swap(e2); }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_EX_H__
 
 #endif // ndef __GINAC_EX_H__
+
index 320de73eb78186786177728ed379d472be177aae..b130465b67ee245a5e145e6346f19ee49901d36b 100644 (file)
@@ -26,7 +26,9 @@
 #include <ginac/ex.h>
 #include <ginac/numeric.h>
 
 #include <ginac/ex.h>
 #include <ginac/numeric.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 /** A pair of expressions.
  *  This similar to, but slightly extended STL's pair<> but we need to account
 
 /** A pair of expressions.
  *  This similar to, but slightly extended STL's pair<> but we need to account
@@ -197,6 +199,8 @@ public:
     }
 };
 
     }
 };
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_EXPAIR_H__
 
 #endif // ndef __GINAC_EXPAIR_H__
index 360c7b97fcc45840afcb9bc1b885055fd25c46be..2e50b0e47d0ab582d1503d7682f25ec789d93c28 100644 (file)
@@ -29,7 +29,9 @@
 #include "debugmsg.h"
 #include "utils.h"
 
 #include "debugmsg.h"
 #include "utils.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 #ifdef EXPAIRSEQ_USE_HASHTAB
 #error "FIXME: expair_needs_further_processing not yet implemented for hashtabs, sorry. A.F."
 
 #ifdef EXPAIRSEQ_USE_HASHTAB
 #error "FIXME: expair_needs_further_processing not yet implemented for hashtabs, sorry. A.F."
@@ -1627,4 +1629,6 @@ unsigned expairseq::hashtabfactor=1;
 const expairseq some_expairseq;
 type_info const & typeid_expairseq=typeid(some_expairseq);
 
 const expairseq some_expairseq;
 type_info const & typeid_expairseq=typeid(some_expairseq);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index a14cecaac00d5bddf852f430d0ee5673243a68d1..72ac829cf6dc6499894e0c09e7785998cceea584 100644 (file)
 
 #include <vector>
 #include <list>
 
 #include <vector>
 #include <list>
+
+// CINT needs <algorithm> to work properly with <vector> and <list>
+//#include <algorithm>
+
 #include <ginac/expair.h>
 
 #include <ginac/expair.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //#define EXPAIRSEQ_USE_HASHTAB
 
 
 //#define EXPAIRSEQ_USE_HASHTAB
 
@@ -194,6 +200,8 @@ inline const expairseq &ex_to_expairseq(const ex &e)
        return static_cast<const expairseq &>(*e.bp);
 }
 
        return static_cast<const expairseq &>(*e.bp);
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_EXPAIRSEQ_H__
 
 #endif // ndef __GINAC_EXPAIRSEQ_H__
index 8ac31b8bdca1a83551abec35ef0c2d4c42338412..ef5f1c5b45b651c41ab8fff1e5aaf0a34e3c1adc 100644 (file)
@@ -24,7 +24,9 @@
 #include "exprseq.h"
 #include "ex.h"
 
 #include "exprseq.h"
 #include "ex.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 bool exprseq::info(unsigned inf) const
 {
 
 bool exprseq::info(unsigned inf) const
 {
@@ -40,4 +42,6 @@ ex & exprseq::let_op(int const i)
     return seq[i];
 }
 
     return seq[i];
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index e5800a388c629a669841427bae8c9ac37fa5ce1a..d4997196bdfa0bfec9ab9539688dd2ac398f909a 100644 (file)
@@ -24,7 +24,9 @@
 #include "fail.h"
 #include "debugmsg.h"
 
 #include "fail.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -123,4 +125,6 @@ int fail::compare_same_type(basic const & other) const
 const fail some_fail;
 type_info const & typeid_fail=typeid(some_fail);
 
 const fail some_fail;
 type_info const & typeid_fail=typeid(some_fail);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 7edc7b1bd842f972c1a2d3b3f739bec6c22cc010..292bf797ebce6ff376c597976c0f84256caf6b18 100644 (file)
@@ -26,7 +26,9 @@
 
 #include <ginac/basic.h>
 
 
 #include <ginac/basic.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 class fail : public basic
 {
 
 class fail : public basic
 {
@@ -69,6 +71,8 @@ protected:
 extern const fail some_fail;
 extern type_info const & typeid_fail;
 
 extern const fail some_fail;
 extern type_info const & typeid_fail;
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_FAIL_H__
 
 #endif // ndef __GINAC_FAIL_H__
index 90f4e38d992960961613eba7d8d52f3ffd063552..6a1bfa4df35f15d34ce949f1bcda1bcd15af6ed5 100644 (file)
@@ -23,7 +23,9 @@
 #ifndef __GINAC_FLAGS_H__
 #define __GINAC_FLAGS_H__
 
 #ifndef __GINAC_FLAGS_H__
 #define __GINAC_FLAGS_H__
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 class expand_options {
 public:
 
 class expand_options {
 public:
@@ -114,6 +116,8 @@ public:
        };
 };
 
        };
 };
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_FLAGS_H__
 
 #endif // ndef __GINAC_FLAGS_H__
index 0e6cacfca222c8e7ff6a212ae332d232a1890655..6493042b7753d5f0583aad1805faab91fe58d33b 100755 (executable)
@@ -31,15 +31,25 @@ sub generate {
     return $res;
 }
 
     return $res;
 }
 
-$declare_function_macro=generate(
-    <<'END_OF_DECLARE_FUNCTION_MACRO','GiNaC::ex const & p${N}','p${N}');
+$declare_function_macro_namespace=generate(
+    <<'END_OF_DECLARE_FUNCTION_MACRO_NAMESPACE','GiNaC::ex const & p${N}','p${N}');
 #define DECLARE_FUNCTION_${N}P(NAME) \\
 extern const unsigned function_index_##NAME; \\
 inline GiNaC::function NAME(${SEQ1}) { \\
     return GiNaC::function(function_index_##NAME, ${SEQ2}); \\
 }
 
 #define DECLARE_FUNCTION_${N}P(NAME) \\
 extern const unsigned function_index_##NAME; \\
 inline GiNaC::function NAME(${SEQ1}) { \\
     return GiNaC::function(function_index_##NAME, ${SEQ2}); \\
 }
 
-END_OF_DECLARE_FUNCTION_MACRO
+END_OF_DECLARE_FUNCTION_MACRO_NAMESPACE
+
+$declare_function_macro_no_namespace=generate(
+    <<'END_OF_DECLARE_FUNCTION_MACRO_NO_NAMESPACE','ex const & p${N}','p${N}');
+#define DECLARE_FUNCTION_${N}P(NAME) \\
+extern unsigned function_index_##NAME; \\
+inline function NAME(${SEQ1}) { \\
+    return function(function_index_##NAME, ${SEQ2}); \\
+}
+
+END_OF_DECLARE_FUNCTION_MACRO_NO_NAMESPACE
 
 $typedef_eval_funcp=generate(
 'typedef ex (* eval_funcp_${N})(${SEQ1});'."\n",
 
 $typedef_eval_funcp=generate(
 'typedef ex (* eval_funcp_${N})(${SEQ1});'."\n",
@@ -148,15 +158,40 @@ $interface=<<END_OF_INTERFACE;
 
 #include <string>
 #include <vector>
 
 #include <string>
 #include <vector>
+
+#ifdef __CINT__
+// CINT needs <algorithm> to work properly with <vector> 
+#include <algorithm>
+#endif // def __CINT__
+
 #include <ginac/exprseq.h>
 
 #include <ginac/exprseq.h>
 
+#ifndef NO_GINAC_NAMESPACE
+
 // the following lines have been generated for max. ${maxargs} parameters
 // the following lines have been generated for max. ${maxargs} parameters
-$declare_function_macro
+$declare_function_macro_namespace
 // end of generated lines
 
 // end of generated lines
 
+#else // ndef NO_GINAC_NAMESPACE
+
+// the following lines have been generated for max. ${maxargs} parameters
+$declare_function_macro_no_namespace
+// end of generated lines
+
+#endif // ndef NO_GINAC_NAMESPACE
+
+#ifndef NO_GINAC_NAMESPACE
+
 #define REGISTER_FUNCTION(NAME,E,EF,D,S) \\
 #define REGISTER_FUNCTION(NAME,E,EF,D,S) \\
+
 const unsigned function_index_##NAME=GiNaC::function::register_new(#NAME,E,EF,D,S);
 
 const unsigned function_index_##NAME=GiNaC::function::register_new(#NAME,E,EF,D,S);
 
+#else // ndef NO_GINAC_NAMESPACE
+
+const unsigned function_index_##NAME=function::register_new(#NAME,E,EF,D,S);
+
+#endif // ndef NO_GINAC_NAMESPACE
+
 #define BEGIN_TYPECHECK \\
 bool automatic_typecheck=true;
 
 #define BEGIN_TYPECHECK \\
 bool automatic_typecheck=true;
 
@@ -165,18 +200,31 @@ if (!is_ex_exactly_of_type(VAR,TYPE)) { \\
     automatic_typecheck=false; \\
 } else
 
     automatic_typecheck=false; \\
 } else
 
+#ifndef NO_GINAC_NAMESPACE
+
 #define TYPECHECK_INTEGER(VAR) \\
 if (!(VAR).info(GiNaC::info_flags::integer)) { \\
     automatic_typecheck=false; \\
 } else
 
 #define TYPECHECK_INTEGER(VAR) \\
 if (!(VAR).info(GiNaC::info_flags::integer)) { \\
     automatic_typecheck=false; \\
 } else
 
+#else // ndef NO_GINAC_NAMESPACE
+
+#define TYPECHECK_INTEGER(VAR) \\
+if (!(VAR).info(info_flags::integer)) { \\
+    automatic_typecheck=false; \\
+} else
+
+#endif // ndef NO_GINAC_NAMESPACE
+
 #define END_TYPECHECK(RV) \\
 {} \\
 if (!automatic_typecheck) { \\
     return RV.hold(); \\
 }
 
 #define END_TYPECHECK(RV) \\
 {} \\
 if (!automatic_typecheck) { \\
     return RV.hold(); \\
 }
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 class function;
 
 
 class function;
 
@@ -206,6 +254,7 @@ struct registered_function_info {
     and user defined functions */
 class function : public exprseq
 {
     and user defined functions */
 class function : public exprseq
 {
+    // CINT has a linking problem
     friend void ginsh_get_ginac_functions(void);
 
 // member functions
     friend void ginsh_get_ginac_functions(void);
 
 // member functions
@@ -271,15 +320,26 @@ protected:
 
 // utility macros
 
 
 // utility macros
 
+#ifndef NO_GINAC_NAMESPACE
+
 #define is_ex_the_function(OBJ, FUNCNAME) \\
     (is_ex_exactly_of_type(OBJ, function) && static_cast<GiNaC::function *>(OBJ.bp)->getserial() == function_index_##FUNCNAME)
 
 #define is_ex_the_function(OBJ, FUNCNAME) \\
     (is_ex_exactly_of_type(OBJ, function) && static_cast<GiNaC::function *>(OBJ.bp)->getserial() == function_index_##FUNCNAME)
 
+#else // ndef NO_GINAC_NAMESPACE
+
+#define is_ex_the_function(OBJ, FUNCNAME) \\
+    (is_ex_exactly_of_type(OBJ, function) && static_cast<function *>(OBJ.bp)->getserial() == function_index_##FUNCNAME)
+
+#endif // ndef NO_GINAC_NAMESPACE
+
 // global constants
 
 extern const function some_function;
 extern type_info const & typeid_function;
 
 // global constants
 
 extern const function some_function;
 extern type_info const & typeid_function;
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_FUNCTION_H__
 
 
 #endif // ndef __GINAC_FUNCTION_H__
 
@@ -319,7 +379,9 @@ $implementation=<<END_OF_IMPLEMENTATION;
 #include "ex.h"
 #include "debugmsg.h"
 
 #include "ex.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -638,7 +700,9 @@ $register_new_implementation
 const function some_function;
 type_info const & typeid_function=typeid(some_function);
 
 const function some_function;
 type_info const & typeid_function=typeid(some_function);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 END_OF_IMPLEMENTATION
 
 
 END_OF_IMPLEMENTATION
 
index f57a5ae4bdc6ac71067d888d37c1ddead3ca59f4..94616ce62ba7c4ba4335996b25a288f06e310b0b 100644 (file)
@@ -29,7 +29,9 @@
 #include "utils.h"
 #include "debugmsg.h"
 
 #include "utils.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -446,4 +448,6 @@ ex subs_indices(ex const & e, exvector const & idxv_subs,
     return res;
 }
 
     return res;
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index fa0b8ce35f952170fe926e62ea9e7d33f636a804..773b2e6b1ae9570abd8e2e896e57caa6e86819a1 100644 (file)
 #define __GINAC_IDX_H__
 
 #include <string>
 #define __GINAC_IDX_H__
 
 #include <string>
-#include <vector>
+//#include <vector>
 #include <ginac/basic.h>
 #include <ginac/ex.h>
 
 #include <ginac/basic.h>
 #include <ginac/ex.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 class idx : public basic
 {
 
 class idx : public basic
 {
@@ -100,7 +102,7 @@ inline const idx &ex_to_idx(const ex &e)
 
 // global functions
 
 
 // global functions
 
-typedef vector<ex> exvector;
+// typedef vector<ex> exvector;
 
 int canonicalize_indices(exvector & iv, bool antisymmetric=false);
 exvector idx_intersect(exvector const & iv1, exvector const & iv2);
 
 int canonicalize_indices(exvector & iv, bool antisymmetric=false);
 exvector idx_intersect(exvector const & iv1, exvector const & iv2);
@@ -111,6 +113,8 @@ ex subs_indices(ex const & e, exvector const & idxv_contra,
                 exvector const & idxv_co);
 unsigned count_index(ex const & e, ex const & i);
 
                 exvector const & idxv_co);
 unsigned count_index(ex const & e, ex const & i);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_IDX_H__
 
 #endif // ndef __GINAC_IDX_H__
index 6e36eb305fc157d4d109f3464ce19be919dc572d..0364d99746e97567c466aeced3e5d15a4bfb3339 100644 (file)
@@ -27,7 +27,9 @@
 #include "idx.h"
 #include "debugmsg.h"
 
 #include "idx.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -292,4 +294,6 @@ bool indexed::all_of_type_idx(void) const
 const indexed some_indexed;
 type_info const & typeid_indexed=typeid(some_indexed);
 
 const indexed some_indexed;
 type_info const & typeid_indexed=typeid(some_indexed);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 3707e6290184d56d613b135a3ab0c7536a3df1ca..a731769bd9f5c9826ead34ae4077094f4fb71500 100644 (file)
@@ -26,7 +26,9 @@
 #include <string>
 #include <ginac/exprseq.h>
 
 #include <string>
 #include <ginac/exprseq.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 /** Base class for non-commutative indexed objects */
 class indexed : public exprseq
 
 /** Base class for non-commutative indexed objects */
 class indexed : public exprseq
@@ -94,6 +96,8 @@ inline const indexed &ex_to_indexed(const ex &e)
        return static_cast<const indexed &>(*e.bp);
 }
 
        return static_cast<const indexed &>(*e.bp);
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_INDEXED_H__
 
 #endif // ndef __GINAC_INDEXED_H__
index 3f67d848cb199d3742dcf510340c083e00eb4b74..25eaae0d9a2939dc15bd59dbe118d9f12ac80d58 100644 (file)
@@ -36,7 +36,9 @@
 #include "series.h"
 #include "symbol.h"
 
 #include "series.h"
 #include "symbol.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // dilogarithm
 
 //////////
 // dilogarithm
@@ -252,4 +254,6 @@ ex ncpower(ex const &basis, unsigned exponent)
 unsigned force_include_gamma = function_index_gamma;
 unsigned force_include_zeta = function_index_zeta;
 
 unsigned force_include_gamma = function_index_gamma;
 unsigned force_include_zeta = function_index_zeta;
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 8be87d64cf15a9e18082bff5ff07c1a49ef2204a..84e0dbcbaa1d126111466e49a313fc6e433a120b 100644 (file)
@@ -26,7 +26,9 @@
 #include <ginac/function.h>
 #include <ginac/ex.h>
 
 #include <ginac/function.h>
 #include <ginac/ex.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 /** Sine. */
 DECLARE_FUNCTION_1P(sin)
 
 /** Sine. */
 DECLARE_FUNCTION_1P(sin)
@@ -116,6 +118,8 @@ inline bool is_order_function(ex const & e)
        return is_ex_the_function(e, Order);
 }
 
        return is_ex_the_function(e, Order);
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_INIFCNS_H__
 
 #endif // ndef __GINAC_INIFCNS_H__
index 5610d48eb14c010a159bbb537cd0a189b80a9717..2fd58cce517fe04d66c8bf158aa95878de6635ea 100644 (file)
@@ -31,7 +31,9 @@
 #include "power.h"
 #include "symbol.h"
 
 #include "power.h"
 #include "symbol.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // Gamma-function
 
 //////////
 // Gamma-function
@@ -197,4 +199,6 @@ static ex psi2_diff(ex const & n, ex const & x, unsigned diff_param)
 
 const unsigned function_index_psi2 = function::register_new("psi", psi2_eval, psi2_evalf, psi2_diff, NULL);
 
 
 const unsigned function_index_psi2 = function::register_new("psi", psi2_eval, psi2_evalf, psi2_diff, NULL);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index db502ca9568faa90f14676ce17af4fb5b547055d..01711a7fa3c9aae70cc9afc536ab651a157d2d34 100644 (file)
@@ -30,7 +30,9 @@
 #include "numeric.h"
 #include "power.h"
 
 #include "numeric.h"
 #include "power.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // exponential function
 
 //////////
 // exponential function
@@ -740,4 +742,6 @@ static ex atanh_diff(ex const & x, unsigned diff_param)
 
 REGISTER_FUNCTION(atanh, atanh_eval, atanh_evalf, atanh_diff, NULL);
 
 
 REGISTER_FUNCTION(atanh, atanh_eval, atanh_evalf, atanh_diff, NULL);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index cd63876506fdb566fdaa681339f4308cfb84442c..c2a298a9aaf1661dedf2ce2245677e4982574d4e 100644 (file)
@@ -30,7 +30,9 @@
 #include "power.h"
 #include "symbol.h"
 
 #include "power.h"
 #include "symbol.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // Riemann's Zeta-function
 
 //////////
 // Riemann's Zeta-function
@@ -85,4 +87,6 @@ static ex zeta_series(ex const & x, symbol const & s, ex const & point, int orde
 
 REGISTER_FUNCTION(zeta, zeta_eval, zeta_evalf, zeta_diff, zeta_series);
 
 
 REGISTER_FUNCTION(zeta, zeta_eval, zeta_evalf, zeta_diff, zeta_series);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index e5288e9cc16d999d211c0b0b005dbbf3fd73a643..8b80a97c80f6161449cff8507152543177bb0c24 100644 (file)
@@ -29,7 +29,9 @@
 #include "utils.h"
 #include "debugmsg.h"
 
 #include "utils.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -211,4 +213,7 @@ unsigned isospin::next_serial=0;
 const isospin some_isospin;
 type_info const & typeid_isospin=typeid(some_isospin);
 
 const isospin some_isospin;
 type_info const & typeid_isospin=typeid(some_isospin);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
+
index c4d23864ea39989c31df26c5d0776aa4b35a40fe..0d25a2a900fe052b37ea6d42ee938f8567643205 100644 (file)
@@ -26,7 +26,9 @@
 #include <string>
 #include <ginac/indexed.h>
 
 #include <string>
 #include <ginac/indexed.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 /** Base class for isospin object */
 class isospin : public indexed
 
 /** Base class for isospin object */
 class isospin : public indexed
@@ -89,6 +91,8 @@ inline const isospin &ex_to_isospin(const ex &e)
        return static_cast<const isospin &>(*e.bp);
 }
 
        return static_cast<const isospin &>(*e.bp);
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_ISOSPIN_H__
 
 #endif // ndef __GINAC_ISOSPIN_H__
index 6d09ee1f271ada48f3a2276a6f45601220fff621..62b01aa4ff35d27c3cf6eb33253e7404bb882382 100644 (file)
@@ -26,7 +26,9 @@
 #include "utils.h"
 #include "debugmsg.h"
 
 #include "utils.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -251,4 +253,6 @@ lorentzidx lorentzidx::create_anonymous_representative(void) const
 const lorentzidx some_lorentzidx;
 type_info const & typeid_lorentzidx=typeid(some_lorentzidx);
 
 const lorentzidx some_lorentzidx;
 type_info const & typeid_lorentzidx=typeid(some_lorentzidx);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 1a429021ef9abb0cc2550c0c13143ccbca47b393..260296efe7883c5cc19de06249239bbf6b88ce06 100644 (file)
@@ -27,7 +27,9 @@
 #include <vector>
 #include <ginac/idx.h>
 
 #include <vector>
 #include <ginac/idx.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 class lorentzidx : public idx
 {
 
 class lorentzidx : public idx
 {
@@ -89,6 +91,8 @@ inline const lorentzidx &ex_to_lorentzidx(const ex &e)
        return static_cast<const lorentzidx &>(*e.bp);
 }
 
        return static_cast<const lorentzidx &>(*e.bp);
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_LORENTZIDX_H__
 
 #endif // ndef __GINAC_LORENTZIDX_H__
index 927a503ce9c620d71d1331fa4703b1327c035a94..67c7e5bef823e2ee567b2bc96d7d7e7d3a32a05f 100644 (file)
@@ -23,7 +23,9 @@
 
 #include "lst.h"
 
 
 #include "lst.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 bool lst::info(unsigned inf) const
 {
 
 bool lst::info(unsigned inf) const
 {
@@ -31,4 +33,6 @@ bool lst::info(unsigned inf) const
     return basic::info(inf);
 }
 
     return basic::info(inf);
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index bacacad8889a4199c7a07576470903f6586277e7..43288df46ab90ecd6c6ad6fc13c12dd7915839af 100644 (file)
@@ -26,7 +26,9 @@
 #include "matrix.h"
 #include "debugmsg.h"
 
 #include "matrix.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor, assignment operator
 
 //////////
 // default constructor, destructor, copy constructor, assignment operator
@@ -872,4 +874,6 @@ int matrix::pivot(int ro)
 const matrix some_matrix;
 type_info const & typeid_matrix=typeid(some_matrix);
 
 const matrix some_matrix;
 type_info const & typeid_matrix=typeid(some_matrix);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 769647cacdeede3685ec276e804e774c814783b0..4ad11ea8108592b3a72fee3df5bbabcd670ee71c 100644 (file)
@@ -27,7 +27,9 @@
 #include <ginac/basic.h>
 #include <ginac/ex.h>
 
 #include <ginac/basic.h>
 #include <ginac/ex.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 /** Symbolic matrices. */
 class matrix : public basic
 
 /** Symbolic matrices. */
 class matrix : public basic
@@ -152,6 +154,8 @@ inline const matrix &ex_to_matrix(const ex &e)
        return static_cast<const matrix &>(*e.bp);
 }
 
        return static_cast<const matrix &>(*e.bp);
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_MATRIX_H__
 
 #endif // ndef __GINAC_MATRIX_H__
index 78f2bd9eb0a3e7e8f12df27243117ff4ce22689c..9155b1a93a17f1f842e6c2fb470a1314be63d28e 100644 (file)
@@ -28,7 +28,9 @@
 #include "power.h"
 #include "debugmsg.h"
 
 #include "power.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -1014,4 +1016,6 @@ unsigned mul::precedence=50;
 const mul some_mul;
 type_info const & typeid_mul=typeid(some_mul);
 
 const mul some_mul;
 type_info const & typeid_mul=typeid(some_mul);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 19dad491c701eb65bd68ebd6ec77e910cdfb2da0..76546eb04072135e4e6f02118f3c45e00193d816 100644 (file)
@@ -25,7 +25,9 @@
 
 #include <ginac/expairseq.h>
 
 
 #include <ginac/expairseq.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 /** Product of expressions. */
 class mul : public expairseq
 
 /** Product of expressions. */
 class mul : public expairseq
@@ -119,6 +121,8 @@ inline const mul &ex_to_mul(const ex &e)
        return static_cast<const mul &>(*e.bp);
 }
 
        return static_cast<const mul &>(*e.bp);
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_MUL_H__
 
 #endif // ndef __GINAC_MUL_H__
index 515a870c301bf673d3be831d74af8058c6b89a8e..9e14edc0f875677d5c7d524922b105dd4d952d94 100644 (file)
@@ -30,7 +30,9 @@
 #include "mul.h"
 #include "debugmsg.h"
 
 #include "mul.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -591,4 +593,6 @@ ex simplified_ncmul(exvector const & v)
                                    status_flags::evaluated);
 }
 
                                    status_flags::evaluated);
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 03b47ca7ae119c9337a31045f0c509469265ba7b..de48b59e58d98d02dd80291dd5dfaafdcd024091 100644 (file)
@@ -25,7 +25,9 @@
 
 #include <ginac/exprseq.h>
 
 
 #include <ginac/exprseq.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 /** Non-commutative product of expressions. */
 class ncmul : public exprseq
 
 /** Non-commutative product of expressions. */
 class ncmul : public exprseq
@@ -114,6 +116,8 @@ inline const ncmul &ex_to_ncmul(const ex &e)
        return static_cast <const ncmul &>(*e.bp);
 }
 
        return static_cast <const ncmul &>(*e.bp);
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_NCMUL_H__
 
 #endif // ndef __GINAC_NCMUL_H__
index 391b80b6dd88c6c77615bda512427b718d175cc1..3846f408f0162617b3303dcd164dd4ad5a69f73b 100644 (file)
@@ -46,7 +46,9 @@
 #include "series.h"
 #include "symbol.h"
 
 #include "series.h"
 #include "symbol.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 // If comparing expressions (ex::compare()) is fast, you can set this to 1.
 // Some routines like quo(), rem() and gcd() will then return a quick answer
 
 // If comparing expressions (ex::compare()) is fast, you can set this to 1.
 // Some routines like quo(), rem() and gcd() will then return a quick answer
@@ -908,7 +910,11 @@ ex basic::smod(const numeric &xi) const
 
 ex numeric::smod(const numeric &xi) const
 {
 
 ex numeric::smod(const numeric &xi) const
 {
+#ifndef NO_GINAC_NAMESPACE
     return GiNaC::smod(*this, xi);
     return GiNaC::smod(*this, xi);
+#else // ndef NO_GINAC_NAMESPACE
+    return ::smod(*this, xi);
+#endif // ndef NO_GINAC_NAMESPACE
 }
 
 ex add::smod(const numeric &xi) const
 }
 
 ex add::smod(const numeric &xi) const
@@ -919,13 +925,21 @@ ex add::smod(const numeric &xi) const
     epvector::const_iterator itend = seq.end();
     while (it != itend) {
         GINAC_ASSERT(!is_ex_exactly_of_type(it->rest,numeric));
     epvector::const_iterator itend = seq.end();
     while (it != itend) {
         GINAC_ASSERT(!is_ex_exactly_of_type(it->rest,numeric));
+#ifndef NO_GINAC_NAMESPACE
         numeric coeff = GiNaC::smod(ex_to_numeric(it->coeff), xi);
         numeric coeff = GiNaC::smod(ex_to_numeric(it->coeff), xi);
+#else // ndef NO_GINAC_NAMESPACE
+        numeric coeff = ::smod(ex_to_numeric(it->coeff), xi);
+#endif // ndef NO_GINAC_NAMESPACE
         if (!coeff.is_zero())
             newseq.push_back(expair(it->rest, coeff));
         it++;
     }
     GINAC_ASSERT(is_ex_exactly_of_type(overall_coeff,numeric));
         if (!coeff.is_zero())
             newseq.push_back(expair(it->rest, coeff));
         it++;
     }
     GINAC_ASSERT(is_ex_exactly_of_type(overall_coeff,numeric));
+#ifndef NO_GINAC_NAMESPACE
     numeric coeff = GiNaC::smod(ex_to_numeric(overall_coeff), xi);
     numeric coeff = GiNaC::smod(ex_to_numeric(overall_coeff), xi);
+#else // ndef NO_GINAC_NAMESPACE
+    numeric coeff = ::smod(ex_to_numeric(overall_coeff), xi);
+#endif // ndef NO_GINAC_NAMESPACE
     return (new add(newseq,coeff))->setflag(status_flags::dynallocated);
 }
 
     return (new add(newseq,coeff))->setflag(status_flags::dynallocated);
 }
 
@@ -941,7 +955,11 @@ ex mul::smod(const numeric &xi) const
 #endif // def DO_GINAC_ASSERT
     mul * mulcopyp=new mul(*this);
     GINAC_ASSERT(is_ex_exactly_of_type(overall_coeff,numeric));
 #endif // def DO_GINAC_ASSERT
     mul * mulcopyp=new mul(*this);
     GINAC_ASSERT(is_ex_exactly_of_type(overall_coeff,numeric));
+#ifndef NO_GINAC_NAMESPACE
     mulcopyp->overall_coeff = GiNaC::smod(ex_to_numeric(overall_coeff),xi);
     mulcopyp->overall_coeff = GiNaC::smod(ex_to_numeric(overall_coeff),xi);
+#else // ndef NO_GINAC_NAMESPACE
+    mulcopyp->overall_coeff = ::smod(ex_to_numeric(overall_coeff),xi);
+#endif // ndef NO_GINAC_NAMESPACE
     mulcopyp->clearflag(status_flags::evaluated);
     mulcopyp->clearflag(status_flags::hash_calculated);
     return mulcopyp->setflag(status_flags::dynallocated);
     mulcopyp->clearflag(status_flags::evaluated);
     mulcopyp->clearflag(status_flags::hash_calculated);
     return mulcopyp->setflag(status_flags::dynallocated);
@@ -1484,4 +1502,6 @@ ex ex::normal(int level) const
         return e;
 }
 
         return e;
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 0fa3a4418b4f4876cbedb70fa4ab0ac09c28b3cc..6395ffe8afd733da61041fcbac6cf8d9fd7d7b33 100644 (file)
@@ -24,7 +24,9 @@
 #ifndef __GINAC_NORMAL_H__
 #define __GINAC_NORMAL_H__
 
 #ifndef __GINAC_NORMAL_H__
 #define __GINAC_NORMAL_H__
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 class ex;
 class symbol;
 
 class ex;
 class symbol;
@@ -50,6 +52,8 @@ extern ex lcm(const ex &a, const ex &b, bool check_args = true);
 // Square-free factorization of a polynomial a(x)
 extern ex sqrfree(const ex &a, const symbol &x);
 
 // Square-free factorization of a polynomial a(x)
 extern ex sqrfree(const ex &a, const symbol &x);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_NORMAL_H__
 
 #endif // ndef __GINAC_NORMAL_H__
index 1cc1fa69592e37195ca013cf38c295f98bec4ae9..4ab0c1758eed5562ad000b7850602aabbbe3806c 100644 (file)
@@ -40,7 +40,9 @@
 #include <cln.h>
 #endif
 
 #include <cln.h>
 #endif
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 // linker has no problems finding text symbols for numerator or denominator
 //#define SANE_LINKER
 
 // linker has no problems finding text symbols for numerator or denominator
 //#define SANE_LINKER
@@ -1453,4 +1455,6 @@ bool _numeric_digits::too_late = false;
  *  assignment from C++ unsigned ints and evaluated like any built-in type. */
 _numeric_digits Digits;
 
  *  assignment from C++ unsigned ints and evaluated like any built-in type. */
 _numeric_digits Digits;
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index eb3565907148ffa34537f7e9b6d65afc841f26ea..b7acbceaf5ef67d6640e352cca1ca63c1dd6ecd9 100644 (file)
@@ -30,7 +30,9 @@
 class cl_N;     // We want to include cln.h only in numeric.cpp in order to 
                 // avoid namespace pollution and keep compile-time low.
 
 class cl_N;     // We want to include cln.h only in numeric.cpp in order to 
                 // avoid namespace pollution and keep compile-time low.
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 #define HASHVALUE_NUMERIC 0x80000001U
 
 
 #define HASHVALUE_NUMERIC 0x80000001U
 
@@ -329,6 +331,8 @@ inline const numeric &ex_to_numeric(const ex &e)
        return static_cast<const numeric &>(*e.bp);
 }
 
        return static_cast<const numeric &>(*e.bp);
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_NUMERIC_H__
 
 #endif // ndef __GINAC_NUMERIC_H__
index 4d762b305c2424ccb623ad5a6e11a61bfa65681e..c21e0ea62a572c27dd56b735a18054bb026271b1 100644 (file)
@@ -31,7 +31,9 @@
 #include "relational.h"
 #include "debugmsg.h"
 
 #include "relational.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 // binary arithmetic operators ex with ex
 
 
 // binary arithmetic operators ex with ex
 
@@ -438,4 +440,6 @@ istream & operator>>(istream & is, ex & e)
     throw(std::logic_error("input from streams not yet implemented"));
 }
 
     throw(std::logic_error("input from streams not yet implemented"));
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index fab2870b4fff53152dd838342f5bdd174962879c..01210fc1c917a1033739cddaa6c4a08645c8c7b0 100644 (file)
@@ -25,7 +25,9 @@
 
 #include <iostream>
 
 
 #include <iostream>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 class ex;
 class numeric;
 
 class ex;
 class numeric;
@@ -129,6 +131,8 @@ relational operator>=(numeric const & lh, ex const & rh);
 ostream & operator<<(ostream & os, ex const & e);
 istream & operator>>(istream & is, ex & e);
 
 ostream & operator<<(ostream & os, ex const & e);
 istream & operator>>(istream & is, ex & e);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_OPERATORS_H__
 
 #endif // ndef __GINAC_OPERATORS_H__
index bed6ed2f4fd841d43e57430129b3a7c53149710f..64dd1fdca9e6305d866446b329b7a4114df69771 100644 (file)
@@ -33,7 +33,9 @@
 #include "symbol.h"
 #include "debugmsg.h"
 
 #include "symbol.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 typedef vector<int> intvector;
 
 
 typedef vector<int> intvector;
 
@@ -721,4 +723,6 @@ unsigned power::precedence=60;
 const power some_power;
 type_info const & typeid_power=typeid(some_power);
 
 const power some_power;
 type_info const & typeid_power=typeid(some_power);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 3d9ae57433dbe44c41eeca88aa559e55638651f2..25f4f8d7d8a0e076a014903245cd9c10840f20c2 100644 (file)
@@ -26,7 +26,9 @@
 #include <ginac/basic.h>
 #include <ginac/ex.h>
 
 #include <ginac/basic.h>
 #include <ginac/ex.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 class numeric;
 class add;
 
 class numeric;
 class add;
@@ -125,6 +127,8 @@ inline ex pow(ex const & b, ex const & e)
 inline ex sqrt(ex const & a)
 { return power(a,exHALF()); }
 
 inline ex sqrt(ex const & a)
 { return power(a,exHALF()); }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_POWER_H__
 
 #endif // ndef __GINAC_POWER_H__
index f90a40ce89fa86aa9acb01e3ca15bd37ff70ad47..c1e9841c9e4858fa409c2bbcb0336db3bc6a51d0 100644 (file)
@@ -41,7 +41,9 @@
 #include "symbol.h"
 #include "debugmsg.h"
 
 #include "symbol.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 void ex::print(ostream & os, unsigned upper_precedence) const
 {
 
 void ex::print(ostream & os, unsigned upper_precedence) const
 {
@@ -259,4 +261,6 @@ void matrix::print(ostream & os, unsigned upper_precedence) const
     os << m[row*col-1] << "]] ]]";
 }
 
     os << m[row*col-1] << "]] ]]";
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 2d0ccfd378d27a4d6965e7823651d791cf466207..723b862b471caef2b77bc6e0498d7a064fa5f47b 100644 (file)
@@ -39,7 +39,9 @@
 #include "symbol.h"
 #include "debugmsg.h"
 
 #include "symbol.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 /** Print expression as a C++ statement. The output looks like
  *  "<type> <var_name> = <expression>;". The "type" parameter has an effect
 
 /** Print expression as a C++ statement. The output looks like
  *  "<type> <var_name> = <expression>;". The "type" parameter has an effect
@@ -330,4 +332,6 @@ void relational::printcsrc(ostream & os, unsigned type, unsigned upper_precedenc
                os << ")";
 }
 
                os << ")";
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 31f5606503ded57a706cbb23bb2be2bda5f30b98..331622a7c93b244afdde980c55da7ba7aab3544e 100644 (file)
@@ -45,7 +45,9 @@
 #include "symbol.h"
 #include "debugmsg.h"
 
 #include "symbol.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 void ex::printraw(ostream & os) const
 {
 
 void ex::printraw(ostream & os) const
 {
@@ -225,4 +227,6 @@ void matrix::printraw(ostream & os) const
     os << m[row*col-1] << "))";
 }
 
     os << m[row*col-1] << "))";
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 99cf56e078395191e5fbd2d524be2f6c1c568a6f..645799e17a2bfce20c3bac0646924f334cc92201 100644 (file)
@@ -40,7 +40,9 @@
 #include "symbol.h"
 #include "debugmsg.h"
 
 #include "symbol.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 void ex::printtree(ostream & os, unsigned indent) const
 {
 
 void ex::printtree(ostream & os, unsigned indent) const
 {
@@ -181,4 +183,6 @@ void expairseq::printtree(ostream & os, unsigned indent) const
 #endif // def EXPAIRSEQ_USE_HASHTAB
 }
 
 #endif // def EXPAIRSEQ_USE_HASHTAB
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 76652e980198a65a483632ce07b5614d55f9ff42..76bd7da2eb2a9ecfefae7abdcf67b675cb370a53 100644 (file)
@@ -26,7 +26,9 @@
 #include "numeric.h"
 #include "debugmsg.h"
 
 #include "numeric.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -264,4 +266,6 @@ unsigned relational::precedence=20;
 const relational some_relational;
 type_info const & typeid_relational=typeid(some_relational);
 
 const relational some_relational;
 type_info const & typeid_relational=typeid(some_relational);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 7426e19ecea8af712554ba7ba9575fa1fc179e86..2767c89b1d1aef996250e7ec1a02a14233c625f9 100644 (file)
@@ -26,7 +26,9 @@
 #include <ginac/basic.h>
 #include <ginac/ex.h>
 
 #include <ginac/basic.h>
 #include <ginac/ex.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 /** This class holds a relation consisting of two expressions and a logical
  *  relation between them. */
 
 /** This class holds a relation consisting of two expressions and a logical
  *  relation between them. */
@@ -103,6 +105,8 @@ inline const relational &ex_to_relational(const ex &e)
        return static_cast<const relational &>(*e.bp);
 }
 
        return static_cast<const relational &>(*e.bp);
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_RELATIONAL_H__
 
 #endif // ndef __GINAC_RELATIONAL_H__
index a390dd1516c61c212156711d3b27dc2d2e11038b..7f8d39281bd5baf0a4fd95f70d6d5869450ff513 100644 (file)
@@ -30,8 +30,9 @@
 #include "symbol.h"
 #include "debugmsg.h"
 
 #include "symbol.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
-
+#endif // ndef NO_GINAC_NAMESPACE
 
 /*
  *  Default constructor, destructor, copy constructor, assignment operator and helpers
 
 /*
  *  Default constructor, destructor, copy constructor, assignment operator and helpers
@@ -636,4 +637,6 @@ ex ex::series(symbol const &s, ex const &point, int order) const
 const series some_series;
 type_info const & typeid_series = typeid(some_series);
 
 const series some_series;
 type_info const & typeid_series = typeid(some_series);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 5df4d82214d0d68e4b001ebdbcf8c737b95fc178..08f859ff69664b9c5955bce686cf789463eae270 100644 (file)
@@ -26,7 +26,9 @@
 #include <ginac/basic.h>
 #include <ginac/expairseq.h>
 
 #include <ginac/basic.h>
 #include <ginac/expairseq.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 /** This class holds a extended truncated power series (positive and negative
  *  integer powers). It consists of expression coefficients (only non-zero
 
 /** This class holds a extended truncated power series (positive and negative
  *  integer powers). It consists of expression coefficients (only non-zero
@@ -113,6 +115,8 @@ inline ex series_to_poly(const ex &e)
        return (static_cast<const series &>(*e.bp).convert_to_poly(true));
 }
 
        return (static_cast<const series &>(*e.bp).convert_to_poly(true));
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_SERIES_H__
 
 #endif // ndef __GINAC_SERIES_H__
index 05f96ae11e880881cba88b868d23cac349c25ca9..a102b74e4d3a36abe4b9852c0384e39e5a43acfd 100644 (file)
@@ -34,7 +34,9 @@
 #include "symbol.h"
 #include "debugmsg.h"
 
 #include "symbol.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -513,4 +515,6 @@ spmapkey scalar_products::make_key(simp_lor const & v1, simp_lor const & v2)
     return spmapkey(strstrpair(v1.name,v2.name),anon);
 }
 
     return spmapkey(strstrpair(v1.name,v2.name),anon);
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 643a6d91f5d49ce51fb70fc7c87d77823ebd34c8..44543fc8234ce426244e0032d2c5740a30b6bb00 100644 (file)
@@ -31,7 +31,9 @@
 #include <ginac/indexed.h>
 #include <ginac/lorentzidx.h>
 
 #include <ginac/indexed.h>
 #include <ginac/lorentzidx.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 typedef pair<string,string> strstrpair;
 typedef pair<strstrpair,lorentzidx> spmapkey;
 
 typedef pair<string,string> strstrpair;
 typedef pair<strstrpair,lorentzidx> spmapkey;
@@ -170,6 +172,8 @@ ex simplify_simp_lor_mul(ex const & m, scalar_products const & sp);
 ex simplify_simp_lor(ex const & e, scalar_products const & sp);
 ex Dim(void);
 
 ex simplify_simp_lor(ex const & e, scalar_products const & sp);
 ex Dim(void);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef _SIMP__GINAC_LOR_H__
 
 #endif // ndef _SIMP__GINAC_LOR_H__
index 539eaf76fba1c8781aa121dea3a2a4df6e68858b..76ee847dd065d4f3eabce4094b4499c70719d868 100644 (file)
@@ -25,7 +25,9 @@
 #include "structure.h"
 #include "debugmsg.h"
 
 #include "structure.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -175,4 +177,6 @@ unsigned structure::register_new(char const * nm)
 const structure some_structure;
 type_info const & typeid_structure=typeid(some_structure);
 
 const structure some_structure;
 type_info const & typeid_structure=typeid(some_structure);
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 3478887507c11b20067c606650cd1cc14e25703a..abde78d7f0d11f00ef4053ac7b07c3069e52226f 100644 (file)
@@ -25,7 +25,9 @@
 
 #include <ginac/basic.h>
 
 
 #include <ginac/basic.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 struct registered_structure_info {
     char const * name;
 
 struct registered_structure_info {
     char const * name;
@@ -84,6 +86,8 @@ public:
 extern const structure some_structure;
 extern type_info const & typeid_structure;
 
 extern const structure some_structure;
 extern type_info const & typeid_structure;
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_STRUCTURE_H__
 
 #endif // ndef __GINAC_STRUCTURE_H__
index 2ae1625a35b5b15057bfcf8459a3db7b0ded401e..d26f78a867d281bd04eaf9540d6479fbc0db439e 100755 (executable)
@@ -150,7 +150,9 @@ ${input_structure}
 
 #include <ginac/structure.h>
 
 
 #include <ginac/structure.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 class ${STRUCTURE} : public structure
 {
 
 class ${STRUCTURE} : public structure
 {
@@ -215,7 +217,9 @@ extern const unsigned tinfo_${STRUCTURE};
 
 #define ex_to_${STRUCTURE}(X) (static_cast<${STRUCTURE} const &>(*(X).bp))
 
 
 #define ex_to_${STRUCTURE}(X) (static_cast<${STRUCTURE} const &>(*(X).bp))
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef _${STRUCTURE_UC}_H_
 
 
 #endif // ndef _${STRUCTURE_UC}_H_
 
@@ -254,7 +258,9 @@ ${input_structure}
 
 #include "${STRUCTURE}.h"
 
 
 #include "${STRUCTURE}.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -508,7 +514,9 @@ const ${STRUCTURE} some_${STRUCTURE};
 type_info const & typeid_${STRUCTURE}=typeid(some_${STRUCTURE});
 const unsigned tinfo_${STRUCTURE}=structure::register_new("${STRUCTURE}");
 
 type_info const & typeid_${STRUCTURE}=typeid(some_${STRUCTURE});
 const unsigned tinfo_${STRUCTURE}=structure::register_new("${STRUCTURE}");
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 END_OF_IMPLEMENTATION
 
 
 END_OF_IMPLEMENTATION
 
index f1dc18dffc7ad7a3a8413a0d925d9160a1147ca8..1bea2cec954698bc3751b8bbdd51efaee2ac8665 100644 (file)
@@ -29,7 +29,9 @@
 #include "idx.h"
 #include "debugmsg.h"
 
 #include "idx.h"
 #include "debugmsg.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -281,4 +283,6 @@ symbol::assigned_ex_info::assigned_ex_info(void) : is_assigned(0), refcount(1)
 {
 }
 
 {
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 9905f3c861efe501dd2a365ed795f98bbf36427a..d315efc5c6dff9cf65298e9c245dff2b37cfa809 100644 (file)
@@ -27,7 +27,9 @@
 #include <ginac/basic.h>
 #include <ginac/ex.h>
 
 #include <ginac/basic.h>
 #include <ginac/ex.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 /** Basic CAS symbol.  It has a name because it must know how to output itself.
  *  It may be assigned an expression, but this feature is only intended for
 
 /** Basic CAS symbol.  It has a name because it must know how to output itself.
  *  It may be assigned an expression, but this feature is only intended for
@@ -127,6 +129,8 @@ inline int degree(symbol const & a, symbol const & s)
 inline int ldegree(symbol const & a, symbol const & s)
 { return a.ldegree(s); }
 
 inline int ldegree(symbol const & a, symbol const & s)
 { return a.ldegree(s); }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_SYMBOL_H__
 
 #endif // ndef __GINAC_SYMBOL_H__
index 2c807b124b6ba504f5a41300c6388d0191a744bd..d13e2b958048e546ee033f9b4755a9aa389e29f5 100644 (file)
@@ -23,7 +23,9 @@
 #ifndef __GINAC_TINFOS_H__
 #define __GINAC_TINFOS_H__
 
 #ifndef __GINAC_TINFOS_H__
 #define __GINAC_TINFOS_H__
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 const unsigned TINFO_basic        = 0x00000001U;
 
 
 const unsigned TINFO_basic        = 0x00000001U;
 
@@ -67,6 +69,8 @@ const unsigned TINFO_idx          = 0x000d0001U;
 const unsigned TINFO_coloridx     = 0x000d1001U;
 const unsigned TINFO_lorentzidx   = 0x000d1002U;
 
 const unsigned TINFO_coloridx     = 0x000d1001U;
 const unsigned TINFO_lorentzidx   = 0x000d1002U;
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_TINFOS_H__
 
 #endif // ndef __GINAC_TINFOS_H__
index 0c99ad59976a47a293bd1e7c18f8e1a93556d7f1..7592e4033e8ef6ae7d0eadcb1fffe10102ab7db2 100644 (file)
@@ -22,7 +22,9 @@
 
 #include "utils.h"
 
 
 #include "utils.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 /** Integer binary logarithm */
 unsigned log2(unsigned n)
 
 /** Integer binary logarithm */
 unsigned log2(unsigned n)
@@ -119,4 +121,6 @@ int compare_pointers(void const * a, void const * b)
 // private
 // none
 
 // private
 // none
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
index 3c33162ec8adc389e58b5617eeafa63082fdcc62..18a5e7bd3f86c85c17216ec9ef20793546244fcf 100644 (file)
@@ -28,7 +28,9 @@
 #include "config.h"
 #include "assertion.h"
 
 #include "config.h"
 #include "assertion.h"
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 template<class T>
 string ToString(T const & t)
 
 template<class T>
 string ToString(T const & t)
@@ -131,6 +133,8 @@ OutputIterator mymerge3(InputIterator1 first1, InputIterator1 last1,
   }
 }
 
   }
 }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_UTILS_H__
 
 #endif // ndef __GINAC_UTILS_H__
index c225fb09433503eb6598d9a8d40c7459d6ea823b..2d32f0e7d33e97f593d5ba644e2b925fe0c0d9fa 100644 (file)
@@ -42,7 +42,10 @@ extern "C" {
 #endif
 
 #include <ginac/ginac.h>
 #endif
 
 #include <ginac/ginac.h>
+
+#ifndef NO_GINAC_NAMESPACE
 using namespace GiNaC;
 using namespace GiNaC;
+#endif // ndef NO_GINAC_NAMESPACE
 
 // yacc stack type
 #define YYSTYPE ex
 
 // yacc stack type
 #define YYSTYPE ex
index f8702d2aea4b7640eb24c5933353ccc4b8b6bc24..b8409ea0649f314f85c3f15afe346bf81fb0a71b 100644 (file)
@@ -554,7 +554,10 @@ static ex f_ginac_function(const exprseq &es, int serial)
 }
 
 // All registered GiNaC functions
 }
 
 // All registered GiNaC functions
-void GiNaC::ginsh_get_ginac_functions(void)
+#ifndef NO_GINAC_NAMESPACE
+#else // ndef NO_GINAC_NAMESPACE
+void ginsh_get_ginac_functions(void)
+#endif // ndef NO_GINAC_NAMESPACE
 {
        vector<registered_function_info>::const_iterator i = function::registered_functions().begin(), end = function::registered_functions().end();
        unsigned serial = 0;
 {
        vector<registered_function_info>::const_iterator i = function::registered_functions().begin(), end = function::registered_functions().end();
        unsigned serial = 0;