From: <and...@us...> - 2009-07-20 21:12:57
|
Revision: 10169 http://plplot.svn.sourceforge.net/plplot/?rev=10169&view=rev Author: andrewross Date: 2009-07-20 21:12:55 +0000 (Mon, 20 Jul 2009) Log Message: ----------- Big change to clean up the plplot namespace. Now plConfig.h only contains macros which need to be externally visible because they are referenced in plplot.h or are used in the examples. These are all prefaced with PL_ . All other macro definitions which are only used internally reside in config.h. Also, the HAVE_ISINF, HAVE_ISNAN and HAVE_FINITE definitions have PL_ added on the front to remove the redefinition warnings caused by python leaking the HAVE_* macros. Modified Paths: -------------- trunk/bindings/c++/plstream.cc trunk/bindings/tcl/tclAPI.c trunk/bindings/tk/plframe.c trunk/bindings/tk/tcpip.c trunk/bindings/tk-x-plat/plplotter.c trunk/cmake/modules/TestBrokenIsnanCXX.cmake trunk/cmake/modules/TestBrokenIsnanCXX.cxx trunk/cmake/modules/TestForNamespace.cmake trunk/cmake/modules/TestForStdintCXX.cmake trunk/cmake/modules/c++.cmake trunk/cmake/modules/plplot.cmake trunk/cmake/modules/wxwidgets.cmake trunk/config.h.cmake trunk/drivers/tk.c trunk/examples/c/plcdemos.h trunk/examples/c/x01c.c trunk/examples/c/x17c.c trunk/examples/c++/plc++demos.h trunk/examples/c++/x01.cc trunk/examples/c++/x01cc.cc trunk/examples/c++/x02.cc trunk/examples/c++/x03.cc trunk/examples/c++/x04.cc trunk/examples/c++/x05.cc trunk/examples/c++/x06.cc trunk/examples/c++/x07.cc trunk/examples/c++/x08.cc trunk/examples/c++/x09.cc trunk/examples/c++/x10.cc trunk/examples/c++/x11.cc trunk/examples/c++/x12.cc trunk/examples/c++/x13.cc trunk/examples/c++/x14.cc trunk/examples/c++/x15.cc trunk/examples/c++/x16.cc trunk/examples/c++/x17.cc trunk/examples/c++/x18.cc trunk/examples/c++/x19.cc trunk/examples/c++/x20.cc trunk/examples/c++/x21.cc trunk/examples/c++/x22.cc trunk/examples/c++/x23.cc trunk/examples/c++/x26.cc trunk/examples/c++/x27.cc trunk/examples/c++/x28.cc trunk/examples/c++/x29.cc trunk/examples/c++/x30.cc trunk/examples/c++/x31.cc trunk/include/plConfig.h.cmake trunk/include/plplot.h trunk/include/plplotP.h trunk/src/plctrl.c Modified: trunk/bindings/c++/plstream.cc =================================================================== --- trunk/bindings/c++/plstream.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/bindings/c++/plstream.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -31,7 +31,7 @@ #include <iostream> -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/bindings/tcl/tclAPI.c =================================================================== --- trunk/bindings/tcl/tclAPI.c 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/bindings/tcl/tclAPI.c 2009-07-20 21:12:55 UTC (rev 10169) @@ -34,7 +34,7 @@ #include "plplotP.h" #include "pltcl.h" #ifndef __WIN32__ -#ifdef HAVE_UNISTD_H +#ifdef PL_HAVE_UNISTD_H #include <unistd.h> #endif #else Modified: trunk/bindings/tk/plframe.c =================================================================== --- trunk/bindings/tk/plframe.c 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/bindings/tk/plframe.c 2009-07-20 21:12:55 UTC (rev 10169) @@ -54,7 +54,7 @@ #include "plxwd.h" #include "tcpip.h" -#ifdef HAVE_UNISTD_H +#ifdef PL_HAVE_UNISTD_H #include <unistd.h> #endif #include <fcntl.h> Modified: trunk/bindings/tk/tcpip.c =================================================================== --- trunk/bindings/tk/tcpip.c 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/bindings/tk/tcpip.c 2009-07-20 21:12:55 UTC (rev 10169) @@ -93,7 +93,7 @@ #if defined(__sgi) && !defined(SVR3) #include <sys/select.h> #endif -#ifdef HAVE_UNISTD_H +#ifdef PL_HAVE_UNISTD_H #include <unistd.h> #endif Modified: trunk/bindings/tk-x-plat/plplotter.c =================================================================== --- trunk/bindings/tk-x-plat/plplotter.c 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/bindings/tk-x-plat/plplotter.c 2009-07-20 21:12:55 UTC (rev 10169) @@ -82,7 +82,7 @@ #endif #ifndef __WIN32__ -#ifdef HAVE_UNISTD_H +#ifdef PL_HAVE_UNISTD_H #include <unistd.h> #include <fcntl.h> #endif Modified: trunk/cmake/modules/TestBrokenIsnanCXX.cmake =================================================================== --- trunk/cmake/modules/TestBrokenIsnanCXX.cmake 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/cmake/modules/TestBrokenIsnanCXX.cmake 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,14 +28,14 @@ OUTPUT_VARIABLE OUTPUT) IF (CMAKE_BROKEN_ISNAN_CXX) MESSAGE(STATUS "Check for isnan in <cmath> - found") - SET (BROKEN_ISNAN_CXX 0 CACHE INTERNAL + SET (PL_BROKEN_ISNAN_CXX 0 CACHE INTERNAL "Does <cmath> contain isnan") FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log "Determining if <cmake> contains isnan passed with " "the following output:\n${OUTPUT}\n\n") ELSE (CMAKE_BROKEN_ISNAN_CXX) MESSAGE(STATUS "Check for isnan in <cmath> - not found") - SET (BROKEN_ISNAN_CXX 1 CACHE INTERNAL + SET (PL_BROKEN_ISNAN_CXX 1 CACHE INTERNAL "Does <cmath> contain isnan") FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Determining if <cmath> contains isnan failed with " Modified: trunk/cmake/modules/TestBrokenIsnanCXX.cxx =================================================================== --- trunk/cmake/modules/TestBrokenIsnanCXX.cxx 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/cmake/modules/TestBrokenIsnanCXX.cxx 2009-07-20 21:12:55 UTC (rev 10169) @@ -4,7 +4,7 @@ #include <math.h> #endif -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/cmake/modules/TestForNamespace.cmake =================================================================== --- trunk/cmake/modules/TestForNamespace.cmake 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/cmake/modules/TestForNamespace.cmake 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,14 +28,14 @@ OUTPUT_VARIABLE OUTPUT) IF (CMAKE_USE_NAMESPACE) MESSAGE(STATUS "Check for using namespace - found") - SET (USE_NAMESPACE 1 CACHE INTERNAL + SET (PL_USE_NAMESPACE 1 CACHE INTERNAL "Does the compiler support using namespace") FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log "Determining if the CXX compiler has using namespace passed with " "the following output:\n${OUTPUT}\n\n") ELSE (CMAKE_USE_NAMESPACE) MESSAGE(STATUS "Check for using namespace - not found") - SET (USE_NAMESPACE 0 CACHE INTERNAL + SET (PL_USE_NAMESPACE 0 CACHE INTERNAL "Does the compiler support using namespace") FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Determining if the CXX compiler has using namespace failed with " Modified: trunk/cmake/modules/TestForStdintCXX.cmake =================================================================== --- trunk/cmake/modules/TestForStdintCXX.cmake 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/cmake/modules/TestForStdintCXX.cmake 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,14 +28,14 @@ OUTPUT_VARIABLE OUTPUT) if(CMAKE_CXX_STDINT_H) message(STATUS "Check for using stdint.h with CXX compiler - ok") - set(HAVE_CXX_STDINT_H 1 CACHE INTERNAL + set(PL_HAVE_CXX_STDINT_H 1 CACHE INTERNAL "Does the CXX compiler support using stdint.h") file(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log "Determining if the CXX compiler supports using stdint.h passed with " "the following output:\n${OUTPUT}\n\n") else(CMAKE_CXX_STDINT_H) message(STATUS "Check for using stdint.h with CXX compiler - not found") - set(HAVE_CXX_STDINT_H 0 CACHE INTERNAL + set(PL_HAVE_CXX_STDINT_H 0 CACHE INTERNAL "Does the CXX compiler support using stdint.h") file(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Determining if the CXX compiler supports using stdint.h failed with " Modified: trunk/cmake/modules/c++.cmake =================================================================== --- trunk/cmake/modules/c++.cmake 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/cmake/modules/c++.cmake 2009-07-20 21:12:55 UTC (rev 10169) @@ -55,11 +55,11 @@ CHECK_INCLUDE_FILE_CXX(cmath HAVE_CMATH) if(NOT MSVC) - # Need to add check for broken cmath with isnan missing (BROKEN_ISNAN_CXX) + # Need to add check for broken cmath with isnan missing (PL_BROKEN_ISNAN_CXX) # but not for Visual C++ compilers include(TestBrokenIsnanCXX) endif(NOT MSVC) - # Need to add check if stdint.h can be used from c++ (HAVE_CXX_STDINT_H) + # Need to add check if stdint.h can be used from c++ (PL_HAVE_CXX_STDINT_H) INCLUDE(TestForStdintCXX) endif(ENABLE_cxx) Modified: trunk/cmake/modules/plplot.cmake =================================================================== --- trunk/cmake/modules/plplot.cmake 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/cmake/modules/plplot.cmake 2009-07-20 21:12:55 UTC (rev 10169) @@ -151,9 +151,9 @@ endif(NOT STDC_HEADERS) # AC_CHECK_HEADERS(unistd.h termios.h stdint.h) -check_include_files(unistd.h HAVE_UNISTD_H) +check_include_files(unistd.h PL_HAVE_UNISTD_H) check_include_files(termios.h HAVE_TERMIOS_H) -check_include_files(stdint.h HAVE_STDINT_H) +check_include_files(stdint.h PL_HAVE_STDINT_H) # AC_HEADER_SYS_WAIT include(TestForStandardHeaderwait) @@ -213,72 +213,72 @@ check_symbol_exists(finite "math.h" HAVE_FINITE_SYMBOL) if(HAVE_FINITE_SYMBOL) - set(HAVE_FINITE ON) + set(PL_HAVE_FINITE ON) else(HAVE_FINITE_SYMBOL) check_function_exists(finite HAVE_FINITE_FUNCTION) if(HAVE_FINITE_FUNCTION) - set(HAVE_FINITE ON) + set(PL_HAVE_FINITE ON) else(HAVE_FINITE_FUNCTION) check_symbol_exists(_finite "math.h" HAVE__FINITE_SYMBOL) if(HAVE__FINITE_SYMBOL) - set(_HAVE_FINITE ON) + set(PL__HAVE_FINITE ON) else(HAVE__FINITE_SYMBOL) check_function_exists(_finite HAVE__FINITE_FUNCTION) if(HAVE__FINITE_FUNCTION) - set(_HAVE_FINITE ON) + set(PL__HAVE_FINITE ON) endif(HAVE__FINITE_FUNCTION) endif(HAVE__FINITE_SYMBOL) endif(HAVE_FINITE_FUNCTION) endif(HAVE_FINITE_SYMBOL) -if(_HAVE_FINITE) - set(HAVE_FINITE ON) -endif(_HAVE_FINITE) +if(PL__HAVE_FINITE) + set(PL_HAVE_FINITE ON) +endif(PL__HAVE_FINITE) check_symbol_exists(isnan "math.h" HAVE_ISNAN_SYMBOL) if(HAVE_ISNAN_SYMBOL) - set(HAVE_ISNAN ON) + set(PL_HAVE_ISNAN ON) else(HAVE_ISNAN_SYMBOL) check_function_exists(isnan HAVE_ISNAN_FUNCTION) if(HAVE_ISNAN_FUNCTION) - set(HAVE_ISNAN ON) + set(PL_HAVE_ISNAN ON) else(HAVE_ISNAN_FUNCTION) check_symbol_exists(_isnan "math.h" HAVE__ISNAN_SYMBOL) if(HAVE__ISNAN_SYMBOL) - set(_HAVE_ISNAN ON) + set(PL__HAVE_ISNAN ON) else(HAVE__ISNAN_SYMBOL) check_function_exists(_isnan HAVE__ISNAN_FUNCTION) if(HAVE__ISNAN_FUNCTION) - set(_HAVE_ISNAN ON) + set(PL__HAVE_ISNAN ON) endif(HAVE__ISNAN_FUNCTION) endif(HAVE__ISNAN_SYMBOL) endif(HAVE_ISNAN_FUNCTION) endif(HAVE_ISNAN_SYMBOL) -if(_HAVE_ISNAN) - set(HAVE_ISNAN ON) -endif(_HAVE_ISNAN) +if(PL__HAVE_ISNAN) + set(PL_HAVE_ISNAN ON) +endif(PL__HAVE_ISNAN) check_symbol_exists(isinf "math.h" HAVE_ISINF_SYMBOL) if(HAVE_ISINF_SYMBOL) - set(HAVE_ISINF ON) + set(PL_HAVE_ISINF ON) else(HAVE_ISINF_SYMBOL) check_function_exists(isinf HAVE_ISINF_FUNCTION) if(HAVE_ISINF_FUNCTION) - set(HAVE_ISINF ON) + set(PL_HAVE_ISINF ON) else(HAVE_ISINF_FUNCTION) check_symbol_exists(_isinf "math.h" HAVE__ISINF_SYMBOL) if(HAVE__ISINF_SYMBOL) - set(_HAVE_ISINF ON) + set(PL__HAVE_ISINF ON) else(HAVE__ISINF_SYMBOL) check_function_exists(_isinf HAVE__ISINF_FUNCTION) if(HAVE__ISINF_FUNCTION) - set(_HAVE_ISINF ON) + set(PL__HAVE_ISINF ON) endif(HAVE__ISINF_FUNCTION) endif(HAVE__ISINF_SYMBOL) endif(HAVE_ISINF_FUNCTION) endif(HAVE_ISINF_SYMBOL) -if(_HAVE_ISINF) - set(HAVE_ISINF ON) -endif(_HAVE_ISINF) +if(PL__HAVE_ISINF) + set(PL_HAVE_ISINF ON) +endif(PL__HAVE_ISINF) check_function_exists(snprintf PL_HAVE_SNPRINTF) Modified: trunk/cmake/modules/wxwidgets.cmake =================================================================== --- trunk/cmake/modules/wxwidgets.cmake 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/cmake/modules/wxwidgets.cmake 2009-07-20 21:12:55 UTC (rev 10169) @@ -50,7 +50,7 @@ set(PLD_wxwidgets OFF CACHE BOOL "Enable wxwidgets device" FORCE) set(PLD_wxpng OFF CACHE BOOL "Enable wxwidgets png device" FORCE) else(NOT wxWidgets_FOUND) - # Check if stdint.h can be used from c++ (HAVE_CXX_STDINT_H) + # Check if stdint.h can be used from c++ (PL_HAVE_CXX_STDINT_H) include(TestForStdintCXX) endif(NOT wxWidgets_FOUND) endif(PLD_wxwidgets OR PLD_wxpng) Modified: trunk/config.h.cmake =================================================================== --- trunk/config.h.cmake 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/config.h.cmake 2009-07-20 21:12:55 UTC (rev 10169) @@ -10,7 +10,7 @@ #define BIN_DIR "${BIN_DIR}" /* isnan is in math.h but not cmath */ -#cmakedefine BROKEN_ISNAN_CXX +#cmakedefine PL_BROKEN_ISNAN_CXX /* Location of Build tree */ #define BUILD_DIR "${BUILD_DIR}" @@ -28,7 +28,7 @@ #cmakedefine HAVE_CMATH 1 /* Define if you have c++ accessible stdint.h */ -#cmakedefine HAVE_CXX_STDINT_H +#cmakedefine PL_HAVE_CXX_STDINT_H /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. */ @@ -38,10 +38,10 @@ #cmakedefine HAVE_DLFCN_H 1 /* Define if finite is available */ -#cmakedefine HAVE_FINITE +#cmakedefine PL_HAVE_FINITE /* Define if _finite is available */ -#cmakedefine _HAVE_FINITE +#cmakedefine PL__HAVE_FINITE /* Define if [freetype] is available */ #cmakedefine HAVE_FREETYPE @@ -62,16 +62,16 @@ #cmakedefine HAVE_INTTYPES_H 1 /* Define if isinf is available */ -#cmakedefine HAVE_ISINF +#cmakedefine PL_HAVE_ISINF /* Define if _isinf is available */ -#cmakedefine _HAVE_ISINF +#cmakedefine PL__HAVE_ISINF /* Define if isnan is available */ -#cmakedefine HAVE_ISNAN +#cmakedefine PL_HAVE_ISNAN /* Define if _isnan is available */ -#cmakedefine _HAVE_ISNAN +#cmakedefine PL__HAVE_ISNAN /* Define if snprintf is available */ #ifndef PL_HAVE_SNPRINTF @@ -139,7 +139,7 @@ #cmakedefine HAVE_QHULL /* Define to 1 if you have the <stdint.h> header file. */ -#cmakedefine HAVE_STDINT_H 1 +#cmakedefine PL_HAVE_STDINT_H 1 /* Define to 1 if you have the <stdlib.h> header file. */ #cmakedefine HAVE_STDLIB_H 1 @@ -165,7 +165,7 @@ #cmakedefine HAVE_TERMIOS_H 1 /* Define to 1 if you have the <unistd.h> header file. */ -#cmakedefine HAVE_UNISTD_H 1 +#cmakedefine PL_HAVE_UNISTD_H 1 /* Define if usleep is available */ #cmakedefine PL_HAVE_USLEEP @@ -472,7 +472,7 @@ #define TCL_DIR "${TCL_DIR}" /* Define if C++ compiler accepts using namespace */ -#cmakedefine USE_NAMESPACE +#cmakedefine PL_USE_NAMESPACE /* Version number of package */ #define VERSION "${VERSION}" Modified: trunk/drivers/tk.c =================================================================== --- trunk/drivers/tk.c 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/drivers/tk.c 2009-07-20 21:12:55 UTC (rev 10169) @@ -46,7 +46,7 @@ #include "metadefs.h" #include "plevent.h" -#if HAVE_UNISTD_H +#if PL_HAVE_UNISTD_H # include <unistd.h> #endif #include <sys/types.h> Modified: trunk/examples/c/plcdemos.h =================================================================== --- trunk/examples/c/plcdemos.h 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c/plcdemos.h 2009-07-20 21:12:55 UTC (rev 10169) @@ -39,4 +39,16 @@ #define ROUND(a) (PLINT)((a)<0. ? ((a)-.5) : ((a)+.5)) #endif +/* Add in missing isnan definition if required */ +#if defined(PL__HAVE_ISNAN) +# define isnan _isnan +# if defined(_MSC_VER) +# include <float.h> +# endif +#endif + +#if !defined(PL_HAVE_ISNAN) +# define isnan(x) ((x) != (x)) +#endif + #endif /* __PLCDEMOS_H__ */ Modified: trunk/examples/c/x01c.c =================================================================== --- trunk/examples/c/x01c.c 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c/x01c.c 2009-07-20 21:12:55 UTC (rev 10169) @@ -24,7 +24,7 @@ #include "plcdemos.h" #include "plevent.h" -#ifdef HAVE_UNISTD_H +#ifdef PL_HAVE_UNISTD_H # include <unistd.h> #endif Modified: trunk/examples/c/x17c.c =================================================================== --- trunk/examples/c/x17c.c 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c/x17c.c 2009-07-20 21:12:55 UTC (rev 10169) @@ -5,10 +5,10 @@ #include "plcdemos.h" #include <stdlib.h> -#ifdef HAVE_UNISTD_H +#ifdef PL_HAVE_UNISTD_H # include <unistd.h> #else -# ifdef HAS_POLL +# ifdef PL_HAVE_POLL # include <poll.h> # endif #endif @@ -130,7 +130,7 @@ #ifdef PL_HAVE_USLEEP usleep(10000); /* wait a little (10 ms) to simulate time elapsing */ #else -# ifdef HAS_POLL +# ifdef PL_HAVE_POLL poll(0,0,10); # else { int i; for( i=0; i<1000000; i++ ); } Modified: trunk/examples/c++/plc++demos.h =================================================================== --- trunk/examples/c++/plc++demos.h 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/plc++demos.h 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,4 +28,16 @@ #define ROUND(a) (PLINT)((a)<0. ? ((a)-0.5) : ((a)+0.5)) #endif +/* Add in missing isnan definition if required */ +#if defined(PL__HAVE_ISNAN) +# define isnan _isnan +# if defined(_MSC_VER) +# include <float.h> +# endif +#endif + +#if !defined(PL_HAVE_ISNAN) +# define isnan(x) ((x) != (x)) +#endif + #endif /* __PLCXXDEMOS_H__ */ Modified: trunk/examples/c++/x01.cc =================================================================== --- trunk/examples/c++/x01.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x01.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -31,11 +31,11 @@ #include "plevent.h" #include <cctype> -#ifdef HAVE_UNISTD_H +#ifdef PL_HAVE_UNISTD_H #include <unistd.h> #endif -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x01cc.cc =================================================================== --- trunk/examples/c++/x01cc.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x01cc.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -32,7 +32,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x02.cc =================================================================== --- trunk/examples/c++/x02.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x02.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x03.cc =================================================================== --- trunk/examples/c++/x03.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x03.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x04.cc =================================================================== --- trunk/examples/c++/x04.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x04.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x05.cc =================================================================== --- trunk/examples/c++/x05.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x05.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x06.cc =================================================================== --- trunk/examples/c++/x06.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x06.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x07.cc =================================================================== --- trunk/examples/c++/x07.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x07.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x08.cc =================================================================== --- trunk/examples/c++/x08.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x08.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x09.cc =================================================================== --- trunk/examples/c++/x09.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x09.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x10.cc =================================================================== --- trunk/examples/c++/x10.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x10.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x11.cc =================================================================== --- trunk/examples/c++/x11.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x11.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x12.cc =================================================================== --- trunk/examples/c++/x12.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x12.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x13.cc =================================================================== --- trunk/examples/c++/x13.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x13.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x14.cc =================================================================== --- trunk/examples/c++/x14.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x14.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x15.cc =================================================================== --- trunk/examples/c++/x15.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x15.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x16.cc =================================================================== --- trunk/examples/c++/x16.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x16.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x17.cc =================================================================== --- trunk/examples/c++/x17.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x17.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -27,15 +27,15 @@ //---------------------------------------------------------------------------// #include "plc++demos.h" -#ifdef HAVE_UNISTD_H +#ifdef PL_HAVE_UNISTD_H # include <unistd.h> #else -# ifdef HAS_POLL +# ifdef PL_HAVE_POLL # include <poll.h> # endif #endif -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif @@ -153,7 +153,7 @@ #ifdef PL_HAVE_USLEEP usleep(10000); /* wait a little (10 ms) to simulate time elapsing */ #else -# ifdef HAS_POLL +# ifdef PL_HAVE_POLL poll(0,0,10); # else { int i; for( i=0; i<1000000; i++ ); } Modified: trunk/examples/c++/x18.cc =================================================================== --- trunk/examples/c++/x18.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x18.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x19.cc =================================================================== --- trunk/examples/c++/x19.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x19.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x20.cc =================================================================== --- trunk/examples/c++/x20.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x20.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -30,7 +30,7 @@ #include "plevent.h" #include <fstream> -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x21.cc =================================================================== --- trunk/examples/c++/x21.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x21.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -29,11 +29,11 @@ #include "plc++demos.h" // Need for some Mac OSX systems with broken <cmath> header -#ifdef BROKEN_ISNAN_CXX +#ifdef PL_BROKEN_ISNAN_CXX extern "C" int isnan (double); #endif -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x22.cc =================================================================== --- trunk/examples/c++/x22.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x22.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x23.cc =================================================================== --- trunk/examples/c++/x23.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x23.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -29,7 +29,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x26.cc =================================================================== --- trunk/examples/c++/x26.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x26.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -64,7 +64,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x27.cc =================================================================== --- trunk/examples/c++/x27.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x27.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -1,5 +1,5 @@ //---------------------------------------------------------------------------// -// $Id:$ +// $Id$ // Drawing "spirograph" curves - epitrochoids, cycolids, roulettes //---------------------------------------------------------------------------// // @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x28.cc =================================================================== --- trunk/examples/c++/x28.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x28.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -24,7 +24,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x29.cc =================================================================== --- trunk/examples/c++/x29.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x29.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -23,7 +23,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x30.cc =================================================================== --- trunk/examples/c++/x30.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x30.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -28,7 +28,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/examples/c++/x31.cc =================================================================== --- trunk/examples/c++/x31.cc 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/examples/c++/x31.cc 2009-07-20 21:12:55 UTC (rev 10169) @@ -24,7 +24,7 @@ #include "plc++demos.h" -#ifdef USE_NAMESPACE +#ifdef PL_USE_NAMESPACE using namespace std; #endif Modified: trunk/include/plConfig.h.cmake =================================================================== --- trunk/include/plConfig.h.cmake 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/include/plConfig.h.cmake 2009-07-20 21:12:55 UTC (rev 10169) @@ -41,44 +41,20 @@ # include <config.h> #endif -/* Define if dynamic drivers are enabled.*/ -#cmakedefine ENABLE_DYNDRIVERS +/* Define if you have c++ accessible stdint.h */ +#cmakedefine PL_HAVE_CXX_STDINT_H -/* Define if [incr Tcl] is available */ -#cmakedefine HAVE_ITCL - -/* Define if [incr Tk] is available */ -#cmakedefine HAVE_ITK - -/* Define if [freetype] is available */ -#cmakedefine HAVE_FREETYPE - -/* Define if finite is available */ -#cmakedefine HAVE_FINITE - -/* Define if _finite is available */ -#cmakedefine _HAVE_FINITE - /* Define if isinf is available */ -#cmakedefine HAVE_ISINF +#cmakedefine PL_HAVE_ISNAN /* Define if _isinf is available */ -#cmakedefine _HAVE_ISINF +#cmakedefine PL__HAVE_ISNAN -/* Define if isnan is available */ -#cmakedefine HAVE_ISNAN - -/* Define if _isnan is available */ -#cmakedefine _HAVE_ISNAN - -/* Define if you have c++ accessible stdint.h */ -#cmakedefine HAVE_CXX_STDINT_H - /* Define to 1 if you have the <stdint.h> header file. */ -#cmakedefine HAVE_STDINT_H 1 +#cmakedefine PL_HAVE_STDINT_H 1 /* Define to 1 if you have the <unistd.h> header file. */ -#cmakedefine HAVE_UNISTD_H 1 +#cmakedefine PL_HAVE_UNISTD_H 1 /* Define if usleep is available */ #cmakedefine PL_HAVE_USLEEP @@ -87,13 +63,10 @@ #cmakedefine PL_DOUBLE /* Define if C++ compiler accepts using namespace */ -#cmakedefine USE_NAMESPACE +#cmakedefine PL_USE_NAMESPACE -/* Define to 1 if <cmath> header file is available */ -#cmakedefine HAVE_CMATH 1 - /* Define if isnan is present in <math.h> but not in <cmath> * - broken Mac OSX systems */ -#cmakedefine BROKEN_ISNAN_CXX +#cmakedefine PL_BROKEN_ISNAN_CXX #endif /* __PLCONFIG_H__ */ Modified: trunk/include/plplot.h =================================================================== --- trunk/include/plplot.h 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/include/plplot.h 2009-07-20 21:12:55 UTC (rev 10169) @@ -154,8 +154,8 @@ #define PLFLT_MIN FLT_MIN #endif -#if (defined(HAVE_STDINT_H) && !defined(__cplusplus)) ||\ -(defined(__cplusplus) && defined(HAVE_CXX_STDINT_H)) +#if (defined(PL_HAVE_STDINT_H) && !defined(__cplusplus)) ||\ +(defined(__cplusplus) && defined(PL_HAVE_CXX_STDINT_H)) #include <stdint.h> /* This is apparently portable if stdint.h exists. */ typedef uint32_t PLUINT; @@ -195,42 +195,6 @@ typedef void* PLPointer; /*--------------------------------------------------------------------------*\ - * Add in missing isnan / isinf functions on some platforms -\*--------------------------------------------------------------------------*/ - -#if defined(_HAVE_ISNAN) -# define isnan _isnan -# if defined(_MSC_VER) -# include <float.h> -# endif -#endif -#if defined(_HAVE_ISINF) -# define isinf _isinf -#endif -#if defined(_HAVE_FINITE) -# define finite _finite -#endif - -/* Note these replacements follow the old BSD convention and not - * C99. In particular isinf does not distinguish +/- inf. */ -#if !defined(HAVE_ISNAN) -# define isnan(x) ((x) != (x)) -#endif -#if !defined(HAVE_ISINF) -# define isinf(x) (!isnan(x) && isnan(x-x)) -#endif -#if !defined(HAVE_FINITE) -# define finite(x) (!isnan(x-x)) -#endif - -/* Check if C99 HUGE_VAL macro is available - if not then - * define a replacement */ -#ifndef HUGE_VAL -#define HUGE_VAL (1.0/0.0) -#endif - - -/*--------------------------------------------------------------------------*\ * Complex data types and other good stuff \*--------------------------------------------------------------------------*/ Modified: trunk/include/plplotP.h =================================================================== --- trunk/include/plplotP.h 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/include/plplotP.h 2009-07-20 21:12:55 UTC (rev 10169) @@ -241,6 +241,41 @@ #endif /* PL_HAVE_SNPRINTF */ /*--------------------------------------------------------------------------*\ + * Add in missing isnan / isinf functions on some platforms +\*--------------------------------------------------------------------------*/ + +#if defined(PL__HAVE_ISNAN) +# define isnan _isnan +# if defined(_MSC_VER) +# include <float.h> +# endif +#endif +#if defined(PL__HAVE_ISINF) +# define isinf _isinf +#endif +#if defined(PL__HAVE_FINITE) +# define finite _finite +#endif + +/* Note these replacements follow the old BSD convention and not + * C99. In particular isinf does not distinguish +/- inf. */ +#if !defined(PL_HAVE_ISNAN) +# define isnan(x) ((x) != (x)) +#endif +#if !defined(PL_HAVE_ISINF) +# define isinf(x) (!isnan(x) && isnan(x-x)) +#endif +#if !defined(PL_HAVE_FINITE) +# define finite(x) (!isnan(x-x)) +#endif + +/* Check if C99 HUGE_VAL macro is available - if not then + * define a replacement */ +#ifndef HUGE_VAL +#define HUGE_VAL (1.0/0.0) +#endif + +/*--------------------------------------------------------------------------*\ * PLPLOT control macros \*--------------------------------------------------------------------------*/ Modified: trunk/src/plctrl.c =================================================================== --- trunk/src/plctrl.c 2009-07-20 19:46:03 UTC (rev 10168) +++ trunk/src/plctrl.c 2009-07-20 21:12:55 UTC (rev 10169) @@ -44,7 +44,7 @@ #ifdef __unix #include <sys/types.h> #include <sys/stat.h> -#ifdef HAVE_UNISTD_H +#ifdef PL_HAVE_UNISTD_H #include <unistd.h> #endif #include <errno.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |