You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(33) |
Jun
|
Jul
(30) |
Aug
(2) |
Sep
|
Oct
(30) |
Nov
(136) |
Dec
(59) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(255) |
Feb
(169) |
Mar
(322) |
Apr
(185) |
May
(33) |
Jun
(89) |
Jul
(47) |
Aug
(59) |
Sep
(40) |
Oct
(31) |
Nov
(74) |
Dec
(84) |
2002 |
Jan
(163) |
Feb
(78) |
Mar
(23) |
Apr
(5) |
May
(22) |
Jun
(75) |
Jul
(143) |
Aug
(48) |
Sep
(111) |
Oct
(58) |
Nov
(124) |
Dec
(278) |
2003 |
Jan
(106) |
Feb
(276) |
Mar
(354) |
Apr
(97) |
May
(14) |
Jun
(3) |
Jul
(7) |
Aug
(21) |
Sep
(83) |
Oct
(110) |
Nov
(3) |
Dec
(119) |
2004 |
Jan
(318) |
Feb
(409) |
Mar
(68) |
Apr
(23) |
May
(105) |
Jun
(147) |
Jul
(69) |
Aug
(53) |
Sep
(23) |
Oct
(14) |
Nov
(15) |
Dec
(63) |
2005 |
Jan
(146) |
Feb
(69) |
Mar
(157) |
Apr
(127) |
May
(166) |
Jun
(8) |
Jul
(5) |
Aug
(3) |
Sep
(8) |
Oct
(17) |
Nov
(29) |
Dec
(34) |
2006 |
Jan
(3) |
Feb
(4) |
Mar
(1) |
Apr
(70) |
May
(241) |
Jun
(82) |
Jul
(344) |
Aug
(196) |
Sep
(87) |
Oct
(57) |
Nov
(121) |
Dec
(86) |
2007 |
Jan
(60) |
Feb
(67) |
Mar
(102) |
Apr
(28) |
May
(13) |
Jun
(29) |
Jul
(38) |
Aug
(56) |
Sep
(91) |
Oct
(89) |
Nov
(50) |
Dec
(68) |
2008 |
Jan
(87) |
Feb
(47) |
Mar
(100) |
Apr
(34) |
May
(65) |
Jun
(54) |
Jul
(98) |
Aug
(128) |
Sep
(109) |
Oct
(141) |
Nov
(40) |
Dec
(206) |
2009 |
Jan
(176) |
Feb
(226) |
Mar
(134) |
Apr
(84) |
May
(152) |
Jun
(85) |
Jul
(91) |
Aug
(153) |
Sep
(141) |
Oct
(59) |
Nov
(87) |
Dec
(75) |
2010 |
Jan
(58) |
Feb
(41) |
Mar
(51) |
Apr
(74) |
May
(81) |
Jun
(39) |
Jul
(30) |
Aug
(43) |
Sep
(76) |
Oct
(59) |
Nov
(62) |
Dec
(52) |
2011 |
Jan
(125) |
Feb
(41) |
Mar
(96) |
Apr
(53) |
May
(21) |
Jun
(23) |
Jul
(48) |
Aug
(71) |
Sep
(37) |
Oct
(81) |
Nov
(60) |
Dec
(32) |
2012 |
Jan
(51) |
Feb
(23) |
Mar
|
Apr
(8) |
May
(2) |
Jun
|
Jul
(8) |
Aug
(25) |
Sep
(4) |
Oct
(32) |
Nov
(17) |
Dec
(2) |
2013 |
Jan
(8) |
Feb
(2) |
Mar
(9) |
Apr
(9) |
May
(37) |
Jun
(48) |
Jul
(63) |
Aug
(42) |
Sep
(59) |
Oct
(83) |
Nov
(141) |
Dec
(133) |
2014 |
Jan
(57) |
Feb
(58) |
Mar
(58) |
Apr
(25) |
May
(14) |
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <and...@us...> - 2013-11-27 12:11:38
|
Revision: 12764 http://sourceforge.net/p/plplot/code/12764 Author: andrewross Date: 2013-11-27 12:11:34 +0000 (Wed, 27 Nov 2013) Log Message: ----------- Implement null arguments for plsvect for swig generated bindings. Modified Paths: -------------- trunk/bindings/java/plplotjavac.i trunk/bindings/lua/plplotluac.i trunk/bindings/octave/plplot_octave.i trunk/bindings/python/plplotcmodule.i trunk/bindings/swig-support/plplotcapi.i Modified: trunk/bindings/java/plplotjavac.i =================================================================== --- trunk/bindings/java/plplotjavac.i 2013-11-27 11:43:57 UTC (rev 12763) +++ trunk/bindings/java/plplotjavac.i 2013-11-27 12:11:34 UTC (rev 12764) @@ -716,6 +716,43 @@ return $jnicall; } +// trailing count, and check consistency with previous +%typemap( in ) ( const PLFLT * ArrayCkNull, PLINT n ) +{ + if ( $input != NULL ) + { + jPLFLT *jydata = ( *jenv )->GetPLFLTArrayElements( jenv, $input, 0 ); + $2 = ( *jenv )->GetArrayLength( jenv, $input ); + if ( ( *jenv )->GetArrayLength( jenv, $input ) != Alen ) + { + printf( "Vectors must be same length.\n" ); + return; + } + setup_array_1d_PLFLT( &$1, jydata, Alen ); + ( *jenv )->ReleasePLFLTArrayElements( jenv, $input, jydata, 0 ); + } + else + { + $1 = NULL; + $2 = 0; + } +} +%typemap( freearg ) ( const PLFLT * ArrayCkNull, PLINT n ) +{ + if ( $1 != NULL ) + free( $1 ); + +} +%typemap( jni ) ( const PLFLT * ArrayCkNull, PLINT n ) jPLFLTArray +%typemap( jtype ) ( const PLFLT * ArrayCkNull, PLINT n ) jPLFLTbracket +%typemap( jstype ) ( const PLFLT * ArrayCkNull, PLINT n ) jPLFLTbracket +%typemap( javain ) ( const PLFLT * ArrayCkNull, PLINT n ) "$javainput" +%typemap( javaout ) ( const PLFLT * ArrayCkNull, PLINT n ) +{ + return $jnicall; +} + + // no count, but check consistency with previous or NULL %typemap( in ) const PLFLT * ArrayCkNull { if ( $input != NULL ) @@ -863,6 +900,34 @@ return $jnicall; } + +// with no trailing count +%typemap( in ) const PLFLT * ArrayNull { + if ( $input != NULL ) + { + jPLFLT *jxdata = ( *jenv )->GetPLFLTArrayElements( jenv, $input, 0 ); + Alen = ( *jenv )->GetArrayLength( jenv, $input ); + setup_array_1d_PLFLT( &$1, jxdata, Alen ); + ( *jenv )->ReleasePLFLTArrayElements( jenv, $input, jxdata, 0 ); + } + else + { + $1 = NULL; + Alen = 0; + } +} +%typemap( freearg ) const PLFLT * ArrayNull { + if ( $1 != NULL ) + free( $1 ); +} +%typemap( jni ) const PLFLT * ArrayNull jPLFLTArray +%typemap( jtype ) const PLFLT * ArrayNull jPLFLTbracket +%typemap( jstype ) const PLFLT * ArrayNull jPLFLTbracket +%typemap( javain ) const PLFLT * ArrayNull "$javainput" +%typemap( javaout ) const PLFLT * ArrayNull { + return $jnicall; +} + // check consistency with X dimension of previous %typemap( in ) const PLFLT * ArrayCkX { jPLFLT *jxdata = ( *jenv )->GetPLFLTArrayElements( jenv, $input, 0 ); Modified: trunk/bindings/lua/plplotluac.i =================================================================== --- trunk/bindings/lua/plplotluac.i 2013-11-27 11:43:57 UTC (rev 12763) +++ trunk/bindings/lua/plplotluac.i 2013-11-27 12:11:34 UTC (rev 12764) @@ -176,14 +176,21 @@ // No count but check consistency with previous, or NULL %typemap( in ) const PLINT * ArrayCkNull( int temp ) { - $1 = (PLINT *) LUA_get_int_num_array_var( L, $input, &temp ); - if ( !$1 ) - SWIG_fail; - if ( temp != Alen ) + if ( lua_isnil( L, $input ) ) { - lua_pushfstring( L, "Tables must be of same length." ); - SWIG_fail; + $1 = NULL; } + else + { + $1 = (PLINT *) LUA_get_int_num_array_var( L, $input, &temp ); + if ( !$1 ) + SWIG_fail; + if ( temp != Alen ) + { + lua_pushfstring( L, "Tables must be of same length." ); + SWIG_fail; + } + } } %typemap( freearg ) const PLINT * ArrayCkNull { LUA_FREE_ARRAY( $1 ); } %typemap( default ) const PLINT * ArrayCkNull { $1 = NULL; } @@ -204,14 +211,21 @@ %typemap( in ) const PLINT * ArrayCkMinus1Null( int temp ) { - $1 = (PLINT *) LUA_get_int_num_array_var( L, $input, &temp ); - if ( !$1 ) - SWIG_fail; - if ( temp < Alen - 1 ) + if ( lua_isnil( L, $input ) ) { - lua_pushfstring( L, "Tables must be at least length of others minus 1." ); - SWIG_fail; + $1 = NULL; } + else + { + $1 = (PLINT *) LUA_get_int_num_array_var( L, $input, &temp ); + if ( !$1 ) + SWIG_fail; + if ( temp < Alen - 1 ) + { + lua_pushfstring( L, "Tables must be at least length of others minus 1." ); + SWIG_fail; + } + } } %typemap( freearg ) const PLINT * ArrayCkMinus1Null { LUA_FREE_ARRAY( $1 ); } %typemap( default ) const PLINT * ArrayCkMinus1Null { $1 = NULL; } @@ -295,6 +309,33 @@ } +// Trailing count and check consistency with previous +%typemap( in ) ( const PLFLT * ArrayCkNull, PLINT n ) +{ + int temp = 0; + if ( lua_isnil( L, $input ) ) + { + $1 = NULL; + } + else + { + $1 = (PLFLT *) LUA_get_double_num_array_var( L, $input, &temp ); + if ( !$1 ) + SWIG_fail; + if ( temp != Alen ) + { + lua_pushfstring( L, "Tables must be of same length." ); + SWIG_fail; + } + } + $2 = temp; +} +%typemap( freearg ) ( const PLFLT * ArrayCkNull, PLINT n ) +{ + LUA_FREE_ARRAY( $1 ); +} + + // no count, but check consistency with previous %typemap( in ) const PLFLT * ArrayCk( int temp ) { @@ -313,14 +354,21 @@ // no count, but check consistency with previous, or NULL %typemap( in ) const PLFLT * ArrayCkNull( int temp ) { - $1 = (PLFLT *) LUA_get_double_num_array_var( L, $input, &temp ); - if ( !$1 ) - SWIG_fail; - if ( temp != Alen ) + if ( lua_isnil( L, $input ) ) { - lua_pushfstring( L, "Tables must be of same length." ); - SWIG_fail; + $1 = NULL; } + else + { + $1 = (PLFLT *) LUA_get_double_num_array_var( L, $input, &temp ); + if ( !$1 ) + SWIG_fail; + if ( temp != Alen ) + { + lua_pushfstring( L, "Tables must be of same length." ); + SWIG_fail; + } + } } %typemap( freearg ) const PLFLT * ArrayCkNull { LUA_FREE_ARRAY( $1 ); } @@ -337,6 +385,28 @@ { LUA_FREE_ARRAY( $1 ); } + +// No length but remember size to check others +%typemap( in ) const PLFLT * ArrayNull { + int temp; + if ( lua_isnil( L, $input ) ) + { + $1 = NULL; + Alen = 0; + } + else + { + $1 = (PLFLT *) LUA_get_double_num_array_var( L, $input, &temp ); + if ( !$1 ) + SWIG_fail; + Alen = temp; + } +} +%typemap( freearg ) ( const PLFLT * Array ) +{ + LUA_FREE_ARRAY( $1 ); +} + %typemap( default ) const PLFLT * ArrayCkNull { $1 = NULL; } // with trailing count Modified: trunk/bindings/octave/plplot_octave.i =================================================================== --- trunk/bindings/octave/plplot_octave.i 2013-11-27 11:43:57 UTC (rev 12763) +++ trunk/bindings/octave/plplot_octave.i 2013-11-27 12:11:34 UTC (rev 12764) @@ -401,6 +401,33 @@ { } +// With trailing count and check consistency with previous +%typemap( in ) ( const PLFLT * ArrayCkNull, PLINT n ) ( Matrix temp ) +{ + if ( _n_dims( $input ) > 1 ) + { + error( "argument must be a scalar or vector" ); SWIG_fail; + } + if ( !$input.is_empty() ) + { + if ( _dim( $input, 0 ) != Alen ) + { + error( "argument vectors must be same length" ); SWIG_fail; + } + temp = $input.matrix_value(); + $1 = &temp( 0, 0 ); + $2 = (PLINT) ( _dim( $input, 0 ) ); + } + else + { + $1 = NULL; + $2 = 0; + } +} +%typemap( freearg ) ( const PLFLT * ArrayCkNull, PLINT n ) +{ +} + // No count but check consistency with previous %typemap( in ) const PLFLT * ArrayCk( Matrix temp ) { @@ -472,6 +499,29 @@ { } +// No count but remember size to check others +%typemap( in ) const PLFLT * ArrayNull( Matrix temp ) +{ + if ( _n_dims( $input ) > 1 ) + { + error( "argument must be a scalar or vector" ); SWIG_fail; + } + if ( !$input.is_empty() ) + { + Alen = (PLINT) ( _dim( $input, 0 ) ); + temp = $input.matrix_value(); + $1 = &temp( 0, 0 ); + } + else + { + $1 = NULL; + Alen = 0; + } +} +%typemap( freearg ) ( const PLFLT * ArrayNull ) +{ +} + // With trailing count but remember size to check others %typemap( in ) ( const PLFLT * Array, PLINT n ) ( Matrix temp ) { Modified: trunk/bindings/python/plplotcmodule.i =================================================================== --- trunk/bindings/python/plplotcmodule.i 2013-11-27 11:43:57 UTC (rev 12763) +++ trunk/bindings/python/plplotcmodule.i 2013-11-27 12:11:34 UTC (rev 12764) @@ -327,6 +327,33 @@ Py_CLEAR( tmp$argnum ); } +// trailing count and check consistency with previous +%typemap( in ) ( const PLFLT * ArrayCkNull, PLINT n ) ( PyArrayObject * tmp = NULL ) +{ + if ( $input != Py_None ) + { + tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 ); + if ( tmp == NULL ) + return NULL; + if ( PyArray_DIMS( tmp )[0] != Alen ) + { + PyErr_SetString( PyExc_ValueError, "Vectors must be same length." ); + return NULL; + } + $1 = (PLFLT *) PyArray_DATA( tmp ); + $2 = PyArray_DIMS( tmp )[0]; + } + else + { + $1 = NULL; + $2 = 0; + } +} +%typemap( freearg ) ( const PLFLT * ArrayCkNull, PLINT n ) +{ + Py_CLEAR( tmp$argnum ); +} + // no count, but check consistency with previous %typemap( in ) const PLFLT * ArrayCk( PyArrayObject * tmp = NULL ) { @@ -345,6 +372,8 @@ // no count, but check consistency with previous, or NULL %typemap( in ) const PLFLT * ArrayCkNull( PyArrayObject * tmp = NULL ) { + if ( $input != Py_None ) + { tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 ); if ( tmp == NULL ) return NULL; @@ -354,6 +383,11 @@ return NULL; } $1 = (PLFLT *) PyArray_DATA( tmp ); + } + else + { + $1 = NULL; + } } %typemap( freearg ) const PLFLT * ArrayCkNull { Py_CLEAR( tmp$argnum );} @@ -465,6 +499,26 @@ } %typemap( freearg ) const PLFLT * Array { Py_CLEAR( tmp$argnum );} + +// with no count +%typemap( in ) const PLFLT * ArrayNull( PyArrayObject * tmp = NULL ) +{ + if ( $input != Py_None ) + { + tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 ); + if ( tmp == NULL ) + return NULL; + Alen = PyArray_DIMS( tmp )[0]; + $1 = (PLFLT *) PyArray_DATA( tmp ); + } + else + { + $1 = NULL; + Alen = 0; + } +} +%typemap( freearg ) const PLFLT * ArrayNull { Py_CLEAR( tmp$argnum );} + // 2D array with trailing dimensions, check consistency with previous %typemap( in ) ( const PLFLT * *MatrixCk, PLINT nx, PLINT ny ) ( PyArrayObject * tmp = NULL ) { Modified: trunk/bindings/swig-support/plplotcapi.i =================================================================== --- trunk/bindings/swig-support/plplotcapi.i 2013-11-27 11:43:57 UTC (rev 12763) +++ trunk/bindings/swig-support/plplotcapi.i 2013-11-27 12:11:34 UTC (rev 12764) @@ -764,7 +764,7 @@ plstyl( PLINT n, const PLINT *Array, const PLINT *ArrayCk ); void -plsvect( const PLFLT *Array, const PLFLT *ArrayCk, PLINT n, PLBOOL fill ); +plsvect( const PLFLT *ArrayNull, const PLFLT *ArrayCkNull, PLINT n, PLBOOL fill ); void plsvpa( PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-11-27 11:44:01
|
Revision: 12763 http://sourceforge.net/p/plplot/code/12763 Author: andrewross Date: 2013-11-27 11:43:57 +0000 (Wed, 27 Nov 2013) Log Message: ----------- With transform need to set rect = 0 since rectangles are not mapped to rectangles any more. Modified Paths: -------------- trunk/examples/c/x22c.c trunk/examples/c++/x22.cc Modified: trunk/examples/c/x22c.c =================================================================== --- trunk/examples/c/x22c.c 2013-11-27 08:41:24 UTC (rev 12762) +++ trunk/examples/c/x22c.c 2013-11-27 11:43:57 UTC (rev 12763) @@ -250,7 +250,7 @@ plcol0( 2 ); plshades( (const PLFLT * const *) u, nx, ny, NULL, xmin + dx / 2, xmax - dx / 2, ymin + dy / 2, ymax - dy / 2, - clev, nc, 0, 1, 1.0, plfill, 1, NULL, NULL ); + clev, nc, 0.0, 1, 1.0, plfill, 0, NULL, NULL ); plvect( (const PLFLT * const *) u, (const PLFLT * const *) v, nx, ny, -1.0, pltr2, (void *) &cgrid2 ); // Plot edges using plpath (which accounts for coordinate transformation) rather than plline Modified: trunk/examples/c++/x22.cc =================================================================== --- trunk/examples/c++/x22.cc 2013-11-27 08:41:24 UTC (rev 12762) +++ trunk/examples/c++/x22.cc 2013-11-27 11:43:57 UTC (rev 12763) @@ -211,7 +211,7 @@ pls->col0( 2 ); pls->shades( (const PLFLT * const *) u, nx, ny, NULL, xmin + dx / 2, xmax - dx / 2, ymin + dy / 2, ymax - dy / 2, - clev, nc, 0, 1, 1.0, plstream::fill, 1, NULL, NULL ); + clev, nc, 0, 1, 1.0, plstream::fill, 0, NULL, NULL ); pls->vect( (const PLFLT * const *) u, (const PLFLT * const *) v, nx, ny, -1.0, plstream::tr2, (void *) &cgrid2 ); // Plot edges using plpath (which accounts for coordinate transformation) rather than plline This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arj...@us...> - 2013-11-27 08:41:28
|
Revision: 12762 http://sourceforge.net/p/plplot/code/12762 Author: arjenmarkus Date: 2013-11-27 08:41:24 +0000 (Wed, 27 Nov 2013) Log Message: ----------- Insert a column break every 30 pages, mostly useful for example 33, as this has 100 pages in total. Some small glitch is left (first column runs from page 1 to 29, the next one from 30 to 59, so one more page), still the menu is now useable even with example 33. Modified Paths: -------------- trunk/drivers/ntk.c Modified: trunk/drivers/ntk.c =================================================================== --- trunk/drivers/ntk.c 2013-11-27 08:39:29 UTC (rev 12761) +++ trunk/drivers/ntk.c 2013-11-27 08:41:24 UTC (rev 12762) @@ -122,14 +122,17 @@ static void create_canvas( PLStream *pls ) { + int columnbreak; + ccanv++; + columnbreak = (ccanv%30 == 0); // create new canvas sprintf( cmd, "set ccanv %d; canvas $plf.f2.c$ccanv -width $xmax -height $ymax -background #%02x%02x%02x -xscrollcommand \"$hs set\" -yscrollcommand \"$vs set\" -scrollregion \"0 0 $xmax $ymax\"", ccanv, pls->cmap0[0].r, pls->cmap0[0].g, pls->cmap0[0].b ); tk_cmd( cmd ); // add new canvas to option menu - sprintf( cmd, "$plf.f1.mb.menu add command -label \"Page $ccanv\" -command {\n" + sprintf( cmd, "$plf.f1.mb.menu add command -label \"Page $ccanv\" -columnbreak %d -command {\n" "set w $plf.f2.c%d;\n" "$hs configure -command \"$w xview\";\n" "$vs configure -command \"$w yview\";\n" @@ -141,7 +144,7 @@ "$hs set $i $j;\n" "scan [$w yview] \"%%f %%f\" i j;\n" "$vs set $i $j;}", - ccanv, ccanv, ccanv ); + columnbreak, ccanv, ccanv, ccanv ); tk_cmd( cmd ); sprintf( cmd, "set item(%d) 0", ccanv ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arj...@us...> - 2013-11-27 08:39:31
|
Revision: 12761 http://sourceforge.net/p/plplot/code/12761 Author: arjenmarkus Date: 2013-11-27 08:39:29 +0000 (Wed, 27 Nov 2013) Log Message: ----------- Adjusting the export definition file for Intel Fortran vis-a-vis the new plsvect API. Modified Paths: -------------- trunk/bindings/f95/plplotf95_ifort.def Modified: trunk/bindings/f95/plplotf95_ifort.def =================================================================== --- trunk/bindings/f95/plplotf95_ifort.def 2013-11-27 08:38:36 UTC (rev 12760) +++ trunk/bindings/f95/plplotf95_ifort.def 2013-11-27 08:39:29 UTC (rev 12761) @@ -84,6 +84,6 @@ PLPLOTP_mp_PLSTRING PLPLOTP_mp_PLSTRING3 PLPLOT_mp_PLSTRIPC - PLPLOT_mp_PLSVECT + PLPLOT_mp_PLSVECT1 PLPLOT_mp_PLSYM PLPLOT_mp_PLXORMOD This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arj...@us...> - 2013-11-27 08:38:38
|
Revision: 12760 http://sourceforge.net/p/plplot/code/12760 Author: arjenmarkus Date: 2013-11-27 08:38:36 +0000 (Wed, 27 Nov 2013) Log Message: ----------- Small corrections to example x22c - MSVC/C++ did not like the use of nc for an array dimension. Using the construction from the C example. Modified Paths: -------------- trunk/examples/c++/x22.cc Modified: trunk/examples/c++/x22.cc =================================================================== --- trunk/examples/c++/x22.cc 2013-11-27 06:28:01 UTC (rev 12759) +++ trunk/examples/c++/x22.cc 2013-11-27 08:38:36 UTC (rev 12760) @@ -172,7 +172,9 @@ PLFLT dx, dy, x, y; PLFLT xmin, xmax, ymin, ymax; PLFLT Q, b, dbdx; - PLFLT clev[nc]; +#define NC 11 + int nc = NC; + PLFLT clev[NC]; dx = 1.0; dy = 1.0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-27 06:28:06
|
Revision: 12759 http://sourceforge.net/p/plplot/code/12759 Author: airwin Date: 2013-11-27 06:28:01 +0000 (Wed, 27 Nov 2013) Log Message: ----------- I have already implemented an "error message delivery hook" method to quiet shapelib "Unable to open" error messages directly from the src/plmap.c PLplot code. This makes the brute-force build modification that was used previously to quiet those error messages completely redundant so therefore drop this brute-force method. Modified Paths: -------------- trunk/cmake/build_projects/shapelib/CMakeLists.txt trunk/cmake/build_projects/shapelib/README trunk/cmake/build_projects/shapelib/bp.cmake Removed Paths: ------------- trunk/cmake/build_projects/shapelib/shapelib.patch Modified: trunk/cmake/build_projects/shapelib/CMakeLists.txt =================================================================== --- trunk/cmake/build_projects/shapelib/CMakeLists.txt 2013-11-27 06:09:46 UTC (rev 12758) +++ trunk/cmake/build_projects/shapelib/CMakeLists.txt 2013-11-27 06:28:01 UTC (rev 12759) @@ -83,15 +83,6 @@ shptree.c ) -option(SHP_DROP_UNABLE_TO_OPEN_MSG "Drop \"unable to open\" error messages" ON) -if(SHP_DROP_UNABLE_TO_OPEN_MSG) - #define the SHP_DROP_UNABLE_TO_OPEN_MSG C macro for this source file. - set_source_files_properties(shpopen.c - PROPERTIES - COMPILE_DEFINITIONS SHP_DROP_UNABLE_TO_OPEN_MSG - ) -endif(SHP_DROP_UNABLE_TO_OPEN_MSG) - add_library(shp ${lib_SRC}) if(WIN32 AND NOT CYGWIN) Modified: trunk/cmake/build_projects/shapelib/README =================================================================== --- trunk/cmake/build_projects/shapelib/README 2013-11-27 06:09:46 UTC (rev 12758) +++ trunk/cmake/build_projects/shapelib/README 2013-11-27 06:28:01 UTC (rev 12759) @@ -17,16 +17,10 @@ (3) Copy the CMakeLists.txt file into the top-level of the unpacked shapelib-1.3.0 source tree. -(4) Apply shapelib.patch (which optionally quiets error messages when -shapelib is unable to open shapefiles). First change directory -to the top-level of the shapelib-1.3.0 source tree, then - -patch -p1 < <full path to shapelib.patch> - -(5) Create a separate empty build tree and use it to configure, build, +(4) Create a separate empty build tree and use it to configure, build, install and test shapelib. For example (you will need to tailor the -compiler, compile options, install prefix, eg_data location, and source tree location to your own -needs): +compiler, compile options, install prefix, eg_data location, and +source tree location to your own needs): mkdir build_dir cd build_dir Modified: trunk/cmake/build_projects/shapelib/bp.cmake =================================================================== --- trunk/cmake/build_projects/shapelib/bp.cmake 2013-11-27 06:09:46 UTC (rev 12758) +++ trunk/cmake/build_projects/shapelib/bp.cmake 2013-11-27 06:28:01 UTC (rev 12759) @@ -55,8 +55,7 @@ build_${BP_PACKAGE} URL ${${BP_PACKAGE}_URL} URL_MD5 ${${BP_PACKAGE}_URL_MD5} - PATCH_COMMAND ${PATCH_EXECUTABLE} -p1 < ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/${BP_PACKAGE}.patch - CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} CFLAGS=${${BP_PACKAGE}_CFLAGS} ${BP_CMAKE_COMMAND} -DEG_DATA:PATH=${EP_BASE}/Source/build_${BP_PACKAGE}/eg_data ${EP_BASE}/Source/build_${BP_PACKAGE} + CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} CFLAGS=${${BP_PACKAGE}_CFLAGS} ${BP_CMAKE_COMMAND} -DEG_DATA:PATH=${EP_BASE}/Source/build_${BP_PACKAGE}/eg_data ${EP_BASE}/Source/build_${BP_PACKAGE} BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} TEST_BEFORE_INSTALL ON TEST_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_CTEST_COMMAND} Deleted: trunk/cmake/build_projects/shapelib/shapelib.patch =================================================================== --- trunk/cmake/build_projects/shapelib/shapelib.patch 2013-11-27 06:09:46 UTC (rev 12758) +++ trunk/cmake/build_projects/shapelib/shapelib.patch 2013-11-27 06:28:01 UTC (rev 12759) @@ -1,23 +0,0 @@ -diff -Naur '--exclude=CMakeLists.txt' '--exclude=*~' shapelib-1.3.0_pristine/shpopen.c shapelib-1.3.0/shpopen.c ---- shapelib-1.3.0_pristine/shpopen.c 2012-01-24 14:33:01.000000000 -0800 -+++ shapelib-1.3.0/shpopen.c 2013-11-26 11:46:43.215221421 -0800 -@@ -559,7 +559,9 @@ - char *pszMessage = (char *) malloc(strlen(pszBasename)*2+256); - sprintf( pszMessage, "Unable to open %s.shp or %s.SHP.", - pszBasename, pszBasename ); -+#ifndef SHP_DROP_UNABLE_TO_OPEN_MSG - psHooks->Error( pszMessage ); -+#endif - free( pszMessage ); - - free( psSHP ); -@@ -582,7 +584,9 @@ - char *pszMessage = (char *) malloc(strlen(pszBasename)*2+256); - sprintf( pszMessage, "Unable to open %s.shx or %s.SHX.", - pszBasename, pszBasename ); -+#ifndef SHP_DROP_UNABLE_TO_OPEN_MSG - psHooks->Error( pszMessage ); -+#endif - free( pszMessage ); - - psSHP->sHooks.FClose( psSHP->fpSHP ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-27 06:09:51
|
Revision: 12758 http://sourceforge.net/p/plplot/code/12758 Author: airwin Date: 2013-11-27 06:09:46 +0000 (Wed, 27 Nov 2013) Log Message: ----------- Use an approach suggested by Frank Warmerdam <war...@po...>, the developer of shapelib to quiet the misleading "Unable to open" error messages generated by shapelib due to our method of searching several directories until the shapelib routine SHPOpenLL returns a non-NULL result indicating shapelib has found shapefiles with the correct basename. Tested by Alan W. Irwin <ai...@us...> with variants of the final CustomErrors to prove this function was being called and was correctly suppressing "Unable to open" error messages. Modified Paths: -------------- trunk/src/plmap.c Modified: trunk/src/plmap.c =================================================================== --- trunk/src/plmap.c 2013-11-26 20:59:05 UTC (rev 12757) +++ trunk/src/plmap.c 2013-11-27 06:09:46 UTC (rev 12758) @@ -50,6 +50,9 @@ SHPHandle OpenShapeFile( const char *fn ); +static void +CustomErrors(const char *message); + #endif //-------------------------------------------------------------------------- @@ -470,19 +473,32 @@ //! found //-------------------------------------------------------------------------- #ifdef HAVE_SHAPELIB +// Our thanks to Frank Warmerdam, the developer of shapelib for suggesting +// this approach for quieting shapelib "Unable to open" error messages. +static +void CustomErrors(const char *message) +{ + if (strstr(message,"Unable to open") == NULL) + fprintf( stderr, "%s\n", message ); +} + SHPHandle OpenShapeFile( const char *fn ) { SHPHandle file; char *fs = NULL, *dn = NULL; + SAHooks sHooks; + SASetupDefaultHooks( &sHooks ); + sHooks.Error = CustomErrors; + //*** search build tree *** if ( plInBuildTree() == 1 ) { plGetName( SOURCE_DIR, "data", fn, &fs ); - if ( ( file = SHPOpen( fs, "rb" ) ) != NULL ) + if ( ( file = SHPOpenLL( fs, "rb", &sHooks ) ) != NULL ) goto done; } @@ -493,7 +509,7 @@ { plGetName( dn, "", fn, &fs ); - if ( ( file = SHPOpen( fs, "rb" ) ) != NULL ) + if ( ( file = SHPOpenLL( fs, "rb", &sHooks ) ) != NULL ) goto done; fprintf( stderr, PLPLOT_LIB_ENV "=\"%s\"\n", dn ); // what IS set? } @@ -501,7 +517,7 @@ //*** search current directory *** - if ( ( file = SHPOpen( fn, "rb" ) ) != NULL ) + if ( ( file = SHPOpenLL( fn, "rb", &sHooks ) ) != NULL ) { pldebug( "OpenShapeFile", "Found file %s in current directory.\n", fn ); free_mem( fs ); @@ -515,7 +531,7 @@ { plGetName( dn, "lib", fn, &fs ); - if ( ( file = SHPOpen( fs, "rb" ) ) != NULL ) + if ( ( file = SHPOpenLL( fs, "rb", &sHooks ) ) != NULL ) goto done; fprintf( stderr, PLPLOT_HOME_ENV "=\"%s\"\n", dn ); // what IS set? } @@ -526,7 +542,7 @@ #if defined ( DATA_DIR ) plGetName( DATA_DIR, "", fn, &fs ); - if ( ( file = SHPOpen( fs, "rb" ) ) != NULL ) + if ( ( file = SHPOpenLL( fs, "rb", &sHooks ) ) != NULL ) goto done; #endif // DATA_DIR @@ -535,7 +551,7 @@ #ifdef PLLIBDEV plGetName( PLLIBDEV, "", fn, &fs ); - if ( ( file = SHPOpen( fs, "rb" ) ) != NULL ) + if ( ( file = SHPOpenLL( fs, "rb", &sHooks ) ) != NULL ) goto done; #endif // PLLIBDEV This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-26 20:59:07
|
Revision: 12757 http://sourceforge.net/p/plplot/code/12757 Author: airwin Date: 2013-11-26 20:59:05 +0000 (Tue, 26 Nov 2013) Log Message: ----------- Make changes to the shapelib build so that the confusing "Unable to open" shapelib error messages are quieted for the normal PLplot procedure (see src/plmap.c) of trying several different directories to find shapefiles. Tested by Alan W. Irwin <ai...@us...> on Linux using both a standalone build of shapelib and also a build_projects build and install of that software. Modified Paths: -------------- trunk/cmake/build_projects/shapelib/CMakeLists.txt trunk/cmake/build_projects/shapelib/README trunk/cmake/build_projects/shapelib/bp.cmake Added Paths: ----------- trunk/cmake/build_projects/shapelib/shapelib.patch Modified: trunk/cmake/build_projects/shapelib/CMakeLists.txt =================================================================== --- trunk/cmake/build_projects/shapelib/CMakeLists.txt 2013-11-26 17:40:50 UTC (rev 12756) +++ trunk/cmake/build_projects/shapelib/CMakeLists.txt 2013-11-26 20:59:05 UTC (rev 12757) @@ -1,7 +1,7 @@ # Top-level CMakeLists.txt for the CMake-based build and test system # of the shapelib software. -# Copyright (C) 2012 Alan W. Irwin +# Copyright (C) 2012-2013 Alan W. Irwin # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU Library General Public License as published @@ -38,9 +38,9 @@ # In windows all created dlls are gathered in the dll directory # if you add this directory to your PATH all shared libraries are available -if(BUILD_SHARED_LIBS AND WIN32) +if(BUILD_SHARED_LIBS AND WIN32 AND NOT CYGWIN) set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dll) -endif(BUILD_SHARED_LIBS AND WIN32) +endif(BUILD_SHARED_LIBS AND WIN32 AND NOT CYGWIN) set(PACKAGE shp) @@ -83,14 +83,23 @@ shptree.c ) +option(SHP_DROP_UNABLE_TO_OPEN_MSG "Drop \"unable to open\" error messages" ON) +if(SHP_DROP_UNABLE_TO_OPEN_MSG) + #define the SHP_DROP_UNABLE_TO_OPEN_MSG C macro for this source file. + set_source_files_properties(shpopen.c + PROPERTIES + COMPILE_DEFINITIONS SHP_DROP_UNABLE_TO_OPEN_MSG + ) +endif(SHP_DROP_UNABLE_TO_OPEN_MSG) + add_library(shp ${lib_SRC}) -if(WIN32) +if(WIN32 AND NOT CYGWIN) set_target_properties(shp PROPERTIES COMPILE_DEFINITIONS SHAPELIB_DLLEXPORT ) -endif(WIN32) +endif(WIN32 AND NOT CYGWIN) set(shp_SOVERSION 1) set(shp_VERSION ${shp_SOVERSION}.0.1) Modified: trunk/cmake/build_projects/shapelib/README =================================================================== --- trunk/cmake/build_projects/shapelib/README 2013-11-26 17:40:50 UTC (rev 12756) +++ trunk/cmake/build_projects/shapelib/README 2013-11-26 20:59:05 UTC (rev 12757) @@ -17,15 +17,23 @@ (3) Copy the CMakeLists.txt file into the top-level of the unpacked shapelib-1.3.0 source tree. -(4) Create a separate empty build tree and use it to configure, build, +(4) Apply shapelib.patch (which optionally quiets error messages when +shapelib is unable to open shapefiles). First change directory +to the top-level of the shapelib-1.3.0 source tree, then + +patch -p1 < <full path to shapelib.patch> + +(5) Create a separate empty build tree and use it to configure, build, install and test shapelib. For example (you will need to tailor the -install prefix, eg_data location, and source tree location to your own +compiler, compile options, install prefix, eg_data location, and source tree location to your own needs): mkdir build_dir cd build_dir -# Configure +# Configure with the compiler and compiler options of your choice. +# N.B. the gcc -fvisibility=hidden option not (yet) supported by shapelib. +env CC=gcc CFLAGS="-O3 -Wuninitialized" \ cmake \ -G "Unix Makefiles" \ -DCMAKE_INSTALL_PREFIX=/home/software/shapelib/install \ @@ -33,7 +41,7 @@ ../shapelib-1.3.0 >& cmake.out # Build and install -make install >& install.out +make VERBOSE=1 -j4 install >& install.out # Test ctest @@ -51,4 +59,5 @@ install shapelib on both the Linux and MinGW/MSYS/Wine platforms. Furthermore, on both platforms I have built and tested PLplot using the installed versions created by the above procedure. No issues were -discovered with example 19 for these two separate platform tests. +discovered with PLplot example 19 (which demos PLplot map capabilities with +map shapefiles) for these two separate platform tests. Modified: trunk/cmake/build_projects/shapelib/bp.cmake =================================================================== --- trunk/cmake/build_projects/shapelib/bp.cmake 2013-11-26 17:40:50 UTC (rev 12756) +++ trunk/cmake/build_projects/shapelib/bp.cmake 2013-11-26 20:59:05 UTC (rev 12757) @@ -55,6 +55,7 @@ build_${BP_PACKAGE} URL ${${BP_PACKAGE}_URL} URL_MD5 ${${BP_PACKAGE}_URL_MD5} + PATCH_COMMAND ${PATCH_EXECUTABLE} -p1 < ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/${BP_PACKAGE}.patch CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} CFLAGS=${${BP_PACKAGE}_CFLAGS} ${BP_CMAKE_COMMAND} -DEG_DATA:PATH=${EP_BASE}/Source/build_${BP_PACKAGE}/eg_data ${EP_BASE}/Source/build_${BP_PACKAGE} BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} TEST_BEFORE_INSTALL ON Added: trunk/cmake/build_projects/shapelib/shapelib.patch =================================================================== --- trunk/cmake/build_projects/shapelib/shapelib.patch (rev 0) +++ trunk/cmake/build_projects/shapelib/shapelib.patch 2013-11-26 20:59:05 UTC (rev 12757) @@ -0,0 +1,23 @@ +diff -Naur '--exclude=CMakeLists.txt' '--exclude=*~' shapelib-1.3.0_pristine/shpopen.c shapelib-1.3.0/shpopen.c +--- shapelib-1.3.0_pristine/shpopen.c 2012-01-24 14:33:01.000000000 -0800 ++++ shapelib-1.3.0/shpopen.c 2013-11-26 11:46:43.215221421 -0800 +@@ -559,7 +559,9 @@ + char *pszMessage = (char *) malloc(strlen(pszBasename)*2+256); + sprintf( pszMessage, "Unable to open %s.shp or %s.SHP.", + pszBasename, pszBasename ); ++#ifndef SHP_DROP_UNABLE_TO_OPEN_MSG + psHooks->Error( pszMessage ); ++#endif + free( pszMessage ); + + free( psSHP ); +@@ -582,7 +584,9 @@ + char *pszMessage = (char *) malloc(strlen(pszBasename)*2+256); + sprintf( pszMessage, "Unable to open %s.shx or %s.SHX.", + pszBasename, pszBasename ); ++#ifndef SHP_DROP_UNABLE_TO_OPEN_MSG + psHooks->Error( pszMessage ); ++#endif + free( pszMessage ); + + psSHP->sHooks.FClose( psSHP->fpSHP ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-26 17:40:54
|
Revision: 12756 http://sourceforge.net/p/plplot/code/12756 Author: airwin Date: 2013-11-26 17:40:50 +0000 (Tue, 26 Nov 2013) Log Message: ----------- Fix the traditional (Makefile + pkg-config) build of the installed examples by configuring and installing the plplottcltk_Main(d).pc pkg-config file associated with libplplottcltk_Main, and using that file to configure the build of the xtk?? examples. Tested by Alan W. Irwin <ai...@us...> on Linux using CMake options -DDEFAULT_NO_CAIRO_DEVICES=ON -DPLD_wxwidgets=OFF -DDEFAULT_NO_BINDINGS=ON -DENABLE_tcl=ON -DENABLE_itcl=ON -DENABLE_tk=ON -DENABLE_itk=ON (to limit most tests just to C and Tcl and friends) for the core build and the test_noninteractive and test_interactive targets for the traditional build system of the installed examples. Modified Paths: -------------- trunk/bindings/tcl/CMakeLists.txt trunk/examples/tk/Makefile.examples.in Modified: trunk/bindings/tcl/CMakeLists.txt =================================================================== --- trunk/bindings/tcl/CMakeLists.txt 2013-11-26 06:56:39 UTC (rev 12755) +++ trunk/bindings/tcl/CMakeLists.txt 2013-11-26 17:40:50 UTC (rev 12756) @@ -547,7 +547,7 @@ ) install(FILES ${PC_CONFIGURED_FILE} DESTINATION ${PKG_CONFIG_DIR}) - set(PC_DATA "tcl:Tcl/Tk:Tcl/Tk bindings, :plplottcltk_Main${LIB_TAG}") + set(PC_DATA "tcl_Main:Tcl_Main/Tk_Main:Tcl_Main/Tk_Main bindings, :plplottcltk_Main${LIB_TAG}") string(REGEX REPLACE "^(.*):.*:.*:.*$" "\\1" BINDING ${PC_DATA}) set(PC_FILE_SUFFIX "-${BINDING}") Modified: trunk/examples/tk/Makefile.examples.in =================================================================== --- trunk/examples/tk/Makefile.examples.in 2013-11-26 06:56:39 UTC (rev 12755) +++ trunk/examples/tk/Makefile.examples.in 2013-11-26 17:40:50 UTC (rev 12756) @@ -37,6 +37,6 @@ rm -f $(EXECUTABLES_list) $(itk_EXECUTABLES_list) .c$(EXEEXT): - $(CC) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-tcl` -lm + $(CC) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-tcl_Main plplot$(LIB_TAG)-tcl plplot$(LIB_TAG)` -lm .SUFFIXES: .c $(EXEEXT) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-26 06:56:44
|
Revision: 12755 http://sourceforge.net/p/plplot/code/12755 Author: airwin Date: 2013-11-26 06:56:39 +0000 (Tue, 26 Nov 2013) Log Message: ----------- Style previous commit. Modified Paths: -------------- trunk/bindings/f95/scstubs.c trunk/examples/c/x22c.c trunk/examples/c++/x22.cc Modified: trunk/bindings/f95/scstubs.c =================================================================== --- trunk/bindings/f95/scstubs.c 2013-11-26 06:52:42 UTC (rev 12754) +++ trunk/bindings/f95/scstubs.c 2013-11-26 06:56:39 UTC (rev 12755) @@ -1535,7 +1535,7 @@ void PLSVECT2( void ) { - c_plsvect( NULL, NULL, 0, 0 ); + c_plsvect( NULL, NULL, 0, 0 ); } void Modified: trunk/examples/c/x22c.c =================================================================== --- trunk/examples/c/x22c.c 2013-11-26 06:52:42 UTC (rev 12754) +++ trunk/examples/c/x22c.c 2013-11-26 06:56:39 UTC (rev 12755) @@ -31,8 +31,8 @@ void f2mnmx( PLFLT **f, PLINT nx, PLINT ny, PLFLT *fnmin, PLFLT *fnmax ); // Pairs of points making the line segments used to plot the user defined arroW -static PLFLT arrow_x[6] = { -0.5, 0.5, 0.3, 0.5, 0.3, 0.5 }; -static PLFLT arrow_y[6] = { 0.0, 0.0, 0.2, 0.0, -0.2, 0.0 }; +static PLFLT arrow_x[6] = { -0.5, 0.5, 0.3, 0.5, 0.3, 0.5 }; +static PLFLT arrow_y[6] = { 0.0, 0.0, 0.2, 0.0, -0.2, 0.0 }; static PLFLT arrow2_x[6] = { -0.5, 0.3, 0.3, 0.5, 0.3, 0.3 }; static PLFLT arrow2_y[6] = { 0.0, 0.0, 0.2, 0.0, -0.2, 0.0 }; Modified: trunk/examples/c++/x22.cc =================================================================== --- trunk/examples/c++/x22.cc 2013-11-26 06:52:42 UTC (rev 12754) +++ trunk/examples/c++/x22.cc 2013-11-26 06:56:39 UTC (rev 12755) @@ -168,11 +168,11 @@ void x22::constriction2( void ) { - int i, j; - PLFLT dx, dy, x, y; - PLFLT xmin, xmax, ymin, ymax; - PLFLT Q, b, dbdx; - PLFLT clev[nc]; + int i, j; + PLFLT dx, dy, x, y; + PLFLT xmin, xmax, ymin, ymax; + PLFLT Q, b, dbdx; + PLFLT clev[nc]; dx = 1.0; dy = 1.0; @@ -209,9 +209,9 @@ pls->col0( 2 ); pls->shades( (const PLFLT * const *) u, nx, ny, NULL, xmin + dx / 2, xmax - dx / 2, ymin + dy / 2, ymax - dy / 2, - clev, nc, 0, 1, 1.0, plstream::fill, 1, NULL, NULL ); + clev, nc, 0, 1, 1.0, plstream::fill, 1, NULL, NULL ); pls->vect( (const PLFLT * const *) u, (const PLFLT * const *) v, nx, ny, - -1.0, plstream::tr2, (void *) &cgrid2 ); + -1.0, plstream::tr2, (void *) &cgrid2 ); // Plot edges using plpath (which accounts for coordinate transformation) rather than plline pls->path( nseg, xmin, ymax, xmax, ymax ); pls->path( nseg, xmin, ymin, xmax, ymin ); @@ -359,9 +359,9 @@ pls->init(); - nx = 20; - ny = 20; - nc = 11; + nx = 20; + ny = 20; + nc = 11; nseg = 20; // Allocate arrays This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-11-26 06:52:45
|
Revision: 12754 http://sourceforge.net/p/plplot/code/12754 Author: andrewross Date: 2013-11-26 06:52:42 +0000 (Tue, 26 Nov 2013) Log Message: ----------- Set default NULL arguments for plsvect, so there is no need to supply any arguments to reset the arrow style to the default. Modified Paths: -------------- trunk/bindings/c++/plstream.h trunk/examples/c++/x22.cc Modified: trunk/bindings/c++/plstream.h =================================================================== --- trunk/bindings/c++/plstream.h 2013-11-26 06:46:51 UTC (rev 12753) +++ trunk/bindings/c++/plstream.h 2013-11-26 06:52:42 UTC (rev 12754) @@ -135,7 +135,7 @@ PLPointer pltr_data ); // Set the arrow style - void svect( const PLFLT *arrow_x, const PLFLT *arrow_y, PLINT npts, bool fill ); + void svect( const PLFLT *arrow_x = NULL, const PLFLT *arrow_y = NULL, PLINT npts = 0, bool fill = false ); // This functions similarly to plbox() except that the origin of the axes is // placed at the user-specified point (x0, y0). Modified: trunk/examples/c++/x22.cc =================================================================== --- trunk/examples/c++/x22.cc 2013-11-26 06:46:51 UTC (rev 12753) +++ trunk/examples/c++/x22.cc 2013-11-26 06:52:42 UTC (rev 12754) @@ -392,8 +392,8 @@ constriction2(); // Reset arrow style to the default by passing two - // NULL arrays - pls->svect( NULL, NULL, 0, 0 ); + // NULL arrays (this are the default arguments) + pls->svect( ); potential(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-26 06:46:54
|
Revision: 12753 http://sourceforge.net/p/plplot/code/12753 Author: airwin Date: 2013-11-26 06:46:51 +0000 (Tue, 26 Nov 2013) Log Message: ----------- Slightly improve commentary and debug messages. Modified Paths: -------------- trunk/src/plctrl.c Modified: trunk/src/plctrl.c =================================================================== --- trunk/src/plctrl.c 2013-11-26 06:45:44 UTC (rev 12752) +++ trunk/src/plctrl.c 2013-11-26 06:46:51 UTC (rev 12753) @@ -2439,6 +2439,8 @@ // Malloc space for filespec free_mem( *filespec ); + // Be slightly generous since 3 (two delimiters + NULL byte) should be + // enough. lfilespec = strlen( dir ) + strlen( subdir ) + strlen( filename ) + 10; if ( ( *filespec = (char *) malloc( lfilespec ) ) == NULL ) { @@ -2457,7 +2459,7 @@ strcat_delim( *filespec ); strcat( *filespec, filename ); } - pldebug( "plGetName", "Length of full pathname of file to be found is %zu\n", lfilespec ); + pldebug( "plGetName", "Maximum length of full pathname of file to be found is %zu\n", lfilespec - 1 ); pldebug( "plGetName", "Full pathname of file to be found is %s\n", *filespec ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-26 06:45:49
|
Revision: 12752 http://sourceforge.net/p/plplot/code/12752 Author: airwin Date: 2013-11-26 06:45:44 +0000 (Tue, 26 Nov 2013) Log Message: ----------- Make pldebug work. Slightly improve commentary and debug messages. Modified Paths: -------------- trunk/src/plmap.c Modified: trunk/src/plmap.c =================================================================== --- trunk/src/plmap.c 2013-11-25 23:36:23 UTC (rev 12751) +++ trunk/src/plmap.c 2013-11-26 06:45:44 UTC (rev 12752) @@ -39,7 +39,8 @@ // // -#define NEED_PLDEBUG 1 +#define DEBUG +#define NEED_PLDEBUG #include "plplotP.h" @@ -544,7 +545,7 @@ return NULL; done: - pldebug( "OpenShapeFile", "Found file %s\n", fs ); + pldebug( "OpenShapeFile", "SHPOpen successfully opened two files with basename %s\n", fs ); free_mem( fs ); return ( file ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-11-25 23:36:26
|
Revision: 12751 http://sourceforge.net/p/plplot/code/12751 Author: andrewross Date: 2013-11-25 23:36:23 +0000 (Mon, 25 Nov 2013) Log Message: ----------- Minor documentation updates to correct references to examples using various functions. Modified Paths: -------------- trunk/doc/docbook/src/api.xml Modified: trunk/doc/docbook/src/api.xml =================================================================== --- trunk/doc/docbook/src/api.xml 2013-11-25 23:29:30 UTC (rev 12750) +++ trunk/doc/docbook/src/api.xml 2013-11-25 23:36:23 UTC (rev 12751) @@ -9211,7 +9211,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 22. </para> </sect1> @@ -11127,7 +11127,7 @@ </para> <para> - This function is not used in any examples. + This function is used in any example 31. </para> </sect1> @@ -14430,7 +14430,8 @@ <listitem> <para> Pointer to a function that defines a transformation from the - input (x, y) coordinate to a new plot world coordinate. + input (x, y) coordinate to a new plot world coordinate. A NULL pointer + means that no transform is applied. </para> </listitem> </varlistentry> @@ -14460,7 +14461,7 @@ </para> <para> - This function is used in example 19. + This function is used in examples 19 and 22. </para> </sect1> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-11-25 23:29:33
|
Revision: 12750 http://sourceforge.net/p/plplot/code/12750 Author: andrewross Date: 2013-11-25 23:29:30 +0000 (Mon, 25 Nov 2013) Log Message: ----------- Update f95 bindings to allow empty argument for plsvect to reset the arrow style. Update example 22 consistent with the C version. Modified Paths: -------------- trunk/bindings/f95/plstubs.h trunk/bindings/f95/scstubs.c trunk/bindings/f95/sfstubsf95.f90 trunk/examples/f95/x22f.f90 Modified: trunk/bindings/f95/plstubs.h =================================================================== --- trunk/bindings/f95/plstubs.h 2013-11-25 19:44:36 UTC (rev 12749) +++ trunk/bindings/f95/plstubs.h 2013-11-25 23:29:30 UTC (rev 12750) @@ -352,7 +352,8 @@ #define PLSTRIPD FNAME( PLSTRIPD, plstripd ) #define PLSTYL FNAME( PLSTYL, plstyl ) #define PLSURF3D FNAME( PLSURF3DF95, plsurf3df95 ) -#define PLSVECT FNAME( PLSVECTF95, plsvectf95 ) +#define PLSVECT1 FNAME( PLSVECT1F95, plsvect1f95 ) +#define PLSVECT2 FNAME( PLSVECT2, plsvect2 ) #define PLSVPA FNAME( PLSVPA, plsvpa ) #define PLSXAX FNAME( PLSXAX, plsxax ) #define PLSYAX FNAME( PLSYAX, plsyax ) Modified: trunk/bindings/f95/scstubs.c =================================================================== --- trunk/bindings/f95/scstubs.c 2013-11-25 19:44:36 UTC (rev 12749) +++ trunk/bindings/f95/scstubs.c 2013-11-25 23:29:30 UTC (rev 12750) @@ -258,7 +258,8 @@ const char *labx, const char *laby, const char *labtop ); void PLSTRIPD( PLINT *id ); void PLSTYL( PLINT *n, PLINT *mark, PLINT *space ); -void PLSVECT( PLFLT *arrowx, PLFLT *arrowy, PLINT *npts, PLBOOL *fill ); +void PLSVECT1( PLFLT *arrowx, PLFLT *arrowy, PLINT *npts, PLBOOL *fill ); +void PLSVECT2( void ); void PLSVPA( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax ); void PLSXAX( PLINT *digmax, PLINT *digits ); void PLSYAX( PLINT *digmax, PLINT *digits ); @@ -1526,12 +1527,18 @@ } void -PLSVECT( PLFLT *arrowx, PLFLT *arrowy, PLINT *npts, PLBOOL *fill ) +PLSVECT1( PLFLT *arrowx, PLFLT *arrowy, PLINT *npts, PLBOOL *fill ) { c_plsvect( arrowx, arrowy, *npts, *fill ); } void +PLSVECT2( void ) +{ + c_plsvect( NULL, NULL, 0, 0 ); +} + +void PLSVPA( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax ) { c_plsvpa( *xmin, *xmax, *ymin, *ymax ); Modified: trunk/bindings/f95/sfstubsf95.f90 =================================================================== --- trunk/bindings/f95/sfstubsf95.f90 2013-11-25 19:44:36 UTC (rev 12749) +++ trunk/bindings/f95/sfstubsf95.f90 2013-11-25 23:29:30 UTC (rev 12750) @@ -897,7 +897,11 @@ end interface interface plsvect - module procedure plsvect + module procedure plsvect1 + + subroutine plsvect2 + end subroutine plsvect2 + end interface interface @@ -1558,14 +1562,14 @@ end subroutine plstripc - subroutine plsvect( arrowx, arrowy, fill ) + subroutine plsvect1( arrowx, arrowy, fill ) logical :: fill real(kind=plflt), dimension(:) :: arrowx, arrowy integer ifill ifill = convert_to_int(fill) - call plsvectf95( arrowx, arrowy, size(arrowx), ifill ) - end subroutine plsvect + call plsvect1f95( arrowx, arrowy, size(arrowx), ifill ) + end subroutine plsvect1 subroutine plsym( x, y, code ) integer :: code Modified: trunk/examples/f95/x22f.f90 =================================================================== --- trunk/examples/f95/x22f.f90 2013-11-25 19:44:36 UTC (rev 12749) +++ trunk/examples/f95/x22f.f90 2013-11-25 23:29:30 UTC (rev 12750) @@ -48,14 +48,18 @@ ! Set arrow style using arrow_x and arrow_y the ! plot using these arrows call plsvect(arrow_x, arrow_y, fill) - call constriction + call constriction( 1 ) ! Set arrow style using arrow_x and arrow_y the ! plot using these arrows fill = .true. call plsvect(arrow2_x, arrow2_y, fill) - call constriction + call constriction( 2 ) + call constriction2 + + call plsvect + call potential call plend @@ -105,13 +109,15 @@ end ! vector plot of the flow through a constricted pipe - subroutine constriction() + subroutine constriction( astyle ) use plplot, PI => PL_PI implicit none - integer i, j, nx, ny + integer i, j, nx, ny, astyle parameter (nx=20, ny=20) + character(len=80) :: title + real(kind=plflt) u(nx, ny), v(nx, ny), xg(nx,ny), yg(nx,ny) real(kind=plflt) dx, dy, xmin, xmax, ymin, ymax @@ -134,7 +140,7 @@ yg(i,j) = yy b = ymax/4.0_plflt*(3.0_plflt-cos(PI*xx/xmax)) if (abs(yy).lt.b) then - dbdx = ymax/4.0_plflt*sin(PI*xx/xmax)*yy/b + dbdx = ymax/4.0_plflt*sin(PI*xx/xmax)*PI/xmax*yy/b u(i,j) = Q*ymax/b v(i,j) = u(i,j)*dbdx else @@ -145,16 +151,95 @@ enddo call plenv(xmin, xmax, ymin, ymax, 0, 0) - call pllab('(x)', '(y)', & - '#frPLplot Example 22 - constriction') + write(title,'(A,I0,A)') '#frPLplot Example 22 - constriction (arrow style ', astyle,')' + call pllab('(x)', '(y)', title) call plcol0(2) - scaling = -0.5_plflt + scaling = -1.0_plflt call plvect(u,v,scaling,xg,yg) call plcol0(1) end +! Global transform function for a constriction using data passed in +! This is the same transformation used in constriction. + subroutine transform( x, y, xt, yt ) + use plplot, PI => PL_PI + implicit none + real(kind=plflt) x, y, xt, yt + + real(kind=plflt) xmax + common /transform_data/ xmax + + xt = x + yt = y / 4.0_plflt * ( 3.0_plflt - cos( PI * x / xmax ) ) + end subroutine transform + +! Vector plot of flow through a constricted pipe +! with a coordinate transform + subroutine constriction2() + use plplot, PI => PL_PI + implicit none + + integer i, j, nx, ny, nc, nseg + parameter (nx=20, ny=20, nc=11, nseg=20) + + real(kind=plflt) dx, dy, xx, yy + real(kind=plflt) xmin, xmax, ymin, ymax + real(kind=plflt) Q, b, dbdx, scaling + real(kind=plflt) u(nx, ny), v(nx, ny), xg(nx,ny), yg(nx,ny) + real(kind=plflt) clev(nc); + common /transform_data/ ymax + character(len=1) defined + + external transform + + dx = 1.0_plflt + dy = 1.0_plflt + + xmin = -dble(nx)/2.0_plflt*dx + xmax = dble(nx)/2.0_plflt*dx + ymin = -dble(ny)/2.0_plflt*dy + ymax = dble(ny)/2.0_plflt*dy + + + call plstransform( transform ) + + Q = 2.0_plflt + do i=1,nx + xx = (dble(i)-dble(nx)/2.0_plflt-0.5_plflt)*dx + do j=1,ny + yy = (dble(j)-dble(ny)/2.0_plflt-0.5_plflt)*dy + xg(i,j) = xx + yg(i,j) = yy + b = ymax/4.0_plflt*(3.0_plflt-cos(PI*xx/xmax)) + u(i,j) = Q*ymax/b + v(i,j) = 0.0_plflt + enddo + enddo + + do i=1,nc + clev(i) = Q + dble(i-1) * Q / ( dble(nc) - 1.0_plflt ) + enddo + + call plenv(xmin, xmax, ymin, ymax, 0, 0) + call pllab('(x)', '(y)', & + '#frPLplot Example 22 - constriction with plstransform') + call plcol0(2) + call plshades(u, defined, xmin + dx / 2.0_plflt, & + xmax - dx / 2.0_plflt, & + ymin + dy / 2.0_plflt, ymax - dy / 2.0_plflt, & + clev, 0.0_plflt, 1, 1.0_plflt) + scaling = -1.0_plflt + call plvect(u,v,scaling,xg,yg) + call plpath(nseg, xmin, ymax, xmax, ymax) + call plpath(nseg, xmin, ymin, xmax, ymin) + call plcol0(1) + + call plstransform + + end subroutine constriction2 + subroutine potential() use plplot, PI => PL_PI implicit none This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-25 19:44:38
|
Revision: 12749 http://sourceforge.net/p/plplot/code/12749 Author: airwin Date: 2013-11-25 19:44:36 +0000 (Mon, 25 Nov 2013) Log Message: ----------- Move pltcl.c and the build of the pltcl executable from utils to the more obvious (in my opinion) directory location bindings/tcl. Tested by: Alan W. Irwin <ai...@us...> on Linux using the test_noninteractive and test_interactive targets in the build tree. Modified Paths: -------------- trunk/bindings/tcl/CMakeLists.txt trunk/examples/tcl/README.tcldemos trunk/utils/CMakeLists.txt Added Paths: ----------- trunk/bindings/tcl/pltcl.c Removed Paths: ------------- trunk/utils/pltcl.c Modified: trunk/bindings/tcl/CMakeLists.txt =================================================================== --- trunk/bindings/tcl/CMakeLists.txt 2013-11-25 06:30:00 UTC (rev 12748) +++ trunk/bindings/tcl/CMakeLists.txt 2013-11-25 19:44:36 UTC (rev 12749) @@ -187,20 +187,12 @@ if(ENABLE_itcl) include_directories(${ITCL_INCLUDE_PATH}) - set( - libplplottcltk${LIB_TAG}_COMPILE_FLAGS - "${libplplottcltk${LIB_TAG}_COMPILE_FLAGS} -I${ITCL_INCLUDE_PATH}" - ) - set(plplottcltk${LIB_TAG}_link_libraries - ${plplottcltk${LIB_TAG}_link_libraries} - ${ITCL_LIBRARY} - ) - set( - libplplottcltk${LIB_TAG}_LINK_FLAGS - ${libplplottcltk${LIB_TAG}_LINK_FLAGS} - ${ITCL_LIBRARY} - ) + # tkMain.c is the only code that currently has a dependence on + # itcl library routines. Since that code is now part of the source code + # for libplplottcltk_Main, only flags for that library (but not + # libplplottcltk any more) are modified below. + set( libplplottcltk_Main${LIB_TAG}_COMPILE_FLAGS "${libplplottcltk_Main${LIB_TAG}_COMPILE_FLAGS} -I${ITCL_INCLUDE_PATH}" @@ -289,19 +281,10 @@ if(ENABLE_itk) include_directories(${ITK_INCLUDE_PATH}) - set( - libplplottcltk${LIB_TAG}_COMPILE_FLAGS - "${libplplottcltk${LIB_TAG}_COMPILE_FLAGS} -I${ITK_INCLUDE_PATH}" - ) - set(plplottcltk${LIB_TAG}_link_libraries - ${plplottcltk${LIB_TAG}_link_libraries} - ${ITK_LIBRARY} - ) - set( - libplplottcltk${LIB_TAG}_LINK_FLAGS - ${libplplottcltk${LIB_TAG}_LINK_FLAGS} - ${ITK_LIBRARY} - ) + # tkMain.c is the only code that currently has a dependence on + # itk library routines. Since that code is now part of the source code + # for libplplottcltk_Main, only flags for that library (but not + # libplplottcltk any more) are modified below. set( libplplottcltk_Main${LIB_TAG}_COMPILE_FLAGS @@ -588,4 +571,20 @@ ) install(FILES ${PC_CONFIGURED_FILE} DESTINATION ${PKG_CONFIG_DIR}) endif(PKG_CONFIG_EXECUTABLE) + + add_executable(pltcl pltcl.c) + + target_link_libraries(pltcl plplot${LIB_TAG} plplottcltk_Main${LIB_TAG} plplottcltk${LIB_TAG} ${ITCL_LIBRARY} ${TCL_LIBRARY}) + + if(USE_RPATH) + set_target_properties(pltcl + PROPERTIES + INSTALL_RPATH "${LIB_INSTALL_RPATH}" + ) + endif(USE_RPATH) + + install(TARGETS pltcl + EXPORT export_plplot + DESTINATION ${BIN_DIR} + ) endif(ENABLE_tcl) Copied: trunk/bindings/tcl/pltcl.c (from rev 12743, trunk/utils/pltcl.c) =================================================================== --- trunk/bindings/tcl/pltcl.c (rev 0) +++ trunk/bindings/tcl/pltcl.c 2013-11-25 19:44:36 UTC (rev 12749) @@ -0,0 +1,182 @@ +// $Id$ +// +// Main program for Tcl-interface to PLplot. Allows interpretive +// execution of plotting primitives without regard to output driver. +// +// Maurice LeBrun +// IFS, University of Texas at Austin +// 19-Jun-1994 +// +// Copyright (C) 2004 Joao Cardoso +// +// This file is part of PLplot. +// +// PLplot is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as published +// by the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// PLplot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public License +// along with PLplot; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +// +// + +#include "plplotP.h" +#define USINGPLDLL +#include "pltcl.h" +#ifdef HAVE_ITCL +# ifndef HAVE_ITCLDECLS_H +# define RESOURCE_INCLUDED +# endif +# include <itcl.h> +#endif + +static int +AppInit( Tcl_Interp *interp ); + +//-------------------------------------------------------------------------- +// main -- +// +// Just a stub routine to call pltclMain. The latter is nice to have when +// building extended tclsh's, since then you don't have to rely on sucking +// the Tcl main out of libtcl (which doesn't work correctly on all +// systems/compilers/linkers/etc). Hopefully in the future Tcl will +// supply a sufficiently capable tclMain() type function that can be used +// instead. +//-------------------------------------------------------------------------- + +int +main( int argc, const char **argv ) +{ + exit( pltclMain( argc, argv, NULL, AppInit ) ); +} + +//-------------------------------------------------------------------------- +// plExitCmd +// +// PLplot/Tcl extension command -- handle exit. +// The reason for overriding the normal exit command is so we can tell +// the PLplot library to clean up. +//-------------------------------------------------------------------------- + +static int +plExitCmd( ClientData clientData, Tcl_Interp *interp, int argc, char **argv ) +{ + const char *tmp = Tcl_GetStringResult( interp ); + (void) argc; + (void) argv; + (void) clientData; + +// Print error message if one given + if ( tmp != NULL && tmp != '\0' ) + fprintf( stderr, "%s\n", Tcl_GetStringResult( interp ) ); + + plspause( 0 ); + plend(); + + Tcl_UnsetVar( interp, "tcl_prompt1", 0 ); + Tcl_Eval( interp, "tclexit" ); + + return TCL_OK; +} + +//-------------------------------------------------------------------------- +// prPromptCmd +// +// PLplot/Tcl extension command -- print the prompt. +// Allows much more flexible setting of the prompt. +//-------------------------------------------------------------------------- + +static int +prPromptCmd( ClientData clientData, Tcl_Interp *interp, int argc, char **argv ) +{ + PLStream *pls; + char prompt[80]; + (void) argc; + (void) argv; + (void) clientData; + + plgpls( &pls ); + + if ( pls->ipls == 0 ) + sprintf( prompt, "pltext; puts -nonewline \"pltcl> \"; flush stdout" ); + else + sprintf( prompt, "pltext; puts -nonewline \"pltcl_%d> \"; flush stdout", pls->ipls ); + + Tcl_VarEval( interp, prompt, 0 ); + + return TCL_OK; +} + +// +//-------------------------------------------------------------------------- +// +// AppInit -- +// +// This procedure performs application-specific initialization. +// Most applications, especially those that incorporate additional +// packages, will have their own version of this procedure. +// +// Results: +// Returns a standard Tcl completion code, and leaves an error +// message in interp->result if an error occurs. +// +// Side effects: +// Depends on the startup script. +// +//-------------------------------------------------------------------------- +// + +static int +AppInit( Tcl_Interp *interp ) +{ +// +// Call the init procedures for included packages. Each call should +// look like this: +// +// if (Mod_Init(interp) == TCL_ERROR) { +// return TCL_ERROR; +// } +// +// where "Mod" is the name of the module. +// + if ( Tcl_Init( interp ) == TCL_ERROR ) + { + printf( "Error Tcl_Init\n" ); + return TCL_ERROR; + } +#ifdef HAVE_ITCL + if ( Itcl_Init( interp ) == TCL_ERROR ) + { + return TCL_ERROR; + } +#endif + if ( Pltcl_Init( interp ) == TCL_ERROR ) + { + return TCL_ERROR; + } + +// Application-specific startup. That means: for use in pltcl ONLY. + +// Rename "exit" to "tclexit", and insert custom exit handler + + Tcl_VarEval( interp, "rename exit tclexit", (char *) NULL ); + + Tcl_CreateCommand( interp, "exit", (Tcl_CmdProc *) plExitCmd, + (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL ); + + Tcl_CreateCommand( interp, "pr_prompt", (Tcl_CmdProc *) prPromptCmd, + (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL ); + +// Custom prompt, to make sure we are in text mode when entering commands + + Tcl_SetVar( interp, "tcl_prompt1", "pr_prompt", 0 ); + + return TCL_OK; +} Modified: trunk/examples/tcl/README.tcldemos =================================================================== --- trunk/examples/tcl/README.tcldemos 2013-11-25 06:30:00 UTC (rev 12748) +++ trunk/examples/tcl/README.tcldemos 2013-11-25 19:44:36 UTC (rev 12749) @@ -42,7 +42,7 @@ There are two ways to run tcldemos.tcl: (1) -pltcl | ../../utils/pltcl +pltcl | ../../bindings/tcl/pltcl plinit source tcldemos.tcl 0 Modified: trunk/utils/CMakeLists.txt =================================================================== --- trunk/utils/CMakeLists.txt 2013-11-25 06:30:00 UTC (rev 12748) +++ trunk/utils/CMakeLists.txt 2013-11-25 19:44:36 UTC (rev 12749) @@ -69,32 +69,6 @@ install(TARGETS pltek DESTINATION ${BIN_DIR}) -if(ENABLE_tcl) - include_directories( - ${CMAKE_SOURCE_DIR}/bindings/tcl - ${TCL_INCLUDE_PATH} - ) - if(HAVE_ITCL) - include_directories(${ITCL_INCLUDE_PATH}) - endif(HAVE_ITCL) - - add_executable(pltcl pltcl.c) - - target_link_libraries(pltcl plplot${LIB_TAG} plplottcltk_Main${LIB_TAG} plplottcltk${LIB_TAG} ${ITCL_LIBRARY} ${TCL_LIBRARY}) - - if(USE_RPATH) - set_target_properties(pltcl - PROPERTIES - INSTALL_RPATH "${LIB_INSTALL_RPATH}" - ) - endif(USE_RPATH) - - install(TARGETS pltcl - EXPORT export_plplot - DESTINATION ${BIN_DIR} - ) -endif(ENABLE_tcl) - # Build simple executable to check parity bits of all characters read # by stdin. add_executable(parity_bit_check parity_bit_check.c) Deleted: trunk/utils/pltcl.c =================================================================== --- trunk/utils/pltcl.c 2013-11-25 06:30:00 UTC (rev 12748) +++ trunk/utils/pltcl.c 2013-11-25 19:44:36 UTC (rev 12749) @@ -1,182 +0,0 @@ -// $Id$ -// -// Main program for Tcl-interface to PLplot. Allows interpretive -// execution of plotting primitives without regard to output driver. -// -// Maurice LeBrun -// IFS, University of Texas at Austin -// 19-Jun-1994 -// -// Copyright (C) 2004 Joao Cardoso -// -// This file is part of PLplot. -// -// PLplot is free software; you can redistribute it and/or modify -// it under the terms of the GNU Library General Public License as published -// by the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// PLplot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public License -// along with PLplot; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// -// - -#include "plplotP.h" -#define USINGPLDLL -#include "pltcl.h" -#ifdef HAVE_ITCL -# ifndef HAVE_ITCLDECLS_H -# define RESOURCE_INCLUDED -# endif -# include <itcl.h> -#endif - -static int -AppInit( Tcl_Interp *interp ); - -//-------------------------------------------------------------------------- -// main -- -// -// Just a stub routine to call pltclMain. The latter is nice to have when -// building extended tclsh's, since then you don't have to rely on sucking -// the Tcl main out of libtcl (which doesn't work correctly on all -// systems/compilers/linkers/etc). Hopefully in the future Tcl will -// supply a sufficiently capable tclMain() type function that can be used -// instead. -//-------------------------------------------------------------------------- - -int -main( int argc, const char **argv ) -{ - exit( pltclMain( argc, argv, NULL, AppInit ) ); -} - -//-------------------------------------------------------------------------- -// plExitCmd -// -// PLplot/Tcl extension command -- handle exit. -// The reason for overriding the normal exit command is so we can tell -// the PLplot library to clean up. -//-------------------------------------------------------------------------- - -static int -plExitCmd( ClientData clientData, Tcl_Interp *interp, int argc, char **argv ) -{ - const char *tmp = Tcl_GetStringResult( interp ); - (void) argc; - (void) argv; - (void) clientData; - -// Print error message if one given - if ( tmp != NULL && tmp != '\0' ) - fprintf( stderr, "%s\n", Tcl_GetStringResult( interp ) ); - - plspause( 0 ); - plend(); - - Tcl_UnsetVar( interp, "tcl_prompt1", 0 ); - Tcl_Eval( interp, "tclexit" ); - - return TCL_OK; -} - -//-------------------------------------------------------------------------- -// prPromptCmd -// -// PLplot/Tcl extension command -- print the prompt. -// Allows much more flexible setting of the prompt. -//-------------------------------------------------------------------------- - -static int -prPromptCmd( ClientData clientData, Tcl_Interp *interp, int argc, char **argv ) -{ - PLStream *pls; - char prompt[80]; - (void) argc; - (void) argv; - (void) clientData; - - plgpls( &pls ); - - if ( pls->ipls == 0 ) - sprintf( prompt, "pltext; puts -nonewline \"pltcl> \"; flush stdout" ); - else - sprintf( prompt, "pltext; puts -nonewline \"pltcl_%d> \"; flush stdout", pls->ipls ); - - Tcl_VarEval( interp, prompt, 0 ); - - return TCL_OK; -} - -// -//-------------------------------------------------------------------------- -// -// AppInit -- -// -// This procedure performs application-specific initialization. -// Most applications, especially those that incorporate additional -// packages, will have their own version of this procedure. -// -// Results: -// Returns a standard Tcl completion code, and leaves an error -// message in interp->result if an error occurs. -// -// Side effects: -// Depends on the startup script. -// -//-------------------------------------------------------------------------- -// - -static int -AppInit( Tcl_Interp *interp ) -{ -// -// Call the init procedures for included packages. Each call should -// look like this: -// -// if (Mod_Init(interp) == TCL_ERROR) { -// return TCL_ERROR; -// } -// -// where "Mod" is the name of the module. -// - if ( Tcl_Init( interp ) == TCL_ERROR ) - { - printf( "Error Tcl_Init\n" ); - return TCL_ERROR; - } -#ifdef HAVE_ITCL - if ( Itcl_Init( interp ) == TCL_ERROR ) - { - return TCL_ERROR; - } -#endif - if ( Pltcl_Init( interp ) == TCL_ERROR ) - { - return TCL_ERROR; - } - -// Application-specific startup. That means: for use in pltcl ONLY. - -// Rename "exit" to "tclexit", and insert custom exit handler - - Tcl_VarEval( interp, "rename exit tclexit", (char *) NULL ); - - Tcl_CreateCommand( interp, "exit", (Tcl_CmdProc *) plExitCmd, - (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL ); - - Tcl_CreateCommand( interp, "pr_prompt", (Tcl_CmdProc *) prPromptCmd, - (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL ); - -// Custom prompt, to make sure we are in text mode when entering commands - - Tcl_SetVar( interp, "tcl_prompt1", "pr_prompt", 0 ); - - return TCL_OK; -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-11-25 06:30:07
|
Revision: 12748 http://sourceforge.net/p/plplot/code/12748 Author: andrewross Date: 2013-11-25 06:30:00 +0000 (Mon, 25 Nov 2013) Log Message: ----------- Easier way to rescale the velocity vectors in example 22. Modified Paths: -------------- trunk/examples/c/x22c.c trunk/examples/c++/x22.cc Modified: trunk/examples/c/x22c.c =================================================================== --- trunk/examples/c/x22c.c 2013-11-24 22:01:17 UTC (rev 12747) +++ trunk/examples/c/x22c.c 2013-11-25 06:30:00 UTC (rev 12748) @@ -30,11 +30,11 @@ void potential( void ); void f2mnmx( PLFLT **f, PLINT nx, PLINT ny, PLFLT *fnmin, PLFLT *fnmax ); -// Pairs of points making the line segments used to plot the user defined arrow -static PLFLT arrow_x[6] = { -1.0, 1.0, 0.6, 1.0, 0.6, 1.0 }; -static PLFLT arrow_y[6] = { 0.0, 0.0, 0.4, 0.0, -0.4, 0.0 }; -static PLFLT arrow2_x[6] = { -1.0, 0.6, 0.6, 1.0, 0.6, 0.6 }; -static PLFLT arrow2_y[6] = { 0.0, 0.0, 0.4, 0.0, -0.4, 0.0 }; +// Pairs of points making the line segments used to plot the user defined arroW +static PLFLT arrow_x[6] = { -0.5, 0.5, 0.3, 0.5, 0.3, 0.5 }; +static PLFLT arrow_y[6] = { 0.0, 0.0, 0.2, 0.0, -0.2, 0.0 }; +static PLFLT arrow2_x[6] = { -0.5, 0.3, 0.3, 0.5, 0.3, 0.3 }; +static PLFLT arrow2_y[6] = { 0.0, 0.0, 0.2, 0.0, -0.2, 0.0 }; //-------------------------------------------------------------------------- // main @@ -160,7 +160,7 @@ sprintf( title, "#frPLplot Example 22 - constriction (arrow style %d)", astyle ); pllab( "(x)", "(y)", title ); plcol0( 2 ); - plvect( (const PLFLT * const *) u, (const PLFLT * const *) v, nx, ny, -0.5, pltr2, (void *) &cgrid2 ); + plvect( (const PLFLT * const *) u, (const PLFLT * const *) v, nx, ny, -1.0, pltr2, (void *) &cgrid2 ); plcol0( 1 ); plFree2dGrid( cgrid2.xg, nx, ny ); @@ -252,7 +252,7 @@ xmin + dx / 2, xmax - dx / 2, ymin + dy / 2, ymax - dy / 2, clev, nc, 0, 1, 1.0, plfill, 1, NULL, NULL ); plvect( (const PLFLT * const *) u, (const PLFLT * const *) v, nx, ny, - -0.5, pltr2, (void *) &cgrid2 ); + -1.0, pltr2, (void *) &cgrid2 ); // Plot edges using plpath (which accounts for coordinate transformation) rather than plline plpath( nseg, xmin, ymax, xmax, ymax ); plpath( nseg, xmin, ymin, xmax, ymin ); Modified: trunk/examples/c++/x22.cc =================================================================== --- trunk/examples/c++/x22.cc 2013-11-24 22:01:17 UTC (rev 12747) +++ trunk/examples/c++/x22.cc 2013-11-25 06:30:00 UTC (rev 12748) @@ -157,7 +157,7 @@ sprintf( title, "#frPLplot Example 22 - constriction (arrow style %d)", astyle ); pls->lab( "(x)", "(y)", title ); pls->col0( 2 ); - pls->vect( u, v, nx, ny, -0.5, plstream::tr2, (void *) &cgrid2 ); + pls->vect( u, v, nx, ny, -1.0, plstream::tr2, (void *) &cgrid2 ); pls->col0( 1 ); } @@ -211,7 +211,7 @@ xmin + dx / 2, xmax - dx / 2, ymin + dy / 2, ymax - dy / 2, clev, nc, 0, 1, 1.0, plstream::fill, 1, NULL, NULL ); pls->vect( (const PLFLT * const *) u, (const PLFLT * const *) v, nx, ny, - -0.5, plstream::tr2, (void *) &cgrid2 ); + -1.0, plstream::tr2, (void *) &cgrid2 ); // Plot edges using plpath (which accounts for coordinate transformation) rather than plline pls->path( nseg, xmin, ymax, xmax, ymax ); pls->path( nseg, xmin, ymin, xmax, ymin ); @@ -343,10 +343,10 @@ bool fill; // Set of points making a polygon to use as the arrow - PLFLT arrow_x[6] = { -1.0, 1.0, 0.6, 1.0, 0.6, 1.0 }; - PLFLT arrow_y[6] = { 0.0, 0.0, 0.4, 0.0, -0.4, 0.0 }; - PLFLT arrow2_x[6] = { -1.0, 0.6, 0.6, 1.0, 0.6, 0.6 }; - PLFLT arrow2_y[6] = { 0.0, 0.0, 0.4, 0.0, -0.4, 0.0 }; + PLFLT arrow_x[6] = { -0.5, 0.5, 0.3, 0.5, 0.3, 0.5 }; + PLFLT arrow_y[6] = { 0.0, 0.0, 0.2, 0.0, -0.2, 0.0 }; + PLFLT arrow2_x[6] = { -0.5, 0.3, 0.3, 0.5, 0.3, 0.3 }; + PLFLT arrow2_y[6] = { 0.0, 0.0, 0.2, 0.0, -0.2, 0.0 }; // Create new plstream pls = new plstream(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-11-24 22:01:21
|
Revision: 12747 http://sourceforge.net/p/plplot/code/12747 Author: andrewross Date: 2013-11-24 22:01:17 +0000 (Sun, 24 Nov 2013) Log Message: ----------- Update C++ example 22 following recent changes to C version. Modified Paths: -------------- trunk/examples/c++/x22.cc Modified: trunk/examples/c++/x22.cc =================================================================== --- trunk/examples/c++/x22.cc 2013-11-24 21:41:37 UTC (rev 12746) +++ trunk/examples/c++/x22.cc 2013-11-24 22:01:17 UTC (rev 12747) @@ -32,13 +32,32 @@ using namespace std; #endif +// +// Global transform function for a constriction using data passed in +// This is the same transformation used in constriction. +// +void +transform( PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer data ) +{ + PLFLT *trdata; + PLFLT xmax; + + trdata = (PLFLT *) data; + xmax = *trdata; + + *xt = x; + *yt = y / 4.0 * ( 3 - cos( M_PI * x / xmax ) ); +} + + class x22 { public: x22( int, const char ** ); private: void circulation(); - void constriction(); + void constriction( int astyle ); + void constriction2(); void potential(); void f2mnmx( PLFLT **f, PLINT nx, PLINT ny, PLFLT *fmin, PLFLT *fmax ); @@ -49,7 +68,7 @@ PLFLT **u, **v; PLcGrid2 cgrid2; - int nx, ny; + int nx, ny, nc, nseg; }; // Vector plot of the circulation about the origin @@ -93,12 +112,13 @@ // Vector plot of flow through a constricted pipe void -x22::constriction() +x22::constriction( int astyle ) { int i, j; PLFLT dx, dy, x, y; PLFLT xmin, xmax, ymin, ymax; PLFLT Q, b, dbdx; + char title[80]; dx = 1.0; dy = 1.0; @@ -111,17 +131,17 @@ Q = 2.0; for ( i = 0; i < nx; i++ ) { + x = ( i - nx / 2 + 0.5 ) * dx; for ( j = 0; j < ny; j++ ) { - x = ( i - nx / 2 + 0.5 ) * dx; y = ( j - ny / 2 + 0.5 ) * dy; cgrid2.xg[i][j] = x; cgrid2.yg[i][j] = y; - b = ymax / 4.0 * ( 3 - cos( M_PI * x / xmax ) ); + b = ymax / 4.0 * ( 3.0 - cos( M_PI * x / xmax ) ); if ( fabs( y ) < b ) { dbdx = ymax / 4.0 * sin( M_PI * x / xmax ) * - y / b; + M_PI / xmax * y / b; u[i][j] = Q * ymax / b; v[i][j] = dbdx * u[i][j]; } @@ -134,12 +154,72 @@ } pls->env( xmin, xmax, ymin, ymax, 0, 0 ); - pls->lab( "(x)", "(y)", "#frPLplot Example 22 - constriction" ); + sprintf( title, "#frPLplot Example 22 - constriction (arrow style %d)", astyle ); + pls->lab( "(x)", "(y)", title ); pls->col0( 2 ); pls->vect( u, v, nx, ny, -0.5, plstream::tr2, (void *) &cgrid2 ); pls->col0( 1 ); } +// +// Vector plot of flow through a constricted pipe +// with a coordinate transform +// +void +x22::constriction2( void ) +{ + int i, j; + PLFLT dx, dy, x, y; + PLFLT xmin, xmax, ymin, ymax; + PLFLT Q, b, dbdx; + PLFLT clev[nc]; + + dx = 1.0; + dy = 1.0; + + xmin = -nx / 2 * dx; + xmax = nx / 2 * dx; + ymin = -ny / 2 * dy; + ymax = ny / 2 * dy; + + pls->stransform( transform, ( PLPointer ) & xmax ); + + Q = 2.0; + for ( i = 0; i < nx; i++ ) + { + x = ( i - nx / 2 + 0.5 ) * dx; + for ( j = 0; j < ny; j++ ) + { + y = ( j - ny / 2 + 0.5 ) * dy; + cgrid2.xg[i][j] = x; + cgrid2.yg[i][j] = y; + b = ymax / 4.0 * ( 3 - cos( M_PI * x / xmax ) ); + u[i][j] = Q * ymax / b; + v[i][j] = 0.0; + } + } + + for ( i = 0; i < nc; i++ ) + { + clev[i] = Q + i * Q / ( nc - 1 ); + } + + pls->env( xmin, xmax, ymin, ymax, 0, 0 ); + pls->lab( "(x)", "(y)", "#frPLplot Example 22 - constriction with plstransform" ); + pls->col0( 2 ); + pls->shades( (const PLFLT * const *) u, nx, ny, NULL, + xmin + dx / 2, xmax - dx / 2, ymin + dy / 2, ymax - dy / 2, + clev, nc, 0, 1, 1.0, plstream::fill, 1, NULL, NULL ); + pls->vect( (const PLFLT * const *) u, (const PLFLT * const *) v, nx, ny, + -0.5, plstream::tr2, (void *) &cgrid2 ); + // Plot edges using plpath (which accounts for coordinate transformation) rather than plline + pls->path( nseg, xmin, ymax, xmax, ymax ); + pls->path( nseg, xmin, ymin, xmax, ymin ); + pls->col0( 1 ); + + pls->stransform( NULL, NULL ); +} + // Vector plot of the gradient of a shielded potential (see example 9) void x22::potential() @@ -263,12 +343,11 @@ bool fill; // Set of points making a polygon to use as the arrow - PLFLT arrow_x[6] = { -0.5, 0.5, 0.3, 0.5, 0.3, 0.5 }; - PLFLT arrow_y[6] = { 0.0, 0.0, 0.2, 0.0, -0.2, 0.0 }; - PLFLT arrow2_x[6] = { -0.5, 0.3, 0.3, 0.5, 0.3, 0.3 }; - PLFLT arrow2_y[6] = { 0.0, 0.0, 0.2, 0.0, -0.2, 0.0 }; + PLFLT arrow_x[6] = { -1.0, 1.0, 0.6, 1.0, 0.6, 1.0 }; + PLFLT arrow_y[6] = { 0.0, 0.0, 0.4, 0.0, -0.4, 0.0 }; + PLFLT arrow2_x[6] = { -1.0, 0.6, 0.6, 1.0, 0.6, 0.6 }; + PLFLT arrow2_y[6] = { 0.0, 0.0, 0.4, 0.0, -0.4, 0.0 }; - // Create new plstream pls = new plstream(); @@ -282,6 +361,8 @@ nx = 20; ny = 20; + nc = 11; + nseg = 20; // Allocate arrays pls->Alloc2dGrid( &cgrid2.xg, nx, ny ); @@ -300,14 +381,20 @@ // Set arrow style using arrow_x and arrow_y then // plot using these arrows. pls->svect( arrow_x, arrow_y, narr, fill ); - constriction(); + constriction( 1 ); // Set arrow style using arrow2_x and arrow2_y then // plot using these filled arrows. fill = true; pls->svect( arrow2_x, arrow2_y, narr, fill ); - constriction(); + constriction( 2 ); + constriction2(); + + // Reset arrow style to the default by passing two + // NULL arrays + pls->svect( NULL, NULL, 0, 0 ); + potential(); pls->Free2dGrid( cgrid2.xg, nx, ny ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-11-24 21:41:40
|
Revision: 12746 http://sourceforge.net/p/plplot/code/12746 Author: andrewross Date: 2013-11-24 21:41:37 +0000 (Sun, 24 Nov 2013) Log Message: ----------- Add distinct titles to the constriction plots. Modified Paths: -------------- trunk/examples/c/x22c.c Modified: trunk/examples/c/x22c.c =================================================================== --- trunk/examples/c/x22c.c 2013-11-23 23:37:35 UTC (rev 12745) +++ trunk/examples/c/x22c.c 2013-11-24 21:41:37 UTC (rev 12746) @@ -26,7 +26,7 @@ #include "plcdemos.h" void circulation( void ); -void constriction( void ); +void constriction( int ); void potential( void ); void f2mnmx( PLFLT **f, PLINT nx, PLINT ny, PLFLT *fnmin, PLFLT *fnmax ); @@ -103,7 +103,7 @@ // Vector plot of flow through a constricted pipe // void -constriction( void ) +constriction( int astyle ) { int i, j; PLFLT dx, dy, x, y; @@ -113,6 +113,7 @@ PLFLT **u, **v; const int nx = 20; const int ny = 20; + char title[80]; dx = 1.0; dy = 1.0; @@ -156,7 +157,8 @@ } plenv( xmin, xmax, ymin, ymax, 0, 0 ); - pllab( "(x)", "(y)", "#frPLplot Example 22 - constriction" ); + sprintf( title, "#frPLplot Example 22 - constriction (arrow style %d)", astyle ); + pllab( "(x)", "(y)", title ); plcol0( 2 ); plvect( (const PLFLT * const *) u, (const PLFLT * const *) v, nx, ny, -0.5, pltr2, (void *) &cgrid2 ); plcol0( 1 ); @@ -244,7 +246,7 @@ } plenv( xmin, xmax, ymin, ymax, 0, 0 ); - pllab( "(x)", "(y)", "#frPLplot Example 22 - constriction" ); + pllab( "(x)", "(y)", "#frPLplot Example 22 - constriction with plstransform" ); plcol0( 2 ); plshades( (const PLFLT * const *) u, nx, ny, NULL, xmin + dx / 2, xmax - dx / 2, ymin + dy / 2, ymax - dy / 2, @@ -424,13 +426,13 @@ // Set arrow style using arrow_x and arrow_y then // plot using these arrows. plsvect( arrow_x, arrow_y, narr, fill ); - constriction(); + constriction( 1 ); // Set arrow style using arrow2_x and arrow2_y then // plot using these filled arrows. fill = 1; plsvect( arrow2_x, arrow2_y, narr, fill ); - constriction(); + constriction( 2 ); constriction2(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-23 23:37:38
|
Revision: 12745 http://sourceforge.net/p/plplot/code/12745 Author: airwin Date: 2013-11-23 23:37:35 +0000 (Sat, 23 Nov 2013) Log Message: ----------- Allow expert users to specify PLPLOT_ITCL_VERSION, PLPLOT_ITK_VERSION, and IWIDGETS_VERSIONS_LIST to avoid running tclsh at the configuration stage. However, the values must be consistent to avoid automatic disabling of Itcl and/or Itk. So for example, -DIWIDGETS_VERSIONS_LIST:STRING="4.0.1;3.3;3.4" -DPLPLOT_ITK_VERSION:STRING=3.3 -DPLPLOT_ITCL_VERSION:STRING=3.4 works correctly on Debian Wheezy, but specifying something different than the values that would be found automatically by "package require" commands under tclsh would result in disabling of Itcl, and/or Itk. So users specify these values at their own risk. Modified Paths: -------------- trunk/cmake/modules/tcl-related.cmake Modified: trunk/cmake/modules/tcl-related.cmake =================================================================== --- trunk/cmake/modules/tcl-related.cmake 2013-11-23 04:20:14 UTC (rev 12744) +++ trunk/cmake/modules/tcl-related.cmake 2013-11-23 23:37:35 UTC (rev 12745) @@ -96,14 +96,28 @@ else(USE_INCRTCL_VERSION_4) set(SUGGESTED_ITCL_VERSION 3) endif(USE_INCRTCL_VERSION_4) - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CheckITCL_Available.tcl "puts -nonewline [package require Itcl ${SUGGESTED_ITCL_VERSION}]; exit") - # Refine SUGGESTED_ITCL_VERSION to exact value or fail. - execute_process( - COMMAND ${TCL_TCLSH} ${CMAKE_CURRENT_BINARY_DIR}/CheckITCL_Available.tcl - RESULT_VARIABLE ITCL_RC - OUTPUT_VARIABLE PLPLOT_ITCL_VERSION - ERROR_VARIABLE ITCL_STDERR - ) + if(NOT PLPLOT_ITCL_VERSION) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CheckITCL_Available.tcl "puts -nonewline [package require Itcl ${SUGGESTED_ITCL_VERSION}]; exit") + # Refine SUGGESTED_ITCL_VERSION to exact value or fail. + execute_process( + COMMAND ${TCL_TCLSH} ${CMAKE_CURRENT_BINARY_DIR}/CheckITCL_Available.tcl + RESULT_VARIABLE ITCL_RC + OUTPUT_VARIABLE _plplot_itcl_version + ) + if(NOT ITCL_RC) + # Store result in cached variable so it will be remembered + # when cmake is re-run, but use type of STRING rather than + # INTERNAL to allow users to specify the value with a + # -DPLPLOT_ITCL_VERSION:STRING=<whatever> on the command + # line for those rare cases when "package require Itcl" + # would error out due to some tclsh issue. + set(PLPLOT_ITCL_VERSION ${_plplot_itcl_version} + CACHE STRING "Itcl version that will be used" + ) + endif(NOT ITCL_RC) + else(NOT PLPLOT_ITCL_VERSION) + set(ITCL_RC 0) + endif(NOT PLPLOT_ITCL_VERSION) if(NOT ITCL_RC) message(STATUS "Looking for itcl.h") if(NOT USE_INCRTCL_VERSION_4) @@ -212,14 +226,29 @@ else(USE_INCRTCL_VERSION_4) set(SUGGESTED_ITK_VERSION 3) endif(USE_INCRTCL_VERSION_4) - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CheckITK_Available.tcl "puts -nonewline [package require Itk ${SUGGESTED_ITK_VERSION}]; exit") - # Refine SUGGESTED_ITK_VERSION to exact value or fail. - execute_process( - COMMAND ${TCL_TCLSH} ${CMAKE_CURRENT_BINARY_DIR}/CheckITK_Available.tcl - RESULT_VARIABLE ITK_RC - OUTPUT_VARIABLE PLPLOT_ITK_VERSION - ERROR_VARIABLE ITK_STDERR - ) + if(NOT PLPLOT_ITK_VERSION) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CheckITK_Available.tcl "puts -nonewline [package require Itk ${SUGGESTED_ITK_VERSION}]; exit") + # Refine SUGGESTED_ITK_VERSION to exact value or fail. + execute_process( + COMMAND ${TCL_TCLSH} ${CMAKE_CURRENT_BINARY_DIR}/CheckITK_Available.tcl + RESULT_VARIABLE ITK_RC + OUTPUT_VARIABLE _plplot_itk_version + ) + if(NOT ITK_RC) + # Store result in cached variable so it will be remembered + # when cmake is re-run, but use type of STRING rather than + # INTERNAL to allow users to specify the value with a + # -DPLPLOT_ITK_VERSION:STRING=<whatever> on the command line + # for those rare cases (e.g., autobuild environment without X) + # when "package require Itk" would error out due to the lack + # of X or some tclsh issue. + set(PLPLOT_ITK_VERSION ${_plplot_itk_version} + CACHE STRING "Itk version that will be used" + ) + endif(NOT ITK_RC) + else(NOT PLPLOT_ITK_VERSION) + set(ITCL_RC 0) + endif(NOT PLPLOT_ITK_VERSION) if(NOT ITK_RC) message(STATUS "Looking for itk.h") if(NOT USE_INCRTCL_VERSION_4) @@ -278,39 +307,57 @@ set(HAVE_ITK ON) # Test version consistency between iwidgets, itk, and itcl. - if(USE_INCRTCL_VERSION_4) - set(SUGGESTED_IWIDGETS_VERSION 4.1) - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/determine_versions.tcl "puts -nonewline \"[package require Iwidgets ${SUGGESTED_IWIDGETS_VERSION}];[package require Itk];[package require Itcl]\";exit") - execute_process( - COMMAND ${TCL_TCLSH} ${CMAKE_CURRENT_BINARY_DIR}/determine_versions.tcl - RESULT_VARIABLE IWIDGETS_RC - OUTPUT_VARIABLE IWIDGETS_VERSIONS_LIST - ERROR_VARIABLE IWIDGETS_STDERR - ) - else(USE_INCRTCL_VERSION_4) - # Find maximum 4.0 version of iwidgets that is - # available. 4.0.1 (released in 2002) is the largest - # version of iwidgets4.0 (as opposed to the recently - # developed iwidgets4.1) I have found on the web in - # tarball form, but I have seen one reference to 4.0.2 - # which may have been publicly released somewhere - # inaccessible to my google searches or privately made - # available before all development of iwidgets4.0 - # stopped. So add 4.0.2 to the list just in case. - foreach(SUGGESTED_IWIDGETS_VERSION 4.0.2 4.0.1 4.0.0) - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/determine_versions.tcl "puts -nonewline \"[package require -exact Iwidgets ${SUGGESTED_IWIDGETS_VERSION}];[package require Itk];[package require Itcl]\";exit") + if(NOT IWIDGETS_VERSIONS_LIST) + if(USE_INCRTCL_VERSION_4) + set(SUGGESTED_IWIDGETS_VERSION 4.1) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/determine_versions.tcl "puts -nonewline \"[package require Iwidgets ${SUGGESTED_IWIDGETS_VERSION}];[package require Itk];[package require Itcl]\";exit") execute_process( COMMAND ${TCL_TCLSH} ${CMAKE_CURRENT_BINARY_DIR}/determine_versions.tcl RESULT_VARIABLE IWIDGETS_RC - OUTPUT_VARIABLE IWIDGETS_VERSIONS_LIST - ERROR_VARIABLE IWIDGETS_STDERR + OUTPUT_VARIABLE _iwidgets_versions_list ) - if(NOT IWIDGETS_RC) - break() - endif(NOT IWIDGETS_RC) - endforeach(SUGGESTED_IWIDGETS_VERSION 4.0.2 4.0.1 4.0.0) - endif(USE_INCRTCL_VERSION_4) + else(USE_INCRTCL_VERSION_4) + # Find maximum 4.0 version of iwidgets that is + # available. 4.0.1 (released in 2002) is the largest + # version of iwidgets4.0 (as opposed to the recently + # developed iwidgets4.1) I have found on the web in + # tarball form, but I have seen one reference to 4.0.2 + # which may have been publicly released somewhere + # inaccessible to my google searches or privately made + # available before all development of iwidgets4.0 + # stopped. So add 4.0.2 to the list just in case. + foreach(SUGGESTED_IWIDGETS_VERSION 4.0.2 4.0.1 4.0.0) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/determine_versions.tcl "puts -nonewline \"[package require -exact Iwidgets ${SUGGESTED_IWIDGETS_VERSION}];[package require Itk];[package require Itcl]\";exit") + execute_process( + COMMAND ${TCL_TCLSH} ${CMAKE_CURRENT_BINARY_DIR}/determine_versions.tcl + RESULT_VARIABLE IWIDGETS_RC + OUTPUT_VARIABLE _iwidgets_versions_list + ERROR_QUIET + ) + if(NOT IWIDGETS_RC) + break() + endif(NOT IWIDGETS_RC) + endforeach(SUGGESTED_IWIDGETS_VERSION 4.0.2 4.0.1 4.0.0) + endif(USE_INCRTCL_VERSION_4) + if(NOT IWIDGETS_RC) + # Store result in cached variable so it will be + # remembered when cmake is re-run, but use type of + # STRING rather than INTERNAL to allow users to + # specify the value with a + # -DIWIDGETS_VERSIONS_LIST:STRING=<whatever> on the + # command line for those rare cases (e.g., autobuild + # environment without X) when "package require Itk (or + # Itcl or IWidgets)" would error out due to the lack of + # X or some tclsh issue + set(IWIDGETS_VERSIONS_LIST ${_iwidgets_versions_list} + CACHE STRING "list of Iwidgets; Itk, and Itcl versions (in that order) that will be used" + ) + endif(NOT IWIDGETS_RC) + else(NOT IWIDGETS_VERSIONS_LIST) + set(IWIDGETS_RC 0) + endif(NOT IWIDGETS_VERSIONS_LIST) if(NOT IWIDGETS_RC) + message(STATUS "IWIDGETS_VERSIONS_LIST = ${IWIDGETS_VERSIONS_LIST}") list(GET IWIDGETS_VERSIONS_LIST 0 PLPLOT_IWIDGETS_VERSION) list(GET IWIDGETS_VERSIONS_LIST 1 CONSISTENT_ITK_VERSION) list(GET IWIDGETS_VERSIONS_LIST 2 CONSISTENT_ITCL_VERSION) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-23 04:20:19
|
Revision: 12744 http://sourceforge.net/p/plplot/code/12744 Author: airwin Date: 2013-11-23 04:20:14 +0000 (Sat, 23 Nov 2013) Log Message: ----------- Implement the test_plserver_runAllDemos and test_wish_runAllDemos targets which do what their name implies. Tested by Alan W. Irwin <ai...@us...> on Linux using build-tree testing of the test_plserver_runAllDemos and test_wish_runAllDemos from an initially empty build tree (to test all required dependencies will be built correctly by these targets). There are a number of run-time issues with these targets that will be discussed on the plplot-devel mailing list. Because of those issues these targets are temporarily kept from being dependencies of more general interactive targets such as test_interactive. Modified Paths: -------------- trunk/examples/CMakeLists.txt trunk/examples/tk/CMakeLists.txt Added Paths: ----------- trunk/examples/tk/plserver_runAllDemos.in trunk/examples/tk/wish_runAllDemos.in Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2013-11-23 01:28:32 UTC (rev 12743) +++ trunk/examples/CMakeLists.txt 2013-11-23 04:20:14 UTC (rev 12744) @@ -1048,6 +1048,41 @@ else(USE_INCRTCL_VERSION_4) list(APPEND targets_examples_tk test_tk_04) endif(USE_INCRTCL_VERSION_4) + + add_custom_target(test_plserver_runAllDemos + COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/plserver_runAllDemos + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk + ) + add_dependencies(test_plserver_runAllDemos + plserver + tcl_examples + tclIndex_tcl + tclIndex_tk + tclIndex_examples_tk + ) + + message(STATUS "WARNING: The test_plserver_runAlldemos target can be run independently but + there are several issues with this target so it is temporarily excluded from being a + dependency of other more general interactive test targets") + #list(APPEND targets_examples_tk test_plserver_runAllDemos) + + add_custom_target(test_wish_runAllDemos + COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/wish_runAllDemos -geometry 800x600 + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk + ) + add_dependencies(test_wish_runAllDemos + plplottcltk${LIB_TAG} + tkwin + tcl_examples + tclIndex_tcl + tclIndex_tk + tclIndex_examples_tk + ) + message(STATUS "WARNING: The test_wish_runAlldemos target can be run independently but + there are several issues with this target so it is temporarily excluded from being a + dependency of other more general interactive test targets") + # list(APPEND targets_examples_tk test_wish_runAlldemos) + endif(ENABLE_itk) endif(ENABLE_tk AND PLD_tk) Modified: trunk/examples/tk/CMakeLists.txt =================================================================== --- trunk/examples/tk/CMakeLists.txt 2013-11-23 01:28:32 UTC (rev 12743) +++ trunk/examples/tk/CMakeLists.txt 2013-11-23 04:20:14 UTC (rev 12744) @@ -142,10 +142,21 @@ # standard_examples is a configured shell script that runs all the standard # examples under plserver. -set(tk_SCRIPTS tk01 tk03 plgrid standard_examples wish_standard_examples) -# The second and fourth Tk examples depend on Itk to work. +set(tk_SCRIPTS + tk01 + tk03 + plgrid + standard_examples + wish_standard_examples + ) +# These examples depend on Itk to work. if(ENABLE_itk) - list(APPEND tk_SCRIPTS tk02 tk04) + list(APPEND tk_SCRIPTS + tk02 + tk04 + plserver_runAllDemos + wish_runAllDemos + ) endif(ENABLE_itk) if(BUILD_TEST) @@ -185,11 +196,15 @@ # wish_standard_examples is a configured shell script that runs all # the standard examples under wish using a TEA-based approach. # pkgIndex_LOCATION is the directory where the relevant pkgIndex.tcl - # file is located. + # file is located. In the Plplotter package case two build-tree + # locations must be given, and we use the pkgIndex_LOCATIONS variable + # to configure that case. if(CORE_BUILD) set(pkgIndex_LOCATION ${CMAKE_BINARY_DIR}/bindings/tk) + set(pkgIndex_LOCATIONS "${CMAKE_BINARY_DIR}/bindings/tk ${CMAKE_BINARY_DIR}/bindings/tk-x-plat") else(CORE_BUILD) set(pkgIndex_LOCATION ${DATA_DIR}) + set(pkgIndex_LOCATIONS ${DATA_DIR}) endif(CORE_BUILD) foreach(tk_related_target xtk01 plserver xtk02 xtk04) Added: trunk/examples/tk/plserver_runAllDemos.in =================================================================== --- trunk/examples/tk/plserver_runAllDemos.in (rev 0) +++ trunk/examples/tk/plserver_runAllDemos.in 2013-11-23 04:20:14 UTC (rev 12744) @@ -0,0 +1,7 @@ +#!@SH_EXECUTABLE@ +# Run plserver example for standard examples. +# The following exec command reexecutes the script under wish. This +# is possible because all comment lines are ignored by wish including +# continued ones with a trailing backslash like this one \ +exec @plserver_LOCATION@ -f "$0" "$@" +source runAllDemos.tcl Property changes on: trunk/examples/tk/plserver_runAllDemos.in ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: trunk/examples/tk/wish_runAllDemos.in =================================================================== --- trunk/examples/tk/wish_runAllDemos.in (rev 0) +++ trunk/examples/tk/wish_runAllDemos.in 2013-11-23 04:20:14 UTC (rev 12744) @@ -0,0 +1,9 @@ +#!@SH_EXECUTABLE@ +# Run standard examples using wish/runAllDemos.tcl +# The following exec command reexecutes the script under wish. This +# is possible because all comment lines are ignored by wish including +# continued ones with a trailing backslash like this one \ +exec @TK_WISH@ "$0" "$@" +lappend auto_path @pkgIndex_LOCATIONS@ +package require Plplotter +source runAllDemos.tcl Property changes on: trunk/examples/tk/wish_runAllDemos.in ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-23 01:28:36
|
Revision: 12743 http://sourceforge.net/p/plplot/code/12743 Author: airwin Date: 2013-11-23 01:28:32 +0000 (Sat, 23 Nov 2013) Log Message: ----------- Simplify and better document our pause treatment Modified Paths: -------------- trunk/examples/tk/standard_examples.in trunk/examples/tk/tkdemos.tcl trunk/examples/tk/wish_standard_examples.in Modified: trunk/examples/tk/standard_examples.in =================================================================== --- trunk/examples/tk/standard_examples.in 2013-11-22 21:01:27 UTC (rev 12742) +++ trunk/examples/tk/standard_examples.in 2013-11-23 01:28:32 UTC (rev 12743) @@ -8,11 +8,11 @@ exec @plserver_LOCATION@ -f "$0" "$@" source tkdemos.tcl # -# Turn off pausing - it has to be done in two ways, as the plxframe uses a visual -# clue and bindings to key press events. +# Turn off pausing - Note in the current plserver case, the plxframe +# uses a visual clue and bindings to key press events so a different +# method must be used to disable pausing than in the wish case. # Note that the widget in question is .plw, not $plwin # -$plwin cmd plspause 0 plw::set_pause .plw 0 # # Now run the examples one by one Modified: trunk/examples/tk/tkdemos.tcl =================================================================== --- trunk/examples/tk/tkdemos.tcl 2013-11-22 21:01:27 UTC (rev 12742) +++ trunk/examples/tk/tkdemos.tcl 2013-11-23 01:28:32 UTC (rev 12743) @@ -91,8 +91,6 @@ proc $i {} " global plwin $demo $plwin - # Disable pausing (currently only does that for the wish version) - $plwin cmd plspause 0 $plwin cmd plcol0 1 $plwin cmd plsori 0 $plwin cmd plspal0 cmap0_default.pal Modified: trunk/examples/tk/wish_standard_examples.in =================================================================== --- trunk/examples/tk/wish_standard_examples.in 2013-11-22 21:01:27 UTC (rev 12742) +++ trunk/examples/tk/wish_standard_examples.in 2013-11-23 01:28:32 UTC (rev 12743) @@ -13,8 +13,8 @@ lappend auto_path @pkgIndex_LOCATION@ package require Pltk source tkdemos.tcl -# disable pauses -$plwin cmd plspause 0 +# Note wish currently disables pauses so no special method is +# required to do that (unlike the plserver case). 0 1 #2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-22 21:01:30
|
Revision: 12742 http://sourceforge.net/p/plplot/code/12742 Author: airwin Date: 2013-11-22 21:01:27 +0000 (Fri, 22 Nov 2013) Log Message: ----------- The tkwin device does make sense when dynamic devices are not used since "package require Plplotter" dynamically loads libplplotd (which contains all the tkwin code in this case) rather than the tkwin device. Therefore revert most of the previous change. The result is only two changes from revision 12719; (1) tclMain.c and tkMain.c are dropped from the code that is included in libplotd when dynamic devices are not enabled and (2) tkwin_LINK_FLAGS includes the stubs versions of libtcl and libtk when USE_TCL_TK_STUBS is ON. Revision Links: -------------- http://sourceforge.net/p/plplot/code/12719 Modified Paths: -------------- trunk/cmake/modules/tk.cmake Modified: trunk/cmake/modules/tk.cmake =================================================================== --- trunk/cmake/modules/tk.cmake 2013-11-22 18:57:31 UTC (rev 12741) +++ trunk/cmake/modules/tk.cmake 2013-11-22 21:01:27 UTC (rev 12742) @@ -54,16 +54,6 @@ endif(PLD_tk OR PLD_ntk OR PLD_tkwin) endif(NOT ENABLE_tk) -# tkwin "device" (the shared object dynamically loaded by the -# "package require Plplotter" command from a Tk wish environment) only -# makes sense for the case of dynamical devices. - -if(NOT ENABLE_DYNDRIVERS) - message(STATUS "WARNING: ENABLE_DYNDRIVERS OFF. Setting PLD_tkwin OFF.") - set(PLD_tkwin OFF CACHE BOOL "Enable tkwin device" FORCE) -endif(NOT ENABLE_DYNDRIVERS) - - # Transform TK_INCLUDE_PATH (which is a list) to blank-delimited flag form. string(REGEX REPLACE ";" " -I" TKLIB_COMPILE_FLAGS "-I${TK_INCLUDE_PATH}") @@ -128,4 +118,35 @@ ${CMAKE_SOURCE_DIR}/bindings/tk-x-plat/Plplotter_Init.c ${CMAKE_SOURCE_DIR}/bindings/tk-x-plat/plplotter.c ) + if(NOT ENABLE_DYNDRIVERS AND NOT PLD_tk) + # All source that is in libplplottcltk + set( + tkwin_SOURCE + ${tkwin_SOURCE} + ${CMAKE_SOURCE_DIR}/bindings/tcl/tclAPI.c + ${CMAKE_SOURCE_DIR}/bindings/tk/Pltk_Init.c + ${CMAKE_SOURCE_DIR}/bindings/tk/plframe.c + ${CMAKE_SOURCE_DIR}/bindings/tk/plr.c + ${CMAKE_SOURCE_DIR}/bindings/tk/tcpip.c + ) + # All source that is in libtclmatrix + set( + tkwin_SOURCE + ${tkwin_SOURCE} + ${CMAKE_SOURCE_DIR}/bindings/tcl/tclMatrix.c + ${CMAKE_SOURCE_DIR}/bindings/tcl/matrixInit.c + ) + if(ENABLE_itcl) + set(tkwin_COMPILE_FLAGS + "${tkwin_COMPILE_FLAGS} -I${ITCL_INCLUDE_PATH}" + ) + set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${ITCL_LIBRARY}) + endif(ENABLE_itcl) + if(ENABLE_itk) + set(tkwin_COMPILE_FLAGS + "${tkwin_COMPILE_FLAGS} -I${ITK_INCLUDE_PATH}" + ) + set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${ITK_LIBRARY}) + endif(ENABLE_itk) + endif(NOT ENABLE_DYNDRIVERS AND NOT PLD_tk) endif(PLD_tkwin) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-22 18:57:34
|
Revision: 12741 http://sourceforge.net/p/plplot/code/12741 Author: airwin Date: 2013-11-22 18:57:31 +0000 (Fri, 22 Nov 2013) Log Message: ----------- Enable -dev ntk by default. Thanks to Arjen's recent changes it works fine for me on Linux, and Arjen reports it also works well on Cygwin, and Windows. Tested by Alan W. Irwin <ai...@us...> on Linux using the test_c_ntk target. Modified Paths: -------------- trunk/cmake/modules/drivers-init.cmake Modified: trunk/cmake/modules/drivers-init.cmake =================================================================== --- trunk/cmake/modules/drivers-init.cmake 2013-11-22 18:42:58 UTC (rev 12740) +++ trunk/cmake/modules/drivers-init.cmake 2013-11-22 18:57:31 UTC (rev 12741) @@ -190,7 +190,7 @@ #"ljii:ljii:OFF:F:OFF" #"ljiip:ljiip:OFF:F:OFF" "mem:mem:ON:M:OFF" - "ntk:ntk:OFF:I:OFF" + "ntk:ntk:ON:I:OFF" "null:null:ON:N:OFF" # The pbm device is primitive (e.g., Hershey fonts, software fills, # no alpha transparency) and poorly maintained (the double free for This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-22 18:43:02
|
Revision: 12740 http://sourceforge.net/p/plplot/code/12740 Author: airwin Date: 2013-11-22 18:42:58 +0000 (Fri, 22 Nov 2013) Log Message: ----------- Style previous commits. Modified Paths: -------------- trunk/bindings/tk/plframe.c trunk/bindings/tk-x-plat/plplotter.c trunk/drivers/ntk.c trunk/examples/c/x22c.c trunk/src/plvect.c Modified: trunk/bindings/tk/plframe.c =================================================================== --- trunk/bindings/tk/plframe.c 2013-11-22 13:36:22 UTC (rev 12739) +++ trunk/bindings/tk/plframe.c 2013-11-22 18:42:58 UTC (rev 12740) @@ -137,7 +137,7 @@ // Support for save operations - char *SaveFnam; // File name we are currently saving to. + char *SaveFnam; // File name we are currently saving to. // Malloc'ed. const char **devDesc; // Descriptive names for file-oriented // devices. Malloc'ed. Modified: trunk/bindings/tk-x-plat/plplotter.c =================================================================== --- trunk/bindings/tk-x-plat/plplotter.c 2013-11-22 13:36:22 UTC (rev 12739) +++ trunk/bindings/tk-x-plat/plplotter.c 2013-11-22 18:42:58 UTC (rev 12740) @@ -149,12 +149,12 @@ // Support for save operations - char *SaveFnam; // File name we are currently saving to. + char *SaveFnam; // File name we are currently saving to. // Malloc'ed. - const char **devDesc; // Descriptive names for file-oriented - // devices. Malloc'ed. - const char **devName; // Keyword names of file-oriented devices. - // Malloc'ed. + const char **devDesc; // Descriptive names for file-oriented + // devices. Malloc'ed. + const char **devName; // Keyword names of file-oriented devices. + // Malloc'ed. // Used in selecting & modifying plot or device area Modified: trunk/drivers/ntk.c =================================================================== --- trunk/drivers/ntk.c 2013-11-22 13:36:22 UTC (rev 12739) +++ trunk/drivers/ntk.c 2013-11-22 18:42:58 UTC (rev 12740) @@ -115,7 +115,7 @@ // sprintf( scmd, "send %s {%s}", rem_interp, cmd ); // mess! make it more efficient if ( Tcl_Eval( interp, scmd ) != TCL_OK ) - fprintf( stderr, "%s\n", Tcl_GetStringResult(interp) ); + fprintf( stderr, "%s\n", Tcl_GetStringResult( interp ) ); } } @@ -239,10 +239,10 @@ if ( pls->geometry != NULL ) sscanf( pls->geometry, "%dx%d", &xmax, &ymax ); -/* if ( pls->plwindow != NULL ) - strcpy( base, pls->plwindow ); - else */ - strcpy( base, ".plf" ); // default frame containing the canvas +// if ( pls->plwindow != NULL ) +// strcpy( base, pls->plwindow ); +// else + strcpy( base, ".plf" ); // default frame containing the canvas interp = Tcl_CreateInterp(); @@ -264,7 +264,7 @@ sprintf( cmd, "send %s \"set client [tk appname]; wm deiconify .\"", rem_interp ); if ( Tcl_Eval( interp, cmd ) != TCL_OK ) { - fprintf( stderr, "%s\n", Tcl_GetStringResult(interp) ); + fprintf( stderr, "%s\n", Tcl_GetStringResult( interp ) ); plexit( "No such tk server." ); } } @@ -301,7 +301,7 @@ // Set up device parameters Tcl_Eval( interp, "tk scaling" ); // pixels per mm - ppm = (PLFLT) atof( Tcl_GetStringResult(interp) ) / ( 25.4 / 72. ); + ppm = (PLFLT) atof( Tcl_GetStringResult( interp ) ) / ( 25.4 / 72. ); plP_setpxl( ppm, ppm ); plP_setphy( xmin, xmax * scale, ymin, ymax * scale ); @@ -373,11 +373,11 @@ { tk_cmd( "update" ); tk_cmd( "info exists keypress" ); - sscanf( Tcl_GetStringResult(interp), "%d", &st ); + sscanf( Tcl_GetStringResult( interp ), "%d", &st ); } tk_cmd( "set keypress" ); - sscanf( Tcl_GetStringResult(interp), "%d", &key ); + sscanf( Tcl_GetStringResult( interp ), "%d", &key ); //fprintf(stderr,"\n%d\n", key);fflush(stderr); tk_cmd( "unset keypress" ); st = 0; @@ -435,7 +435,7 @@ { tk_cmd( "update" ); tk_cmd( "winfo exists $plf.f2.c$ccanv" ); - sscanf( Tcl_GetStringResult(interp), "%d", &st ); + sscanf( Tcl_GetStringResult( interp ), "%d", &st ); } st = 0; // this give a "Segmentation fault", even after checking for the canvas! @@ -452,16 +452,16 @@ { tk_cmd( "update" ); tk_cmd( "info exists xloc" ); - sscanf( Tcl_GetStringResult(interp), "%d", &st ); + sscanf( Tcl_GetStringResult( interp ), "%d", &st ); } tk_cmd( "set xloc" ); - sscanf( Tcl_GetStringResult(interp), "%d", &gin.pX ); + sscanf( Tcl_GetStringResult( interp ), "%d", &gin.pX ); tk_cmd( "set yloc" ); - sscanf( Tcl_GetStringResult(interp), "%d", &gin.pY ); + sscanf( Tcl_GetStringResult( interp ), "%d", &gin.pY ); tk_cmd( "set bloc" ); - sscanf( Tcl_GetStringResult(interp), "%d", &gin.button ); + sscanf( Tcl_GetStringResult( interp ), "%d", &gin.button ); tk_cmd( "set sloc" ); - sscanf( Tcl_GetStringResult(interp), "%d", &gin.state ); + sscanf( Tcl_GetStringResult( interp ), "%d", &gin.state ); gin.dX = (PLFLT) gin.pX / xmax; gin.dY = 1. - (PLFLT) gin.pY / ymax; Modified: trunk/examples/c/x22c.c =================================================================== --- trunk/examples/c/x22c.c 2013-11-22 13:36:22 UTC (rev 12739) +++ trunk/examples/c/x22c.c 2013-11-22 18:42:58 UTC (rev 12740) @@ -434,9 +434,9 @@ constriction2(); - // Reset arrow style to the default by passing two + // Reset arrow style to the default by passing two // NULL arrays - plsvect( NULL, NULL, 0, 0); + plsvect( NULL, NULL, 0, 0 ); potential(); Modified: trunk/src/plvect.c =================================================================== --- trunk/src/plvect.c 2013-11-22 13:36:22 UTC (rev 12739) +++ trunk/src/plvect.c 2013-11-22 18:42:58 UTC (rev 12740) @@ -39,7 +39,7 @@ void c_plsvect( const PLFLT *arrowx, const PLFLT *arrowy, PLINT npts, PLINT fill ) { - int i; + int i; PLFLT def_arrow_x[6] = { -0.5, 0.5, 0.3, 0.5, 0.3, 0.5 }; PLFLT def_arrow_y[6] = { 0.0, 0.0, 0.2, 0.0, -0.2, 0.0 }; @@ -49,12 +49,12 @@ free_mem( plsc->arrow_y ); // Reset default arrow if null pointers are passed. - if (arrowx == NULL && arrowy == NULL) + if ( arrowx == NULL && arrowy == NULL ) { - arrowx = def_arrow_x; - arrowy = def_arrow_y; - npts = 6; - fill = 0; + arrowx = def_arrow_x; + arrowy = def_arrow_y; + npts = 6; + fill = 0; } if ( ( ( plsc->arrow_x = (PLFLT *) malloc( (size_t) npts * sizeof ( PLFLT ) ) ) == NULL ) || This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |