From 68c3715b5ce34c04521f6de41a76cca85cab9c62 Mon Sep 17 00:00:00 2001 From: Andreas Meyer Date: Thu, 10 Aug 2006 15:14:32 +0000 Subject: [PATCH] support for LEDA 5.x (mostly done by Eric Berberich) --- .../bench/Arrangement_2/arr_bench.cpp | 4 + .../Convex_hull_d/chull_3d-windows-demo.cpp | 5 + .../delaunay_3d-windows-demo.cpp | 4 + .../Convex_hull_d/delaunay_dd-runtime.cpp | 4 + .../CGAL/IO/Regular_complex_d_window_stream.h | 7 + .../include/CGAL/Regular_complex_d.h | 4 + .../include/CGAL/Cubical_gaussian_map_3.h | 4 + Distance_2/test/Distance_2/numrep1.h | 8 + Distance_2/test/Distance_2/numrep2.h | 8 + Distance_3/test/Distance_3/numrep1.h | 8 + Distance_3/test/Distance_3/numrep2.h | 8 + .../test/Intersections_2/numrep1.h | 9 + .../test/Intersections_2/numrep2.h | 8 + Kernel_23/include/CGAL/kernel_to_kernel.h | 4 + LEDA/include/CGAL/LEDA_basic.h | 4 + LEDA/include/CGAL/leda_in_CGAL_2.h | 6 + LEDA/include/CGAL/rat_leda_in_CGAL_2.h | 6 + LEDA/test/LEDA/include/CGAL/rat_leda.h | 4 + .../CGAL/IO/Nef_polyhedron_2_PS_stream.h | 6 + Nef_2/include/CGAL/Nef_2/PM_point_locator.h | 11 +- .../CGAL/Nef_2/Segment_overlay_traits.h | 10 + Nef_2/include/CGAL/Nef_2/gen_point_location.h | 4 + Nef_2/noweb/Nef_polyhedron_2.lw | 25 + Nef_2/noweb/PM_point_locator.lw | 15 +- Nef_2/noweb/Polynomial.lw | 10 + Nef_2/noweb/Segment_overlay.lw | 42 ++ Nef_2/noweb/Svens_point_location.lw | 4 + Nef_3/performance/Nef_3/abdruck.C | 2 +- Nef_3/performance/Nef_3/big_and_small.C | 2 +- Nef_3/performance/Nef_3/binary_operation.C | 2 +- Nef_3/performance/Nef_3/complex_facet.C | 2 +- Nef_3/performance/Nef_3/complex_sphere_map.C | 2 +- Nef_3/performance/Nef_3/point_location.C | 2 +- Nef_3/performance/Nef_3/point_location2.C | 2 +- Nef_3/performance/Nef_3/quadratic.C | 2 +- Nef_3/performance/Nef_3/quadratic2.C | 2 +- Nef_3/performance/Nef_3/tetrahedra_and_grid.C | 2 +- .../performance/Nef_3/two_tetrahedra_fields.C | 2 +- Nef_S2/demo/Nef_S2/Nef_polyhedron_S2-demo.cpp | 4 + Nef_S2/demo/Nef_S2/SM_overlayer-demo.cpp | 4 + Nef_S2/demo/Nef_S2/Sphere_geometry-demo.cpp | 5 + Nef_S2/include/CGAL/Nef_S2/leda_sphere_map.h | 5 + Nef_S2/noweb/SM_overlayer.lw | 4 + Number_types/include/CGAL/leda_bigfloat.h | 4 + Number_types/include/CGAL/leda_integer.h | 4 + Number_types/include/CGAL/leda_rational.h | 4 + Number_types/include/CGAL/leda_real.h | 4 + .../include/CGAL/IO/Postscript_file_stream.h | 526 ++---------------- .../CGAL/IO/forward_decl_window_stream.h | 4 + window/include/CGAL/IO/leda_window.h | 4 + 50 files changed, 322 insertions(+), 504 deletions(-) diff --git a/Arrangement_2/bench/Arrangement_2/arr_bench.cpp b/Arrangement_2/bench/Arrangement_2/arr_bench.cpp index 44751fc8962..6fe02139875 100644 --- a/Arrangement_2/bench/Arrangement_2/arr_bench.cpp +++ b/Arrangement_2/bench/Arrangement_2/arr_bench.cpp @@ -68,8 +68,12 @@ enum MaxFilesNumber { #if BENCH_KERNEL == LEDA_KERNEL || BENCH_KERNEL == MY_KERNEL #if defined(USE_CGAL_WINDOW) +#if CGAL_LEDA_VERSION < 500 #include #else +#include +#endif +#else #include #endif #endif diff --git a/Convex_hull_d/demo/Convex_hull_d/chull_3d-windows-demo.cpp b/Convex_hull_d/demo/Convex_hull_d/chull_3d-windows-demo.cpp index 76245e0cb54..9bc84bc991f 100644 --- a/Convex_hull_d/demo/Convex_hull_d/chull_3d-windows-demo.cpp +++ b/Convex_hull_d/demo/Convex_hull_d/chull_3d-windows-demo.cpp @@ -26,8 +26,13 @@ #include #include +#if CGAL_LEDA_VERSION < 500 #include #include +#else +#include +#include +#endif typedef leda_integer RT; diff --git a/Convex_hull_d/demo/Convex_hull_d/delaunay_3d-windows-demo.cpp b/Convex_hull_d/demo/Convex_hull_d/delaunay_3d-windows-demo.cpp index d571e69f6c0..e60600903a6 100644 --- a/Convex_hull_d/demo/Convex_hull_d/delaunay_3d-windows-demo.cpp +++ b/Convex_hull_d/demo/Convex_hull_d/delaunay_3d-windows-demo.cpp @@ -25,7 +25,11 @@ #include #include #include +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif #include typedef leda_integer RT; diff --git a/Convex_hull_d/demo/Convex_hull_d/delaunay_dd-runtime.cpp b/Convex_hull_d/demo/Convex_hull_d/delaunay_dd-runtime.cpp index 13a2489794d..7d77f4f2723 100644 --- a/Convex_hull_d/demo/Convex_hull_d/delaunay_dd-runtime.cpp +++ b/Convex_hull_d/demo/Convex_hull_d/delaunay_dd-runtime.cpp @@ -26,7 +26,11 @@ #include #include +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif #include typedef leda_integer RT; diff --git a/Convex_hull_d/include/CGAL/IO/Regular_complex_d_window_stream.h b/Convex_hull_d/include/CGAL/IO/Regular_complex_d_window_stream.h index ca09a9d5b7e..6ca9fc9581d 100644 --- a/Convex_hull_d/include/CGAL/IO/Regular_complex_d_window_stream.h +++ b/Convex_hull_d/include/CGAL/IO/Regular_complex_d_window_stream.h @@ -26,10 +26,17 @@ #include #include +#if CGAL_LEDA_VERSION < 500 #include #include #include #include +#else +#include +#include +#include +#include +#endif 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 e01d5e53fb9..5cf6d4de997 100644 --- a/Convex_hull_d/include/CGAL/Regular_complex_d.h +++ b/Convex_hull_d/include/CGAL/Regular_complex_d.h @@ -40,7 +40,11 @@ #include #ifdef CGAL_USE_LEDA +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif #endif CGAL_BEGIN_NAMESPACE diff --git a/Cubical_gaussian_map_3/include/CGAL/Cubical_gaussian_map_3.h b/Cubical_gaussian_map_3/include/CGAL/Cubical_gaussian_map_3.h index 1b6d9bb0dc3..580b2f79993 100644 --- a/Cubical_gaussian_map_3/include/CGAL/Cubical_gaussian_map_3.h +++ b/Cubical_gaussian_map_3/include/CGAL/Cubical_gaussian_map_3.h @@ -46,7 +46,11 @@ #include #if defined(CGAL_USE_LEDA) +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif #endif #include diff --git a/Distance_2/test/Distance_2/numrep1.h b/Distance_2/test/Distance_2/numrep1.h index 4de028e4472..4bf10d716cb 100644 --- a/Distance_2/test/Distance_2/numrep1.h +++ b/Distance_2/test/Distance_2/numrep1.h @@ -52,12 +52,20 @@ inline CGAL::TestrepH to_nt(int d) #include #include +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif inline integer to_nt(int d) { return integer(d); } +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif #endif struct randomint { diff --git a/Distance_2/test/Distance_2/numrep2.h b/Distance_2/test/Distance_2/numrep2.h index b6f589d759d..324de4641bb 100644 --- a/Distance_2/test/Distance_2/numrep2.h +++ b/Distance_2/test/Distance_2/numrep2.h @@ -19,8 +19,16 @@ #endif #if TESTR == 5 +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif typedef integer testnt; +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif typedef CGAL::Homogeneous TestR; #endif diff --git a/Distance_3/test/Distance_3/numrep1.h b/Distance_3/test/Distance_3/numrep1.h index 4de028e4472..4bf10d716cb 100644 --- a/Distance_3/test/Distance_3/numrep1.h +++ b/Distance_3/test/Distance_3/numrep1.h @@ -52,12 +52,20 @@ inline CGAL::TestrepH to_nt(int d) #include #include +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif inline integer to_nt(int d) { return integer(d); } +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif #endif struct randomint { diff --git a/Distance_3/test/Distance_3/numrep2.h b/Distance_3/test/Distance_3/numrep2.h index b6f589d759d..324de4641bb 100644 --- a/Distance_3/test/Distance_3/numrep2.h +++ b/Distance_3/test/Distance_3/numrep2.h @@ -19,8 +19,16 @@ #endif #if TESTR == 5 +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif typedef integer testnt; +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif typedef CGAL::Homogeneous TestR; #endif diff --git a/Intersections_2/test/Intersections_2/numrep1.h b/Intersections_2/test/Intersections_2/numrep1.h index 4de028e4472..11bfcf89d44 100644 --- a/Intersections_2/test/Intersections_2/numrep1.h +++ b/Intersections_2/test/Intersections_2/numrep1.h @@ -52,12 +52,21 @@ inline CGAL::TestrepH to_nt(int d) #include #include +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif inline integer to_nt(int d) { return integer(d); + } +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif #endif struct randomint { diff --git a/Intersections_2/test/Intersections_2/numrep2.h b/Intersections_2/test/Intersections_2/numrep2.h index b6f589d759d..324de4641bb 100644 --- a/Intersections_2/test/Intersections_2/numrep2.h +++ b/Intersections_2/test/Intersections_2/numrep2.h @@ -19,8 +19,16 @@ #endif #if TESTR == 5 +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif typedef integer testnt; +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif typedef CGAL::Homogeneous TestR; #endif diff --git a/Kernel_23/include/CGAL/kernel_to_kernel.h b/Kernel_23/include/CGAL/kernel_to_kernel.h index 286753415ee..3f335a03a59 100644 --- a/Kernel_23/include/CGAL/kernel_to_kernel.h +++ b/Kernel_23/include/CGAL/kernel_to_kernel.h @@ -27,7 +27,11 @@ #ifdef CGAL_USE_LEDA #include #include +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif #endif CGAL_BEGIN_NAMESPACE diff --git a/LEDA/include/CGAL/LEDA_basic.h b/LEDA/include/CGAL/LEDA_basic.h index 9370014fc83..7c1d99ad639 100644 --- a/LEDA/include/CGAL/LEDA_basic.h +++ b/LEDA/include/CGAL/LEDA_basic.h @@ -28,7 +28,11 @@ // The following is needed for LEDA 4.4 due to min/max problems... # define LEDA_NO_MIN_MAX_TEMPL +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif #ifdef LEDA_NAMESPACE # define CGAL_LEDA_SCOPE leda diff --git a/LEDA/include/CGAL/leda_in_CGAL_2.h b/LEDA/include/CGAL/leda_in_CGAL_2.h index 6efae737656..603d226ba3c 100644 --- a/LEDA/include/CGAL/leda_in_CGAL_2.h +++ b/LEDA/include/CGAL/leda_in_CGAL_2.h @@ -28,9 +28,15 @@ #include #include #include +#if CGAL_LEDA_VERSION < 500 #include #include #include +#else +#include +#include +#include +#endif CGAL_BEGIN_NAMESPACE diff --git a/LEDA/include/CGAL/rat_leda_in_CGAL_2.h b/LEDA/include/CGAL/rat_leda_in_CGAL_2.h index 19044c6ff6c..a3f2d894ee9 100644 --- a/LEDA/include/CGAL/rat_leda_in_CGAL_2.h +++ b/LEDA/include/CGAL/rat_leda_in_CGAL_2.h @@ -28,9 +28,15 @@ #include #include #include +#if CGAL_LEDA_VERSION < 500 #include #include #include +#else +#include +#include +#include +#endif CGAL_BEGIN_NAMESPACE diff --git a/LEDA/test/LEDA/include/CGAL/rat_leda.h b/LEDA/test/LEDA/include/CGAL/rat_leda.h index ac3d48e9e3f..2ed5903bb3a 100644 --- a/LEDA/test/LEDA/include/CGAL/rat_leda.h +++ b/LEDA/test/LEDA/include/CGAL/rat_leda.h @@ -25,7 +25,11 @@ #include #include #include +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif #include #define CGAL_REP_CLASS_DEFINED diff --git a/Nef_2/include/CGAL/IO/Nef_polyhedron_2_PS_stream.h b/Nef_2/include/CGAL/IO/Nef_polyhedron_2_PS_stream.h index 4a7d6440e29..d6f54df4099 100644 --- a/Nef_2/include/CGAL/IO/Nef_polyhedron_2_PS_stream.h +++ b/Nef_2/include/CGAL/IO/Nef_polyhedron_2_PS_stream.h @@ -21,9 +21,15 @@ #define NEF_POLYHEDRON_2_PS_STREAM_H #include +#if CGAL_LEDA_VERSION < 500 #include #include #include +#else +#include +#include +#include +#endif CGAL_BEGIN_NAMESPACE static int frame_default = 100; diff --git a/Nef_2/include/CGAL/Nef_2/PM_point_locator.h b/Nef_2/include/CGAL/Nef_2/PM_point_locator.h index a7c67acd98b..9e0845f5d68 100644 --- a/Nef_2/include/CGAL/Nef_2/PM_point_locator.h +++ b/Nef_2/include/CGAL/Nef_2/PM_point_locator.h @@ -29,12 +29,13 @@ #define CGAL_NEF_DEBUG 17 #include #include + #ifdef CGAL_USE_LEDA -#include -#if __LEDA__ > 410 && __LEDA__ < 441 -#define CGAL_USING_PPL -#include -#endif +#include +# if __LEDA__ > 410 && __LEDA__ < 441 +# define CGAL_USING_PPL +# include +# endif #endif CGAL_BEGIN_NAMESPACE diff --git a/Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h b/Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h index e265fa4ccb9..19c3e11d3e2 100644 --- a/Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h +++ b/Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h @@ -26,6 +26,7 @@ #if defined(CGAL_USE_LEDA) #include +#if CGAL_LEDA_VERSION < 500 #include #include #include @@ -33,6 +34,15 @@ #include #include #include +#else +#include +#include +#include +#include +#include +#include +#include +#endif #include #include diff --git a/Nef_2/include/CGAL/Nef_2/gen_point_location.h b/Nef_2/include/CGAL/Nef_2/gen_point_location.h index 7c26f329c8b..be5b6f58fdb 100644 --- a/Nef_2/include/CGAL/Nef_2/gen_point_location.h +++ b/Nef_2/include/CGAL/Nef_2/gen_point_location.h @@ -22,7 +22,11 @@ #define GEN_POINT_LOCATION_H #include +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif #include #include #include diff --git a/Nef_2/noweb/Nef_polyhedron_2.lw b/Nef_2/noweb/Nef_polyhedron_2.lw index c0dadba1d00..2d6da57140b 100644 --- a/Nef_2/noweb/Nef_polyhedron_2.lw +++ b/Nef_2/noweb/Nef_polyhedron_2.lw @@ -2227,8 +2227,13 @@ drawing window. #include #ifdef CGAL_USE_LEDA #include "xpms/nef.xpm" +#if CGAL_LEDA_VERSION < 500 #include #include +#else +#include +#include +#endif #include #include #include @@ -2371,12 +2376,21 @@ operations |main_panel|, |op_panel|. We store a history of polyhedra: |ML| stores the names displayed, |MH| maps the names to the existing objects. |N_display| stores the current object drawn in |W|. <>= +#if CGAL_LEDA_VERSION < 500 #include #include #include #include #include #include +#else +#include +#include +#include +#include +#include +#include +#endif static leda_panel main_panel; static leda_panel op_panel; @@ -3034,10 +3048,17 @@ SUN Ultra-Enterprise-10000 with an 333 MHz UltraSPARC processors. #include #include +#if CGAL_LEDA_VERSION < 500 #include #include #include #include +#else +#include +#include +#include +#include +#endif template <> struct ring_or_field { @@ -3441,7 +3462,11 @@ assert(n1.explorer().number_of_faces()==n2.explorer().number_of_faces()); #include #include #include +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif template <> struct ring_or_field { diff --git a/Nef_2/noweb/PM_point_locator.lw b/Nef_2/noweb/PM_point_locator.lw index 985f56f5975..3e46228cdac 100644 --- a/Nef_2/noweb/PM_point_locator.lw +++ b/Nef_2/noweb/PM_point_locator.lw @@ -1421,11 +1421,16 @@ class |PM_point_locator|. of LEDA starting version 4.2. <>= #ifdef CGAL_USE_LEDA -#include -#if __LEDA__ > 410 -#define CGAL_USING_PPL -#include -#endif +# if CGAL_LEDA_VERSION < 500 +# include +# else +# include +# endif + +# if __LEDA__ > 410 && __LEDA__ < 441 +# define CGAL_USING_PPL +# include +# endif #endif @ \end{ignoreindiss}% The point location framework is added to the point location class only diff --git a/Nef_2/noweb/Polynomial.lw b/Nef_2/noweb/Polynomial.lw index e47cfc1df74..a2ac4d74146 100644 --- a/Nef_2/noweb/Polynomial.lw +++ b/Nef_2/noweb/Polynomial.lw @@ -1584,9 +1584,15 @@ int main() #include #include #include +#if CGAL_LEDA_VERSION < 500 #include #include #include +#else +#include +#include +#include +#endif #define POLYNOMIAL_EXPLICIT_OUTPUT #ifndef CARTESIAN @@ -1902,7 +1908,11 @@ sub specialize_members { <>= #include +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif // SPECIALIZE_CLASS(T,int) START template class A; diff --git a/Nef_2/noweb/Segment_overlay.lw b/Nef_2/noweb/Segment_overlay.lw index 3b2453c2ed3..0bd06a6dee9 100644 --- a/Nef_2/noweb/Segment_overlay.lw +++ b/Nef_2/noweb/Segment_overlay.lw @@ -364,6 +364,7 @@ static const char* sweepversion = "STL segment overlay sweep"; #endif // CGAL_SEGMENT_OVERLAY_TRAITS_H <>= +#if CGAL_LEDA_VERSION < 500 #include #include #include @@ -371,6 +372,15 @@ static const char* sweepversion = "STL segment overlay sweep"; #include #include #include +#else +#include +#include +#include +#include +#include +#include +#include +#endif #include #include @@ -1459,9 +1469,15 @@ nodes. #ifndef LEDA_OVERLAY_TRAITS_H #define LEDA_OVERLAY_TRAITS_H +#if CGAL_LEDA_VERSION < 500 #include #include #include +#else +#include +#include +#include +#endif template ostream& operator<<(ostream& os, const leda_slist& s) @@ -1650,7 +1666,11 @@ in the appendix (Section \ref{GenericSweepVisualization}). #ifndef LEDA_OVERLAY_VISUALIZATION_H #define LEDA_OVERLAY_VISUALIZATION_H +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif template class leda_visualization { @@ -1735,12 +1755,21 @@ VDEVICE& device() { return W; } @ \subsection{Testing the generic LEDA sweep} <>= +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif #include "Segment_overlay_traits.h" #include "leda_overlay_traits.h" #include "leda_overlay_visualization.h" +#if CGAL_LEDA_VERSION < 500 #include #include +#else +#include +#include +#endif using namespace CGAL; @@ -1821,9 +1850,15 @@ square. The runtimes are in seconds on an Ultra 2 200 MHz. #define INCLUDEBOTH // to allow comparison #include "Segment_overlay_traits.h" #include "leda_overlay_traits.h" +#if CGAL_LEDA_VERSION < 500 #include #include #include +#else +#include +#include +#include +#endif typedef leda_list::iterator Seg_iterator; typedef CGAL::leda_seg_overlay_traits< Seg_iterator, @@ -2242,10 +2277,17 @@ int main(int argc, char** argv) #include "Segment_overlay_traits.h" #include "leda_overlay_traits.h" #include "leda_overlay_visualization.h" +#if CGAL_LEDA_VERSION < 500 #include #include #include #include +#else +#include +#include +#include +#include +#endif typedef leda_list::iterator Seg_iterator; typedef CGAL::Segment_overlay_traits< Seg_iterator, diff --git a/Nef_2/noweb/Svens_point_location.lw b/Nef_2/noweb/Svens_point_location.lw index 122ba98252e..54b1fabd359 100644 --- a/Nef_2/noweb/Svens_point_location.lw +++ b/Nef_2/noweb/Svens_point_location.lw @@ -2469,7 +2469,11 @@ LEDA-spezifischen Klassen:%" #ifndef GEN_POINT_LOCATION_H #define GEN_POINT_LOCATION_H +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif #include #include #include diff --git a/Nef_3/performance/Nef_3/abdruck.C b/Nef_3/performance/Nef_3/abdruck.C index db4774da020..46480680ff0 100644 --- a/Nef_3/performance/Nef_3/abdruck.C +++ b/Nef_3/performance/Nef_3/abdruck.C @@ -36,7 +36,7 @@ typedef CGAL::Extended_homogeneous Kernel; #endif #ifdef CGAL_NEF3_USE_LEDA_RATIONAL -#include +#include typedef leda_rational NT; #endif diff --git a/Nef_3/performance/Nef_3/big_and_small.C b/Nef_3/performance/Nef_3/big_and_small.C index 2cc13ee413e..d536a930f14 100644 --- a/Nef_3/performance/Nef_3/big_and_small.C +++ b/Nef_3/performance/Nef_3/big_and_small.C @@ -36,7 +36,7 @@ typedef CGAL::Extended_homogeneous Kernel; #endif #ifdef CGAL_NEF3_USE_LEDA_RATIONAL -#include +#include typedef leda_rational NT; #endif diff --git a/Nef_3/performance/Nef_3/binary_operation.C b/Nef_3/performance/Nef_3/binary_operation.C index 3de28bf4cd8..96ec325eee7 100644 --- a/Nef_3/performance/Nef_3/binary_operation.C +++ b/Nef_3/performance/Nef_3/binary_operation.C @@ -36,7 +36,7 @@ typedef CGAL::Extended_homogeneous Kernel; #endif #ifdef CGAL_NEF3_USE_LEDA_RATIONAL -#include +#include typedef leda_rational NT; #endif diff --git a/Nef_3/performance/Nef_3/complex_facet.C b/Nef_3/performance/Nef_3/complex_facet.C index 7b39611d5d0..4449d921583 100644 --- a/Nef_3/performance/Nef_3/complex_facet.C +++ b/Nef_3/performance/Nef_3/complex_facet.C @@ -36,7 +36,7 @@ typedef CGAL::Extended_homogeneous Kernel; #endif #ifdef CGAL_NEF3_USE_LEDA_RATIONAL -#include +#include typedef leda_rational NT; #endif diff --git a/Nef_3/performance/Nef_3/complex_sphere_map.C b/Nef_3/performance/Nef_3/complex_sphere_map.C index 9ac2d7c077f..875d3318c75 100644 --- a/Nef_3/performance/Nef_3/complex_sphere_map.C +++ b/Nef_3/performance/Nef_3/complex_sphere_map.C @@ -36,7 +36,7 @@ typedef CGAL::Extended_homogeneous Kernel; #endif #ifdef CGAL_NEF3_USE_LEDA_RATIONAL -#include +#include typedef leda_rational NT; #endif diff --git a/Nef_3/performance/Nef_3/point_location.C b/Nef_3/performance/Nef_3/point_location.C index b98c5716e4b..4b819641f84 100644 --- a/Nef_3/performance/Nef_3/point_location.C +++ b/Nef_3/performance/Nef_3/point_location.C @@ -36,7 +36,7 @@ typedef CGAL::Extended_homogeneous Kernel; #endif #ifdef CGAL_NEF3_USE_LEDA_RATIONAL -#include +#include typedef leda_rational NT; #endif diff --git a/Nef_3/performance/Nef_3/point_location2.C b/Nef_3/performance/Nef_3/point_location2.C index e82f37109dd..652727793eb 100644 --- a/Nef_3/performance/Nef_3/point_location2.C +++ b/Nef_3/performance/Nef_3/point_location2.C @@ -36,7 +36,7 @@ typedef CGAL::Extended_homogeneous Kernel; #endif #ifdef CGAL_NEF3_USE_LEDA_RATIONAL -#include +#include typedef leda_rational NT; #endif diff --git a/Nef_3/performance/Nef_3/quadratic.C b/Nef_3/performance/Nef_3/quadratic.C index e6abe13339a..84db9611c0c 100644 --- a/Nef_3/performance/Nef_3/quadratic.C +++ b/Nef_3/performance/Nef_3/quadratic.C @@ -41,7 +41,7 @@ typedef CGAL::Extended_homogeneous Kernel; #endif #ifdef CGAL_NEF3_USE_LEDA_RATIONAL -#include +#include typedef leda_rational NT; #endif diff --git a/Nef_3/performance/Nef_3/quadratic2.C b/Nef_3/performance/Nef_3/quadratic2.C index 399cdb6a10d..20145185716 100644 --- a/Nef_3/performance/Nef_3/quadratic2.C +++ b/Nef_3/performance/Nef_3/quadratic2.C @@ -41,7 +41,7 @@ typedef CGAL::Extended_homogeneous Kernel; #endif #ifdef CGAL_NEF3_USE_LEDA_RATIONAL -#include +#include typedef leda_rational NT; #endif diff --git a/Nef_3/performance/Nef_3/tetrahedra_and_grid.C b/Nef_3/performance/Nef_3/tetrahedra_and_grid.C index 135878f4af2..568addcc023 100644 --- a/Nef_3/performance/Nef_3/tetrahedra_and_grid.C +++ b/Nef_3/performance/Nef_3/tetrahedra_and_grid.C @@ -36,7 +36,7 @@ typedef CGAL::Extended_homogeneous Kernel; #endif #ifdef CGAL_NEF3_USE_LEDA_RATIONAL -#include +#include typedef leda_rational NT; #endif diff --git a/Nef_3/performance/Nef_3/two_tetrahedra_fields.C b/Nef_3/performance/Nef_3/two_tetrahedra_fields.C index 4e1a756167c..a558091c433 100644 --- a/Nef_3/performance/Nef_3/two_tetrahedra_fields.C +++ b/Nef_3/performance/Nef_3/two_tetrahedra_fields.C @@ -41,7 +41,7 @@ typedef CGAL::Extended_homogeneous Kernel; #endif #ifdef CGAL_NEF3_USE_LEDA_RATIONAL -#include +#include typedef leda_rational NT; #endif diff --git a/Nef_S2/demo/Nef_S2/Nef_polyhedron_S2-demo.cpp b/Nef_S2/demo/Nef_S2/Nef_polyhedron_S2-demo.cpp index 5cdea9c0b65..3f47ed8cf4b 100644 --- a/Nef_S2/demo/Nef_S2/Nef_polyhedron_S2-demo.cpp +++ b/Nef_S2/demo/Nef_S2/Nef_polyhedron_S2-demo.cpp @@ -28,7 +28,11 @@ #include #include #include +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif #include typedef leda_integer NT; diff --git a/Nef_S2/demo/Nef_S2/SM_overlayer-demo.cpp b/Nef_S2/demo/Nef_S2/SM_overlayer-demo.cpp index c0d066f6a2d..74221c1200b 100644 --- a/Nef_S2/demo/Nef_S2/SM_overlayer-demo.cpp +++ b/Nef_S2/demo/Nef_S2/SM_overlayer-demo.cpp @@ -23,7 +23,11 @@ #include #include #include +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif #include #include diff --git a/Nef_S2/demo/Nef_S2/Sphere_geometry-demo.cpp b/Nef_S2/demo/Nef_S2/Sphere_geometry-demo.cpp index 25e5295eaed..ffd83f5ca53 100644 --- a/Nef_S2/demo/Nef_S2/Sphere_geometry-demo.cpp +++ b/Nef_S2/demo/Nef_S2/Sphere_geometry-demo.cpp @@ -26,8 +26,13 @@ #include #include #include +#if CGAL_LEDA_VERSION < 500 #include #include +#else +#include +#include +#endif // #include #include diff --git a/Nef_S2/include/CGAL/Nef_S2/leda_sphere_map.h b/Nef_S2/include/CGAL/Nef_S2/leda_sphere_map.h index ae44d5dfaf6..fff069361a2 100644 --- a/Nef_S2/include/CGAL/Nef_S2/leda_sphere_map.h +++ b/Nef_S2/include/CGAL/Nef_S2/leda_sphere_map.h @@ -23,8 +23,13 @@ #include #include #include +#if CGAL_LEDA_VERSION < 500 #include #include +#else +#include +#include +#endif #undef CGAL_NEF_DEBUG #define CGAL_NEF_DEBUG 211 diff --git a/Nef_S2/noweb/SM_overlayer.lw b/Nef_S2/noweb/SM_overlayer.lw index 48f4f711ffe..c098eb8a7fb 100644 --- a/Nef_S2/noweb/SM_overlayer.lw +++ b/Nef_S2/noweb/SM_overlayer.lw @@ -2264,7 +2264,11 @@ int main(int argc, char **argv) #include #include #include +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif #include #include #include diff --git a/Number_types/include/CGAL/leda_bigfloat.h b/Number_types/include/CGAL/leda_bigfloat.h index f85f3db576a..7c76391dc81 100644 --- a/Number_types/include/CGAL/leda_bigfloat.h +++ b/Number_types/include/CGAL/leda_bigfloat.h @@ -32,7 +32,11 @@ #include #include +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif CGAL_BEGIN_NAMESPACE diff --git a/Number_types/include/CGAL/leda_integer.h b/Number_types/include/CGAL/leda_integer.h index 45f098c4fdf..071226526b0 100644 --- a/Number_types/include/CGAL/leda_integer.h +++ b/Number_types/include/CGAL/leda_integer.h @@ -31,7 +31,11 @@ #include #include +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif CGAL_BEGIN_NAMESPACE diff --git a/Number_types/include/CGAL/leda_rational.h b/Number_types/include/CGAL/leda_rational.h index 8c0792939a0..0256542346d 100644 --- a/Number_types/include/CGAL/leda_rational.h +++ b/Number_types/include/CGAL/leda_rational.h @@ -32,7 +32,11 @@ #include #include +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif CGAL_BEGIN_NAMESPACE diff --git a/Number_types/include/CGAL/leda_real.h b/Number_types/include/CGAL/leda_real.h index 8a2f7ca0e4a..9eddbcb3fcb 100644 --- a/Number_types/include/CGAL/leda_real.h +++ b/Number_types/include/CGAL/leda_real.h @@ -31,7 +31,11 @@ #include #include +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif CGAL_BEGIN_NAMESPACE diff --git a/window/include/CGAL/IO/Postscript_file_stream.h b/window/include/CGAL/IO/Postscript_file_stream.h index 8345401064f..7f37f49cab6 100644 --- a/window/include/CGAL/IO/Postscript_file_stream.h +++ b/window/include/CGAL/IO/Postscript_file_stream.h @@ -27,10 +27,16 @@ #include #include + #ifdef LEDA_PS_FILE_H -# error Internal CGAL error: should not have been included yet -#else -# include +# if CGAL_LEDA_VERSION < 500 +# error Internal CGAL error: should not have been included yet +# else +# error Internal CGAL error: should not have been included yet +# endif +#endif + +#if (CGAL_LEDA_VERSION < 500) # include # include # include @@ -39,19 +45,43 @@ # include # include # include -# if (__LEDA__ >= 400) -# include -# endif // 400 # include # include -# if (__LEDA__ >= 400) -# include -# include -# endif // 400 -# define private protected +#else +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +#endif + + + +#if (CGAL_LEDA_VERSION >= 400) + #if (CGAL_LEDA_VERSION < 500) + #include + #include + #include + #else + #include + #include + #include + #endif +#endif // 400 + +#define private protected +#if CGAL_LEDA_VERSION < 500 # include -# undef private -#endif // LEDA_PS_FILE_H +#else +# include +#endif +#undef private + #include CGAL_BEGIN_NAMESPACE @@ -161,57 +191,6 @@ operator<<(Postscript_file_stream& w, const Point_2& p) return w; } -template< class R > -Postscript_file_stream& -operator>>(Postscript_file_stream& w, Point_2& p) -{ - typedef typename R::RT RT; - leda_point l_p; - leda_drawing_mode save = w.set_mode(leda_xor_mode); - if (w >> l_p) - { - double x = l_p.xcoord(); - double y = l_p.ycoord(); - w << l_p; - w.set_mode( save); - w.draw_point(x,y); - - p = Point_2( RT(x), RT(y)); - } - else - { - w.set_mode( save); - } - return w; -} - -template< class R > -Postscript_file_stream& -read(Postscript_file_stream& w, Point_2& p) -{ - typedef typename R::RT RT; - leda_point l_p; - if (w >> l_p) - { - double x = l_p.xcoord(); - double y = l_p.ycoord(); - p = Point_2( RT(x), RT(y)); - } - return w; -} - -template -void -read_mouse_plus(Postscript_file_stream& w, Point_2& p, int& button) -{ - typedef typename R::RT RT; - double x, y; - button = w.read_mouse(x,y); - w.draw_point(x,y); - - p = Point_2(RT(x), RT(y)); -} - #endif // CGAL_POSTSCRIPT_FILE_STREAM_POINT_2 #endif // CGAL_POINT_2_H @@ -230,48 +209,6 @@ operator<<(Postscript_file_stream& w, const Segment_2& s) return w; } -template< class R > -Postscript_file_stream& -operator>>(Postscript_file_stream& w, Segment_2& s) -{ - typedef typename R::RT RT; - leda_segment l_s; - leda_drawing_mode save = w.set_mode(leda_xor_mode); - if ( w.read( l_s)) - { - double x1 = l_s.xcoord1(); - double y1 = l_s.ycoord1(); - double x2 = l_s.xcoord2(); - double y2 = l_s.ycoord2(); - w.set_mode( save); - w.draw_segment(x1,y1, x2, y2); - s = Segment_2(Point_2( RT(x1), RT(y1)), - Point_2( RT(x2), RT(y2))); - } - else - { - w.set_mode( save); - } - return w; -} - -template< class R > -Postscript_file_stream& -read(Postscript_file_stream& w, Segment_2& s) -{ - typedef typename R::RT RT; - leda_segment l_s; - if ( w.read( l_s)) - { - double x1 = l_s.xcoord1(); - double y1 = l_s.ycoord1(); - double x2 = l_s.xcoord2(); - double y2 = l_s.ycoord2(); - s = Segment_2(Point_2( RT(x1), RT(y1)), - Point_2( RT(x2), RT(y2))); - } - return w; -} #endif // CGAL_POSTSCRIPT_FILE_STREAM_SEGMENT_2 #endif // CGAL_SEGMENT_2_H @@ -291,48 +228,6 @@ operator<<(Postscript_file_stream& w, const Line_2& l) return w; } -template< class R > -Postscript_file_stream& -operator>>(Postscript_file_stream& w, Line_2& l) -{ - typedef typename R::RT RT; - leda_segment l_s; - leda_drawing_mode save = w.set_mode(leda_xor_mode); - if ( w.read( l_s)) - { - double x1 = l_s.xcoord1(); - double y1 = l_s.ycoord1(); - double x2 = l_s.xcoord2(); - double y2 = l_s.ycoord2(); - w.set_mode( save); - w.draw_line(x1,y1, x2, y2); - l = Line_2(Point_2( RT(x1), RT(y1)), - Point_2( RT(x2), RT(y2))); - } - else - { - w.set_mode( save); - } - return w; -} - -template< class R > -Postscript_file_stream& -read(Postscript_file_stream& w, Line_2& l) -{ - typedef typename R::RT RT; - leda_segment l_s; - if ( w.read( l_s)) - { - double x1 = l_s.xcoord1(); - double y1 = l_s.ycoord1(); - double x2 = l_s.xcoord2(); - double y2 = l_s.ycoord2(); - l = Line_2(Point_2( RT(x1), RT(y1)), - Point_2( RT(x2), RT(y2))); - } - return w; -} #endif // CGAL_POSTSCRIPT_FILE_STREAM_LINE_2 #endif //CGAL_LINE_2_H @@ -352,48 +247,6 @@ operator<<(Postscript_file_stream& w, const Ray_2& r) return w; } -template< class R > -Postscript_file_stream& -operator>>(Postscript_file_stream& w, Ray_2& r) -{ - typedef typename R::RT RT; - leda_segment l_s; - leda_drawing_mode save = w.set_mode(leda_xor_mode); - if ( w.read( l_s)) - { - double x1 = l_s.xcoord1(); - double y1 = l_s.ycoord1(); - double x2 = l_s.xcoord2(); - double y2 = l_s.ycoord2(); - w.set_mode( save); - r = Ray_2(Point_2( RT(x1), RT(y1)), - Point_2( RT(x2), RT(y2))); - w << r; - } - else - { - w.set_mode( save); - } - return w; -} - -template< class R > -Postscript_file_stream& -read(Postscript_file_stream& w, Ray_2& r) -{ - typedef typename R::RT RT; - leda_segment l_s; - if ( w.read( l_s)) - { - double x1 = l_s.xcoord1(); - double y1 = l_s.ycoord1(); - double x2 = l_s.xcoord2(); - double y2 = l_s.ycoord2(); - r = Ray_2(Point_2( RT(x1), RT(y1)), - Point_2( RT(x2), RT(y2))); - } - return w; -} #endif // CGAL_POSTSCRIPT_FILE_STREAM_RAY_2 #endif //CGAL_RAY_2_H @@ -416,143 +269,6 @@ operator<<(Postscript_file_stream& w, const Triangle_2& t) return w; } -template< class R > -Postscript_file_stream& -operator>>(Postscript_file_stream& w, Triangle_2& t) -{ - typedef typename R::RT RT; - double x,y; - int key = 0; -#if ( __LEDA__ < 362 ) - w.state = 1; -#else - w.set_state( 1); -#endif // __LEDA__ < ... - leda_point first, second, third, p; - leda_drawing_mode save = w.set_mode(leda_xor_mode); - if ( !( w >> first)) { w.set_mode( save); return w; } - int save_but[8]; - w.std_buttons(save_but); - key = w.read_mouse_seg( first.xcoord(), first.ycoord(), x, y); - if ( key == MOUSE_BUTTON(3)) - { - w.set_buttons( save_but); - w.set_mode( save); -#if ( __LEDA__ < 362 ) - w.state = 0; -#else - w.set_state( 0); -#endif // __LEDA__ < ... - return w; - } - else - { - w << leda_segment( first.xcoord(), first.ycoord(), x, y); - second = leda_point( x, y); - } - key = w.read_mouse_seg( second.xcoord(), second.ycoord(), x, y); - if ( key == MOUSE_BUTTON(3)) - { - w << leda_segment( first, second ); - w.set_buttons( save_but); - w.set_mode( save); -#if ( __LEDA__ < 362 ) - w.state = 0; -#else - w.set_state( 0); -#endif // __LEDA__ < ... - return w; - } - else - { - w << leda_segment( second.xcoord(), second.ycoord(), x, y); - third = leda_point( x, y); - } - w << leda_segment( first, second ); - w << leda_segment( second, third ); - double x0 = first.xcoord(); - double y0 = first.ycoord(); - double x1 = second.xcoord(); - double y1 = second.ycoord(); - double x2 = third.xcoord(); - double y2 = third.ycoord(); - w.set_mode( save); - w.draw_segment(x0,y0, x1, y1); - w.draw_segment(x1,y1, x2, y2); - w.draw_segment(x2,y2, x0, y0); - - t = Triangle_2(Point_2( RT(x0), RT(y0)), - Point_2( RT(x1), RT(y1)), - Point_2( RT(x2), RT(y2))); - return w; -} - -template< class R > -Postscript_file_stream& -read(Postscript_file_stream& w, Triangle_2& t) -{ - typedef typename R::RT RT; - double x,y; - int key = 0; -#if ( __LEDA__ < 362 ) - w.state = 1; -#else - w.set_state( 1); -#endif // __LEDA__ < ... - leda_point first, second, third, p; - leda_drawing_mode save = w.set_mode(leda_xor_mode); - if ( !( w >> first)) { w.set_mode( save); return w; } - int save_but[8]; - w.std_buttons(save_but); - key = w.read_mouse_seg( first.xcoord(), first.ycoord(), x, y); - if ( key == MOUSE_BUTTON(3)) - { - w.set_buttons( save_but); - w.set_mode( save); -#if ( __LEDA__ < 362 ) - w.state = 0; -#else - w.set_state( 0); -#endif // __LEDA__ < ... - return w; - } - else - { - w << leda_segment( first.xcoord(), first.ycoord(), x, y); - second = leda_point( x, y); - } - key = w.read_mouse_seg( second.xcoord(), second.ycoord(), x, y); - if ( key == MOUSE_BUTTON(3)) - { - w << leda_segment( first, second ); - w.set_buttons( save_but); - w.set_mode( save); -#if ( __LEDA__ < 362 ) - w.state = 0; -#else - w.set_state( 0); -#endif // __LEDA__ < ... - return w; - } - else - { - w << leda_segment( second.xcoord(), second.ycoord(), x, y); - third = leda_point( x, y); - } - w << leda_segment( first, second ); - w << leda_segment( second, third ); - double x0 = first.xcoord(); - double y0 = first.ycoord(); - double x1 = second.xcoord(); - double y1 = second.ycoord(); - double x2 = third.xcoord(); - double y2 = third.ycoord(); - w.set_mode( save); - t = Triangle_2(Point_2( RT(x0), RT(y0)), - Point_2( RT(x1), RT(y1)), - Point_2( RT(x2), RT(y2))); - return w; -} #endif // CGAL_POSTSCRIPT_FILE_STREAM_TRIANGLE_2 #endif // CGAL_TRIANGLE_2_H @@ -570,88 +286,6 @@ operator<<(Postscript_file_stream& w, const Circle_2& c) return w; } -template< class R > -Postscript_file_stream& -operator>>(Postscript_file_stream& w, Circle_2& c) -{ - typedef typename R::RT RT; - double x,y; - int key = 0; -#if ( __LEDA__ < 362 ) - w.state = 1; -#else - w.set_state( 1); -#endif // __LEDA__ < ... - leda_point p; - leda_drawing_mode save = w.set_mode(leda_xor_mode); - if ( !( w.read( p))) { w.set_mode( save); return w; } - double cx = p.xcoord(); - double cy = p.ycoord(); - Point_2 center = Point_2( RT(cx), RT(cy)); - int save_but[8]; - w.std_buttons(save_but); - key = w.read_mouse_circle(cx, cy, x, y); - if ( key == MOUSE_BUTTON(3)) - { - w.set_buttons( save_but); - w.set_mode( save); -#if ( __LEDA__ < 362 ) - w.state = 0; -#else - w.set_state( 0); -#endif // __LEDA__ < ... - return w; - } - double dx = x - cx; - double dy = y - cy; - double sqr = dx*dx+dy*dy; - w.set_mode( save); - w.set_buttons( save_but); - w.draw_circle(cx, cy , sqrt(sqr)); - c = Circle_2(center, RT(sqr)); - return w; -} - -template< class R > -Postscript_file_stream& -read(Postscript_file_stream& w, Circle_2& c) -{ - typedef typename R::RT RT; - double x,y; - int key = 0; -#if ( __LEDA__ < 362 ) - w.state = 1; -#else - w.set_state( 1); -#endif // __LEDA__ < ... - leda_point p; - leda_drawing_mode save = w.set_mode(leda_xor_mode); - if ( !( w.read( p))) { w.set_mode( save); return w; } - double cx = p.xcoord(); - double cy = p.ycoord(); - Point_2 center = Point_2( RT(cx), RT(cy)); - int save_but[8]; - w.std_buttons(save_but); - key = w.read_mouse_circle(cx, cy, x, y); - if ( key == MOUSE_BUTTON(3)) - { - w.set_buttons( save_but); - w.set_mode( save); -#if ( __LEDA__ < 362 ) - w.state = 0; -#else - w.set_state( 0); -#endif // __LEDA__ < ... - return w; - } - double dx = x - cx; - double dy = y - cy; - double sqr = dx*dx+dy*dy; - w.set_mode( save); - w.set_buttons( save_but); - c = Circle_2(center, RT(sqr)); - return w; -} #endif // CGAL_POSTSCRIPT_FILE_STREAM_CIRCLE_2 #endif // CGAL_CIRCLE_2_H @@ -673,80 +307,6 @@ operator<<(Postscript_file_stream& w, const Iso_rectangle_2& r) return w; } -template< class R > -Postscript_file_stream& -operator>>(Postscript_file_stream& w, Iso_rectangle_2& r) -{ - typedef typename R::RT RT; - double x,y; - int key = 0; -#if ( __LEDA__ < 362 ) - w.state = 1; -#else - w.set_state( 1); -#endif // __LEDA__ < ... - leda_point first, second; - leda_drawing_mode save = w.set_mode(leda_xor_mode); - if ( !( w.read( first))) { w.set_mode( save); return w; } - int save_but[8]; - w.std_buttons(save_but); - key = w.read_mouse_rect( first.xcoord(), first.ycoord(), x, y); - if ( key == MOUSE_BUTTON(3)) - { - w.set_buttons( save_but); - w.set_mode( save); -#if ( __LEDA__ < 362 ) - w.state = 0; -#else - w.set_state( 0); -#endif // __LEDA__ < ... - return w; - } - r = Iso_rectangle_2(Point_2( RT(first.xcoord()), - RT(first.ycoord())), - Point_2( RT(x), RT(y))); - w.set_mode( save); - w.draw_rectangle( first.xcoord(), first.ycoord(), x, y); - w.set_buttons( save_but); - return w; -} - -template< class R > -Postscript_file_stream& -read(Postscript_file_stream& w, Iso_rectangle_2& r) -{ - typedef typename R::RT RT; - double x,y; - int key = 0; -#if ( __LEDA__ < 362 ) - w.state = 1; -#else - w.set_state( 1); -#endif // __LEDA__ < ... - leda_point first, second; - leda_drawing_mode save = w.set_mode(leda_xor_mode); - if ( !( w.read( first))) { w.set_mode( save); return w; } - int save_but[8]; - w.std_buttons(save_but); - key = w.read_mouse_rect( first.xcoord(), first.ycoord(), x, y); - if ( key == MOUSE_BUTTON(3)) - { - w.set_buttons( save_but); - w.set_mode( save); -#if ( __LEDA__ < 362 ) - w.state = 0; -#else - w.set_state( 0); -#endif // __LEDA__ < ... - return w; - } - r = Iso_rectangle_2(Point_2( RT(first.xcoord()), - RT(first.ycoord())), - Point_2( RT(x), RT(y))); - w.set_mode( save); - w.set_buttons( save_but); - return w; -} #endif // CGAL_POSTSCRIPT_FILE_STREAM_ISO_RECTANGLE_2 #endif // CGAL_ISO_RECTANGLE_2_H diff --git a/window/include/CGAL/IO/forward_decl_window_stream.h b/window/include/CGAL/IO/forward_decl_window_stream.h index 3de137d7d4a..a81aebbbc5f 100644 --- a/window/include/CGAL/IO/forward_decl_window_stream.h +++ b/window/include/CGAL/IO/forward_decl_window_stream.h @@ -29,7 +29,11 @@ CGAL_BEGIN_NAMESPACE class window; CGAL_END_NAMESPACE #else +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif class leda_window; #endif diff --git a/window/include/CGAL/IO/leda_window.h b/window/include/CGAL/IO/leda_window.h index 6bb097ede43..fcb09d4a744 100644 --- a/window/include/CGAL/IO/leda_window.h +++ b/window/include/CGAL/IO/leda_window.h @@ -28,7 +28,11 @@ #include #include +#if CGAL_LEDA_VERSION < 500 #include +#else +#include +#endif #include CGAL_BEGIN_NAMESPACE