|
From: <ai...@us...> - 2014-01-13 03:27:13
|
Revision: 12938
http://sourceforge.net/p/plplot/code/12938
Author: airwin
Date: 2014-01-13 03:27:10 +0000 (Mon, 13 Jan 2014)
Log Message:
-----------
For C source code replace use of the ENABLE_tk macro (defined only if
the CMake variable ENABLE_tk is true) by the more specifice ENABLE_tkX
macro (only defined if the CMake variables ENABLE_tk and X11_FOUND are
true). The reason for the change is both tcpip.c and
plplot_widgetmodule.c are only viable if X is available.
Modified Paths:
--------------
trunk/bindings/python/plplot_widgetmodule.c
trunk/bindings/tk/tcpip.c
trunk/plplot_config.h.in
Modified: trunk/bindings/python/plplot_widgetmodule.c
===================================================================
--- trunk/bindings/python/plplot_widgetmodule.c 2014-01-13 03:22:38 UTC (rev 12937)
+++ trunk/bindings/python/plplot_widgetmodule.c 2014-01-13 03:27:10 UTC (rev 12938)
@@ -6,7 +6,7 @@
#include "plplot.h"
#include "plplotP.h"
-#ifdef ENABLE_tk
+#ifdef ENABLE_tkX
#include <tcl.h>
#include "pltk.h"
#endif
@@ -15,7 +15,7 @@
#define TRY( E ) if ( !( E ) ) return NULL
-#ifdef ENABLE_tk
+#ifdef ENABLE_tkX
static char doc_Pltk_init[] = "Initialize the Pltk Tcl extension.";
//--------------------------------------------------------------------------
@@ -44,7 +44,7 @@
if ( Pltk_Init( interp ) == TCL_ERROR )
{
- printf( "Initizlization of Pltk Tcl extension failed!\n" );
+ printf( "Initialization of Pltk Tcl extension failed!\n" );
return NULL;
}
@@ -59,7 +59,7 @@
//--------------------------------------------------------------------------
static PyMethodDef plplot_widget_methods[] = {
-#ifdef ENABLE_tk
+#ifdef ENABLE_tkX
{ "Pltk_init", pl_Pltk_init, METH_VARARGS, doc_Pltk_init },
#endif
Modified: trunk/bindings/tk/tcpip.c
===================================================================
--- trunk/bindings/tk/tcpip.c 2014-01-13 03:22:38 UTC (rev 12937)
+++ trunk/bindings/tk/tcpip.c 2014-01-13 03:27:10 UTC (rev 12938)
@@ -63,7 +63,7 @@
#include "plDevs.h"
#include "plConfig.h"
-#if defined ( PLD_tk ) || defined ( ENABLE_tk )
+#if defined ( PLD_tk ) || defined ( ENABLE_tkX )
// This file is meant to be compiled with non-ANSI compilers ("cc").
// The reason for doing it this way is to ensure that the full C
@@ -748,4 +748,4 @@
return 0;
}
-#endif // defined(PLD_tk) || defined (ENABLE_tk)
+#endif // defined(PLD_tk) || defined (ENABLE_tkX)
Modified: trunk/plplot_config.h.in
===================================================================
--- trunk/plplot_config.h.in 2014-01-13 03:22:38 UTC (rev 12937)
+++ trunk/plplot_config.h.in 2014-01-13 03:27:10 UTC (rev 12938)
@@ -78,8 +78,8 @@
// Define to 1 if you have the <itclDecls.h> header file.
#cmakedefine HAVE_ITCLDECLS_H 1
-// Define if Tk is available
-#cmakedefine ENABLE_tk
+// Define if Tk is enabled and X11 has been found.
+#cmakedefine ENABLE_tkX
// Define if [incr], [Tk] is available
#cmakedefine HAVE_ITK
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|