From 51b8b2e28a75ab8cc64296e73416420a6def901a Mon Sep 17 00:00:00 2001 From: Sylvain Pion Date: Wed, 23 May 2007 13:33:11 +0000 Subject: [PATCH] Do not use _DEBUG, prefix some macros by CGAL_KD_. --- Convex_hull_d/include/CGAL/Convex_hull_d.h | 4 +- .../include/CGAL/Regular_complex_d.h | 4 +- .../test/Convex_hull_d/chull_d-test.cpp | 2 +- .../test/Convex_hull_d/delaunay_d-test.cpp | 2 +- .../CGAL/Kernel_d/Linear_algebraCd_impl.h | 34 +++++----- Kernel_d/include/CGAL/Kernel_d/Vector__.h | 4 +- Kernel_d/include/CGAL/Kernel_d/debug.h | 63 +++++++++---------- .../CGAL/Kernel_d/function_objectsCd.h | 12 ++-- .../CGAL/Kernel_d/intersection_objectsCd.h | 4 +- Kernel_d/include/CGAL/Linear_algebraCd.h | 4 +- .../test/Kernel_d/Linear_algebra-test.cpp | 2 +- Kernel_d/test/Kernel_d/interface-test.cpp | 2 +- 12 files changed, 68 insertions(+), 69 deletions(-) diff --git a/Convex_hull_d/include/CGAL/Convex_hull_d.h b/Convex_hull_d/include/CGAL/Convex_hull_d.h index ba294fd2bb7..afb98b51e4b 100644 --- a/Convex_hull_d/include/CGAL/Convex_hull_d.h +++ b/Convex_hull_d/include/CGAL/Convex_hull_d.h @@ -75,8 +75,8 @@ Let |j = C.index_of_vertex_in_opposite_facet(f,i)|. Then #include #include -#undef _DEBUG -#define _DEBUG 93 +#undef CGAL_KD_DEBUG +#define CGAL_KD_DEBUG 93 #include CGAL_BEGIN_NAMESPACE diff --git a/Convex_hull_d/include/CGAL/Regular_complex_d.h b/Convex_hull_d/include/CGAL/Regular_complex_d.h index 57fd0dc432b..14b1a5003e4 100644 --- a/Convex_hull_d/include/CGAL/Regular_complex_d.h +++ b/Convex_hull_d/include/CGAL/Regular_complex_d.h @@ -35,8 +35,8 @@ #include #include -#undef _DEBUG -#define _DEBUG 93 +#undef CGAL_KD_DEBUG +#define CGAL_KD_DEBUG 93 #include #ifdef CGAL_USE_LEDA diff --git a/Convex_hull_d/test/Convex_hull_d/chull_d-test.cpp b/Convex_hull_d/test/Convex_hull_d/chull_d-test.cpp index 0e1d8e31b81..ae48e4ac271 100644 --- a/Convex_hull_d/test/Convex_hull_d/chull_d-test.cpp +++ b/Convex_hull_d/test/Convex_hull_d/chull_d-test.cpp @@ -23,7 +23,7 @@ typedef double RT; int main() { - SETDTHREAD(11); + CGAL_KD_SETDTHREAD(11); CGAL::set_pretty_mode ( std::cerr ); CGAL_TEST_START; { diff --git a/Convex_hull_d/test/Convex_hull_d/delaunay_d-test.cpp b/Convex_hull_d/test/Convex_hull_d/delaunay_d-test.cpp index b60557452bd..c8bd65a625e 100644 --- a/Convex_hull_d/test/Convex_hull_d/delaunay_d-test.cpp +++ b/Convex_hull_d/test/Convex_hull_d/delaunay_d-test.cpp @@ -27,7 +27,7 @@ typedef double FT; int main() { CGAL::set_pretty_mode ( std::cerr ); - SETDTHREAD(193); + CGAL_KD_SETDTHREAD(193); CGAL_TEST_START; { typedef CGAL::Cartesian_d Kernel; diff --git a/Kernel_d/include/CGAL/Kernel_d/Linear_algebraCd_impl.h b/Kernel_d/include/CGAL/Kernel_d/Linear_algebraCd_impl.h index 71212f9158f..a0b03677b7c 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Linear_algebraCd_impl.h +++ b/Kernel_d/include/CGAL/Kernel_d/Linear_algebraCd_impl.h @@ -73,30 +73,30 @@ Gaussian_elimination(const Matrix &M, for (i=0; i=0; --i) { Uinv[i][i] = FT(1)/U[i][i]; for (j=i+1; j @@ -184,7 +184,7 @@ inverse(const Matrix &M, Matrix &I, FT &D, Vector &c) Uinv = Uinv * L; // Don't forget to permute the rows of M back - TRACEN("inverse before permutation : "< dummy, var; - TRACEN("linear_solver");TRACEV(M); TRACEV(b); + CGAL_KD_TRACEN("linear_solver");CGAL_KD_TRACEV(M); CGAL_KD_TRACEV(b); Gaussian_elimination(M, L, U, dummy, var, D, rank, c); // Compute a solution by solving triangular system // Since LM=U, and x is a solution of Mx=b, then Ux=Lb @@ -294,7 +294,7 @@ linear_solver(const Matrix &M, const Vector &b, Matrix L,U; int rank; std::vector dummy, var; - TRACEN("linear_solver");TRACEV(M); TRACEV(b); + CGAL_KD_TRACEN("linear_solver");CGAL_KD_TRACEV(M); CGAL_KD_TRACEV(b); Gaussian_elimination(M, L, U, dummy, var, D, rank, c); // Compute a solution by solving triangular system // Since LM=U, and x is a solution of Mx=b, then Ux=Lb @@ -320,7 +320,7 @@ linear_solver(const Matrix &M, const Vector &b, h -= U(i,j)*spanning_vectors(var[j],l); spanning_vectors(var[i],l)= h / U(i,i); } - TRACEV(spanning_vectors.column(l)); + CGAL_KD_TRACEV(spanning_vectors.column(l)); #ifdef CGAL_LA_SELFTEST CGAL_assertion( (M*spanning_vectors.column(l)).is_zero() ); @@ -362,7 +362,7 @@ homogeneous_linear_solver(const Matrix &M, Matrix &spanning_vectors) #ifdef CGAL_LA_SELFTEST Vector x; Triangular_system_solver(U, L, b, rank, c, D); - TRACEV(M);TRACEV(U);TRACEV(b);TRACEV(rank);TRACEV(c);TRACEV(D); + CGAL_KD_TRACEV(M);CGAL_KD_TRACEV(U);CGAL_KD_TRACEV(b);CGAL_KD_TRACEV(rank);CGAL_KD_TRACEV(c);CGAL_KD_TRACEV(D); x = Vector(M.column_dimension()); for (i=0; i #include -#undef _DEBUG -#define _DEBUG 51 +#undef CGAL_KD_DEBUG +#define CGAL_KD_DEBUG 51 #include #include diff --git a/Kernel_d/include/CGAL/Kernel_d/debug.h b/Kernel_d/include/CGAL/Kernel_d/debug.h index caecf4eb93b..3ef892a25ac 100644 --- a/Kernel_d/include/CGAL/Kernel_d/debug.h +++ b/Kernel_d/include/CGAL/Kernel_d/debug.h @@ -20,19 +20,20 @@ // // // Author(s) : Michael Seel -#ifndef CGAL_DEBUG_H -#define CGAL_DEBUG_H +// +#ifndef CGAL_KERNEL_D_DEBUG_H +#define CGAL_KERNEL_D_DEBUG_H #include #include #include -#undef TRACE -#undef TRACEN -#undef TRACEV -#undef CTRACE -#undef CTRACEN -#undef ASSERT +#undef CGAL_KD_TRACE +#undef CGAL_KD_TRACEN +#undef CGAL_KD_TRACEV +#undef CGAL_KD_CTRACE +#undef CGAL_KD_CTRACEN +#undef CGAL_KD_ASSERT static int debugthread=3141592; namespace { @@ -40,49 +41,49 @@ namespace { int Avoid_warning_for_unused_debugthread::x = debugthread; } -#if _DEBUG>0 -#define SETDTHREAD(l) debugthread=l +#if CGAL_KD_DEBUG>0 +#define CGAL_KD_SETDTHREAD(l) debugthread=l #else -#define SETDTHREAD(l) +#define CGAL_KD_SETDTHREAD(l) #endif -#if _DEBUG>0 -#define TRACE(t) if((debugthread%_DEBUG)==0)\ +#if CGAL_KD_DEBUG>0 +#define CGAL_KD_TRACE(t) if((debugthread%CGAL_KD_DEBUG)==0)\ std::cerr<<" "<0 -#define TRACEV(t) if((debugthread%_DEBUG)==0)\ +#if CGAL_KD_DEBUG>0 +#define CGAL_KD_TRACEV(t) if((debugthread%CGAL_KD_DEBUG)==0)\ std::cerr<<" "<<#t<<" = "<<(t)<0 -#define TRACEN(t) if((debugthread%_DEBUG)==0)\ +#if CGAL_KD_DEBUG>0 +#define CGAL_KD_TRACEN(t) if((debugthread%CGAL_KD_DEBUG)==0)\ std::cerr<<" "<0 -#define CTRACE(b,t) if(b) std::cerr << " " << t; else std::cerr << " 0" +#if CGAL_KD_DEBUG>0 +#define CGAL_KD_CTRACE(b,t) if(b) std::cerr << " " << t; else std::cerr << " 0" #else -#define CTRACE(b,t) +#define CGAL_KD_CTRACE(b,t) #endif -#if _DEBUG>0 -#define CTRACEN(b,t) if(b) std::cerr<< " " <0 +#define CGAL_KD_CTRACEN(b,t) if(b) std::cerr<< " " < #endif -#undef TRACE -#undef TRACEN -#undef TRACEV -#define TRACE(t) std::cerr << t -#define TRACEN(t) std::cerr << t << std::endl -#define TRACEV(t) std::cerr << #t << " = " << (t) << std::endl +#undef CGAL_KD_TRACE +#undef CGAL_KD_TRACEN +#undef CGAL_KD_TRACEV +#define CGAL_KD_TRACE(t) std::cerr << t +#define CGAL_KD_TRACEN(t) std::cerr << t << std::endl +#define CGAL_KD_TRACEV(t) std::cerr << #t << " = " << (t) << std::endl CGAL_BEGIN_NAMESPACE diff --git a/Kernel_d/include/CGAL/Kernel_d/intersection_objectsCd.h b/Kernel_d/include/CGAL/Kernel_d/intersection_objectsCd.h index 3f89036a2d4..76f9b1a3aba 100644 --- a/Kernel_d/include/CGAL/Kernel_d/intersection_objectsCd.h +++ b/Kernel_d/include/CGAL/Kernel_d/intersection_objectsCd.h @@ -25,8 +25,8 @@ #include -#undef _DEBUG -#define _DEBUG 11 +#undef CGAL_KD_DEBUG +#define CGAL_KD_DEBUG 11 #include diff --git a/Kernel_d/include/CGAL/Linear_algebraCd.h b/Kernel_d/include/CGAL/Linear_algebraCd.h index c2876d6cb21..017ee322a5d 100644 --- a/Kernel_d/include/CGAL/Linear_algebraCd.h +++ b/Kernel_d/include/CGAL/Linear_algebraCd.h @@ -29,8 +29,8 @@ #include #include -#undef _DEBUG -#define _DEBUG 13 +#undef CGAL_KD_DEBUG +#define CGAL_KD_DEBUG 13 #include diff --git a/Kernel_d/test/Kernel_d/Linear_algebra-test.cpp b/Kernel_d/test/Kernel_d/Linear_algebra-test.cpp index 11b32807244..5e128e4e499 100644 --- a/Kernel_d/test/Kernel_d/Linear_algebra-test.cpp +++ b/Kernel_d/test/Kernel_d/Linear_algebra-test.cpp @@ -36,7 +36,7 @@ typedef double FT; int main(int argc, char* argv[]) { - SETDTHREAD(151); + CGAL_KD_SETDTHREAD(151); CGAL::set_pretty_mode ( std::cerr ); CGAL_TEST_START; { diff --git a/Kernel_d/test/Kernel_d/interface-test.cpp b/Kernel_d/test/Kernel_d/interface-test.cpp index cd0397081c9..4f10860bd1b 100644 --- a/Kernel_d/test/Kernel_d/interface-test.cpp +++ b/Kernel_d/test/Kernel_d/interface-test.cpp @@ -30,7 +30,7 @@ typedef double FT_; #endif int main() -{ SETDTHREAD(2); +{ CGAL_KD_SETDTHREAD(2); CGAL::set_pretty_mode ( std::cerr ); CGAL_TEST_START; { // Homogeneous Kernel