From: <ai...@us...> - 2013-10-12 00:45:07
|
Revision: 12589 http://sourceforge.net/p/plplot/code/12589 Author: airwin Date: 2013-10-12 00:45:01 +0000 (Sat, 12 Oct 2013) Log Message: ----------- Do not assume that hpdf.h will be found in the hpdf subdirectory. This change allows the pdf device driver to build not only against a native build of the libhpdf library (which installs hpdf.h in an hpdf subdirectory) as well as the Debian package of same (which install hpdf.h in /usr/include, i.e, not in a subdirectory named hpdf). Modified Paths: -------------- trunk/cmake/modules/Findhpdf.cmake trunk/drivers/pdf.c Modified: trunk/cmake/modules/Findhpdf.cmake =================================================================== --- trunk/cmake/modules/Findhpdf.cmake 2013-10-11 18:50:01 UTC (rev 12588) +++ trunk/cmake/modules/Findhpdf.cmake 2013-10-12 00:45:01 UTC (rev 12589) @@ -8,7 +8,7 @@ # hpdf_LIBRARY_DIRS, the directory where libhpdf (either shared or static) # is found. -find_path(hpdf_INCLUDE_DIR hpdf/hpdf.h /usr/local/include /usr/include) +find_path(hpdf_INCLUDE_DIR hpdf.h /usr/local/include/hpdf /usr/local/include /usr/include/hpdf /usr/include) if(hpdf_INCLUDE_DIR) find_library(hpdf_LIBRARY Modified: trunk/drivers/pdf.c =================================================================== --- trunk/drivers/pdf.c 2013-10-11 18:50:01 UTC (rev 12588) +++ trunk/drivers/pdf.c 2013-10-12 00:45:01 UTC (rev 12589) @@ -38,7 +38,7 @@ #include <math.h> #include <setjmp.h> -#include "hpdf/hpdf.h" +#include "hpdf.h" // PLplot header files #define DEBUG This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-10-20 00:14:12
|
Revision: 12609 http://sourceforge.net/p/plplot/code/12609 Author: airwin Date: 2013-10-20 00:14:09 +0000 (Sun, 20 Oct 2013) Log Message: ----------- Style previous commit. Modified Paths: -------------- trunk/drivers/cairo.c trunk/examples/d/x33d.d Modified: trunk/drivers/cairo.c =================================================================== --- trunk/drivers/cairo.c 2013-10-19 18:05:40 UTC (rev 12608) +++ trunk/drivers/cairo.c 2013-10-20 00:14:09 UTC (rev 12609) @@ -750,12 +750,12 @@ strncat( aStream->pangoMarkupString, "</span>", MAX_MARKUP_LEN - 1 - strlen( aStream->pangoMarkupString ) ); aStream->level++; } - else - { + else + { strncat( aStream->pangoMarkupString, "<span underline=\"single\">", MAX_MARKUP_LEN - 1 - strlen( aStream->pangoMarkupString ) ); aStream->level++; - } - aStream->uline = !aStream->uline; + } + aStream->uline = !aStream->uline; break; case PLTEXT_BACKCHAR: case PLTEXT_OVERLINE: @@ -989,7 +989,7 @@ // http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html //-------------------------------------------------------------------------- -char *ucs4_to_pango_markup_format( PLUNICODE *ucs4, int ucs4Len, float fontSize) +char *ucs4_to_pango_markup_format( PLUNICODE *ucs4, int ucs4Len, float fontSize ) { char plplotEsc; int i; Modified: trunk/examples/d/x33d.d =================================================================== --- trunk/examples/d/x33d.d 2013-10-19 18:05:40 UTC (rev 12608) +++ trunk/examples/d/x33d.d 2013-10-20 00:14:09 UTC (rev 12609) @@ -65,8 +65,8 @@ // plcolorbar options // Colorbar type options -const int COLORBAR_KINDS = 4; -static PLINT colorbar_option_kinds[COLORBAR_KINDS] = [ +const int COLORBAR_KINDS = 4; +static PLINT colorbar_option_kinds[COLORBAR_KINDS] = [ PL_COLORBAR_SHADE, PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, PL_COLORBAR_IMAGE, @@ -80,8 +80,8 @@ ]; // Which side of the page are we positioned relative to? -const int COLORBAR_POSITIONS = 4; -static PLINT colorbar_position_options[COLORBAR_POSITIONS] = [ +const int COLORBAR_POSITIONS = 4; +static PLINT colorbar_position_options[COLORBAR_POSITIONS] = [ PL_POSITION_LEFT, PL_POSITION_RIGHT, PL_POSITION_TOP, @@ -95,8 +95,8 @@ ]; // Colorbar label positioning options -const int COLORBAR_LABELS = 4; -static PLINT colorbar_label_options[COLORBAR_LABELS] = [ +const int COLORBAR_LABELS = 4; +static PLINT colorbar_label_options[COLORBAR_LABELS] = [ PL_COLORBAR_LABEL_LEFT, PL_COLORBAR_LABEL_RIGHT, PL_COLORBAR_LABEL_TOP, @@ -110,8 +110,8 @@ ]; // Colorbar cap options -const int COLORBAR_CAPS = 4; -static PLINT colorbar_cap_options[COLORBAR_CAPS] = [ +const int COLORBAR_CAPS = 4; +static PLINT colorbar_cap_options[COLORBAR_CAPS] = [ PL_COLORBAR_CAP_NONE, PL_COLORBAR_CAP_LOW, PL_COLORBAR_CAP_HIGH, @@ -124,31 +124,31 @@ "Low and high caps" ]; -static int colorbar = 1; // By default do not plot plcolorbar pages +static int colorbar = 1; // By default do not plot plcolorbar pages // for now while we are working out the API. void plcolorbar_example_page( int kind_i, int label_i, int cap_i, PLINT cont_color, PLFLT cont_width, PLINT n_values, PLFLT [] values ) { // Parameters for the colorbars on this page - PLINT position_i, position, opt; - PLFLT x, y, x_length, y_length; - PLFLT ticks[1] = [ 0.0 ]; - PLINT sub_ticks[1] = [ 0 ]; - PLFLT low_cap_color, high_cap_color; - PLINT vertical, ifn; - PLINT n_axes = 1; - string[] axis_opts; - PLINT n_labels = 1; - PLINT label_opts[1] = [ 0 ]; - string[] label; - string title; - PLFLT colorbar_width, colorbar_height; - PLINT n_values_array[1]; - PLFLT[][] values_array; + PLINT position_i, position, opt; + PLFLT x, y, x_length, y_length; + PLFLT ticks[1] = [ 0.0 ]; + PLINT sub_ticks[1] = [ 0 ]; + PLFLT low_cap_color, high_cap_color; + PLINT vertical, ifn; + PLINT n_axes = 1; + string[] axis_opts; + PLINT n_labels = 1; + PLINT label_opts[1] = [ 0 ]; + string[] label; + string title; + PLFLT colorbar_width, colorbar_height; + PLINT n_values_array[1]; + PLFLT[][] values_array; - axis_opts.length = 1; - label.length = 1; - values_array = new PLFLT[][1]; + axis_opts.length = 1; + label.length = 1; + values_array = new PLFLT[][1]; n_values_array[0] = n_values; values_array[0] = values; @@ -283,26 +283,26 @@ int main( char[][] args ) { - int i, k; - PLINT opt; - PLINT nlegend, nturn; - PLINT opt_array[MAX_NLEGEND]; - PLINT text_colors[MAX_NLEGEND]; - PLINT box_colors[MAX_NLEGEND]; - PLINT box_patterns[MAX_NLEGEND]; - PLFLT box_scales[MAX_NLEGEND]; - PLFLT box_line_widths[MAX_NLEGEND]; - PLINT line_colors[MAX_NLEGEND]; - PLINT line_styles[MAX_NLEGEND]; - PLFLT line_widths[MAX_NLEGEND]; - PLINT symbol_numbers[MAX_NLEGEND]; - PLINT symbol_colors[MAX_NLEGEND]; - PLFLT symbol_scales[MAX_NLEGEND]; - string text[MAX_NLEGEND]; - string symbols[MAX_NLEGEND]; - PLFLT legend_width, legend_height, x, y, xstart, ystart; - PLFLT max_height, text_scale; - PLINT position, opt_base, nrow, ncolumn; + int i, k; + PLINT opt; + PLINT nlegend, nturn; + PLINT opt_array[MAX_NLEGEND]; + PLINT text_colors[MAX_NLEGEND]; + PLINT box_colors[MAX_NLEGEND]; + PLINT box_patterns[MAX_NLEGEND]; + PLFLT box_scales[MAX_NLEGEND]; + PLFLT box_line_widths[MAX_NLEGEND]; + PLINT line_colors[MAX_NLEGEND]; + PLINT line_styles[MAX_NLEGEND]; + PLFLT line_widths[MAX_NLEGEND]; + PLINT symbol_numbers[MAX_NLEGEND]; + PLINT symbol_colors[MAX_NLEGEND]; + PLFLT symbol_scales[MAX_NLEGEND]; + string text[MAX_NLEGEND]; + string symbols[MAX_NLEGEND]; + PLFLT legend_width, legend_height, x, y, xstart, ystart; + PLFLT max_height, text_scale; + PLINT position, opt_base, nrow, ncolumn; // Parse and process command line arguments plparseopts( args, PL_PARSE_FULL ); @@ -336,9 +336,9 @@ for ( k = 0; k < 16; k++ ) { - position = position_options[k]; - opt = opt_base; - text[0] = format( "%2.2d", k ); + position = position_options[k]; + opt = opt_base; + text[0] = format( "%2.2d", k ); text_colors[0] = 1 + ( k % 8 ); line_colors[0] = 1 + ( k % 8 ); symbol_colors[0] = 1 + ( k % 8 ); @@ -375,10 +375,10 @@ symbol_scales[k] = 1.; symbol_numbers[k] = 2; symbols[k] = "*"; - text[k] = format( "%2.2d", k ); - text_colors[k] = 1 + ( k % 8 ); - line_colors[k] = 1 + ( k % 8 ); - symbol_colors[k] = 1 + ( k % 8 ); + text[k] = format( "%2.2d", k ); + text_colors[k] = 1 + ( k % 8 ); + line_colors[k] = 1 + ( k % 8 ); + symbol_colors[k] = 1 + ( k % 8 ); } // Use monotype fonts so that all legends are the same size. @@ -515,16 +515,16 @@ symbol_scales[k] = 1.; symbol_numbers[k] = 2; symbols[k] = "*"; - text[k] = format( "%2.2d", k ); - text_colors[k] = 1 + ( k % 8 ); - line_colors[k] = 1 + ( k % 8 ); - symbol_colors[k] = 1 + ( k % 8 ); + text[k] = format( "%2.2d", k ); + text_colors[k] = 1 + ( k % 8 ); + line_colors[k] = 1 + ( k % 8 ); + symbol_colors[k] = 1 + ( k % 8 ); } // Use monotype fonts so that all legends are the same size. plsfont( PL_FCI_MONO, -1, -1 ); plscol0a( 15, 32, 32, 32, 0.70 ); - nrow = cast(int)fmin( 3, nlegend ); + nrow = cast(int) fmin( 3, nlegend ); ncolumn = 0; pllegend( &legend_width, &legend_height, opt, position, x, y, @@ -533,7 +533,7 @@ 1., text_colors[0..nlegend], text[0..nlegend], null, null, null, null, line_colors[0..nlegend], line_styles[0..nlegend], line_widths[0..nlegend], - symbol_colors[0..nlegend], symbol_scales[0..nlegend], symbol_numbers[0..nlegend], symbols[0..nlegend] ); + symbol_colors[0..nlegend], symbol_scales[0..nlegend], symbol_numbers[0..nlegend], symbols[0..nlegend] ); if ( i == nturn ) { @@ -570,35 +570,35 @@ opt_base = PL_LEGEND_BACKGROUND | PL_LEGEND_BOUNDING_BOX | PL_LEGEND_TEXT_LEFT; // Set up None, Box, Line, Symbol, and Line & Symbol legend entries. - opt_array[0] = PL_LEGEND_NONE; - text[0] = format( "%s", "None" ); + opt_array[0] = PL_LEGEND_NONE; + text[0] = format( "%s", "None" ); text_colors[0] = 1; - opt_array[1] = PL_LEGEND_COLOR_BOX; - text[1] = format( "%s", "Box" ); + opt_array[1] = PL_LEGEND_COLOR_BOX; + text[1] = format( "%s", "Box" ); text_colors[1] = 2; box_colors[1] = 2; box_patterns[1] = 0; box_scales[1] = 0.8; box_line_widths[1] = 1.; - opt_array[2] = PL_LEGEND_LINE; - text[2] = format( "%s", "Line" ); + opt_array[2] = PL_LEGEND_LINE; + text[2] = format( "%s", "Line" ); text_colors[2] = 3; line_colors[2] = 3; line_styles[2] = 1; line_widths[2] = 1.; - opt_array[3] = PL_LEGEND_SYMBOL; - text[3] = format( "%s", "Symbol" ); + opt_array[3] = PL_LEGEND_SYMBOL; + text[3] = format( "%s", "Symbol" ); text_colors[3] = 4; symbol_colors[3] = 4; symbol_scales[3] = text_scale; symbol_numbers[3] = 4; symbols[3] = special_symbols[2]; - opt_array[4] = PL_LEGEND_SYMBOL | PL_LEGEND_LINE; - text[4] = format( "%s", "L & S" ); + opt_array[4] = PL_LEGEND_SYMBOL | PL_LEGEND_LINE; + text[4] = format( "%s", "L & S" ); text_colors[4] = 5; line_colors[4] = 5; line_styles[4] = 1; @@ -623,8 +623,8 @@ // Set up symbol legend entries with various symbols. for ( i = 0; i < nlegend; i++ ) { - opt_array[i] = PL_LEGEND_SYMBOL; - text[i] = format( "%s%s", "Symbol ", special_symbols[i] ); + opt_array[i] = PL_LEGEND_SYMBOL; + text[i] = format( "%s%s", "Symbol ", special_symbols[i] ); text_colors[i] = i + 1; symbol_colors[i] = i + 1; symbol_scales[i] = text_scale; @@ -648,8 +648,8 @@ // Set up symbol legend entries with various numbers of symbols. for ( i = 0; i < nlegend; i++ ) { - opt_array[i] = PL_LEGEND_SYMBOL; - text[i] = format( "%s %d", "Symbol Number", i + 2 ); + opt_array[i] = PL_LEGEND_SYMBOL; + text[i] = format( "%s %d", "Symbol Number", i + 2 ); text_colors[i] = i + 1; symbol_colors[i] = i + 1; symbol_scales[i] = text_scale; @@ -673,8 +673,8 @@ // Set up box legend entries with various colours. for ( i = 0; i < nlegend; i++ ) { - opt_array[i] = PL_LEGEND_COLOR_BOX; - text[i] = format( "%s %d", "Box Color", i + 1 ); + opt_array[i] = PL_LEGEND_COLOR_BOX; + text[i] = format( "%s %d", "Box Color", i + 1 ); text_colors[i] = i + 1; box_colors[i] = i + 1; box_patterns[i] = 0; @@ -701,8 +701,8 @@ // Set up box legend entries with various patterns. for ( i = 0; i < nlegend; i++ ) { - opt_array[i] = PL_LEGEND_COLOR_BOX; - text[i] = format( "%s %d", "Box Pattern", i ); + opt_array[i] = PL_LEGEND_COLOR_BOX; + text[i] = format( "%s %d", "Box Pattern", i ); text_colors[i] = 2; box_colors[i] = 2; box_patterns[i] = i; @@ -726,8 +726,8 @@ // Set up box legend entries with various box pattern line widths. for ( i = 0; i < nlegend; i++ ) { - opt_array[i] = PL_LEGEND_COLOR_BOX; - text[i] = format( "%s %d", "Box Line Width", i + 1 ); + opt_array[i] = PL_LEGEND_COLOR_BOX; + text[i] = format( "%s %d", "Box Line Width", i + 1 ); text_colors[i] = 2; box_colors[i] = 2; box_patterns[i] = 3; @@ -751,8 +751,8 @@ // Set up line legend entries with various colours. for ( i = 0; i < nlegend; i++ ) { - opt_array[i] = PL_LEGEND_LINE; - text[i] = format( "%s %d", "Line Color", i + 1 ); + opt_array[i] = PL_LEGEND_LINE; + text[i] = format( "%s %d", "Line Color", i + 1 ); text_colors[i] = i + 1; line_colors[i] = i + 1; line_styles[i] = 1; @@ -778,8 +778,8 @@ // Set up line legend entries with various styles. for ( i = 0; i < nlegend; i++ ) { - opt_array[i] = PL_LEGEND_LINE; - text[i] = format( "%s %d", "Line Style", i + 1 ); + opt_array[i] = PL_LEGEND_LINE; + text[i] = format( "%s %d", "Line Style", i + 1 ); text_colors[i] = 2; line_colors[i] = 2; line_styles[i] = i + 1; @@ -802,8 +802,8 @@ // Set up line legend entries with various widths. for ( i = 0; i < nlegend; i++ ) { - opt_array[i] = PL_LEGEND_LINE; - text[i] = format( "%s %d", "Line Width", i + 1 ); + opt_array[i] = PL_LEGEND_LINE; + text[i] = format( "%s %d", "Line Width", i + 1 ); text_colors[i] = 2; line_colors[i] = 2; line_styles[i] = 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-10-20 04:41:09
|
Revision: 12612 http://sourceforge.net/p/plplot/code/12612 Author: airwin Date: 2013-10-20 04:41:07 +0000 (Sun, 20 Oct 2013) Log Message: ----------- For the ps, psttf, and hpgl device drivers change all macros concerning pen width to floating point so that no casts are implicitly made when comparing to plsc->width. Of course, these device drivers all write integer pen widths to the file so make the appropriate casts concerning that. ToDo (some day for somebody else). Investigate whether the PostScript standard allows floating values for the pen width, and if so, do not do the cast and instead write out to the floating point value of the width to the file. Modified Paths: -------------- trunk/drivers/hpgl.c trunk/drivers/psttf.cc trunk/include/ps.h Modified: trunk/drivers/hpgl.c =================================================================== --- trunk/drivers/hpgl.c 2013-10-20 04:33:13 UTC (rev 12611) +++ trunk/drivers/hpgl.c 2013-10-20 04:41:07 UTC (rev 12612) @@ -78,9 +78,9 @@ #define LJIII_YMAX 7700 #define OF pls->OutFile -#define MIN_WIDTH 1 // Minimum pen width -#define MAX_WIDTH 10 // Maximum pen width -#define DEF_WIDTH 1 // Default pen width +#define MIN_WIDTH 1. // Minimum pen width +#define MAX_WIDTH 10. // Maximum pen width +#define DEF_WIDTH 1. // Default pen width static void hpgl_dispatch_init_helper( PLDispatchTable *pdt, char *menustr, char *devnam, @@ -349,9 +349,9 @@ { case PLSTATE_WIDTH: case PLSTATE_COLOR0: { - int width = + int width = (int) ( ( pls->width < MIN_WIDTH ) ? DEF_WIDTH : - ( pls->width > MAX_WIDTH ) ? MAX_WIDTH : pls->width; + ( pls->width > MAX_WIDTH ) ? MAX_WIDTH : pls->width ); if ( pls->icol0 < 1 || pls->icol0 > 8 ) fputs( "\nInvalid pen selection.", stderr ); Modified: trunk/drivers/psttf.cc =================================================================== --- trunk/drivers/psttf.cc 2013-10-20 04:33:13 UTC (rev 12611) +++ trunk/drivers/psttf.cc 2013-10-20 04:41:07 UTC (rev 12612) @@ -670,9 +670,9 @@ switch ( op ) { case PLSTATE_WIDTH: { - int width = + int width = (int) ( ( pls->width < MIN_WIDTH ) ? DEF_WIDTH : - ( pls->width > MAX_WIDTH ) ? MAX_WIDTH : pls->width; + ( pls->width > MAX_WIDTH ) ? MAX_WIDTH : pls->width ); doc->osBody() << " S\n" << width << " W"; Modified: trunk/include/ps.h =================================================================== --- trunk/include/ps.h 2013-10-20 04:33:13 UTC (rev 12611) +++ trunk/include/ps.h 2013-10-20 04:41:07 UTC (rev 12612) @@ -22,9 +22,9 @@ #define PSX XPSSIZE - 1 #define PSY YPSSIZE - 1 #define OF pls->OutFile -#define MIN_WIDTH 1 // Minimum pen width -#define MAX_WIDTH 30 // Maximum pen width -#define DEF_WIDTH 3 // Default pen width +#define MIN_WIDTH 1. // Minimum pen width +#define MAX_WIDTH 30. // Maximum pen width +#define DEF_WIDTH 3. // Default pen width // These are for covering the page with the background color This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-10-22 17:47:17
|
Revision: 12617 http://sourceforge.net/p/plplot/code/12617 Author: airwin Date: 2013-10-22 17:47:13 +0000 (Tue, 22 Oct 2013) Log Message: ----------- Create SO_PERMISSIONS variable that is designed to mimic the permissions of shared objects created by the add_library command. The result should be correct regardless of whether the Linux platform is Fedora-based or Debian-based. Use that permissions variable for the dll*_stubs.so shared objects built and installed by the OCaml bindings and the plplot_octave.oct shared object built and installed by the Octave bindings. Tested by Alan W. Irwin <ai...@us...> using the install target on a Debian system. All permissions of the relevant installed files mentioned above were (-rw-r--r--) as expected. On Fedora systems the results should be (-rwxr-xr-x), but that needs testing. Modified Paths: -------------- trunk/bindings/ocaml/CMakeLists.txt trunk/bindings/ocaml/plcairo/CMakeLists.txt trunk/bindings/octave/CMakeLists.txt trunk/cmake/modules/plplot.cmake Modified: trunk/bindings/ocaml/CMakeLists.txt =================================================================== --- trunk/bindings/ocaml/CMakeLists.txt 2013-10-22 01:33:19 UTC (rev 12616) +++ trunk/bindings/ocaml/CMakeLists.txt 2013-10-22 17:47:13 UTC (rev 12617) @@ -360,15 +360,13 @@ DESTINATION ${OCAML_INSTALL_DIR}/plplot ) - # Shared library stubs go in stublibs. - # Use default permissions (rw-r--r--) for FILES signature because - # those are the permissions used by install(TARGETS... (which - # we are trying to emulate here because that signature not - # available to us because this shared object was - # created by a custom command). + # Shared library stubs go in stublibs. Use SO_PERMISSIONS to + # be consistent with permissions used for shared objects created + # by the add_library command. install( FILES ${CMAKE_CURRENT_BINARY_DIR}/dllplplot_stubs.so DESTINATION ${OCAML_INSTALL_DIR}/stublibs + PERMISSIONS ${SO_PERMISSIONS} ) endif(ENABLE_ocaml) Modified: trunk/bindings/ocaml/plcairo/CMakeLists.txt =================================================================== --- trunk/bindings/ocaml/plcairo/CMakeLists.txt 2013-10-22 01:33:19 UTC (rev 12616) +++ trunk/bindings/ocaml/plcairo/CMakeLists.txt 2013-10-22 17:47:13 UTC (rev 12617) @@ -250,15 +250,13 @@ DESTINATION ${OCAML_INSTALL_DIR}/plcairo ) - # Shared library stubs go in stublibs - # Use default permissions (rw-r--r--) for FILES signature because - # those are the permissions used by install(TARGETS... (which - # we are trying to emulate here because that signature not - # available to us because this shared object was - # created by a custom command). + # Shared library stubs go in stublibs. Use SO_PERMISSIONS to + # be consistent with permissions used for shared objects created + # by the add_library command. install( FILES ${CMAKE_CURRENT_BINARY_DIR}/dllplcairo_stubs.so DESTINATION ${OCAML_INSTALL_DIR}/stublibs + PERMISSIONS ${SO_PERMISSIONS} ) endif(ENABLE_ocaml AND OCAML_HAS_CAIRO) Modified: trunk/bindings/octave/CMakeLists.txt =================================================================== --- trunk/bindings/octave/CMakeLists.txt 2013-10-22 01:33:19 UTC (rev 12616) +++ trunk/bindings/octave/CMakeLists.txt 2013-10-22 17:47:13 UTC (rev 12617) @@ -311,19 +311,15 @@ ) endif(USE_RPATH) - # Have to be specific about permissions for some reason (probably oct suffix). - set(PERM_MODULES - OWNER_READ - OWNER_WRITE - GROUP_READ - WORLD_READ - ) + # Have to be specific about permissions for some reason (probably + # oct suffix). Use SO_PERMISSIONS to be consistent with permissions + # used for other shared objects created by the add_library command. install(TARGETS plplot_octave EXPORT export_plplot LIBRARY DESTINATION ${OCTAVE_OCT_DIR} - PERMISSIONS ${PERM_MODULES} + PERMISSIONS ${SO_PERMISSIONS} ) endif(ENABLE_octave) Modified: trunk/cmake/modules/plplot.cmake =================================================================== --- trunk/cmake/modules/plplot.cmake 2013-10-22 01:33:19 UTC (rev 12616) +++ trunk/cmake/modules/plplot.cmake 2013-10-22 17:47:13 UTC (rev 12617) @@ -544,4 +544,34 @@ include(doxygen) include(summary) +# Calculate permissions that should be used for shared objects that +# are created by custom commands to be consistent with the permissions +# automatically used for shared objects created as targets. The +# result (whether execute permissions are set) depends on +# CMAKE_INSTALL_SO_NO_EXE that is set in +# $prefix/share/cmake-2.8/Modules/Platform/Linux.cmake, where $prefix +# is the installation prefix for cmake itself, and the value depends +# on Linux platform. +if(CMAKE_INSTALL_SO_NO_EXE) + # Permissions for shared objects are (rw-r--r--). + set(SO_PERMISSIONS + OWNER_READ + OWNER_WRITE + GROUP_READ + WORLD_READ + ) +else(CMAKE_INSTALL_SO_NO_EXE) + # Permissions for shared objects are (rwxr-xr-x). + set(SO_PERMISSIONS + OWNER_READ + OWNER_WRITE + OWNER_EXECUTE + GROUP_READ + GROUP_EXECUTE + WORLD_READ + WORLD_EXECUTE + ) +endif(CMAKE_INSTALL_SO_NO_EXE) + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-10-23 19:27:09
|
Revision: 12622 http://sourceforge.net/p/plplot/code/12622 Author: airwin Date: 2013-10-23 19:27:05 +0000 (Wed, 23 Oct 2013) Log Message: ----------- NUMERIC_INCLUDE_PATH ==> NUMPY_INCLUDE_PATH We have dropped support for the Numeric Python module and are now exclusively using the numpy Python modules instead. Therefore, have changed the CMake variable name used in our build system that holds the location of the numpy headers from the confusing misnomer, NUMERIC_INCLUDE_PATH, to NUMPY_INCLUDE_PATH. I have also taken this opportunity to simplify our numpy-related build system logic, e.g., by dropping CMake variables that were not being used anywhere. This change only impacts PLplot users who in the past have used the cmake option -DNUMERIC_INCLUDE_PATH to set the CMake variable NUMERIC_INCLUDE_PATH to the location of the numpy header directory. Note we discourage that method since without that user intervention, the build system uses python and numpy to find the location which should normally be foolproof and not subject to the inconsistencies or errors possible with setting the variable. But if some users still insist on setting the variable, that variable's name should now be NUMPY_INCLUDE_PATH. Modified Paths: -------------- trunk/README.release trunk/bindings/gnome2/python/CMakeLists.txt trunk/bindings/python/CMakeLists.txt trunk/cmake/modules/python.cmake trunk/cmake/modules/summary.cmake trunk/config.h.in trunk/plplot_test/CMakeLists.txt trunk/plplot_test/test_python.sh.in Modified: trunk/README.release =================================================================== --- trunk/README.release 2013-10-23 08:46:57 UTC (rev 12621) +++ trunk/README.release 2013-10-23 19:27:05 UTC (rev 12622) @@ -23,6 +23,8 @@ 3. Changes relative to PLplot 5.9.10 (the previous development release) +3.1 NUMERIC_INCLUDE_PATH ==> NUMPY_INCLUDE_PATH + 4. OFFICIAL NOTICES FOR USERS SINCE 5.8.0 (the previous stable release) 5. Changes relative to PLplot 5.8.0 (the previous stable release) @@ -99,6 +101,7 @@ all non-windows systems 5.65 Update f95 examples to take larger advantage of Fortran 95 capabilities 5.66 Substantial additions to the doxygen documentation +5.67 NUMERIC_INCLUDE_PATH ==> NUMPY_INCLUDE_PATH 1. OFFICIAL NOTICES FOR USERS SINCE 5.9.10 (the previous development release) @@ -110,8 +113,22 @@ 3. Changes relative to PLplot 5.9.10 (the previous development release) -None at this time. +3.1 NUMERIC_INCLUDE_PATH ==> NUMPY_INCLUDE_PATH +We have long since dropped support for the Numeric Python module and +are now exclusively using the numpy Python modules instead. +Therefore, we have changed the CMake variable name used in our build +system that holds the location of the numpy headers from the confusing +misnomer, NUMERIC_INCLUDE_PATH, to NUMPY_INCLUDE_PATH. This change +only impacts PLplot users who in the past have used the cmake option +-DNUMERIC_INCLUDE_PATH to set the CMake variable NUMERIC_INCLUDE_PATH +to the location of the numpy header directory. Note we discourage +that method since without that user intervention, the build system +uses python and numpy to find the location which should normally be +foolproof and not subject to the inconsistencies or errors possible +with setting the variable. But if some users still insist on setting +the variable, that variable's name should now be NUMPY_INCLUDE_PATH. + 4. OFFICIAL NOTICES FOR USERS SINCE 5.8.0 (the previous stable release) (5.9.10) The minimum version of CMake has been bumped to 5.8.9. This @@ -1443,3 +1460,20 @@ documentation of every single argument of the public API for PLplot. A substantial increase in such documentation has been implemented in this release cycle. + +5.67 NUMERIC_INCLUDE_PATH ==> NUMPY_INCLUDE_PATH + +We have long since dropped support for the Numeric Python module and +are now exclusively using the numpy Python modules instead. +Therefore, we have changed the CMake variable name used in our build +system that holds the location of the numpy headers from the confusing +misnomer, NUMERIC_INCLUDE_PATH, to NUMPY_INCLUDE_PATH. This change +only impacts PLplot users who in the past have used the cmake option +-DNUMERIC_INCLUDE_PATH to set the CMake variable NUMERIC_INCLUDE_PATH +to the location of the numpy header directory. Note we discourage +that method since without that user intervention, the build system +uses python and numpy to find the location which should normally be +foolproof and not subject to the inconsistencies or errors possible +with setting the variable. But if some users still insist on setting +the variable, that variable's name should now be NUMPY_INCLUDE_PATH. + Modified: trunk/bindings/gnome2/python/CMakeLists.txt =================================================================== --- trunk/bindings/gnome2/python/CMakeLists.txt 2013-10-23 08:46:57 UTC (rev 12621) +++ trunk/bindings/gnome2/python/CMakeLists.txt 2013-10-23 19:27:05 UTC (rev 12622) @@ -115,7 +115,7 @@ ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/include ${PYTHON_INCLUDE_PATH} - ${NUMERIC_INCLUDE_PATH} + ${NUMPY_INCLUDE_PATH} ) ### Build and install the gcw module Modified: trunk/bindings/python/CMakeLists.txt =================================================================== --- trunk/bindings/python/CMakeLists.txt 2013-10-23 08:46:57 UTC (rev 12621) +++ trunk/bindings/python/CMakeLists.txt 2013-10-23 19:27:05 UTC (rev 12622) @@ -33,7 +33,7 @@ ${CMAKE_CURRENT_BINARY_DIR} ${TCL_INCLUDE_PATH} ${PYTHON_INCLUDE_PATH} - ${NUMERIC_INCLUDE_PATH} + ${NUMPY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/bindings/swig-support ) else(ENABLE_tk) @@ -44,7 +44,7 @@ ${CMAKE_BINARY_DIR}/include ${CMAKE_CURRENT_BINARY_DIR} ${PYTHON_INCLUDE_PATH} - ${NUMERIC_INCLUDE_PATH} + ${NUMPY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/bindings/swig-support ) endif(ENABLE_tk) Modified: trunk/cmake/modules/python.cmake =================================================================== --- trunk/cmake/modules/python.cmake 2013-10-23 08:46:57 UTC (rev 12621) +++ trunk/cmake/modules/python.cmake 2013-10-23 19:27:05 UTC (rev 12622) @@ -60,55 +60,46 @@ endif(NOT PYTHON_LIBRARIES OR NOT PYTHON_INCLUDE_PATH) endif(ENABLE_python) -option(HAVE_NUMPY "Have the numpy package" ON) - if(ENABLE_python) - # NUMERIC_INCLUDE_PATH = path to arrayobject.h for numpy. - #message(STATUS "DEBUG: NUMERIC_INCLUDE_PATH = ${NUMERIC_INCLUDE_PATH}") - if(NOT NUMERIC_INCLUDE_PATH) - if(HAVE_NUMPY) - # First check for new version of numpy - execute_process( - COMMAND - ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.get_include()" - OUTPUT_VARIABLE NUMPY_INCLUDE_PATH - RESULT_VARIABLE NUMPY_ERR - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - if(NUMPY_ERR) - set(HAVE_NUMPY OFF CACHE BOOL "Have the numpy package" FORCE) - endif(NUMPY_ERR) - endif(HAVE_NUMPY) - - if(HAVE_NUMPY) + # NUMPY_INCLUDE_PATH = path to arrayobject.h for numpy. + #message(STATUS "DEBUG: NUMPY_INCLUDE_PATH = ${NUMPY_INCLUDE_PATH}") + if(NOT NUMPY_INCLUDE_PATH) + # Check for numpy installation. + execute_process( + COMMAND + ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.get_include()" + OUTPUT_VARIABLE NUMPY_INCLUDE_PATH_PARENT + RESULT_VARIABLE NUMPY_ERR + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if(NUMPY_ERR) + set(NUMPY_INCLUDE_PATH) + else(NUMPY_ERR) # We use the full path name (including numpy on the end), but # Double-check that all is well with that choice. find_path( - NUMERIC_INCLUDE_PATH + NUMPY_INCLUDE_PATH arrayobject.h - ${NUMPY_INCLUDE_PATH}/numpy + ${NUMPY_INCLUDE_PATH_PARENT}/numpy ) - if(NUMERIC_INCLUDE_PATH) - set(PYTHON_NUMERIC_NAME numpy CACHE INTERNAL "") - endif(NUMERIC_INCLUDE_PATH) - endif(HAVE_NUMPY) + endif(NUMPY_ERR) - endif(NOT NUMERIC_INCLUDE_PATH) + endif(NOT NUMPY_INCLUDE_PATH) - if(NOT NUMERIC_INCLUDE_PATH) + if(NOT NUMPY_INCLUDE_PATH) message(STATUS "WARNING: " "NumPy header not found. Disabling Python bindings") set(ENABLE_python OFF CACHE BOOL "Enable Python bindings" FORCE) - endif(NOT NUMERIC_INCLUDE_PATH) + endif(NOT NUMPY_INCLUDE_PATH) endif(ENABLE_python) -if(ENABLE_python AND HAVE_NUMPY) +if(ENABLE_python) # This numpy installation bug found by Geoff. option(EXCLUDE_PYTHON_LIBRARIES "Linux temporary workaround for numpy installation bug for non-system Python install prefix" OFF) if(EXCLUDE_PYTHON_LIBRARIES) set(PYTHON_LIBRARIES) endif(EXCLUDE_PYTHON_LIBRARIES) -endif(ENABLE_python AND HAVE_NUMPY) +endif(ENABLE_python) if(ENABLE_python) # if CMAKE_INSTALL_EXEC_PREFIX is an empty string, must replace Modified: trunk/cmake/modules/summary.cmake =================================================================== --- trunk/cmake/modules/summary.cmake 2013-10-23 08:46:57 UTC (rev 12621) +++ trunk/cmake/modules/summary.cmake 2013-10-23 19:27:05 UTC (rev 12622) @@ -89,7 +89,7 @@ PYTHON_EXECUTABLE: ${PYTHON_EXECUTABLE} PYTHON_INCLUDE_PATH: ${PYTHON_INCLUDE_PATH} PYTHON_LIBRARIES: ${PYTHON_LIBRARIES} -NUMERIC_INCLUDE_PATH: ${NUMERIC_INCLUDE_PATH}") +NUMPY_INCLUDE_PATH: ${NUMPY_INCLUDE_PATH}") endif(ENABLE_python) set( Modified: trunk/config.h.in =================================================================== --- trunk/config.h.in 2013-10-23 08:46:57 UTC (rev 12621) +++ trunk/config.h.in 2013-10-23 19:27:05 UTC (rev 12622) @@ -112,9 +112,6 @@ // Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. #cmakedefine HAVE_NDIR_H 1 -// Define if python numpy is available -#cmakedefine HAVE_NUMPY - // Define if libpango is available #cmakedefine HAVE_PANGO Modified: trunk/plplot_test/CMakeLists.txt =================================================================== --- trunk/plplot_test/CMakeLists.txt 2013-10-23 08:46:57 UTC (rev 12621) +++ trunk/plplot_test/CMakeLists.txt 2013-10-23 19:27:05 UTC (rev 12622) @@ -170,12 +170,6 @@ endif(ENABLE_octave) if(ENABLE_python) - if(HAVE_NUMPY) - # The following examples only work with numpy - set(NUMPY_EXAMPLES "21") - else(HAVE_NUMPY) - set(NUMPY_EXAMPLES) - endif(HAVE_NUMPY) configure_file( test_python.sh.in ${CMAKE_CURRENT_BINARY_DIR}/test_python.sh Modified: trunk/plplot_test/test_python.sh.in =================================================================== --- trunk/plplot_test/test_python.sh.in 2013-10-23 08:46:57 UTC (rev 12621) +++ trunk/plplot_test/test_python.sh.in 2013-10-23 19:27:05 UTC (rev 12622) @@ -30,7 +30,7 @@ # For 24 you need special fonts installed to get good result. lang="p" for index in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 \ - 20 22 23 24 25 26 27 28 29 30 31 33 @NUMPY_EXAMPLES@ ; do + 20 21 22 23 24 25 26 27 28 29 30 31 33 ; do if [ "$verbose_test" ] ; then echo "x${index}" fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-10-24 23:01:37
|
Revision: 12626 http://sourceforge.net/p/plplot/code/12626 Author: andrewross Date: 2013-10-24 23:01:26 +0000 (Thu, 24 Oct 2013) Log Message: ----------- Fix up various compiler warnings, mostly related to casting and uninitialized variables. Modified Paths: -------------- trunk/bindings/f95/plstubs.h trunk/bindings/f95/scstubs.c trunk/bindings/java/plplotjavac.i trunk/bindings/python/plplot_widgetmodule.c trunk/bindings/python/plplotcmodule.i trunk/drivers/xfig.c trunk/examples/c/x33c.c trunk/examples/c++/x16.cc trunk/examples/f95/x00f.f90 trunk/examples/f95/x09f.f90 trunk/examples/f95/x27f.f90 trunk/examples/f95/x33f.f90 trunk/src/plfreetype.c trunk/src/plmap.c Modified: trunk/bindings/f95/plstubs.h =================================================================== --- trunk/bindings/f95/plstubs.h 2013-10-24 18:54:19 UTC (rev 12625) +++ trunk/bindings/f95/plstubs.h 2013-10-24 23:01:26 UTC (rev 12626) @@ -208,7 +208,7 @@ #define PLFONT FNAME( PLFONT, plfont ) #define PLFONTLD FNAME( PLFONTLD, plfontld ) #define PLGCHR FNAME( PLGCHR, plgchr ) -#define PLGCMAP1_RANGE FNAME( PLFCMAP1_RANGE, plgcmap1_range ) +#define PLGCMAP1_RANGE FNAME( PLGCMAP1_RANGE, plgcmap1_range ) #define PLGCOL0 FNAME( PLGCOL0, plgcol0 ) #define PLGCOL0A FNAME( PLGCOL0A, plgcol0a ) #define PLGCOLBG FNAME( PLGCOLBG, plgcolbg ) Modified: trunk/bindings/f95/scstubs.c =================================================================== --- trunk/bindings/f95/scstubs.c 2013-10-24 18:54:19 UTC (rev 12625) +++ trunk/bindings/f95/scstubs.c 2013-10-24 23:01:26 UTC (rev 12626) @@ -106,6 +106,7 @@ void PLGCOLBG( PLINT *r, PLINT *g, PLINT *b ); void PLGCOLBGA( PLINT *r, PLINT *g, PLINT *b, PLFLT *a ); void PLGCOMPRESSION( PLINT *compression ); +void PLGCMAP1_RANGE( PLFLT *min_color, PLFLT *max_color ); void PLGDEV7( char *dev, int length ); void PLGDIDEV( PLFLT *p_mar, PLFLT *p_aspect, PLFLT *p_jx, PLFLT *p_jy ); void PLGDIORI( PLFLT *p_rot ); @@ -198,6 +199,7 @@ void PLSCMAP1LA2( PLBOOL *itype, PLINT *npts, PLFLT *intensity, PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a ); void PLSCMAP1N( PLINT *n ); +void PLSCMAP1_RANGE( PLFLT *min_color, PLFLT *max_color ); void PLSCOL0( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b ); void PLSCOL0A( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b, PLFLT *a ); void PLSCOLBG( PLINT *r, PLINT *g, PLINT *b ); @@ -412,10 +414,10 @@ PLFLT **a; int i, j; - a = (PLFLT **) malloc( sizeof ( PLFLT * ) * ( *n_axes ) ); + a = (PLFLT **) malloc( sizeof ( PLFLT * ) * ( size_t ) ( *n_axes ) ); for ( i = 0; i < *n_axes; i++ ) { - a[i] = (PLFLT *) malloc( sizeof ( PLFLT ) * n_values[i] ); + a[i] = (PLFLT *) malloc( sizeof ( PLFLT ) * ( size_t ) n_values[i] ); for ( j = 0; j < n_values[i]; j++ ) { a[i][j] = values[i + j * ( *n_axes )]; Modified: trunk/bindings/java/plplotjavac.i =================================================================== --- trunk/bindings/java/plplotjavac.i 2013-10-24 18:54:19 UTC (rev 12625) +++ trunk/bindings/java/plplotjavac.i 2013-10-24 23:01:26 UTC (rev 12626) @@ -197,7 +197,7 @@ setup_array_1d_b( PLBOOL **pa, jboolean *adat, int n ) { int i; - *pa = (PLBOOL *) malloc( n * sizeof ( PLBOOL ) ); + *pa = (PLBOOL *) malloc( ( size_t ) n * sizeof ( PLBOOL ) ); for ( i = 0; i < n; i++ ) { ( *pa )[i] = adat[i] ? 1 : 0; @@ -210,7 +210,7 @@ setup_array_1d_i( PLINT **pa, jint *adat, int n ) { int i; - *pa = (PLINT *) malloc( n * sizeof ( PLINT ) ); + *pa = (PLINT *) malloc( ( size_t ) n * sizeof ( PLINT ) ); for ( i = 0; i < n; i++ ) { ( *pa )[i] = adat[i]; @@ -223,7 +223,7 @@ setup_array_1d_f( PLFLT **pa, jfloat *adat, int n ) { int i; - *pa = (PLFLT *) malloc( n * sizeof ( PLFLT ) ); + *pa = (PLFLT *) malloc( ( size_t ) n * sizeof ( PLFLT ) ); for ( i = 0; i < n; i++ ) { ( *pa )[i] = adat[i]; @@ -236,7 +236,7 @@ setup_array_1d_d( PLFLT **pa, jdouble *adat, int n ) { int i; - *pa = (PLFLT *) malloc( n * sizeof ( PLFLT ) ); + *pa = (PLFLT *) malloc( ( size_t ) n * sizeof ( PLFLT ) ); for ( i = 0; i < n; i++ ) { ( *pa )[i] = adat[i]; @@ -251,8 +251,8 @@ { int i, j; - *pa = (PLFLT **) malloc( nx * sizeof ( PLFLT * ) ); - ( *pa )[0] = (PLFLT *) malloc( nx * ny * sizeof ( PLFLT ) ); + *pa = (PLFLT **) malloc( ( size_t ) nx * sizeof ( PLFLT * ) ); + ( *pa )[0] = (PLFLT *) malloc( ( size_t ) ( nx * ny ) * sizeof ( PLFLT ) ); for ( i = 0; i < nx; i++ ) { @@ -270,8 +270,8 @@ { int i, j; - *pa = (PLFLT **) malloc( nx * sizeof ( PLFLT * ) ); - ( *pa )[0] = (PLFLT *) malloc( nx * ny * sizeof ( PLFLT ) ); + *pa = (PLFLT **) malloc( ( size_t ) nx * sizeof ( PLFLT * ) ); + ( *pa )[0] = (PLFLT *) malloc( ( size_t ) ( nx * ny ) * sizeof ( PLFLT ) ); for ( i = 0; i < nx; i++ ) { @@ -292,7 +292,7 @@ #ifdef PL_DOUBLE x = (double *) dat; #else - x = (double *) malloc( n * sizeof ( double ) ); + x = (double *) malloc( ( size_t ) n * sizeof ( double ) ); for ( i = 0; i < n; i++ ) { x[i] = (double) dat[i]; @@ -915,8 +915,8 @@ int nx = ( *jenv )->GetArrayLength( jenv, $input ); int ny = -1; int i, j; - ai = (jobject *) malloc( nx * sizeof ( jobject ) ); - adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) ); + ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) ); + adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) ); ( *jenv )->EnsureLocalCapacity( jenv, nx ); @@ -982,8 +982,8 @@ int nx = ( *jenv )->GetArrayLength( jenv, $input ); int ny = -1; int i, j; - ai = (jobject *) malloc( nx * sizeof ( jobject ) ); - adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) ); + ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) ); + adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) ); ( *jenv )->EnsureLocalCapacity( jenv, nx ); @@ -1040,8 +1040,8 @@ int nx = ( *jenv )->GetArrayLength( jenv, $input ); int ny = -1; int i, j; - ai = (jobject *) malloc( nx * sizeof ( jobject ) ); - adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) ); + ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) ); + adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) ); ( *jenv )->EnsureLocalCapacity( jenv, nx ); @@ -1094,8 +1094,8 @@ int nx = ( *jenv )->GetArrayLength( jenv, $input ); int ny = -1; int i, j; - ai = (jobject *) malloc( nx * sizeof ( jobject ) ); - adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) ); + ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) ); + adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) ); ( *jenv )->EnsureLocalCapacity( jenv, nx ); @@ -1178,8 +1178,8 @@ return; } - ptr = (PLFLT **) malloc( nx * sizeof ( PLFLT * ) ); - ptr[0] = (PLFLT *) malloc( nx * ny * sizeof ( PLFLT ) ); + ptr = (PLFLT **) malloc( ( size_t ) nx * sizeof ( PLFLT * ) ); + ptr[0] = (PLFLT *) malloc( ( size_t ) nx * ny * sizeof ( PLFLT ) ); for ( i = 0; i < nx; i++ ) { ptr[i] = ptr[0] + i * ny; @@ -1197,8 +1197,8 @@ ptr = $1; - ai = (jobject *) malloc( nx * sizeof ( jobject ) ); - adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) ); + ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) ); + adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) ); for ( i = 0; i < nx; i++ ) { @@ -1254,8 +1254,8 @@ int nx = ( *jenv )->GetArrayLength( jenv, $input ); int ny = -1; int i, j; - ai = (jobject *) malloc( nx * sizeof ( jobject ) ); - adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) ); + ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) ); + adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) ); ( *jenv )->EnsureLocalCapacity( jenv, nx ); @@ -1318,6 +1318,8 @@ jmethodID mapformID; JNIEnv *cbenvMapform; + void mapform_java( PLINT n, PLFLT *x, PLFLT *y ); + // C mapform callback function which calls the java // mapform function in a PLCallbackMapform object. void mapform_java( PLINT n, PLFLT *x, PLFLT *y ) @@ -1567,8 +1569,8 @@ int nx = ( *jenv )->GetArrayLength( jenv, $input ); int ny = -1; int i, j; - ai = (jobject *) malloc( nx * sizeof ( jobject ) ); - adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) ); + ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) ); + adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) ); ( *jenv )->EnsureLocalCapacity( jenv, nx ); @@ -1643,8 +1645,8 @@ int nx = ( *jenv )->GetArrayLength( jenv, $input ); int ny = -1; int i, j; - ai = (jobject *) malloc( nx * sizeof ( jobject ) ); - adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) ); + ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) ); + adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) ); ( *jenv )->EnsureLocalCapacity( jenv, nx ); @@ -1711,8 +1713,8 @@ int nx = ( *jenv )->GetArrayLength( jenv, $input ); int ny = -1; int i, j; - ai = (jobject *) malloc( nx * sizeof ( jobject ) ); - adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) ); + ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) ); + adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) ); ( *jenv )->EnsureLocalCapacity( jenv, nx ); @@ -1805,7 +1807,7 @@ // Take a copy of the C string as the typemap is for a non const C string jmethodID capacityID = ( *jenv )->GetMethodID( jenv, sbufClass, "capacity", "()I" ); jint capacity = ( *jenv )->CallIntMethod( jenv, $input, capacityID ); - $1 = (char *) malloc( capacity + 1 ); + $1 = (char *) malloc( ( size_t ) ( capacity + 1 ) ); // Zero the original StringBuffer, so we can replace it with the result setLengthID = ( *jenv )->GetMethodID( jenv, sbufClass, "setLength", "(I)V" ); @@ -1850,7 +1852,7 @@ int i = 0; size = (int) ( ( *jenv )->GetArrayLength( jenv, $input ) ); $1 = &size; - $2 = (char **) malloc( ( size + 1 ) * sizeof ( char * ) ); + $2 = (char **) malloc( ( size_t ) ( size + 1 ) * sizeof ( char * ) ); // make a copy of each string for ( i = 0; i < size; i++ ) { @@ -1929,7 +1931,7 @@ printf( "Arrays must be the same length\n" ); return; } - $1 = (char **) malloc( Alen * sizeof ( char * ) ); + $1 = (char **) malloc( ( size_t ) Alen * sizeof ( char * ) ); // make a copy of each string for ( i = 0; i < Alen; i++ ) { @@ -1975,7 +1977,7 @@ int size = ( *jenv )->GetArrayLength( jenv, $input ); Alen = size; $1 = size; - $2 = (char **) malloc( Alen * sizeof ( char * ) ); + $2 = (char **) malloc( ( size_t ) Alen * sizeof ( char * ) ); // make a copy of each string for ( i = 0; i < Alen; i++ ) { Modified: trunk/bindings/python/plplot_widgetmodule.c =================================================================== --- trunk/bindings/python/plplot_widgetmodule.c 2013-10-24 18:54:19 UTC (rev 12625) +++ trunk/bindings/python/plplot_widgetmodule.c 2013-10-24 23:01:26 UTC (rev 12626) @@ -8,8 +8,11 @@ #ifdef ENABLE_tk #include <tcl.h> +#include "pltk.h" #endif +void initplplot_widget( void ); + #define TRY( E ) if ( !( E ) ) return NULL #ifdef ENABLE_tk @@ -66,13 +69,13 @@ PLDLLIMPEXP_PLPLOT_WIDGETMODULE void initplplot_widget( void ) { PyObject *m; - PyObject *d; + //PyObject *d; import_array(); // Create the module and add the functions m = Py_InitModule( "plplot_widget", plplot_widget_methods ); - d = PyModule_GetDict( m ); + PyModule_GetDict( m ); // Check for errors if ( PyErr_Occurred() ) Modified: trunk/bindings/python/plplotcmodule.i =================================================================== --- trunk/bindings/python/plplotcmodule.i 2013-10-24 18:54:19 UTC (rev 12625) +++ trunk/bindings/python/plplotcmodule.i 2013-10-24 23:01:26 UTC (rev 12626) @@ -113,8 +113,11 @@ #if SIZEOF_LONG != 4 %wrapper %{ + + PyArrayObject* myIntArray_ContiguousFromObject( PyObject* in, int type, int mindims, int maxdims ); + // some really twisted stuff to allow calling a single precision library from python - PyArrayObject* myIntArray_ContiguousFromObject( PyObject* in, int type, int mindims, int maxdims ) + PyArrayObject* myIntArray_ContiguousFromObject( PyObject* in, int PL_UNUSED( type ), int mindims, int maxdims ) { PyArrayObject* tmp = (PyArrayObject *) PyArray_ContiguousFromObject( in, NPY_PLINT, mindims, maxdims ); @@ -478,7 +481,7 @@ $2 = PyArray_DIMS( tmp )[0]; $3 = PyArray_DIMS( tmp )[1]; size = $3; - $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * $2 ); + $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) $2 ); for ( i = 0; i < $2; i++ ) $1[i] = ( (PLFLT *) PyArray_DATA( tmp ) + i * size ); } @@ -498,7 +501,7 @@ Xlen = $2 = PyArray_DIMS( tmp )[0]; Ylen = $3 = PyArray_DIMS( tmp )[1]; size = $3; - $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * $2 ); + $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) $2 ); for ( i = 0; i < $2; i++ ) $1[i] = ( (PLFLT *) PyArray_DATA( tmp ) + i * size ); } @@ -518,7 +521,7 @@ Xlen = PyArray_DIMS( tmp )[0]; Ylen = PyArray_DIMS( tmp )[1]; size = Ylen; - $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * Xlen ); + $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) Xlen ); for ( i = 0; i < Xlen; i++ ) $1[i] = ( (PLFLT *) PyArray_DATA( tmp ) + i * size ); } @@ -555,7 +558,7 @@ return NULL; } size = Ylen; - $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * Xlen ); + $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) Xlen ); for ( i = 0; i < Xlen; i++ ) $1[i] = ( (PLFLT *) PyArray_DATA( tmp ) + i * size ); } @@ -578,7 +581,7 @@ return NULL; } size = Ylen; - $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * Xlen ); + $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) Xlen ); for ( i = 0; i < Xlen; i++ ) $1[i] = ( (PLFLT *) PyArray_DATA( tmp ) + i * size ); } @@ -608,7 +611,7 @@ if ( !array ) return NULL; size = Ylen; - $3 = (double **) malloc( sizeof ( double * ) * Xlen ); + $3 = (double **) malloc( sizeof ( double * ) * ( size_t ) Xlen ); for ( i = 0; i < Xlen; i++ ) $3[i] = ( (double *) PyArray_DATA( (PyArrayObject *) array ) + i * size ); } @@ -637,7 +640,7 @@ PyErr_SetString( PyExc_ValueError, "Vectors must be same length." ); return NULL; } - $1 = (char **) malloc( sizeof ( char* ) * Alen ); + $1 = (char **) malloc( sizeof ( char* ) * ( size_t ) Alen ); for ( i = 0; i < Alen; i++ ) { $1[i] = (char *) PyArray_DATA( tmp ) + i * PyArray_STRIDES( tmp )[0]; @@ -659,7 +662,7 @@ return NULL; Alen = PyArray_DIMS( tmp )[0]; $1 = Alen; - $2 = (char **) malloc( sizeof ( char* ) * Alen ); + $2 = (char **) malloc( sizeof ( char* ) * ( size_t ) Alen ); for ( i = 0; i < Alen; i++ ) { $2[i] = (char *) PyArray_DATA( tmp ) + i * PyArray_STRIDES( tmp )[0]; @@ -719,6 +722,11 @@ static PLcGrid tmpGrid1; static PLcGrid2 tmpGrid2; + PLcGrid* marshal_PLcGrid1( PyObject* input, int isimg ); + void cleanup_PLcGrid1( void ); + PLcGrid2* marshal_PLcGrid2( PyObject* input, int isimg ); + void cleanup_PLcGrid2( void ); + PLcGrid* marshal_PLcGrid1( PyObject* input, int isimg ) { // fprintf(stderr, "marshal PLcGrid1\n"); @@ -736,8 +744,8 @@ PyErr_SetString( PyExc_ValueError, "Expected a sequence to two 1D arrays." ); return NULL; } - tmpGrid1.nx = PyArray_DIMS( pltr_xg )[0]; - tmpGrid1.ny = PyArray_DIMS( pltr_yg )[0]; + tmpGrid1.nx = ( PLINT ) PyArray_DIMS( pltr_xg )[0]; + tmpGrid1.ny = ( PLINT ) PyArray_DIMS( pltr_yg )[0]; if ( isimg == 0 ) { if ( Xlen != tmpGrid1.nx || Ylen != tmpGrid1.ny ) @@ -790,8 +798,8 @@ PyErr_SetString( PyExc_ValueError, "Arrays must be same size." ); return NULL; } - tmpGrid2.nx = PyArray_DIMS( pltr_xg )[0]; - tmpGrid2.ny = PyArray_DIMS( pltr_xg )[1]; + tmpGrid2.nx = ( PLINT ) PyArray_DIMS( pltr_xg )[0]; + tmpGrid2.ny = ( PLINT ) PyArray_DIMS( pltr_xg )[1]; if ( isimg == 0 ) { if ( Xlen != tmpGrid2.nx || Ylen != tmpGrid2.ny ) @@ -809,10 +817,10 @@ } } size = tmpGrid2.ny; - tmpGrid2.xg = (PLFLT **) malloc( sizeof ( PLFLT* ) * tmpGrid2.nx ); + tmpGrid2.xg = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) tmpGrid2.nx ); for ( i = 0; i < tmpGrid2.nx; i++ ) tmpGrid2.xg[i] = ( (PLFLT *) PyArray_DATA( pltr_xg ) + i * size ); - tmpGrid2.yg = (PLFLT **) malloc( sizeof ( PLFLT* ) * tmpGrid2.nx ); + tmpGrid2.yg = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) tmpGrid2.nx ); for ( i = 0; i < tmpGrid2.nx; i++ ) tmpGrid2.yg[i] = ( (PLFLT *) PyArray_DATA( pltr_yg ) + i * size ); return &tmpGrid2; @@ -920,6 +928,22 @@ #define MY_UNBLOCK_THREADS #endif +// Function prototypes + void do_pltr_callback( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer data ); + PLFLT do_f2eval_callback( PLINT x, PLINT y, PLPointer data ); + void do_label_callback( PLINT axis, PLFLT value, char *string, PLINT len, PLPointer data ); + void do_ct_callback( PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer data ); + void do_mapform_callback( PLINT n, PLFLT *x, PLFLT *y ); + pltr_func marshal_pltr( PyObject* input ); + void cleanup_pltr( void ); + ct_func marshal_ct( PyObject* input ); + void cleanup_ct( void ); + mapform_func marshal_mapform( PyObject* input ); + void cleanup_mapform( void ); + PLPointer marshal_PLPointer( PyObject* input, int isimg ); + void cleanup_PLPointer( void ); + + // This is the callback that gets handed to the C code. It, in turn, calls the Python callback void do_pltr_callback( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer data ) @@ -1026,7 +1050,6 @@ { PyObject *pdata, *arglist, *result; char *pystring; - PLFLT fresult = 0.0; // the data argument is acutally a pointer to a python object if ( data ) @@ -1500,7 +1523,7 @@ } tmp = PyList_Size( $input ); $1 = &tmp; - $2 = (char **) malloc( ( tmp + 1 ) * sizeof ( char * ) ); + $2 = (char **) malloc( ( size_t ) ( tmp + 1 ) * sizeof ( char * ) ); for ( i = 0; i < tmp; i++ ) { PyObject *s = PyList_GetItem( $input, i ); Modified: trunk/drivers/xfig.c =================================================================== --- trunk/drivers/xfig.c 2013-10-24 18:54:19 UTC (rev 12625) +++ trunk/drivers/xfig.c 2013-10-24 23:01:26 UTC (rev 12626) @@ -123,7 +123,7 @@ dev = (xfig_Dev *) pls->dev; - dev->curwid = pls->width < 1 ? 1 : pls->width; + dev->curwid = pls->width < 1 ? 1 : (int) pls->width; dev->firstline = 1; dev->xold = PL_UNDEFINED; @@ -390,7 +390,7 @@ case PLSTATE_WIDTH: flushbuffer( pls ); dev->firstline = 1; - dev->curwid = pls->width < 1 ? 1 : pls->width; + dev->curwid = pls->width < 1 ? 1 : (int) pls->width; break; case PLSTATE_COLOR0: Modified: trunk/examples/c/x33c.c =================================================================== --- trunk/examples/c/x33c.c 2013-10-24 18:54:19 UTC (rev 12625) +++ trunk/examples/c/x33c.c 2013-10-24 23:01:26 UTC (rev 12626) @@ -257,7 +257,7 @@ 15, 1, 1, low_cap_color, high_cap_color, cont_color, cont_width, - n_labels, label_opts, (const char **) &label, + n_labels, label_opts, (const char * const *) &label, n_axes, axis_opts, ticks, sub_ticks, n_values_array, (const PLFLT * const *) values_array ); Modified: trunk/examples/c++/x16.cc =================================================================== --- trunk/examples/c++/x16.cc 2013-10-24 18:54:19 UTC (rev 12625) +++ trunk/examples/c++/x16.cc 2013-10-24 23:01:26 UTC (rev 12626) @@ -168,7 +168,6 @@ PLINT axis_subticks[NUM_AXES] = { 0, }; - PLFLT filler_values[2] = { 0.0, 1.0 }; #define NUM_LABELS 1 PLINT n_labels = NUM_LABELS; PLINT label_opts[] = { Modified: trunk/examples/f95/x00f.f90 =================================================================== --- trunk/examples/f95/x00f.f90 2013-10-24 18:54:19 UTC (rev 12625) +++ trunk/examples/f95/x00f.f90 2013-10-24 23:01:26 UTC (rev 12626) @@ -28,7 +28,7 @@ real(kind=plflt), dimension(NSIZE) :: x, y real(kind=plflt) :: xmin = 0._plflt, xmax = 1._plflt, ymin = 0._plflt, ymax = 100._plflt - integer :: i + ! integer :: i ! Prepare data to be plotted. x = arange(0, NSIZE) / real(NSIZE-1,plflt) Modified: trunk/examples/f95/x09f.f90 =================================================================== --- trunk/examples/f95/x09f.f90 2013-10-24 18:54:19 UTC (rev 12625) +++ trunk/examples/f95/x09f.f90 2013-10-24 23:01:26 UTC (rev 12626) @@ -149,7 +149,7 @@ integer :: i,j real(kind=plflt) :: xg(xdim, ydim), yg(xdim, ydim), & z(xdim, ydim), px(PERIMETERPTS), py(PERIMETERPTS), & - lev(NLEVEL), t, r, theta, delta + lev(NLEVEL), r, theta, delta call plenv(-1._plflt, 1._plflt, -1._plflt, 1._plflt, 0, -2) call plcol0(1) Modified: trunk/examples/f95/x27f.f90 =================================================================== --- trunk/examples/f95/x27f.f90 2013-10-24 18:54:19 UTC (rev 12625) +++ trunk/examples/f95/x27f.f90 2013-10-24 23:01:26 UTC (rev 12626) @@ -173,6 +173,12 @@ n = windings*steps+1 + ! Initialize variables to prevent compiler warnings + xmin = 0.0 + xmax = 0.0 + ymin = 0.0 + ymax = 0.0 + do i = 1,n phi = dble(i-1) * dphi phiw = (params(1)-params(2))/params(2)*phi Modified: trunk/examples/f95/x33f.f90 =================================================================== --- trunk/examples/f95/x33f.f90 2013-10-24 18:54:19 UTC (rev 12625) +++ trunk/examples/f95/x33f.f90 2013-10-24 23:01:26 UTC (rev 12626) @@ -748,9 +748,7 @@ integer :: sub_ticks(1) real(kind=plflt) :: low_cap_color, high_cap_color logical :: vertical, ifn - integer, parameter :: n_axes = 1 character(len=20) :: axis_opts(1) - integer, parameter :: n_labels = 1 integer :: label_opts(1) character(len=200) :: labels(1) character(len=200) :: title Modified: trunk/src/plfreetype.c =================================================================== --- trunk/src/plfreetype.c 2013-10-24 18:54:19 UTC (rev 12625) +++ trunk/src/plfreetype.c 2013-10-24 23:01:26 UTC (rev 12626) @@ -225,7 +225,7 @@ { // FCI in text stream; change font accordingly. FT_SetFace( pls, text[i] ); - *yy = FT->face->size->metrics.height > -*yy ? -FT->face->size->metrics.height : *yy; + *yy = (int) (FT->face->size->metrics.height > -*yy ? -FT->face->size->metrics.height : *yy); } else { Modified: trunk/src/plmap.c =================================================================== --- trunk/src/plmap.c 2013-10-24 18:54:19 UTC (rev 12625) +++ trunk/src/plmap.c 2013-10-24 23:01:26 UTC (rev 12626) @@ -169,8 +169,8 @@ } #endif - bufx = malloc( ncopies * sizeof ( PLFLT* ) ); - bufy = malloc( ncopies * sizeof ( PLFLT* ) ); + bufx = malloc( ( size_t ) ncopies * sizeof ( PLFLT* ) ); + bufy = malloc( ( size_t ) ncopies * sizeof ( PLFLT* ) ); for ( i = 0; i < ncopies; i++ ) { bufx[i] = NULL; @@ -206,8 +206,8 @@ free( bufx[i] ); if ( bufy[i] ) free( bufy[i] ); - bufx[i] = malloc( bufsize * sizeof ( double ) ); - bufy[i] = malloc( bufsize * sizeof ( double ) ); + bufx[i] = malloc( ( size_t ) bufsize * sizeof ( double ) ); + bufy[i] = malloc( ( size_t ) bufsize * sizeof ( double ) ); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hez...@us...> - 2013-10-29 00:18:50
|
Revision: 12639 http://sourceforge.net/p/plplot/code/12639 Author: hezekiahcarty Date: 2013-10-29 00:18:45 +0000 (Tue, 29 Oct 2013) Log Message: ----------- Update OCaml example 16, small type fix for OCaml's plshades This version should have no visual difference between the C and OCaml example 16. There is still a postscript output difference due to some color setting and restoration which is performed in the OCaml version. That difference will be addressed in a later commit. Modified Paths: -------------- trunk/bindings/ocaml/plplot_impl.c trunk/examples/ocaml/x16.ml Modified: trunk/bindings/ocaml/plplot_impl.c =================================================================== --- trunk/bindings/ocaml/plplot_impl.c 2013-10-28 22:05:41 UTC (rev 12638) +++ trunk/bindings/ocaml/plplot_impl.c 2013-10-29 00:18:45 UTC (rev 12639) @@ -450,7 +450,7 @@ void ml_plshades( const PLFLT **a, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT *clevel, PLINT nlevel, PLFLT fill_width, - PLINT cont_color, PLINT cont_width, + PLINT cont_color, PLFLT cont_width, PLBOOL rectangular ) { c_plshades( a, nx, ny, Modified: trunk/examples/ocaml/x16.ml =================================================================== --- trunk/examples/ocaml/x16.ml 2013-10-28 22:05:41 UTC (rev 12638) +++ trunk/examples/ocaml/x16.ml 2013-10-29 00:18:45 UTC (rev 12639) @@ -9,6 +9,33 @@ open Plplot +let colorbar ?color ?contour values = + (* Smaller text *) + plschr 0.0 0.75; + (* Small ticks on the vertical axis *) + plsmaj 0.0 0.5; + plsmin 0.0 0.5; + + let axis = + [ + `frame0; + `frame1; + `vertical_label; + `unconventional_label; + `major_ticks; + ] + in + let shade = Plot.shade_colorbar ~custom:true ~axis values in + let pos = Plot.viewport_pos ~inside:false 0.005 0.0 in + Plot.plot [ + Plot.colorbar ?color ?contour ~orient:(`top (0.0375, 0.875)) ~label:[`bottom "Magnitude"] ~pos shade; + ]; + + (* Reset text and tick sizes *) + plschr 0.0 1.0; + plsmaj 0.0 1.0; + plsmin 0.0 1.0 + let pi = atan 1.0 *. 4.0 (* Fundamental settings. See notes[] for more info. *) @@ -133,6 +160,8 @@ plshades z (-1.0) 1.0 (-1.0) 1.0 shedge fill_width cont_color cont_width true; + colorbar shedge; + plcol0 1; plbox "bcnst" 0.0 0 "bcnstv" 0.0 0; plcol0 2; @@ -153,6 +182,8 @@ plset_pltr (pltr1 xg1 yg1); plshades z (-1.0) 1.0 (-1.0) 1.0 shedge fill_width cont_color cont_width true; + colorbar shedge; + plcol0 1; plbox "bcnst" 0.0 0 "bcnstv" 0.0 0; plcol0 2; @@ -174,6 +205,8 @@ plshades z (-1.0) 1.0 (-1.0) 1.0 shedge fill_width cont_color cont_width false; + colorbar shedge; + plcol0 1; plbox "bcnst" 0.0 0 "bcnstv" 0.0 0; plcol0 2; @@ -195,6 +228,8 @@ plshades z (-1.0) 1.0 (-1.) 1.0 shedge fill_width 2 3.0 false; + colorbar ~color:(`index 2) ~contour:(`index 2, 3.0) shedge; + plcol0 1; plbox "bcnst" 0.0 0 "bcnstv" 0.0 0; plcol0 2; @@ -214,6 +249,8 @@ plset_defined zdefined; plshades z (-1.0) 1.0 (-1.0) 1.0 shedge fill_width cont_color cont_width false; + + colorbar shedge; plunset_defined (); plcol0 1; @@ -257,6 +294,8 @@ plshades z (-1.0) 1.0 (-1.0) 1.0 shedge fill_width cont_color cont_width false; + colorbar shedge; + (* Now we can draw the perimeter. (If do before, shade stuff may overlap.) *) let px = Array.make perimeterpts 0.0 in let py = Array.make perimeterpts 0.0 in This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-05 16:24:15
|
Revision: 12661 http://sourceforge.net/p/plplot/code/12661 Author: airwin Date: 2013-11-05 16:24:11 +0000 (Tue, 05 Nov 2013) Log Message: ----------- Style previous commits. Modified Paths: -------------- trunk/bindings/f95/scstubs.c trunk/bindings/java/plplotjavac.i trunk/bindings/python/plplot_widgetmodule.c trunk/bindings/python/plplotcmodule.i trunk/examples/c/x22c.c trunk/src/plfreetype.c trunk/src/plmap.c trunk/src/plvect.c Modified: trunk/bindings/f95/scstubs.c =================================================================== --- trunk/bindings/f95/scstubs.c 2013-11-05 15:16:33 UTC (rev 12660) +++ trunk/bindings/f95/scstubs.c 2013-11-05 16:24:11 UTC (rev 12661) @@ -414,10 +414,10 @@ PLFLT **a; int i, j; - a = (PLFLT **) malloc( sizeof ( PLFLT * ) * ( size_t ) ( *n_axes ) ); + a = (PLFLT **) malloc( sizeof ( PLFLT * ) * (size_t) ( *n_axes ) ); for ( i = 0; i < *n_axes; i++ ) { - a[i] = (PLFLT *) malloc( sizeof ( PLFLT ) * ( size_t ) n_values[i] ); + a[i] = (PLFLT *) malloc( sizeof ( PLFLT ) * (size_t) n_values[i] ); for ( j = 0; j < n_values[i]; j++ ) { a[i][j] = values[i + j * ( *n_axes )]; @@ -1019,7 +1019,7 @@ } void -PLPATH( PLINT *n, PLFLT *x1, PLFLT *y1, PLFLT *x2, PLFLT *y2 ) +PLPATH( PLINT *n, PLFLT *x1, PLFLT *y1, PLFLT *x2, PLFLT *y2 ) { c_plpath( *n, *x1, *y1, *x2, *y2 ); } Modified: trunk/bindings/java/plplotjavac.i =================================================================== --- trunk/bindings/java/plplotjavac.i 2013-11-05 15:16:33 UTC (rev 12660) +++ trunk/bindings/java/plplotjavac.i 2013-11-05 16:24:11 UTC (rev 12661) @@ -197,7 +197,7 @@ setup_array_1d_b( PLBOOL **pa, jboolean *adat, int n ) { int i; - *pa = (PLBOOL *) malloc( ( size_t ) n * sizeof ( PLBOOL ) ); + *pa = (PLBOOL *) malloc( (size_t) n * sizeof ( PLBOOL ) ); for ( i = 0; i < n; i++ ) { ( *pa )[i] = adat[i] ? 1 : 0; @@ -210,7 +210,7 @@ setup_array_1d_i( PLINT **pa, jint *adat, int n ) { int i; - *pa = (PLINT *) malloc( ( size_t ) n * sizeof ( PLINT ) ); + *pa = (PLINT *) malloc( (size_t) n * sizeof ( PLINT ) ); for ( i = 0; i < n; i++ ) { ( *pa )[i] = adat[i]; @@ -223,7 +223,7 @@ setup_array_1d_f( PLFLT **pa, jfloat *adat, int n ) { int i; - *pa = (PLFLT *) malloc( ( size_t ) n * sizeof ( PLFLT ) ); + *pa = (PLFLT *) malloc( (size_t) n * sizeof ( PLFLT ) ); for ( i = 0; i < n; i++ ) { ( *pa )[i] = adat[i]; @@ -236,7 +236,7 @@ setup_array_1d_d( PLFLT **pa, jdouble *adat, int n ) { int i; - *pa = (PLFLT *) malloc( ( size_t ) n * sizeof ( PLFLT ) ); + *pa = (PLFLT *) malloc( (size_t) n * sizeof ( PLFLT ) ); for ( i = 0; i < n; i++ ) { ( *pa )[i] = adat[i]; @@ -251,8 +251,8 @@ { int i, j; - *pa = (PLFLT **) malloc( ( size_t ) nx * sizeof ( PLFLT * ) ); - ( *pa )[0] = (PLFLT *) malloc( ( size_t ) ( nx * ny ) * sizeof ( PLFLT ) ); + *pa = (PLFLT **) malloc( (size_t) nx * sizeof ( PLFLT * ) ); + ( *pa )[0] = (PLFLT *) malloc( (size_t) ( nx * ny ) * sizeof ( PLFLT ) ); for ( i = 0; i < nx; i++ ) { @@ -270,8 +270,8 @@ { int i, j; - *pa = (PLFLT **) malloc( ( size_t ) nx * sizeof ( PLFLT * ) ); - ( *pa )[0] = (PLFLT *) malloc( ( size_t ) ( nx * ny ) * sizeof ( PLFLT ) ); + *pa = (PLFLT **) malloc( (size_t) nx * sizeof ( PLFLT * ) ); + ( *pa )[0] = (PLFLT *) malloc( (size_t) ( nx * ny ) * sizeof ( PLFLT ) ); for ( i = 0; i < nx; i++ ) { @@ -292,7 +292,7 @@ #ifdef PL_DOUBLE x = (double *) dat; #else - x = (double *) malloc( ( size_t ) n * sizeof ( double ) ); + x = (double *) malloc( (size_t) n * sizeof ( double ) ); for ( i = 0; i < n; i++ ) { x[i] = (double) dat[i]; @@ -915,8 +915,8 @@ int nx = ( *jenv )->GetArrayLength( jenv, $input ); int ny = -1; int i, j; - ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) ); - adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) ); + ai = (jobject *) malloc( (size_t) nx * sizeof ( jobject ) ); + adat = (jPLFLT **) malloc( (size_t) nx * sizeof ( jPLFLT * ) ); ( *jenv )->EnsureLocalCapacity( jenv, nx ); @@ -982,8 +982,8 @@ int nx = ( *jenv )->GetArrayLength( jenv, $input ); int ny = -1; int i, j; - ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) ); - adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) ); + ai = (jobject *) malloc( (size_t) nx * sizeof ( jobject ) ); + adat = (jPLFLT **) malloc( (size_t) nx * sizeof ( jPLFLT * ) ); ( *jenv )->EnsureLocalCapacity( jenv, nx ); @@ -1040,8 +1040,8 @@ int nx = ( *jenv )->GetArrayLength( jenv, $input ); int ny = -1; int i, j; - ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) ); - adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) ); + ai = (jobject *) malloc( (size_t) nx * sizeof ( jobject ) ); + adat = (jPLFLT **) malloc( (size_t) nx * sizeof ( jPLFLT * ) ); ( *jenv )->EnsureLocalCapacity( jenv, nx ); @@ -1094,8 +1094,8 @@ int nx = ( *jenv )->GetArrayLength( jenv, $input ); int ny = -1; int i, j; - ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) ); - adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) ); + ai = (jobject *) malloc( (size_t) nx * sizeof ( jobject ) ); + adat = (jPLFLT **) malloc( (size_t) nx * sizeof ( jPLFLT * ) ); ( *jenv )->EnsureLocalCapacity( jenv, nx ); @@ -1178,8 +1178,8 @@ return; } - ptr = (PLFLT **) malloc( ( size_t ) nx * sizeof ( PLFLT * ) ); - ptr[0] = (PLFLT *) malloc( ( size_t ) nx * ny * sizeof ( PLFLT ) ); + ptr = (PLFLT **) malloc( (size_t) nx * sizeof ( PLFLT * ) ); + ptr[0] = (PLFLT *) malloc( (size_t) nx * ny * sizeof ( PLFLT ) ); for ( i = 0; i < nx; i++ ) { ptr[i] = ptr[0] + i * ny; @@ -1197,8 +1197,8 @@ ptr = $1; - ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) ); - adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) ); + ai = (jobject *) malloc( (size_t) nx * sizeof ( jobject ) ); + adat = (jPLFLT **) malloc( (size_t) nx * sizeof ( jPLFLT * ) ); for ( i = 0; i < nx; i++ ) { @@ -1254,8 +1254,8 @@ int nx = ( *jenv )->GetArrayLength( jenv, $input ); int ny = -1; int i, j; - ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) ); - adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) ); + ai = (jobject *) malloc( (size_t) nx * sizeof ( jobject ) ); + adat = (jPLFLT **) malloc( (size_t) nx * sizeof ( jPLFLT * ) ); ( *jenv )->EnsureLocalCapacity( jenv, nx ); @@ -1569,8 +1569,8 @@ int nx = ( *jenv )->GetArrayLength( jenv, $input ); int ny = -1; int i, j; - ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) ); - adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) ); + ai = (jobject *) malloc( (size_t) nx * sizeof ( jobject ) ); + adat = (jPLFLT **) malloc( (size_t) nx * sizeof ( jPLFLT * ) ); ( *jenv )->EnsureLocalCapacity( jenv, nx ); @@ -1645,8 +1645,8 @@ int nx = ( *jenv )->GetArrayLength( jenv, $input ); int ny = -1; int i, j; - ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) ); - adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) ); + ai = (jobject *) malloc( (size_t) nx * sizeof ( jobject ) ); + adat = (jPLFLT **) malloc( (size_t) nx * sizeof ( jPLFLT * ) ); ( *jenv )->EnsureLocalCapacity( jenv, nx ); @@ -1713,8 +1713,8 @@ int nx = ( *jenv )->GetArrayLength( jenv, $input ); int ny = -1; int i, j; - ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) ); - adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) ); + ai = (jobject *) malloc( (size_t) nx * sizeof ( jobject ) ); + adat = (jPLFLT **) malloc( (size_t) nx * sizeof ( jPLFLT * ) ); ( *jenv )->EnsureLocalCapacity( jenv, nx ); @@ -1807,7 +1807,7 @@ // Take a copy of the C string as the typemap is for a non const C string jmethodID capacityID = ( *jenv )->GetMethodID( jenv, sbufClass, "capacity", "()I" ); jint capacity = ( *jenv )->CallIntMethod( jenv, $input, capacityID ); - $1 = (char *) malloc( ( size_t ) ( capacity + 1 ) ); + $1 = (char *) malloc( (size_t) ( capacity + 1 ) ); // Zero the original StringBuffer, so we can replace it with the result setLengthID = ( *jenv )->GetMethodID( jenv, sbufClass, "setLength", "(I)V" ); @@ -1852,7 +1852,7 @@ int i = 0; size = (int) ( ( *jenv )->GetArrayLength( jenv, $input ) ); $1 = &size; - $2 = (char **) malloc( ( size_t ) ( size + 1 ) * sizeof ( char * ) ); + $2 = (char **) malloc( (size_t) ( size + 1 ) * sizeof ( char * ) ); // make a copy of each string for ( i = 0; i < size; i++ ) { @@ -1931,7 +1931,7 @@ printf( "Arrays must be the same length\n" ); return; } - $1 = (char **) malloc( ( size_t ) Alen * sizeof ( char * ) ); + $1 = (char **) malloc( (size_t) Alen * sizeof ( char * ) ); // make a copy of each string for ( i = 0; i < Alen; i++ ) { @@ -1977,7 +1977,7 @@ int size = ( *jenv )->GetArrayLength( jenv, $input ); Alen = size; $1 = size; - $2 = (char **) malloc( ( size_t ) Alen * sizeof ( char * ) ); + $2 = (char **) malloc( (size_t) Alen * sizeof ( char * ) ); // make a copy of each string for ( i = 0; i < Alen; i++ ) { Modified: trunk/bindings/python/plplot_widgetmodule.c =================================================================== --- trunk/bindings/python/plplot_widgetmodule.c 2013-11-05 15:16:33 UTC (rev 12660) +++ trunk/bindings/python/plplot_widgetmodule.c 2013-11-05 16:24:11 UTC (rev 12661) @@ -12,7 +12,7 @@ #endif void initplplot_widget( void ); - + #define TRY( E ) if ( !( E ) ) return NULL #ifdef ENABLE_tk Modified: trunk/bindings/python/plplotcmodule.i =================================================================== --- trunk/bindings/python/plplotcmodule.i 2013-11-05 15:16:33 UTC (rev 12660) +++ trunk/bindings/python/plplotcmodule.i 2013-11-05 16:24:11 UTC (rev 12661) @@ -113,8 +113,7 @@ #if SIZEOF_LONG != 4 %wrapper %{ - - PyArrayObject* myIntArray_ContiguousFromObject( PyObject* in, int type, int mindims, int maxdims ); + PyArrayObject* myIntArray_ContiguousFromObject( PyObject* in, int type, int mindims, int maxdims ); // some really twisted stuff to allow calling a single precision library from python PyArrayObject* myIntArray_ContiguousFromObject( PyObject* in, int PL_UNUSED( type ), int mindims, int maxdims ) @@ -481,7 +480,7 @@ $2 = PyArray_DIMS( tmp )[0]; $3 = PyArray_DIMS( tmp )[1]; size = $3; - $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) $2 ); + $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * (size_t) $2 ); for ( i = 0; i < $2; i++ ) $1[i] = ( (PLFLT *) PyArray_DATA( tmp ) + i * size ); } @@ -501,7 +500,7 @@ Xlen = $2 = PyArray_DIMS( tmp )[0]; Ylen = $3 = PyArray_DIMS( tmp )[1]; size = $3; - $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) $2 ); + $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * (size_t) $2 ); for ( i = 0; i < $2; i++ ) $1[i] = ( (PLFLT *) PyArray_DATA( tmp ) + i * size ); } @@ -521,7 +520,7 @@ Xlen = PyArray_DIMS( tmp )[0]; Ylen = PyArray_DIMS( tmp )[1]; size = Ylen; - $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) Xlen ); + $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * (size_t) Xlen ); for ( i = 0; i < Xlen; i++ ) $1[i] = ( (PLFLT *) PyArray_DATA( tmp ) + i * size ); } @@ -558,7 +557,7 @@ return NULL; } size = Ylen; - $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) Xlen ); + $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * (size_t) Xlen ); for ( i = 0; i < Xlen; i++ ) $1[i] = ( (PLFLT *) PyArray_DATA( tmp ) + i * size ); } @@ -581,7 +580,7 @@ return NULL; } size = Ylen; - $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) Xlen ); + $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * (size_t) Xlen ); for ( i = 0; i < Xlen; i++ ) $1[i] = ( (PLFLT *) PyArray_DATA( tmp ) + i * size ); } @@ -611,7 +610,7 @@ if ( !array ) return NULL; size = Ylen; - $3 = (double **) malloc( sizeof ( double * ) * ( size_t ) Xlen ); + $3 = (double **) malloc( sizeof ( double * ) * (size_t) Xlen ); for ( i = 0; i < Xlen; i++ ) $3[i] = ( (double *) PyArray_DATA( (PyArrayObject *) array ) + i * size ); } @@ -640,7 +639,7 @@ PyErr_SetString( PyExc_ValueError, "Vectors must be same length." ); return NULL; } - $1 = (char **) malloc( sizeof ( char* ) * ( size_t ) Alen ); + $1 = (char **) malloc( sizeof ( char* ) * (size_t) Alen ); for ( i = 0; i < Alen; i++ ) { $1[i] = (char *) PyArray_DATA( tmp ) + i * PyArray_STRIDES( tmp )[0]; @@ -662,7 +661,7 @@ return NULL; Alen = PyArray_DIMS( tmp )[0]; $1 = Alen; - $2 = (char **) malloc( sizeof ( char* ) * ( size_t ) Alen ); + $2 = (char **) malloc( sizeof ( char* ) * (size_t) Alen ); for ( i = 0; i < Alen; i++ ) { $2[i] = (char *) PyArray_DATA( tmp ) + i * PyArray_STRIDES( tmp )[0]; @@ -744,8 +743,8 @@ PyErr_SetString( PyExc_ValueError, "Expected a sequence to two 1D arrays." ); return NULL; } - tmpGrid1.nx = ( PLINT ) PyArray_DIMS( pltr_xg )[0]; - tmpGrid1.ny = ( PLINT ) PyArray_DIMS( pltr_yg )[0]; + tmpGrid1.nx = (PLINT) PyArray_DIMS( pltr_xg )[0]; + tmpGrid1.ny = (PLINT) PyArray_DIMS( pltr_yg )[0]; if ( isimg == 0 ) { if ( Xlen != tmpGrid1.nx || Ylen != tmpGrid1.ny ) @@ -798,8 +797,8 @@ PyErr_SetString( PyExc_ValueError, "Arrays must be same size." ); return NULL; } - tmpGrid2.nx = ( PLINT ) PyArray_DIMS( pltr_xg )[0]; - tmpGrid2.ny = ( PLINT ) PyArray_DIMS( pltr_xg )[1]; + tmpGrid2.nx = (PLINT) PyArray_DIMS( pltr_xg )[0]; + tmpGrid2.ny = (PLINT) PyArray_DIMS( pltr_xg )[1]; if ( isimg == 0 ) { if ( Xlen != tmpGrid2.nx || Ylen != tmpGrid2.ny ) @@ -817,10 +816,10 @@ } } size = tmpGrid2.ny; - tmpGrid2.xg = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) tmpGrid2.nx ); + tmpGrid2.xg = (PLFLT **) malloc( sizeof ( PLFLT* ) * (size_t) tmpGrid2.nx ); for ( i = 0; i < tmpGrid2.nx; i++ ) tmpGrid2.xg[i] = ( (PLFLT *) PyArray_DATA( pltr_xg ) + i * size ); - tmpGrid2.yg = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) tmpGrid2.nx ); + tmpGrid2.yg = (PLFLT **) malloc( sizeof ( PLFLT* ) * (size_t) tmpGrid2.nx ); for ( i = 0; i < tmpGrid2.nx; i++ ) tmpGrid2.yg[i] = ( (PLFLT *) PyArray_DATA( pltr_yg ) + i * size ); return &tmpGrid2; @@ -1524,7 +1523,7 @@ } tmp = PyList_Size( $input ); $1 = &tmp; - $2 = (char **) malloc( ( size_t ) ( tmp + 1 ) * sizeof ( char * ) ); + $2 = (char **) malloc( (size_t) ( tmp + 1 ) * sizeof ( char * ) ); for ( i = 0; i < tmp; i++ ) { PyObject *s = PyList_GetItem( $input, i ); Modified: trunk/examples/c/x22c.c =================================================================== --- trunk/examples/c/x22c.c 2013-11-05 15:16:33 UTC (rev 12660) +++ trunk/examples/c/x22c.c 2013-11-05 16:24:11 UTC (rev 12661) @@ -143,7 +143,7 @@ if ( fabs( y ) < b ) { dbdx = ymax / 4.0 * sin( M_PI * x / xmax ) * - M_PI / xmax * y / b; + M_PI / xmax * y / b; u[i][j] = Q * ymax / b; v[i][j] = dbdx * u[i][j]; } @@ -175,14 +175,14 @@ void transform( PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer data ) { - PLFLT *trdata; - PLFLT xmax; + PLFLT *trdata; + PLFLT xmax; - trdata = (PLFLT *) data; - xmax = *trdata; + trdata = (PLFLT *) data; + xmax = *trdata; - *xt = x; - *yt = y / 4.0 * ( 3 - cos( M_PI * x / xmax ) ); + *xt = x; + *yt = y / 4.0 * ( 3 - cos( M_PI * x / xmax ) ); } // @@ -198,9 +198,9 @@ PLFLT Q, b, dbdx; PLcGrid2 cgrid2; PLFLT **u, **v; - const int nx = 20; - const int ny = 20; - const int nc = 11; + const int nx = 20; + const int ny = 20; + const int nc = 11; const int nseg = 20; PLFLT clev[nc]; @@ -212,7 +212,7 @@ ymin = -ny / 2 * dy; ymax = ny / 2 * dy; - plstransform(transform, (PLPointer) &xmax); + plstransform( transform, ( PLPointer ) & xmax ); plAlloc2dGrid( &cgrid2.xg, nx, ny ); plAlloc2dGrid( &cgrid2.yg, nx, ny ); @@ -231,27 +231,28 @@ 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; + 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); + for ( i = 0; i < nc; i++ ) + { + clev[i] = Q + i * Q / ( nc - 1 ); } - + plenv( xmin, xmax, ymin, ymax, 0, 0 ); pllab( "(x)", "(y)", "#frPLplot Example 22 - constriction" ); 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); - plvect( (const PLFLT * const *) u, (const PLFLT * const *) v, nx, ny, - -0.5, pltr2, (void *) &cgrid2 ); + 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 ); + plvect( (const PLFLT * const *) u, (const PLFLT * const *) v, nx, ny, + -0.5, 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); + plpath( nseg, xmin, ymax, xmax, ymax ); + plpath( nseg, xmin, ymin, xmax, ymin ); plcol0( 1 ); plFree2dGrid( cgrid2.xg, nx, ny ); @@ -259,8 +260,7 @@ plFree2dGrid( u, nx, ny ); plFree2dGrid( v, nx, ny ); - plstransform(NULL, NULL); - + plstransform( NULL, NULL ); } Modified: trunk/src/plfreetype.c =================================================================== --- trunk/src/plfreetype.c 2013-11-05 15:16:33 UTC (rev 12660) +++ trunk/src/plfreetype.c 2013-11-05 16:24:11 UTC (rev 12661) @@ -225,7 +225,7 @@ { // FCI in text stream; change font accordingly. FT_SetFace( pls, text[i] ); - *yy = (int) (FT->face->size->metrics.height > -*yy ? -FT->face->size->metrics.height : *yy); + *yy = (int) ( FT->face->size->metrics.height > -*yy ? -FT->face->size->metrics.height : *yy ); } else { Modified: trunk/src/plmap.c =================================================================== --- trunk/src/plmap.c 2013-11-05 15:16:33 UTC (rev 12660) +++ trunk/src/plmap.c 2013-11-05 16:24:11 UTC (rev 12661) @@ -169,8 +169,8 @@ } #endif - bufx = malloc( ( size_t ) ncopies * sizeof ( PLFLT* ) ); - bufy = malloc( ( size_t ) ncopies * sizeof ( PLFLT* ) ); + bufx = malloc( (size_t) ncopies * sizeof ( PLFLT* ) ); + bufy = malloc( (size_t) ncopies * sizeof ( PLFLT* ) ); for ( i = 0; i < ncopies; i++ ) { bufx[i] = NULL; @@ -206,8 +206,8 @@ free( bufx[i] ); if ( bufy[i] ) free( bufy[i] ); - bufx[i] = malloc( ( size_t ) bufsize * sizeof ( double ) ); - bufy[i] = malloc( ( size_t ) bufsize * sizeof ( double ) ); + bufx[i] = malloc( (size_t) bufsize * sizeof ( double ) ); + bufy[i] = malloc( (size_t) bufsize * sizeof ( double ) ); } } Modified: trunk/src/plvect.c =================================================================== --- trunk/src/plvect.c 2013-11-05 15:16:33 UTC (rev 12660) +++ trunk/src/plvect.c 2013-11-05 16:24:11 UTC (rev 12661) @@ -191,7 +191,7 @@ vmax = ( v[i][j] > vmax ) ? v[i][j] : vmax; } } - lscale = 1.5*MIN(dxmin / umax, dymin / vmax); + lscale = 1.5 * MIN( dxmin / umax, dymin / vmax ); if ( scale < 0.0 ) { scale = -scale * lscale; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-12 03:22:21
|
Revision: 12678 http://sourceforge.net/p/plplot/code/12678 Author: airwin Date: 2013-11-12 03:22:18 +0000 (Tue, 12 Nov 2013) Log Message: ----------- Use PLPLOT_ITCL_VERSION, PLPLOT_ITK_VERSION, and PLPLOT_IWIDGETS_VERSION (now #defined in C environment) to create Tcl global variables pl_itcl_package_name, pl_itk_package_name, and pl_iwidgets_package_name. Use those global variables containing the package name and version for Itcl, Itk, and Iwidgets wherever the "package require Itcl", "package require Itk", and "package require Iwidgets" were used previously in tcl scripts. Tested by: Alan W. Irwin <ai...@us...> on Linux using the test_interactive target in the build tree. There were no run-time errors, and the "itcl" examples (targets test_tk_02 and test_tk_04) worked without issues, but the "itcl" menu items for colour palette manipulation were missing. Thus, these changes introduce a colour palette regression that needs to be fixed. Modified Paths: -------------- trunk/bindings/tcl/tclAPI.c trunk/bindings/tk/PLWin.itk trunk/bindings/tk/Pltkwin.tcl trunk/bindings/tk/plcolor.tcl trunk/bindings/tk/pltools.tcl trunk/bindings/tk/plwidget.tcl trunk/bindings/tk-x-plat/Memberscope.tcl trunk/bindings/tk-x-plat/Plplotwin.tcl trunk/bindings/tk-x-plat/Plwindow.tcl trunk/bindings/tk-x-plat/plbarchart.tcl trunk/bindings/tk-x-plat/pltimeseries.tcl trunk/bindings/tk-x-plat/plwidget2.tcl trunk/cmake/modules/tcl-related.cmake trunk/examples/tk/tk02.in trunk/examples/tk/tk04.in Modified: trunk/bindings/tcl/tclAPI.c =================================================================== --- trunk/bindings/tcl/tclAPI.c 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tcl/tclAPI.c 2013-11-12 03:22:18 UTC (rev 12678) @@ -443,6 +443,37 @@ Tcl_SetVar( interp, "plversion", PLPLOT_VERSION, TCL_GLOBAL_ONLY ); + if ( strcmp( PLPLOT_ITCL_VERSION, "4.0.0" ) >= 0 ) + Tcl_SetVar( interp, "pl_itcl_package_name", "Itcl 4", TCL_GLOBAL_ONLY ); + else if ( strcmp( PLPLOT_ITCL_VERSION, "3.0.0" ) >= 0 ) + Tcl_SetVar( interp, "pl_itcl_package_name", "Itcl 3", TCL_GLOBAL_ONLY ); + else + // Mark invalid package name in such a way as to cause an error + // when, for example, itcl has been disabled by PLplot, yet one + // of the PLplot Tcl scripts attempts to load Itcl. + Tcl_SetVar( interp, "pl_itcl_package_name", "Itcl(because_not_found_by_PLplot)", TCL_GLOBAL_ONLY ); + + if ( strcmp( PLPLOT_ITK_VERSION, "4.0.0" ) >= 0 ) + Tcl_SetVar( interp, "pl_itk_package_name", "Itk 4", TCL_GLOBAL_ONLY ); + else if ( strcmp( PLPLOT_ITK_VERSION, "3.0.0" ) >= 0 ) + Tcl_SetVar( interp, "pl_itk_package_name", "Itk 3", TCL_GLOBAL_ONLY ); + else + // Mark invalid package name in such a way as to cause an error + // when, for example, itk has been disabled by PLplot, yet one + // of the PLplot Tcl scripts attempts to load Itk. + Tcl_SetVar( interp, "pl_itk_package_name", "Itk(because_not_found_by_PLplot)", TCL_GLOBAL_ONLY ); + + if ( strcmp( PLPLOT_IWIDGETS_VERSION, "4.1.0" ) >= 0 ) + Tcl_SetVar( interp, "pl_iwidgets_package_name", "Iwidgets 4", TCL_GLOBAL_ONLY ); + else if ( strcmp( PLPLOT_IWIDGETS_VERSION, "4.0.0" ) >= 0 ) + Tcl_SetVar( interp, "pl_iwidgets_package_name", "-exact Iwidgets " PLPLOT_IWIDGETS_VERSION, TCL_GLOBAL_ONLY ); + else + // Mark invalid package name in such a way as to cause an error + // when, for example, itk has been disabled by PLplot, yet one + // of the PLplot Tcl scripts attempts to load Iwidgets. + Tcl_SetVar( interp, "pl_iwidgets_package_name", "Iwidgets(because_not_found_by_PLplot)", TCL_GLOBAL_ONLY ); + + // Begin search for init script // Each search begins with a test of libDir, so rearrangement is easy. // If search is successful, both libDir (C) and pllibrary (tcl) are set Modified: trunk/bindings/tk/PLWin.itk =================================================================== --- trunk/bindings/tk/PLWin.itk 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk/PLWin.itk 2013-11-12 03:22:18 UTC (rev 12678) @@ -7,7 +7,7 @@ # $Id$ ############################################################################### -package require Itk +eval package require $pl_itk_package_name itcl::class PLWin { inherit itk::Widget Modified: trunk/bindings/tk/Pltkwin.tcl =================================================================== --- trunk/bindings/tk/Pltkwin.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk/Pltkwin.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -36,9 +36,7 @@ # We don't need version numbers because we use the first versions # which actually use the 'package' mechanism. package require Pltk -package require Itcl -package require Itk -package require Iwidgets +eval package require $pl_iwidgets_package_name itcl::class Pltkwin { inherit PLWin Modified: trunk/bindings/tk/plcolor.tcl =================================================================== --- trunk/bindings/tk/plcolor.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk/plcolor.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -69,7 +69,7 @@ set colorSpace hsl -package require Itcl +eval package require $pl_itcl_package_name itcl::class ColorEditor { private variable r 255 Modified: trunk/bindings/tk/pltools.tcl =================================================================== --- trunk/bindings/tk/pltools.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk/pltools.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -258,7 +258,7 @@ proc fileSelect {{filter {}}} { # Use the Iwidgets file selector if available - if ![catch {package require Iwidgets}] { + if ![catch {eval package require $pl_iwidgets_package_name}] { if {![winfo exist .fs]} { iwidgets::fileselectiondialog .fs -modality application } Modified: trunk/bindings/tk/plwidget.tcl =================================================================== --- trunk/bindings/tk/plwidget.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk/plwidget.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -560,7 +560,7 @@ # The palette tools require Itcl 3.0 or later. - if [catch {package require Itcl 3.0}] { return } + if [catch {eval package require $pl_itcl_package_name}] { return } $pmenu($w) add cascade -label "Palettes" -menu $m menu $m Modified: trunk/bindings/tk-x-plat/Memberscope.tcl =================================================================== --- trunk/bindings/tk-x-plat/Memberscope.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk-x-plat/Memberscope.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -2,7 +2,7 @@ # Use, copy, sell, rewrite, improve however you like. # Vince Darley. -package require Itcl +eval package require $pl_itcl_package_name itcl::class Memberscope { protected method memberscope {var} Modified: trunk/bindings/tk-x-plat/Plplotwin.tcl =================================================================== --- trunk/bindings/tk-x-plat/Plplotwin.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk-x-plat/Plplotwin.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -51,7 +51,7 @@ package require Tk 8.0 package require Plplotter -package require Itk 3.0 +eval package require $pl_itk_package_name # # Usual options. Modified: trunk/bindings/tk-x-plat/Plwindow.tcl =================================================================== --- trunk/bindings/tk-x-plat/Plwindow.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk-x-plat/Plwindow.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -13,9 +13,8 @@ option add *Plwindow.width 250 widgetDefault option add *Plwindow.height 250 widgetDefault -package require Itk 3.0 package require Plplotter - +eval package require $pl_itk_package_name # # Usual options. # Modified: trunk/bindings/tk-x-plat/plbarchart.tcl =================================================================== --- trunk/bindings/tk-x-plat/plbarchart.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk-x-plat/plbarchart.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -17,8 +17,7 @@ ## package require Plplotter -package require Itk - +eval package require $pl_itk_package_name proc plbarchart {args} {uplevel Plbarchart $args} itcl::class Plbarchart { Modified: trunk/bindings/tk-x-plat/pltimeseries.tcl =================================================================== --- trunk/bindings/tk-x-plat/pltimeseries.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk-x-plat/pltimeseries.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -17,8 +17,7 @@ ## package require Plplotter -package require Itk - +eval package require $pl_itk_package_name proc pltimeseries {args} {uplevel Pltimeseries $args} itcl::class Pltimeseries { Modified: trunk/bindings/tk-x-plat/plwidget2.tcl =================================================================== --- trunk/bindings/tk-x-plat/plwidget2.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk-x-plat/plwidget2.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -533,11 +533,11 @@ $m add checkbutton -label "Doublebuffer" -variable \ plotopts($w,dbl) -command "$w.plwin configure -doublebuffer \$plotopts($w,dbl)" - global plopt_static_redraw plopt_dynamic_redraw + global plopt_static_redraw plopt_dynamic_redraw pl_itcl_package_name # The palette tools require Itcl 3.0 or later. - if [catch {package require Itcl 3.0}] { return } + if [catch {eval package require $pl_itcl_package_name}] { return } # Set up redraw variables. Basically if you have r/w colorcells (e.g. # PseudoColor visual, not sure if any others), you don't need either of Modified: trunk/cmake/modules/tcl-related.cmake =================================================================== --- trunk/cmake/modules/tcl-related.cmake 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/cmake/modules/tcl-related.cmake 2013-11-12 03:22:18 UTC (rev 12678) @@ -296,14 +296,14 @@ endforeach(SUGGESTED_IWIDGETS_VERSION 4.0.2 4.0.1 4.0.0) endif(USE_INCRTCL_VERSION_4) if(NOT IWIDGETS_RC) - list(GET IWIDGETS_VERSIONS_LIST 0 IWIDGETS_VERSION) + 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) message(STATUS "Checking that the Iwidgets, Itk, and Itcl packages are consistent") if(CONSISTENT_ITCL_VERSION STREQUAL PLPLOT_ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL PLPLOT_ITK_VERSION) message(STATUS "Checking that the Iwidgets, Itk, and Itcl packages are consistent - true") else(CONSISTENT_ITCL_VERSION STREQUAL PLPLOT_ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL PLPLOT_ITK_VERSION) - message(STATUS "IWIDGETS_VERSION = ${IWIDGETS_VERSION}") + message(STATUS "PLPLOT_IWIDGETS_VERSION = ${PLPLOT_IWIDGETS_VERSION}") message(STATUS "PLPLOT_ITK_VERSION = ${PLPLOT_ITK_VERSION}") message(STATUS "CONSISTENT_ITK_VERSION = ${CONSISTENT_ITK_VERSION}") message(STATUS "PLPLOT_ITCL_VERSION = ${PLPLOT_ITCL_VERSION}") Modified: trunk/examples/tk/tk02.in =================================================================== --- trunk/examples/tk/tk02.in 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/examples/tk/tk02.in 2013-11-12 03:22:18 UTC (rev 12678) @@ -8,7 +8,8 @@ # @> A script for using Tk to control xtk01, using the PLplot itcl interface. ############################################################################### -package require Itk +package require Pltk +eval package require $pl_itk_package_name wm title . "x01c -- TK version" plstdwin . Modified: trunk/examples/tk/tk04.in =================================================================== --- trunk/examples/tk/tk04.in 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/examples/tk/tk04.in 2013-11-12 03:22:18 UTC (rev 12678) @@ -7,8 +7,8 @@ # @> A script illustrating use of 2-d tcl api (plframe). ############################################################################### -package require Itk - +package require Pltk +eval package require $pl_itk_package_name wm title . "tk04" plstdwin . This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-13 01:15:44
|
Revision: 12687 http://sourceforge.net/p/plplot/code/12687 Author: airwin Date: 2013-11-13 01:15:42 +0000 (Wed, 13 Nov 2013) Log Message: ----------- Finish propagating recent plplot.h ==> plplotcapi.i changes in numerical macros to symbolic PLplot constants for two non-swig languages. These changes were automatically generated by the check_f95_parameters and check_tcl_parameters targets and copied back to the source tree by hand after evaluation. Document the entire series of changes leading up to and including these ones in README.release. Tested by Alan W. Irwin <ai...@us...> on Linux using the check_f95_parameters and check_tcl_parameters targets (to check consistency) and the test_noninteractive target (to test that these changes and the prior extensive changes propagated from numerical macros #defined in include/plplot.h caused no issues). Modified Paths: -------------- trunk/README.release trunk/bindings/f95/plplot_parameters.h trunk/bindings/tcl/plplot_parameters.h Modified: trunk/README.release =================================================================== --- trunk/README.release 2013-11-12 23:55:03 UTC (rev 12686) +++ trunk/README.release 2013-11-13 01:15:42 UTC (rev 12687) @@ -105,8 +105,27 @@ 1. OFFICIAL NOTICES FOR USERS SINCE 5.9.10 (the previous development release) -None at this time. +((5.9.11) Backwards-incompatible API change. The numerical symbolic +constants that are #defined as macros in plplot.h have been +repropagated to the Python, Java, Lua, Octave, Fortran 95, and Tcl +language bindings using scripts. Previously, this propagation was +done by hand in a piece-meal manner so use of the scripts has created +a number of changes in the PLplot symbolic constants for these +languages. These changes are the addition of 25 symbolic constants +that were previously only available for C, no deletions of symbolic +constants, no changes to numerical values, but the following +backwards-incompatible name changes: +PLESC_PLFLTBUFFERING ==> PLESC_DOUBLEBUFFERING +PLESPLFLTBUFFERING_DISABLE ==> PLESC_DOUBLEBUFFERING_ENABLE +PLESPLFLTBUFFERING_ENABLE ==> PLESC_DOUBLEBUFFERING_ENABLE +PLESPLFLTBUFFERING_QUERY ==> PLESC_DOUBLEBUFFERING_QUERY + +So those users who were using the symbolic constants on the left for +the above languages will have to change their source code or scripts +to use the constants on the right. No changes in source code or +scripts should be required of other users. + 2. Tests made for release 5.9.11 None at this time. @@ -131,6 +150,27 @@ 4. OFFICIAL NOTICES FOR USERS SINCE 5.8.0 (the previous stable release) +(5.9.11) Backwards-incompatible API change. The numerical symbolic +constants that are #defined as macros in plplot.h have been +repropagated to the Python, Java, Lua, Octave, Fortran 95, and Tcl +language bindings using scripts. Previously, this propagation was +done by hand in a piece-meal manner so use of the scripts has created +a number of changes in the PLplot symbolic constants for these +languages. These changes are the addition of 25 symbolic constants +that were previously only available for C, no deletions of symbolic +constants, no changes to numerical values, but the following +backwards-incompatible name changes: + +PLESC_PLFLTBUFFERING ==> PLESC_DOUBLEBUFFERING +PLESPLFLTBUFFERING_DISABLE ==> PLESC_DOUBLEBUFFERING_ENABLE +PLESPLFLTBUFFERING_ENABLE ==> PLESC_DOUBLEBUFFERING_ENABLE +PLESPLFLTBUFFERING_QUERY ==> PLESC_DOUBLEBUFFERING_QUERY + +So those users who were using the symbolic constants on the left for +the above languages will have to change their source code or scripts +to use the constants on the right. No changes in source code or +scripts should be required of other users. + (5.9.10) The minimum version of CMake has been bumped to 5.8.9. This change allows our build system to take advantage of CMake features introduced in later versions of CMake. Even more importantly it also Modified: trunk/bindings/f95/plplot_parameters.h =================================================================== --- trunk/bindings/f95/plplot_parameters.h 2013-11-12 23:55:03 UTC (rev 12686) +++ trunk/bindings/f95/plplot_parameters.h 2013-11-13 01:15:42 UTC (rev 12687) @@ -21,7 +21,7 @@ integer, parameter :: PLESC_EH = 12 ! handle Window events integer, parameter :: PLESC_GETC = 13 ! get cursor position integer, parameter :: PLESC_SWIN = 14 ! set window parameters - integer, parameter :: PLESC_PLFLTBUFFERING = 15 ! configure PLFLT buffering + integer, parameter :: PLESC_DOUBLEBUFFERING = 15 ! configure double buffering integer, parameter :: PLESC_XORMOD = 16 ! set xor mode integer, parameter :: PLESC_SET_COMPRESSION = 17 ! AFR: set compression integer, parameter :: PLESC_CLEAR = 18 ! RL: clear graphics region @@ -29,58 +29,27 @@ integer, parameter :: PLESC_HAS_TEXT = 20 ! driver draws text integer, parameter :: PLESC_IMAGE = 21 ! handle image integer, parameter :: PLESC_IMAGEOPS = 22 ! plimage related operations - integer, parameter :: DRAW_LINEX = 1 ! draw lines parallel to the X axis - integer, parameter :: DRAW_LINEY = 2 ! draw lines parallel to the Y axis - integer, parameter :: DRAW_LINEXY = 3 ! draw lines parallel to both the X and Y axes - integer, parameter :: MAG_COLOR = 4 ! draw the mesh with a color dependent of the magnitude - integer, parameter :: BASE_CONT = 8 ! draw contour plot at bottom xy plane - integer, parameter :: TOP_CONT = 1*16 ! draw contour plot at top xy plane - integer, parameter :: SURF_CONT = 2*16 ! draw contour plot at surface - integer, parameter :: DRAW_SIDES = 4*16 ! draw sides - integer, parameter :: FACETED = 8*16 ! draw outline for each square that makes up the surface - integer, parameter :: MESH = 1*16*16 ! draw mesh - integer, parameter :: PL_BIN_DEFAULT = 0 - integer, parameter :: PL_BIN_CENTRED = 1 - integer, parameter :: PL_BIN_NOEXPAND = 2 - integer, parameter :: PL_BIN_NOEMPTY = 4 - integer, parameter :: PL_HIST_DEFAULT = 0 - integer, parameter :: PL_HIST_NOSCALING = 1 - integer, parameter :: PL_HIST_IGNORE_OUTLIERS = 2 - integer, parameter :: PL_HIST_NOEXPAND = 8 - integer, parameter :: PL_HIST_NOEMPTY = 16 - integer, parameter :: PL_POSITION_LEFT = 1 - integer, parameter :: PL_POSITION_RIGHT = 2 - integer, parameter :: PL_POSITION_TOP = 4 - integer, parameter :: PL_POSITION_BOTTOM = 8 - integer, parameter :: PL_POSITION_INSIDE = 16 - integer, parameter :: PL_POSITION_OUTSIDE = 32 - integer, parameter :: PL_POSITION_VIEWPORT = 64 - integer, parameter :: PL_POSITION_SUBPAGE = 128 - integer, parameter :: PL_LEGEND_NONE = 1 - integer, parameter :: PL_LEGEND_COLOR_BOX = 2 - integer, parameter :: PL_LEGEND_LINE = 4 - integer, parameter :: PL_LEGEND_SYMBOL = 8 - integer, parameter :: PL_LEGEND_TEXT_LEFT = 16 - integer, parameter :: PL_LEGEND_BACKGROUND = 32 - integer, parameter :: PL_LEGEND_BOUNDING_BOX = 64 - integer, parameter :: PL_LEGEND_ROW_MAJOR = 128 - integer, parameter :: PL_COLORBAR_LABEL_LEFT = 1 - integer, parameter :: PL_COLORBAR_LABEL_RIGHT = 2 - integer, parameter :: PL_COLORBAR_LABEL_TOP = 4 - integer, parameter :: PL_COLORBAR_LABEL_BOTTOM = 8 - integer, parameter :: PL_COLORBAR_IMAGE = 1*16 - integer, parameter :: PL_COLORBAR_SHADE = 2*16 - integer, parameter :: PL_COLORBAR_GRADIENT = 4*16 - integer, parameter :: PL_COLORBAR_CAP_NONE = 8*16 - integer, parameter :: PL_COLORBAR_CAP_LOW = 1*16*16 - integer, parameter :: PL_COLORBAR_CAP_HIGH = 2*16*16 - integer, parameter :: PL_COLORBAR_SHADE_LABEL = 4*16*16 - integer, parameter :: PL_COLORBAR_ORIENT_RIGHT = 8*16*16 - integer, parameter :: PL_COLORBAR_ORIENT_TOP = 1*16*16*16 - integer, parameter :: PL_COLORBAR_ORIENT_LEFT = 2*16*16*16 - integer, parameter :: PL_COLORBAR_ORIENT_BOTTOM = 4*16*16*16 - integer, parameter :: PL_COLORBAR_BACKGROUND = 8*16*16*16 - integer, parameter :: PL_COLORBAR_BOUNDING_BOX = 1*16*16*16*16 + integer, parameter :: PLESC_PL2DEVCOL = 23 ! convert PLColor to device color + integer, parameter :: PLESC_DEV2PLCOL = 24 ! convert device color to PLColor + integer, parameter :: PLESC_SETBGFG = 25 ! set BG, FG colors + integer, parameter :: PLESC_DEVINIT = 26 ! alternate device initialization + integer, parameter :: PLESC_GETBACKEND = 27 ! get used backend of (wxWidgets) driver + integer, parameter :: PLESC_BEGIN_TEXT = 28 ! get ready to draw a line of text + integer, parameter :: PLESC_TEXT_CHAR = 29 ! render a character of text + integer, parameter :: PLESC_CONTROL_CHAR = 30 ! handle a text control character (super/subscript, etc.) + integer, parameter :: PLESC_END_TEXT = 31 ! finish a drawing a line of text + integer, parameter :: PLESC_START_RASTERIZE = 32 ! start rasterized rendering + integer, parameter :: PLESC_END_RASTERIZE = 33 ! end rasterized rendering + integer, parameter :: PLESC_ARC = 34 ! render an arc + integer, parameter :: PLESC_GRADIENT = 35 ! render a gradient + integer, parameter :: PLESC_MODESET = 36 ! set drawing mode + integer, parameter :: PLESC_MODEGET = 37 ! get drawing mode + integer, parameter :: PLTEXT_FONTCHANGE = 0 ! font change in the text stream + integer, parameter :: PLTEXT_SUPERSCRIPT = 1 ! superscript in the text stream + integer, parameter :: PLTEXT_SUBSCRIPT = 2 ! subscript in the text stream + integer, parameter :: PLTEXT_BACKCHAR = 3 ! back-char in the text stream + integer, parameter :: PLTEXT_OVERLINE = 4 ! toggle overline in the text stream + integer, parameter :: PLTEXT_UNDERLINE = 5 ! toggle underline in the text stream integer, parameter :: PLSWIN_DEVICE = 1 ! device coordinates integer, parameter :: PLSWIN_WORLD = 2 ! world coordinates integer, parameter :: PL_X_AXIS = 1 ! The x-axis @@ -128,12 +97,68 @@ real(kind=plflt), parameter :: PL_NOTSET = -42.0_plflt real(kind=plflt), parameter :: PL_PI = 3.1415926535897932384_plflt real(kind=plflt), parameter :: PL_TWOPI = 2.0_plflt*PL_PI - integer, parameter :: PLESPLFLTBUFFERING_ENABLE = 1 - integer, parameter :: PLESPLFLTBUFFERING_DISABLE = 2 - integer, parameter :: PLESPLFLTBUFFERING_QUERY = 3 + integer, parameter :: PLESC_DOUBLEBUFFERING_ENABLE = 1 + integer, parameter :: PLESC_DOUBLEBUFFERING_DISABLE = 2 + integer, parameter :: PLESC_DOUBLEBUFFERING_QUERY = 3 + integer, parameter :: PL_BIN_DEFAULT = 0 + integer, parameter :: PL_BIN_CENTRED = 1 + integer, parameter :: PL_BIN_NOEXPAND = 2 + integer, parameter :: PL_BIN_NOEMPTY = 4 integer, parameter :: GRID_CSA = 1 ! Bivariate Cubic Spline approximation integer, parameter :: GRID_DTLI = 2 ! Delaunay Triangulation Linear Interpolation integer, parameter :: GRID_NNI = 3 ! Natural Neighbors Interpolation integer, parameter :: GRID_NNIDW = 4 ! Nearest Neighbors Inverse Distance Weighted integer, parameter :: GRID_NNLI = 5 ! Nearest Neighbors Linear Interpolation integer, parameter :: GRID_NNAIDW = 6 ! Nearest Neighbors Around Inverse Distance Weighted + integer, parameter :: PL_HIST_DEFAULT = 0 + integer, parameter :: PL_HIST_NOSCALING = 1 + integer, parameter :: PL_HIST_IGNORE_OUTLIERS = 2 + integer, parameter :: PL_HIST_NOEXPAND = 8 + integer, parameter :: PL_HIST_NOEMPTY = 1*16 + integer, parameter :: PL_POSITION_LEFT = 1 + integer, parameter :: PL_POSITION_RIGHT = 2 + integer, parameter :: PL_POSITION_TOP = 4 + integer, parameter :: PL_POSITION_BOTTOM = 8 + integer, parameter :: PL_POSITION_INSIDE = 1*16 + integer, parameter :: PL_POSITION_OUTSIDE = 2*16 + integer, parameter :: PL_POSITION_VIEWPORT = 4*16 + integer, parameter :: PL_POSITION_SUBPAGE = 8*16 + integer, parameter :: PL_LEGEND_NONE = 1 + integer, parameter :: PL_LEGEND_COLOR_BOX = 2 + integer, parameter :: PL_LEGEND_LINE = 4 + integer, parameter :: PL_LEGEND_SYMBOL = 8 + integer, parameter :: PL_LEGEND_TEXT_LEFT = 1*16 + integer, parameter :: PL_LEGEND_BACKGROUND = 2*16 + integer, parameter :: PL_LEGEND_BOUNDING_BOX = 4*16 + integer, parameter :: PL_LEGEND_ROW_MAJOR = 8*16 + integer, parameter :: PL_COLORBAR_LABEL_LEFT = 1 + integer, parameter :: PL_COLORBAR_LABEL_RIGHT = 2 + integer, parameter :: PL_COLORBAR_LABEL_TOP = 4 + integer, parameter :: PL_COLORBAR_LABEL_BOTTOM = 8 + integer, parameter :: PL_COLORBAR_IMAGE = 1*16 + integer, parameter :: PL_COLORBAR_SHADE = 2*16 + integer, parameter :: PL_COLORBAR_GRADIENT = 4*16 + integer, parameter :: PL_COLORBAR_CAP_NONE = 8*16 + integer, parameter :: PL_COLORBAR_CAP_LOW = 1*16*16 + integer, parameter :: PL_COLORBAR_CAP_HIGH = 2*16*16 + integer, parameter :: PL_COLORBAR_SHADE_LABEL = 4*16*16 + integer, parameter :: PL_COLORBAR_ORIENT_RIGHT = 8*16*16 + integer, parameter :: PL_COLORBAR_ORIENT_TOP = 1*16*16*16 + integer, parameter :: PL_COLORBAR_ORIENT_LEFT = 2*16*16*16 + integer, parameter :: PL_COLORBAR_ORIENT_BOTTOM = 4*16*16*16 + integer, parameter :: PL_COLORBAR_BACKGROUND = 8*16*16*16 + integer, parameter :: PL_COLORBAR_BOUNDING_BOX = 1*16*16*16*16 + integer, parameter :: PL_DRAWMODE_UNKNOWN = 0 + integer, parameter :: PL_DRAWMODE_DEFAULT = 1 + integer, parameter :: PL_DRAWMODE_REPLACE = 2 + integer, parameter :: PL_DRAWMODE_XOR = 4 + integer, parameter :: DRAW_LINEX = 1 ! draw lines parallel to the X axis + integer, parameter :: DRAW_LINEY = 2 ! draw lines parallel to the Y axis + integer, parameter :: DRAW_LINEXY = 3 ! draw lines parallel to both the X and Y axis + integer, parameter :: MAG_COLOR = 4 ! draw the mesh with a color dependent of the magnitude + integer, parameter :: BASE_CONT = 8 ! draw contour plot at bottom xy plane + integer, parameter :: TOP_CONT = 1*16 ! draw contour plot at top xy plane + integer, parameter :: SURF_CONT = 2*16 ! draw contour plot at surface + integer, parameter :: DRAW_SIDES = 4*16 ! draw sides + integer, parameter :: FACETED = 8*16 ! draw outline for each square that makes up the surface + integer, parameter :: MESH = 1*16*16 ! draw mesh Modified: trunk/bindings/tcl/plplot_parameters.h =================================================================== --- trunk/bindings/tcl/plplot_parameters.h 2013-11-12 23:55:03 UTC (rev 12686) +++ trunk/bindings/tcl/plplot_parameters.h 2013-11-13 01:15:42 UTC (rev 12687) @@ -56,8 +56,8 @@ # set window parameters\n\ variable PLESC_SWIN 14\n\ \n\ -# configure PLFLT buffering\n\ -variable PLESC_PLFLTBUFFERING 15\n\ +# configure double buffering\n\ +variable PLESC_DOUBLEBUFFERING 15\n\ \n\ # set xor mode\n\ variable PLESC_XORMOD 16\n\ @@ -80,162 +80,69 @@ # plimage related operations\n\ variable PLESC_IMAGEOPS 22\n\ \n\ -# draw lines parallel to the X axis\n\ -variable DRAW_LINEX 0x01\n\ +# convert PLColor to device color\n\ +variable PLESC_PL2DEVCOL 23\n\ \n\ -# draw lines parallel to the Y axis\n\ -variable DRAW_LINEY 0x02\n\ +# convert device color to PLColor\n\ +variable PLESC_DEV2PLCOL 24\n\ \n\ -# draw lines parallel to both the X and Y axes\n\ -variable DRAW_LINEXY 0x03\n\ +# set BG, FG colors\n\ +variable PLESC_SETBGFG 25\n\ \n\ -# draw the mesh with a color dependent of the magnitude\n\ -variable MAG_COLOR 0x04\n\ +# alternate device initialization\n\ +variable PLESC_DEVINIT 26\n\ \n\ -# draw contour plot at bottom xy plane\n\ -variable BASE_CONT 0x08\n\ +# get used backend of (wxWidgets) driver\n\ +variable PLESC_GETBACKEND 27\n\ \n\ -# draw contour plot at top xy plane\n\ -variable TOP_CONT 0x10\n\ +# get ready to draw a line of text\n\ +variable PLESC_BEGIN_TEXT 28\n\ \n\ -# draw contour plot at surface\n\ -variable SURF_CONT 0x20\n\ +# render a character of text\n\ +variable PLESC_TEXT_CHAR 29\n\ \n\ -# draw sides\n\ -variable DRAW_SIDES 0x40\n\ +# handle a text control character (super/subscript, etc.)\n\ +variable PLESC_CONTROL_CHAR 30\n\ \n\ -# draw outline for each square that makes up the surface\n\ -variable FACETED 0x80\n\ +# finish a drawing a line of text\n\ +variable PLESC_END_TEXT 31\n\ \n\ -# draw mesh\n\ -variable MESH 0x100\n\ +# start rasterized rendering\n\ +variable PLESC_START_RASTERIZE 32\n\ \n\ +# end rasterized rendering\n\ +variable PLESC_END_RASTERIZE 33\n\ \n\ -variable PL_BIN_DEFAULT 0\n\ +# render an arc\n\ +variable PLESC_ARC 34\n\ \n\ +# render a gradient\n\ +variable PLESC_GRADIENT 35\n\ \n\ -variable PL_BIN_CENTRED 1\n\ +# set drawing mode\n\ +variable PLESC_MODESET 36\n\ \n\ +# get drawing mode\n\ +variable PLESC_MODEGET 37\n\ \n\ -variable PL_BIN_NOEXPAND 2\n\ +# font change in the text stream\n\ +variable PLTEXT_FONTCHANGE 0\n\ \n\ +# superscript in the text stream\n\ +variable PLTEXT_SUPERSCRIPT 1\n\ \n\ -variable PL_BIN_NOEMPTY 4\n\ +# subscript in the text stream\n\ +variable PLTEXT_SUBSCRIPT 2\n\ \n\ +# back-char in the text stream\n\ +variable PLTEXT_BACKCHAR 3\n\ \n\ -variable PL_HIST_DEFAULT 0\n\ +# toggle overline in the text stream\n\ +variable PLTEXT_OVERLINE 4\n\ \n\ +# toggle underline in the text stream\n\ +variable PLTEXT_UNDERLINE 5\n\ \n\ -variable PL_HIST_NOSCALING 1\n\ -\n\ -\n\ -variable PL_HIST_IGNORE_OUTLIERS 2\n\ -\n\ -\n\ -variable PL_HIST_NOEXPAND 8\n\ -\n\ -\n\ -variable PL_HIST_NOEMPTY 16\n\ -\n\ -\n\ -variable PL_POSITION_LEFT 1\n\ -\n\ -\n\ -variable PL_POSITION_RIGHT 2\n\ -\n\ -\n\ -variable PL_POSITION_TOP 4\n\ -\n\ -\n\ -variable PL_POSITION_BOTTOM 8\n\ -\n\ -\n\ -variable PL_POSITION_INSIDE 16\n\ -\n\ -\n\ -variable PL_POSITION_OUTSIDE 32\n\ -\n\ -\n\ -variable PL_POSITION_VIEWPORT 64\n\ -\n\ -\n\ -variable PL_POSITION_SUBPAGE 128\n\ -\n\ -\n\ -variable PL_LEGEND_NONE 1\n\ -\n\ -\n\ -variable PL_LEGEND_COLOR_BOX 2\n\ -\n\ -\n\ -variable PL_LEGEND_LINE 4\n\ -\n\ -\n\ -variable PL_LEGEND_SYMBOL 8\n\ -\n\ -\n\ -variable PL_LEGEND_TEXT_LEFT 16\n\ -\n\ -\n\ -variable PL_LEGEND_BACKGROUND 32\n\ -\n\ -\n\ -variable PL_LEGEND_BOUNDING_BOX 64\n\ -\n\ -\n\ -variable PL_LEGEND_ROW_MAJOR 128\n\ -\n\ -\n\ -variable PL_COLORBAR_LABEL_LEFT 0x1\n\ -\n\ -\n\ -variable PL_COLORBAR_LABEL_RIGHT 0x2\n\ -\n\ -\n\ -variable PL_COLORBAR_LABEL_TOP 0x4\n\ -\n\ -\n\ -variable PL_COLORBAR_LABEL_BOTTOM 0x8\n\ -\n\ -\n\ -variable PL_COLORBAR_IMAGE 0x10\n\ -\n\ -\n\ -variable PL_COLORBAR_SHADE 0x20\n\ -\n\ -\n\ -variable PL_COLORBAR_GRADIENT 0x40\n\ -\n\ -\n\ -variable PL_COLORBAR_CAP_NONE 0x80\n\ -\n\ -\n\ -variable PL_COLORBAR_CAP_LOW 0x100\n\ -\n\ -\n\ -variable PL_COLORBAR_CAP_HIGH 0x200\n\ -\n\ -\n\ -variable PL_COLORBAR_SHADE_LABEL 0x400\n\ -\n\ -\n\ -variable PL_COLORBAR_ORIENT_RIGHT 0x800\n\ -\n\ -\n\ -variable PL_COLORBAR_ORIENT_TOP 0x1000\n\ -\n\ -\n\ -variable PL_COLORBAR_ORIENT_LEFT 0x2000\n\ -\n\ -\n\ -variable PL_COLORBAR_ORIENT_BOTTOM 0x4000\n\ -\n\ -\n\ -variable PL_COLORBAR_BACKGROUND 0x8000\n\ -\n\ -\n\ -variable PL_COLORBAR_BOUNDING_BOX 0x10000\n\ -\n\ # device coordinates\n\ variable PLSWIN_DEVICE 1\n\ \n\ @@ -375,14 +282,26 @@ variable PL_PI 3.1415926535897932384\n\ \n\ \n\ -variable PLESPLFLTBUFFERING_ENABLE 1\n\ +variable PLESC_DOUBLEBUFFERING_ENABLE 1\n\ \n\ \n\ -variable PLESPLFLTBUFFERING_DISABLE 2\n\ +variable PLESC_DOUBLEBUFFERING_DISABLE 2\n\ \n\ \n\ -variable PLESPLFLTBUFFERING_QUERY 3\n\ +variable PLESC_DOUBLEBUFFERING_QUERY 3\n\ \n\ +\n\ +variable PL_BIN_DEFAULT 0x0\n\ +\n\ +\n\ +variable PL_BIN_CENTRED 0x1\n\ +\n\ +\n\ +variable PL_BIN_NOEXPAND 0x2\n\ +\n\ +\n\ +variable PL_BIN_NOEMPTY 0x4\n\ +\n\ # Bivariate Cubic Spline approximation\n\ variable GRID_CSA 1\n\ \n\ @@ -400,5 +319,161 @@ \n\ # Nearest Neighbors Around Inverse Distance Weighted\n\ variable GRID_NNAIDW 6\n\ +\n\ +\n\ +variable PL_HIST_DEFAULT 0x00\n\ +\n\ +\n\ +variable PL_HIST_NOSCALING 0x01\n\ +\n\ +\n\ +variable PL_HIST_IGNORE_OUTLIERS 0x02\n\ +\n\ +\n\ +variable PL_HIST_NOEXPAND 0x08\n\ +\n\ +\n\ +variable PL_HIST_NOEMPTY 0x10\n\ +\n\ +\n\ +variable PL_POSITION_LEFT 0x1\n\ +\n\ +\n\ +variable PL_POSITION_RIGHT 0x2\n\ +\n\ +\n\ +variable PL_POSITION_TOP 0x4\n\ +\n\ +\n\ +variable PL_POSITION_BOTTOM 0x8\n\ +\n\ +\n\ +variable PL_POSITION_INSIDE 0x10\n\ +\n\ +\n\ +variable PL_POSITION_OUTSIDE 0x20\n\ +\n\ +\n\ +variable PL_POSITION_VIEWPORT 0x40\n\ +\n\ +\n\ +variable PL_POSITION_SUBPAGE 0x80\n\ +\n\ +\n\ +variable PL_LEGEND_NONE 0x1\n\ +\n\ +\n\ +variable PL_LEGEND_COLOR_BOX 0x2\n\ +\n\ +\n\ +variable PL_LEGEND_LINE 0x4\n\ +\n\ +\n\ +variable PL_LEGEND_SYMBOL 0x8\n\ +\n\ +\n\ +variable PL_LEGEND_TEXT_LEFT 0x10\n\ +\n\ +\n\ +variable PL_LEGEND_BACKGROUND 0x20\n\ +\n\ +\n\ +variable PL_LEGEND_BOUNDING_BOX 0x40\n\ +\n\ +\n\ +variable PL_LEGEND_ROW_MAJOR 0x80\n\ +\n\ +\n\ +variable PL_COLORBAR_LABEL_LEFT 0x1\n\ +\n\ +\n\ +variable PL_COLORBAR_LABEL_RIGHT 0x2\n\ +\n\ +\n\ +variable PL_COLORBAR_LABEL_TOP 0x4\n\ +\n\ +\n\ +variable PL_COLORBAR_LABEL_BOTTOM 0x8\n\ +\n\ +\n\ +variable PL_COLORBAR_IMAGE 0x10\n\ +\n\ +\n\ +variable PL_COLORBAR_SHADE 0x20\n\ +\n\ +\n\ +variable PL_COLORBAR_GRADIENT 0x40\n\ +\n\ +\n\ +variable PL_COLORBAR_CAP_NONE 0x80\n\ +\n\ +\n\ +variable PL_COLORBAR_CAP_LOW 0x100\n\ +\n\ +\n\ +variable PL_COLORBAR_CAP_HIGH 0x200\n\ +\n\ +\n\ +variable PL_COLORBAR_SHADE_LABEL 0x400\n\ +\n\ +\n\ +variable PL_COLORBAR_ORIENT_RIGHT 0x800\n\ +\n\ +\n\ +variable PL_COLORBAR_ORIENT_TOP 0x1000\n\ +\n\ +\n\ +variable PL_COLORBAR_ORIENT_LEFT 0x2000\n\ +\n\ +\n\ +variable PL_COLORBAR_ORIENT_BOTTOM 0x4000\n\ +\n\ +\n\ +variable PL_COLORBAR_BACKGROUND 0x8000\n\ +\n\ +\n\ +variable PL_COLORBAR_BOUNDING_BOX 0x10000\n\ +\n\ +\n\ +variable PL_DRAWMODE_UNKNOWN 0x0\n\ +\n\ +\n\ +variable PL_DRAWMODE_DEFAULT 0x1\n\ +\n\ +\n\ +variable PL_DRAWMODE_REPLACE 0x2\n\ +\n\ +\n\ +variable PL_DRAWMODE_XOR 0x4\n\ +\n\ +# draw lines parallel to the X axis\n\ +variable DRAW_LINEX 0x001\n\ +\n\ +# draw lines parallel to the Y axis\n\ +variable DRAW_LINEY 0x002\n\ +\n\ +# draw lines parallel to both the X and Y axis\n\ +variable DRAW_LINEXY 0x003\n\ +\n\ +# draw the mesh with a color dependent of the magnitude\n\ +variable MAG_COLOR 0x004\n\ +\n\ +# draw contour plot at bottom xy plane\n\ +variable BASE_CONT 0x008\n\ +\n\ +# draw contour plot at top xy plane\n\ +variable TOP_CONT 0x010\n\ +\n\ +# draw contour plot at surface\n\ +variable SURF_CONT 0x020\n\ +\n\ +# draw sides\n\ +variable DRAW_SIDES 0x040\n\ +\n\ +# draw outline for each square that makes up the surface\n\ +variable FACETED 0x080\n\ +\n\ +# draw mesh\n\ +variable MESH 0x100\n\ }" ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-13 09:10:12
|
Revision: 12689 http://sourceforge.net/p/plplot/code/12689 Author: airwin Date: 2013-11-13 09:10:07 +0000 (Wed, 13 Nov 2013) Log Message: ----------- Update documentation of PL_COLORBAR_ORIENT_* bits used to help form plcolorbar arguments. The docbook result validates, and the doxygen commentary in the source file compiles. The corresponding changes in swig_documentation.i were automatically generated from the DocBook api.xml file using the check_swig_documentation target. Modified Paths: -------------- trunk/bindings/swig-support/swig_documentation.i trunk/doc/docbook/src/api.xml trunk/src/pllegend.c Modified: trunk/bindings/swig-support/swig_documentation.i =================================================================== --- trunk/bindings/swig-support/swig_documentation.i 2013-11-13 06:30:19 UTC (rev 12688) +++ trunk/bindings/swig-support/swig_documentation.i 2013-11-13 09:10:07 UTC (rev 12689) @@ -702,10 +702,12 @@ opt (PLINT, input) : opt contains bits controlling the overall color bar. The orientation (direction of the maximum value) of the color bar is specified with PL_ORIENT_RIGHT, PL_ORIENT_TOP, - PL_ORIENT_LEFT, or PL_ORIENT_BOTTOM. If none of those bits are - specified, the default orientation is toward the top, i.e., a - vertical color bar. If the PL_COLORBAR_BACKGROUND bit is set, plot - a (semi-transparent) background for the color bar. If the + PL_ORIENT_LEFT, or PL_ORIENT_BOTTOM. If none of these bits are + specified, the default orientation is toward the top if the + colorbar is placed on the left or right of the viewport or toward + the right if the colorbar is placed on the top or bottom of the + viewport. If the PL_COLORBAR_BACKGROUND bit is set, plot a + (semi-transparent) background for the color bar. If the PL_COLORBAR_BOUNDING_BOX bit is set, plot a bounding box for the color bar. The type of color bar must be specified with one of PL_COLORBAR_IMAGE, PL_COLORBAR_SHADE, or PL_COLORBAR_GRADIENT. If Modified: trunk/doc/docbook/src/api.xml =================================================================== --- trunk/doc/docbook/src/api.xml 2013-11-13 06:30:19 UTC (rev 12688) +++ trunk/doc/docbook/src/api.xml 2013-11-13 09:10:07 UTC (rev 12689) @@ -1954,10 +1954,12 @@ the maximum value) of the color bar is specified with <literal>PL_ORIENT_RIGHT</literal>, <literal>PL_ORIENT_TOP</literal>, <literal>PL_ORIENT_LEFT</literal>, or - <literal>PL_ORIENT_BOTTOM</literal>. If none of those bits are - specified, the default orientation is toward the top, i.e., a vertical - color bar. If the <literal>PL_COLORBAR_BACKGROUND</literal> bit is - set, plot a (semi-transparent) background for the color bar. If the + <literal>PL_ORIENT_BOTTOM</literal>. If none of these bits are + specified, the default orientation is toward the top if the colorbar + is placed on the left or right of the viewport or toward the right if + the colorbar is placed on the top or bottom of the viewport. If the + <literal>PL_COLORBAR_BACKGROUND</literal> bit is set, plot a + (semi-transparent) background for the color bar. If the <literal>PL_COLORBAR_BOUNDING_BOX</literal> bit is set, plot a bounding box for the color bar. The type of color bar must be specified with one of <literal>PL_COLORBAR_IMAGE</literal>, Modified: trunk/src/pllegend.c =================================================================== --- trunk/src/pllegend.c 2013-11-13 06:30:19 UTC (rev 12688) +++ trunk/src/pllegend.c 2013-11-13 09:10:07 UTC (rev 12689) @@ -1400,8 +1400,10 @@ //! @param opt This variable contains bits which control the overall //! color bar. The orientation (direction of the maximum value) of //! the color bar is specified with PL_COLORBAR_ORIENT_(RIGHT, TOP, -//! LEFT, BOTTOM). If none of those bits are specified, the default -//! orientation is toward the top, i.e., a vertical color bar. If the +//! LEFT, BOTTOM). If none of these bits are specified, the default +//! orientation is toward the top if the colorbar is placed on the +//! left or right of the viewport or toward the right if the colorbar +//! is placed on the top or bottom of the viewport. If the //! PL_COLORBAR_BACKGROUND bit is set, plot a (semi-transparent) //! background for the color bar. If the PL_COLORBAR_BOUNDING_BOX bit //! is set, plot a bounding box for the color bar. The type of color This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-11-14 23:04:59
|
Revision: 12699 http://sourceforge.net/p/plplot/code/12699 Author: andrewross Date: 2013-11-14 23:04:56 +0000 (Thu, 14 Nov 2013) Log Message: ----------- Update the way the tk driver creates fifos to avoid GNU linker complaining about use of the insecure tmpnam. Instead we now use mkdtemp to securely create a private temporary directory, then create the fifo in that. This avoids potential race conditions. Modified Paths: -------------- trunk/cmake/modules/plplot.cmake trunk/config.h.in trunk/drivers/tk.c trunk/include/plplotP.h trunk/src/plstdio.c Modified: trunk/cmake/modules/plplot.cmake =================================================================== --- trunk/cmake/modules/plplot.cmake 2013-11-14 21:32:36 UTC (rev 12698) +++ trunk/cmake/modules/plplot.cmake 2013-11-14 23:04:56 UTC (rev 12699) @@ -253,6 +253,8 @@ check_function_exists(popen HAVE_POPEN) check_function_exists(usleep PL_HAVE_USLEEP) check_function_exists(mkstemp PL_HAVE_MKSTEMP) +check_function_exists(mkdtemp PL_HAVE_MKDTEMP) +check_function_exists(mkfifo PL_HAVE_MKFIFO) check_function_exists(unlink PL_HAVE_UNLINK) check_function_exists(_NSGetArgc HAVE_NSGETARGC) Modified: trunk/config.h.in =================================================================== --- trunk/config.h.in 2013-11-14 21:32:36 UTC (rev 12698) +++ trunk/config.h.in 2013-11-14 23:04:56 UTC (rev 12699) @@ -109,6 +109,12 @@ // Define to 1 if the function mkstemp is available. #cmakedefine PL_HAVE_MKSTEMP 1 +// Define to 1 if the function mkdtemp is available. +#cmakedefine PL_HAVE_MKDTEMP 1 + +// Define to 1 if the function mkfifo is available. +#cmakedefine PL_HAVE_MKFIFO 1 + // Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. #cmakedefine HAVE_NDIR_H 1 Modified: trunk/drivers/tk.c =================================================================== --- trunk/drivers/tk.c 2013-11-14 21:32:36 UTC (rev 12698) +++ trunk/drivers/tk.c 2013-11-14 23:04:56 UTC (rev 12699) @@ -1521,6 +1521,7 @@ TkDev *dev = (TkDev *) pls->dev; PLiodev *iodev = (PLiodev *) dev->iodev; size_t bufmax = (size_t) ( pls->bufmax * 1.2 ); + char *dirname = NULL; dbug_enter( "link_init" ); @@ -1528,11 +1529,11 @@ if ( !pls->dp ) { - // This of tmpnam should (?) be safe since mkfifo - // will fail if the filename already exists - iodev->fileName = (char *) tmpnam( NULL ); - if ( mkfifo( iodev->fileName, - S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ) < 0 ) + // This uses the pl_create_tempfifo function to create + // the fifo in a safe manner by first creating a private + // temporary directory. + iodev->fileName = pl_create_tempfifo( (char **) &iodev->fileName, &dirname ); + if ( dirname == NULL || iodev->fileName == NULL ) abort_session( pls, "mkfifo error" ); // Tell plframe widget to open FIFO (for reading). @@ -1555,8 +1556,10 @@ // Unlink FIFO so that it isn't left around if program crashes. // This also ensures no other program can mess with it. - if ( unlink( iodev->fileName ) == -1 ) + if ( unlink( iodev->fileName) == -1 ) abort_session( pls, "Error removing fifo" ); + if ( rmdir( dirname ) == -1 ) + abort_session( pls, "Error removing temporary directory" ); } // Create socket for data transfer to the plframe widget Modified: trunk/include/plplotP.h =================================================================== --- trunk/include/plplotP.h 2013-11-14 21:32:36 UTC (rev 12698) +++ trunk/include/plplotP.h 2013-11-14 23:04:56 UTC (rev 12699) @@ -1227,6 +1227,10 @@ PLDLLIMPEXP FILE * pl_create_tempfile( char **fname ); +// Create a temporary fifo securely +PLDLLIMPEXP char * +pl_create_tempfifo( char **p_fifoname, char **p_dirname ); + #ifdef __cplusplus } #endif Modified: trunk/src/plstdio.c =================================================================== --- trunk/src/plstdio.c 2013-11-14 21:32:36 UTC (rev 12698) +++ trunk/src/plstdio.c 2013-11-14 23:04:56 UTC (rev 12699) @@ -27,10 +27,12 @@ #if defined ( MSDOS ) || defined ( WIN32 ) #include <sys/types.h> -#include <sys/stat.h> #include <fcntl.h> #endif +// This is needed for mode flags for mkfifo as well sa for MSDOS / WIN32 +#include <sys/stat.h> + // For Visual C++ 2005 and later mktemp() and open() are deprecated (see // http://msdn.microsoft.com/en-us/library/ms235413.aspx and // http://msdn.microsoft.com/en-us/library/ms235491.aspx). mktemp() @@ -254,3 +256,91 @@ return fd; } +// +// pl_create_tempfifo() +// +// Securely create a temporary fifo and return the file name. +// This only works on POSIX compliant platforms at the moment. +// It creates a secure directory first using mkdtemp, then +// creates the named fifo in this directory. The combination of +// a private directory and mkfifo failing if the file name already exists +// makes this secure against race conditions / DoS attacks. This function +// includes additional functionality over mkdtemp in that it honours the +// TMP / TMPDIR / TEMP environment variables. +// +// The function returns the file name of the fifo. +// +char * +pl_create_tempfifo( char **p_fifoname, char **p_dirname ) +{ +#if !defined PL_HAVE_MKDTEMP || !defined PL_HAVE_MKFIFO + plwarn("Creating fifos not supported on this platform"); + return NULL; +#else + FILE *fd; + const char *tmpdir; + char *template; + char *dirname; + const char *tmpname = "plplot_dir_XXXXXX"; + const char *fifoname = "plplot_fifo"; + int flags; + +#if defined ( MSDOS ) || defined ( WIN32 ) + tmpdir = getenv( "TEMP" ); +#else + tmpdir = getenv( "TMPDIR" ); +#endif + +// The P_TMPDIR macro is defined in stdio.h on many UNIX systems - try that +#ifdef P_TMPDIR + if ( tmpdir == NULL ) + tmpdir = P_TMPDIR; +#endif + + if ( tmpdir == NULL ) + { +#if defined ( MSDOS ) || defined ( WIN32 ) + tmpdir = "c:\\windows\\Temp"; +#else + tmpdir = "/tmp"; +#endif + } + + // N.B. Malloc ensures template is long enough so strcpy and strcat are safe here + dirname = (char *) malloc( sizeof ( char ) * ( strlen( tmpdir ) + strlen( tmpname ) + 2 ) ); + strcpy( dirname, tmpdir ); +#if defined ( MSDOS ) || defined ( WIN32 ) + strcat( dirname, "\\" ); +#else + strcat( dirname, "/" ); +#endif + strcat( dirname, tmpname ); + // Create the temporary directory + dirname = mkdtemp( dirname ); + *p_dirname = dirname; + + // Now create the fifo in the directory + template = (char *) malloc( sizeof ( char ) * ( strlen( tmpdir ) + strlen( tmpname ) + strlen(fifoname) + 4 ) ); + strcpy( template, dirname ); +#if defined ( MSDOS ) || defined ( WIN32 ) + strcat( template, "\\" ); +#else + strcat( template, "/" ); +#endif + strcat( template, fifoname ); + *p_fifoname = template; + + // Check that mkfifo succeeds safely + if ( mkfifo( template, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ) < 0 ) { + plwarn( "mkfifo error" ); + free( template ); + *p_fifoname = NULL; + free( dirname ); + *p_dirname = NULL; + return NULL; + } + + return template; +#endif +} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-11-14 23:19:11
|
Revision: 12700 http://sourceforge.net/p/plplot/code/12700 Author: andrewross Date: 2013-11-14 23:19:09 +0000 (Thu, 14 Nov 2013) Log Message: ----------- Remove obsolete support for matwrap generated octave bindings. The new swig generated bindings offer a fuller coverage of the plplot API and are more maintainable. Modified Paths: -------------- trunk/bindings/octave/CMakeLists.txt trunk/cmake/modules/octave.cmake trunk/plplot_test/CMakeLists.txt trunk/plplot_test/test_octave.sh.in Removed Paths: ------------- trunk/bindings/octave/matwrap/ trunk/bindings/octave/plplot_octave_def Modified: trunk/bindings/octave/CMakeLists.txt =================================================================== --- trunk/bindings/octave/CMakeLists.txt 2013-11-14 23:04:56 UTC (rev 12699) +++ trunk/bindings/octave/CMakeLists.txt 2013-11-14 23:19:09 UTC (rev 12700) @@ -121,160 +121,59 @@ ) # Build octave interface. - if(ENABLE_matwrapped_octave) + add_custom_command( + OUTPUT + ${CMAKE_CURRENT_BINARY_DIR}/plplot_stub.m + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_SOURCE_DIR}/plplot_stub_hand_crafted.m + ${CMAKE_CURRENT_BINARY_DIR}/plplot_stub.m + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/plplot_stub_hand_crafted.m + ) - # Add (Unix) custom target to check that plplot_oct_def (used only - # when ENABLE_matwrapped_octave is ON) is consistent - # with swig-support/plplotcapi.i. - add_custom_target( - check_plplot_octave_def - COMMAND ${CMAKE_COMMAND} -E remove -f - ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave_compare - COMMAND - sed -f ${CMAKE_CURRENT_SOURCE_DIR}/global_defines.sed < - ${CMAKE_SOURCE_DIR}/bindings/swig-support/plplotcapi.i > - ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave_compare - COMMAND - ${CMAKE_COMMAND} -E echo "Check that plplot_octave_def is consistent with bindings/swig-support/plplotcapi.i" - COMMAND - cmp ${CMAKE_CURRENT_SOURCE_DIR}/plplot_octave_def - ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave_compare - ) + add_custom_target( + plplot_stub.m_built ALL + DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/plplot_stub.m + ) - set(octave_interface_INCLUDE_PATHS - ${CMAKE_SOURCE_DIR}/include - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/include - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${OCTAVE_INCLUDE_PATH} - ) - include_directories(${octave_interface_INCLUDE_PATHS}) + set(octave_interface_INCLUDE_PATHS + ${CMAKE_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/lib/qsastime + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/include + ${CMAKE_CURRENT_BINARY_DIR} + ${OCTAVE_INCLUDE_PATH} + ${CMAKE_SOURCE_DIR}/bindings/swig-support + ) + include_directories(${octave_interface_INCLUDE_PATHS}) + set(CMAKE_SWIG_FLAGS -DSWIG_OCTAVE) + set(CMAKE_SWIG_OUTDIR ${CMAKE_CURRENT_BINARY_DIR}) - add_custom_command( - OUTPUT - ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave.cc - ${CMAKE_CURRENT_BINARY_DIR}/tmp_stub - COMMAND ${PERL_EXECUTABLE} - -I${MATWRAP_PATH} ${MATWRAP} - -language octave -o plplot_octave.cc -stub tmp_stub - -cpp_ignore ${CMAKE_CURRENT_SOURCE_DIR} - -cpp_ignore ${CMAKE_CURRENT_SOURCE_DIR}/plplot_octave_rej.h - -cpp ${CMAKE_C_COMPILER} -D__builtin_va_list=void -E - -I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_CURRENT_BINARY_DIR} -C plplot_octave.h - DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave.h - ) - set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/plplot_octave.cc - PROPERTIES GENERATED ON) + set_source_files_properties(plplot_octave.i + PROPERTIES + SWIG_MODULE_NAME plplot_octave + CPLUSPLUS ON + ) - add_library(plplot_octave MODULE ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave.cc) - target_link_libraries( - plplot_octave - plplot${LIB_TAG} - "${OCTAVE_LIBRARIES}" - "${OCTINTERP_LIBRARIES}" - ) + set(SWIG_MODULE_plplot_octave_EXTRA_DEPS + ${CMAKE_SOURCE_DIR}/bindings/swig-support/swig_documentation.i + ${CMAKE_SOURCE_DIR}/bindings/swig-support/plplotcapi.i + ) - # Build and install plplot_stub.m - add_executable(massage massage.c) - get_target_property( - massage_LOCATION - massage - LOCATION - ) + # Set up swig + c wrapper. + swig_add_module(plplot_octave octave plplot_octave.i) + swig_link_libraries( + plplot_octave + plplot${LIB_TAG} + "${OCTAVE_LIBRARIES}" + "${OCTINTERP_LIBRARIES}" + ) - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/plplot_stub.m_part2 - "# It was also massaged to add online documentation\n" - "# extracted from some PLplot distribution files\n" - "\n" - "1;\n" - "\n" - ) - add_custom_command( - OUTPUT - ${CMAKE_CURRENT_BINARY_DIR}/plplot_stub.m - ${CMAKE_CURRENT_BINARY_DIR}/missing_help - COMMAND head -5 tmp_stub > plplot_stub.m - COMMAND - cat plplot_stub.m_part2 >> plplot_stub.m - COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/plplot_octave_def >> plplot_stub.m - COMMAND echo >> plplot_stub.m - COMMAND - ${massage_LOCATION} >> plplot_stub.m 2> missing_help - DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/tmp_stub - ${CMAKE_CURRENT_SOURCE_DIR}/plplot_octave_def - ${massage_LOCATION} - ${make_documentation_DEPENDS} - ) + # Make sure plplot_stub.m is copied to build tree before plplot_octave + # is created so can use plplot_octave in normal way. + add_dependencies(plplot_octave plplot_stub.m_built) - add_custom_target( - plplot_stub.m_built ALL - DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/plplot_stub.m - ) - - # Both these targets file-depend on custom commands which in turn - # file-depend on ${make_documentation_DEPENDS}. Therefore, must - # serialize these custom targets so that parallel build jobs - # don't interfere with each other. - add_dependencies(plplot_stub.m_built make_documentation) - else(ENABLE_matwrapped_octave) - add_custom_command( - OUTPUT - ${CMAKE_CURRENT_BINARY_DIR}/plplot_stub.m - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/plplot_stub_hand_crafted.m - ${CMAKE_CURRENT_BINARY_DIR}/plplot_stub.m - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/plplot_stub_hand_crafted.m - ) - - add_custom_target( - plplot_stub.m_built ALL - DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/plplot_stub.m - ) - - set(octave_interface_INCLUDE_PATHS - ${CMAKE_SOURCE_DIR}/include - ${CMAKE_SOURCE_DIR}/lib/qsastime - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/include - ${CMAKE_CURRENT_BINARY_DIR} - ${OCTAVE_INCLUDE_PATH} - ${CMAKE_SOURCE_DIR}/bindings/swig-support - ) - include_directories(${octave_interface_INCLUDE_PATHS}) - set(CMAKE_SWIG_FLAGS -DSWIG_OCTAVE) - set(CMAKE_SWIG_OUTDIR ${CMAKE_CURRENT_BINARY_DIR}) - - set_source_files_properties(plplot_octave.i - PROPERTIES - SWIG_MODULE_NAME plplot_octave - CPLUSPLUS ON - ) - - set(SWIG_MODULE_plplot_octave_EXTRA_DEPS - ${CMAKE_SOURCE_DIR}/bindings/swig-support/swig_documentation.i - ${CMAKE_SOURCE_DIR}/bindings/swig-support/plplotcapi.i - ) - - # Set up swig + c wrapper. - swig_add_module(plplot_octave octave plplot_octave.i) - swig_link_libraries( - plplot_octave - plplot${LIB_TAG} - "${OCTAVE_LIBRARIES}" - "${OCTINTERP_LIBRARIES}" - ) - - # Make sure plplot_stub.m is copied to build tree before plplot_octave - # is created so can use plplot_octave in normal way. - add_dependencies(plplot_octave plplot_stub.m_built) - endif(ENABLE_matwrapped_octave) - # Need access elsewhere (examples/octave) to the file depends of # this custom target. set_property(GLOBAL PROPERTY Deleted: trunk/bindings/octave/plplot_octave_def =================================================================== --- trunk/bindings/octave/plplot_octave_def 2013-11-14 23:04:56 UTC (rev 12699) +++ trunk/bindings/octave/plplot_octave_def 2013-11-14 23:19:09 UTC (rev 12700) @@ -1,256 +0,0 @@ -global PLESC_SET_RGB -PLESC_SET_RGB = 1; # obsolete -global PLESC_ALLOC_NCOL -PLESC_ALLOC_NCOL = 2; # obsolete -global PLESC_SET_LPB -PLESC_SET_LPB = 3; # obsolete -global PLESC_EXPOSE -PLESC_EXPOSE = 4; # handle window expose -global PLESC_RESIZE -PLESC_RESIZE = 5; # handle window resize -global PLESC_REDRAW -PLESC_REDRAW = 6; # handle window redraw -global PLESC_TEXT -PLESC_TEXT = 7; # switch to text screen -global PLESC_GRAPH -PLESC_GRAPH = 8; # switch to graphics screen -global PLESC_FILL -PLESC_FILL = 9; # fill polygon -global PLESC_DI -PLESC_DI = 10; # handle DI command -global PLESC_FLUSH -PLESC_FLUSH = 11; # flush output -global PLESC_EH -PLESC_EH = 12; # handle Window events -global PLESC_GETC -PLESC_GETC = 13; # get cursor position -global PLESC_SWIN -PLESC_SWIN = 14; # set window parameters -global PLESC_PLFLTBUFFERING -PLESC_PLFLTBUFFERING = 15; # configure PLFLT buffering -global PLESC_XORMOD -PLESC_XORMOD = 16; # set xor mode -global PLESC_SET_COMPRESSION -PLESC_SET_COMPRESSION = 17; # AFR: set compression -global PLESC_CLEAR -PLESC_CLEAR = 18; # RL: clear graphics region -global PLESC_DASH -PLESC_DASH = 19; # RL: draw dashed line -global PLESC_HAS_TEXT -PLESC_HAS_TEXT = 20; # driver draws text -global PLESC_IMAGE -PLESC_IMAGE = 21; # handle image -global PLESC_IMAGEOPS -PLESC_IMAGEOPS = 22; # plimage related operations -global DRAW_LINEX -DRAW_LINEX = 0x01; # draw lines parallel to the X axis -global DRAW_LINEY -DRAW_LINEY = 0x02; # draw lines parallel to the Y axis -global DRAW_LINEXY -DRAW_LINEXY = 0x03; # draw lines parallel to both the X and Y axes -global MAG_COLOR -MAG_COLOR = 0x04; # draw the mesh with a color dependent of the magnitude -global BASE_CONT -BASE_CONT = 0x08; # draw contour plot at bottom xy plane -global TOP_CONT -TOP_CONT = 0x10; # draw contour plot at top xy plane -global SURF_CONT -SURF_CONT = 0x20; # draw contour plot at surface -global DRAW_SIDES -DRAW_SIDES = 0x40; # draw sides -global FACETED -FACETED = 0x80; # draw outline for each square that makes up the surface -global MESH -MESH = 0x100; # draw mesh -global PL_BIN_DEFAULT -PL_BIN_DEFAULT = 0; -global PL_BIN_CENTRED -PL_BIN_CENTRED = 1; -global PL_BIN_NOEXPAND -PL_BIN_NOEXPAND = 2; -global PL_BIN_NOEMPTY -PL_BIN_NOEMPTY = 4; -global PL_HIST_DEFAULT -PL_HIST_DEFAULT = 0; -global PL_HIST_NOSCALING -PL_HIST_NOSCALING = 1; -global PL_HIST_IGNORE_OUTLIERS -PL_HIST_IGNORE_OUTLIERS = 2; -global PL_HIST_NOEXPAND -PL_HIST_NOEXPAND = 8; -global PL_HIST_NOEMPTY -PL_HIST_NOEMPTY = 16; -global PL_POSITION_LEFT -PL_POSITION_LEFT = 1; -global PL_POSITION_RIGHT -PL_POSITION_RIGHT = 2; -global PL_POSITION_TOP -PL_POSITION_TOP = 4; -global PL_POSITION_BOTTOM -PL_POSITION_BOTTOM = 8; -global PL_POSITION_INSIDE -PL_POSITION_INSIDE = 16; -global PL_POSITION_OUTSIDE -PL_POSITION_OUTSIDE = 32; -global PL_POSITION_VIEWPORT -PL_POSITION_VIEWPORT = 64; -global PL_POSITION_SUBPAGE -PL_POSITION_SUBPAGE = 128; -global PL_LEGEND_NONE -PL_LEGEND_NONE = 1; -global PL_LEGEND_COLOR_BOX -PL_LEGEND_COLOR_BOX = 2; -global PL_LEGEND_LINE -PL_LEGEND_LINE = 4; -global PL_LEGEND_SYMBOL -PL_LEGEND_SYMBOL = 8; -global PL_LEGEND_TEXT_LEFT -PL_LEGEND_TEXT_LEFT = 16; -global PL_LEGEND_BACKGROUND -PL_LEGEND_BACKGROUND = 32; -global PL_LEGEND_BOUNDING_BOX -PL_LEGEND_BOUNDING_BOX = 64; -global PL_LEGEND_ROW_MAJOR -PL_LEGEND_ROW_MAJOR = 128; -global PL_COLORBAR_LABEL_LEFT -PL_COLORBAR_LABEL_LEFT = 0x1; -global PL_COLORBAR_LABEL_RIGHT -PL_COLORBAR_LABEL_RIGHT = 0x2; -global PL_COLORBAR_LABEL_TOP -PL_COLORBAR_LABEL_TOP = 0x4; -global PL_COLORBAR_LABEL_BOTTOM -PL_COLORBAR_LABEL_BOTTOM = 0x8; -global PL_COLORBAR_IMAGE -PL_COLORBAR_IMAGE = 0x10; -global PL_COLORBAR_SHADE -PL_COLORBAR_SHADE = 0x20; -global PL_COLORBAR_GRADIENT -PL_COLORBAR_GRADIENT = 0x40; -global PL_COLORBAR_CAP_NONE -PL_COLORBAR_CAP_NONE = 0x80; -global PL_COLORBAR_CAP_LOW -PL_COLORBAR_CAP_LOW = 0x100; -global PL_COLORBAR_CAP_HIGH -PL_COLORBAR_CAP_HIGH = 0x200; -global PL_COLORBAR_SHADE_LABEL -PL_COLORBAR_SHADE_LABEL = 0x400; -global PL_COLORBAR_ORIENT_RIGHT -PL_COLORBAR_ORIENT_RIGHT = 0x800; -global PL_COLORBAR_ORIENT_TOP -PL_COLORBAR_ORIENT_TOP = 0x1000; -global PL_COLORBAR_ORIENT_LEFT -PL_COLORBAR_ORIENT_LEFT = 0x2000; -global PL_COLORBAR_ORIENT_BOTTOM -PL_COLORBAR_ORIENT_BOTTOM = 0x4000; -global PL_COLORBAR_BACKGROUND -PL_COLORBAR_BACKGROUND = 0x8000; -global PL_COLORBAR_BOUNDING_BOX -PL_COLORBAR_BOUNDING_BOX = 0x10000; -global PLSWIN_DEVICE -PLSWIN_DEVICE = 1; # device coordinates -global PLSWIN_WORLD -PLSWIN_WORLD = 2; # world coordinates -global PL_X_AXIS -PL_X_AXIS = 1; # The x-axis -global PL_Y_AXIS -PL_Y_AXIS = 2; # The y-axis -global PL_Z_AXIS -PL_Z_AXIS = 3; # The z-axis -global PL_OPT_ENABLED -PL_OPT_ENABLED = 0x0001; # Obsolete -global PL_OPT_ARG -PL_OPT_ARG = 0x0002; # Option has an argment -global PL_OPT_NODELETE -PL_OPT_NODELETE = 0x0004; # Don't delete after processing -global PL_OPT_INVISIBLE -PL_OPT_INVISIBLE = 0x0008; # Make invisible -global PL_OPT_DISABLED -PL_OPT_DISABLED = 0x0010; # Processing is disabled -global PL_OPT_FUNC -PL_OPT_FUNC = 0x0100; # Call handler function -global PL_OPT_BOOL -PL_OPT_BOOL = 0x0200; # Set *var = 1 -global PL_OPT_INT -PL_OPT_INT = 0x0400; # Set *var = atoi(optarg) -global PL_OPT_FLOAT -PL_OPT_FLOAT = 0x0800; # Set *var = atof(optarg) -global PL_OPT_STRING -PL_OPT_STRING = 0x1000; # Set var = optarg -global PL_PARSE_PARTIAL -PL_PARSE_PARTIAL = 0x0000; # For backward compatibility -global PL_PARSE_FULL -PL_PARSE_FULL = 0x0001; # Process fully & exit if error -global PL_PARSE_QUIET -PL_PARSE_QUIET = 0x0002; # Don't issue messages -global PL_PARSE_NODELETE -PL_PARSE_NODELETE = 0x0004; # Don't delete options after -global PL_PARSE_SHOWALL -PL_PARSE_SHOWALL = 0x0008; # Show invisible options -global PL_PARSE_OVERRIDE -PL_PARSE_OVERRIDE = 0x0010; # Obsolete -global PL_PARSE_NOPROGRAM -PL_PARSE_NOPROGRAM = 0x0020; # Program name NOT in *argv[0].. -global PL_PARSE_NODASH -PL_PARSE_NODASH = 0x0040; # Set if leading dash NOT required -global PL_PARSE_SKIP -PL_PARSE_SKIP = 0x0080; # Skip over unrecognized args -global PL_FCI_MARK -PL_FCI_MARK = 0x80000000; -global PL_FCI_IMPOSSIBLE -PL_FCI_IMPOSSIBLE = 0x00000000; -global PL_FCI_HEXDIGIT_MASK -PL_FCI_HEXDIGIT_MASK = 0xf; -global PL_FCI_HEXPOWER_MASK -PL_FCI_HEXPOWER_MASK = 0x7; -global PL_FCI_HEXPOWER_IMPOSSIBLE -PL_FCI_HEXPOWER_IMPOSSIBLE = 0xf; -global PL_FCI_FAMILY -PL_FCI_FAMILY = 0x0; -global PL_FCI_STYLE -PL_FCI_STYLE = 0x1; -global PL_FCI_WEIGHT -PL_FCI_WEIGHT = 0x2; -global PL_FCI_SANS -PL_FCI_SANS = 0x0; -global PL_FCI_SERIF -PL_FCI_SERIF = 0x1; -global PL_FCI_MONO -PL_FCI_MONO = 0x2; -global PL_FCI_SCRIPT -PL_FCI_SCRIPT = 0x3; -global PL_FCI_SYMBOL -PL_FCI_SYMBOL = 0x4; -global PL_FCI_UPRIGHT -PL_FCI_UPRIGHT = 0x0; -global PL_FCI_ITALIC -PL_FCI_ITALIC = 0x1; -global PL_FCI_OBLIQUE -PL_FCI_OBLIQUE = 0x2; -global PL_FCI_MEDIUM -PL_FCI_MEDIUM = 0x0; -global PL_FCI_BOLD -PL_FCI_BOLD = 0x1; -global PL_MAXKEY -PL_MAXKEY = 16; -global PL_MAXWINDOWS -PL_MAXWINDOWS = 64; # Max number of windows/page tracked -global PL_NOTSET -PL_NOTSET = -42; -global PLESPLFLTBUFFERING_ENABLE -PLESPLFLTBUFFERING_ENABLE = 1; -global PLESPLFLTBUFFERING_DISABLE -PLESPLFLTBUFFERING_DISABLE = 2; -global PLESPLFLTBUFFERING_QUERY -PLESPLFLTBUFFERING_QUERY = 3; -global GRID_CSA -GRID_CSA = 1; # Bivariate Cubic Spline approximation -global GRID_DTLI -GRID_DTLI = 2; # Delaunay Triangulation Linear Interpolation -global GRID_NNI -GRID_NNI = 3; # Natural Neighbors Interpolation -global GRID_NNIDW -GRID_NNIDW = 4; # Nearest Neighbors Inverse Distance Weighted -global GRID_NNLI -GRID_NNLI = 5; # Nearest Neighbors Linear Interpolation -global GRID_NNAIDW -GRID_NNAIDW = 6; # Nearest Neighbors Around Inverse Distance Weighted Modified: trunk/cmake/modules/octave.cmake =================================================================== --- trunk/cmake/modules/octave.cmake 2013-11-14 23:04:56 UTC (rev 12699) +++ trunk/cmake/modules/octave.cmake 2013-11-14 23:19:09 UTC (rev 12700) @@ -208,13 +208,6 @@ endif(ENABLE_octave) if(ENABLE_octave) - #MATWRAP is the path+filename of the matwrap script. - set(MATWRAP "${CMAKE_CURRENT_SOURCE_DIR}/bindings/octave/matwrap/matwrap") - message(STATUS "MATWRAP = ${MATWRAP}") - #MATWRAP_PATH is the path of the matwrap script - get_filename_component(MATWRAP_PATH ${MATWRAP} PATH) - message(STATUS "MATWRAP_PATH = ${MATWRAP_PATH}") - # PLPLOT_OCTAVE_DIR is the directory for installation of the PLplot_Octave # specific m files set(PLPLOT_OCTAVE_DIR ${CMAKE_INSTALL_DATADIR}/plplot_octave) @@ -286,13 +279,5 @@ if(PL_DOUBLE) set(DEFINE_PL_DOUBLE "#define PL_DOUBLE") endif(PL_DOUBLE) -# option(ENABLE_matwrapped_octave "Enable legacy Octave bindings generated by matwrap" OFF) -# if(NOT SWIG_FOUND AND NOT ENABLE_matwrapped_octave) -# message(STATUS "WARNING: " -# "SWIG not found. Falling back to deprecated matwrapped Octave bindings.") -# set(ENABLE_matwrapped_octave ON CACHE BOOL "Enable legacy Octave bindings generated by matwrap" FORCE) -# endif(NOT SWIG_FOUND AND NOT ENABLE_matwrapped_octave) - # Force disabling of matwrapped bindings which are no longer maintained. - set(ENABLE_matwrapped_octave OFF CACHE BOOL "Enable legacy Octave bindings generated by matwrap" FORCE) endif(ENABLE_octave) Modified: trunk/plplot_test/CMakeLists.txt =================================================================== --- trunk/plplot_test/CMakeLists.txt 2013-11-14 23:04:56 UTC (rev 12699) +++ trunk/plplot_test/CMakeLists.txt 2013-11-14 23:19:09 UTC (rev 12700) @@ -140,13 +140,6 @@ endif(ENABLE_java) if(ENABLE_octave) - if(ENABLE_matwrapped_octave) - set(matwrap_octave_comment) - set(swig_octave_comment "# (ignore for matwrap-generated case) ") - else(ENABLE_matwrapped_octave) - set(swig_octave_comment) - set(matwrap_octave_comment "# (ignore for swig-generated case) ") - endif(ENABLE_matwrapped_octave) configure_file( test_octave_interactive.sh.in Modified: trunk/plplot_test/test_octave.sh.in =================================================================== --- trunk/plplot_test/test_octave.sh.in 2013-11-14 23:04:56 UTC (rev 12699) +++ trunk/plplot_test/test_octave.sh.in 2013-11-14 23:19:09 UTC (rev 12700) @@ -59,8 +59,7 @@ # Remove 7, 16 until plshade1 fix is done. -@swig_octave_comment@for i=[1:6 8 9 13 15 21] ; -@matwrap_octave_comment@for i=[1:6 8 9 13 15 21] ; +for i=[1:6 8 9 13 15 21] ; if (verbose_test) printf("p%d\n",i); endif @@ -73,10 +72,7 @@ # Example 32 not implemented because there has been no call for propagation # and it exercises no new API. failed = [] ; -@swig_octave_comment@for i=[0:18 19 20:31 33] ; -# Drop 4, 18, 26, and 33 because deprecated matwrap does not include plstring, -# plstring3, pllegend, or plcolorbar. -@matwrap_octave_comment@for i=[0:3 5:17 20:25 27:31 ] ; +for i=[0:18 19 20:31 33] ; ofile = sprintf("${OUTPUT_DIR}/x%.2d${lang}_${dsuffix}.txt",i); strm = fopen(ofile,"w"); cmd = sprintf("x%.2dc",i); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-18 21:54:29
|
Revision: 12714 http://sourceforge.net/p/plplot/code/12714 Author: airwin Date: 2013-11-18 21:54:26 +0000 (Mon, 18 Nov 2013) Log Message: ----------- Style previous commits. Modified Paths: -------------- trunk/bindings/tk/plserver.c trunk/drivers/tk.c trunk/src/plstdio.c Modified: trunk/bindings/tk/plserver.c =================================================================== --- trunk/bindings/tk/plserver.c 2013-11-18 21:45:22 UTC (rev 12713) +++ trunk/bindings/tk/plserver.c 2013-11-18 21:54:26 UTC (rev 12714) @@ -115,7 +115,7 @@ // Save arglist to get around Tk_ParseArgv limitations - myargv = (const char **) malloc( argc * sizeof(char *) ); + myargv = (const char **) malloc( argc * sizeof ( char * ) ); for ( i = 0; i < argc; i++ ) { myargv[i] = argv[i]; Modified: trunk/drivers/tk.c =================================================================== --- trunk/drivers/tk.c 2013-11-18 21:45:22 UTC (rev 12713) +++ trunk/drivers/tk.c 2013-11-18 21:54:26 UTC (rev 12714) @@ -1518,10 +1518,10 @@ static void link_init( PLStream *pls ) { - TkDev *dev = (TkDev *) pls->dev; - PLiodev *iodev = (PLiodev *) dev->iodev; - size_t bufmax = (size_t) ( pls->bufmax * 1.2 ); - char *dirname = NULL; + TkDev *dev = (TkDev *) pls->dev; + PLiodev *iodev = (PLiodev *) dev->iodev; + size_t bufmax = (size_t) ( pls->bufmax * 1.2 ); + char *dirname = NULL; dbug_enter( "link_init" ); @@ -1529,11 +1529,11 @@ if ( !pls->dp ) { - // This uses the pl_create_tempfifo function to create + // This uses the pl_create_tempfifo function to create // the fifo in a safe manner by first creating a private // temporary directory. iodev->fileName = pl_create_tempfifo( (char **) &iodev->fileName, &dirname ); - if ( dirname == NULL || iodev->fileName == NULL ) + if ( dirname == NULL || iodev->fileName == NULL ) abort_session( pls, "mkfifo error" ); // Tell plframe widget to open FIFO (for reading). @@ -1556,7 +1556,7 @@ // Unlink FIFO so that it isn't left around if program crashes. // This also ensures no other program can mess with it. - if ( unlink( iodev->fileName) == -1 ) + if ( unlink( iodev->fileName ) == -1 ) abort_session( pls, "Error removing fifo" ); if ( rmdir( dirname ) == -1 ) abort_session( pls, "Error removing temporary directory" ); Modified: trunk/src/plstdio.c =================================================================== --- trunk/src/plstdio.c 2013-11-18 21:45:22 UTC (rev 12713) +++ trunk/src/plstdio.c 2013-11-18 21:54:26 UTC (rev 12714) @@ -260,12 +260,12 @@ // pl_create_tempfifo() // // Securely create a temporary fifo and return the file name. -// This only works on POSIX compliant platforms at the moment. -// It creates a secure directory first using mkdtemp, then -// creates the named fifo in this directory. The combination of +// This only works on POSIX compliant platforms at the moment. +// It creates a secure directory first using mkdtemp, then +// creates the named fifo in this directory. The combination of // a private directory and mkfifo failing if the file name already exists // makes this secure against race conditions / DoS attacks. This function -// includes additional functionality over mkdtemp in that it honours the +// includes additional functionality over mkdtemp in that it honours the // TMP / TMPDIR / TEMP environment variables. // // The function returns the file name of the fifo. @@ -274,14 +274,14 @@ pl_create_tempfifo( char **p_fifoname, char **p_dirname ) { #if !defined PL_HAVE_MKDTEMP || !defined PL_HAVE_MKFIFO - plwarn("Creating fifos not supported on this platform"); + plwarn( "Creating fifos not supported on this platform" ); return NULL; -#else +#else FILE *fd; const char *tmpdir; - char *template; - char *dirname; - const char *tmpname = "plplot_dir_XXXXXX"; + char *template; + char *dirname; + const char *tmpname = "plplot_dir_XXXXXX"; const char *fifoname = "plplot_fifo"; int flags; @@ -316,11 +316,11 @@ #endif strcat( dirname, tmpname ); // Create the temporary directory - dirname = mkdtemp( dirname ); + dirname = mkdtemp( dirname ); *p_dirname = dirname; // Now create the fifo in the directory - template = (char *) malloc( sizeof ( char ) * ( strlen( tmpdir ) + strlen( tmpname ) + strlen(fifoname) + 4 ) ); + template = (char *) malloc( sizeof ( char ) * ( strlen( tmpdir ) + strlen( tmpname ) + strlen( fifoname ) + 4 ) ); strcpy( template, dirname ); #if defined ( MSDOS ) || defined ( WIN32 ) strcat( template, "\\" ); @@ -331,13 +331,14 @@ *p_fifoname = template; // Check that mkfifo succeeds safely - if ( mkfifo( template, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ) < 0 ) { - plwarn( "mkfifo error" ); - free( template ); - *p_fifoname = NULL; - free( dirname ); - *p_dirname = NULL; - return NULL; + if ( mkfifo( template, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ) < 0 ) + { + plwarn( "mkfifo error" ); + free( template ); + *p_fifoname = NULL; + free( dirname ); + *p_dirname = NULL; + return NULL; } return template; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-18 22:52:44
|
Revision: 12717 http://sourceforge.net/p/plplot/code/12717 Author: airwin Date: 2013-11-18 22:52:41 +0000 (Mon, 18 Nov 2013) Log Message: ----------- Using stub versions of Tcl and Tk libraries is highly recommended by the Tcl/Tk community. Therefore, implement a USE_TCL_TK_STUBS option to use the Tcl/Tk stubs libraries. This option currently defaults to OFF because it is only partially implemented (only the USE_TCL_STUBS part of this has been implemented so far). Part of this change is a backwards incompatible change in libplplottcltk; the functions in tclMain.c (notably pltclMain) are split off from that library since they are only used by the pltcl executable, and the call of Tcl_FindExecutable within pltclMain appears not to be compatible with linking with libtclstub8.6, i.e., Tcl_FindExecutable has been completely removed from the stub tables for Tcl8.6. I think all this simply means that only Tcl/Tk extensions (but not code for an an executable like pltcl.c and tclMain.c) are considered to be good candidates for linking with libtclstub8.x so splitting out tclMain.c from the rest of the source code for libplplottcltk seems the correct thing to do. Tested by Alan W. Irwin <ai...@us...> on Linux with the -DENABLE_tk=OFF and -DUSE_TCL_TK_STUBS=ON cmake options and the two targets test_tcl_standard_examples and test_tclsh_standard_examples. Modified Paths: -------------- trunk/bindings/tcl/CMakeLists.txt trunk/bindings/tcl/matrixInit.c trunk/cmake/modules/tcl-related.cmake trunk/utils/CMakeLists.txt Modified: trunk/bindings/tcl/CMakeLists.txt =================================================================== --- trunk/bindings/tcl/CMakeLists.txt 2013-11-18 21:57:39 UTC (rev 12716) +++ trunk/bindings/tcl/CMakeLists.txt 2013-11-18 22:52:41 UTC (rev 12717) @@ -61,9 +61,21 @@ PROPERTIES COMPILE_FLAGS "-DUSINGDLL" ) endif(BUILD_SHARED_LIBS) + if(USE_TCL_TK_STUBS) + set_source_files_properties( + ${tclmatrix${LIB_TAG}_LIB_SRCS} + PROPERTIES COMPILE_DEFINITIONS USE_TCL_STUBS + ) + endif(USE_TCL_TK_STUBS) + add_library(tclmatrix${LIB_TAG} ${tclmatrix${LIB_TAG}_LIB_SRCS}) - target_link_libraries(tclmatrix${LIB_TAG} ${TCL_LIBRARY}) + if(USE_TCL_TK_STUBS) + target_link_libraries(tclmatrix${LIB_TAG} ${TCL_STUB_LIBRARY}) + else(USE_TCL_TK_STUBS) + target_link_libraries(tclmatrix${LIB_TAG} ${TCL_LIBRARY}) + endif(USE_TCL_TK_STUBS) + if(USE_RPATH) set(LIB_INSTALL_RPATH ${LIB_DIR}) set_target_properties(tclmatrix${LIB_TAG} @@ -125,7 +137,7 @@ set(plplottcltk${LIB_TAG}_LIB_SRCS tclAPI.c - tclMain.c + #tclMain.c ) if(BUILD_SHARED_LIBS) set_source_files_properties(${plplottcltk${LIB_TAG}_LIB_SRCS} @@ -133,17 +145,31 @@ ) endif(BUILD_SHARED_LIBS) - set( - plplottcltk${LIB_TAG}_link_libraries - tclmatrix${LIB_TAG} - plplot${LIB_TAG} - ${TCL_LIBRARY} - ) - set( - libplplottcltk${LIB_TAG}_LINK_FLAGS - -ltclmatrix${LIB_TAG} - ${TCL_LIBRARY} - ) + if(USE_TCL_TK_STUBS) + set( + plplottcltk${LIB_TAG}_link_libraries + tclmatrix${LIB_TAG} + plplot${LIB_TAG} + ${TCL_STUB_LIBRARY} + ) + set( + libplplottcltk${LIB_TAG}_LINK_FLAGS + -ltclmatrix${LIB_TAG} + ${TCL_STUB_LIBRARY} + ) + else(USE_TCL_TK_STUBS) + set( + plplottcltk${LIB_TAG}_link_libraries + tclmatrix${LIB_TAG} + plplot${LIB_TAG} + ${TCL_LIBRARY} + ) + set( + libplplottcltk${LIB_TAG}_LINK_FLAGS + -ltclmatrix${LIB_TAG} + ${TCL_LIBRARY} + ) + endif(USE_TCL_TK_STUBS) if(ENABLE_itcl) include_directories(${ITCL_INCLUDE_PATH}) @@ -218,6 +244,13 @@ "${libplplottcltk${LIB_TAG}_LINK_FLAGS}" ) + if(USE_TCL_TK_STUBS) + set_source_files_properties( + ${plplottcltk${LIB_TAG}_LIB_SRCS} + PROPERTIES COMPILE_DEFINITIONS USE_TCL_STUBS + ) + endif(USE_TCL_TK_STUBS) + add_library(plplottcltk${LIB_TAG} ${plplottcltk${LIB_TAG}_LIB_SRCS}) if(NON_TRANSITIVE) Modified: trunk/bindings/tcl/matrixInit.c =================================================================== --- trunk/bindings/tcl/matrixInit.c 2013-11-18 21:57:39 UTC (rev 12716) +++ trunk/bindings/tcl/matrixInit.c 2013-11-18 22:52:41 UTC (rev 12717) @@ -28,6 +28,15 @@ int Matrix_Init( Tcl_Interp *interp ) { +#ifdef USE_TCL_STUBS +// +// We hard-wire 8.1 here, rather than TCL_VERSION, TK_VERSION because +// we really don't mind which version of Tcl, Tk we use as long as it +// is 8.1 or newer. Otherwise if we compiled against 8.2, we couldn't +// be loaded into 8.1 +// + Tcl_InitStubs( interp, "8.1", 0 ); +#endif // matrix -- matrix support command Tcl_CreateCommand( interp, "matrix", (Tcl_CmdProc *) Tcl_MatrixCmd, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL ); Modified: trunk/cmake/modules/tcl-related.cmake =================================================================== --- trunk/cmake/modules/tcl-related.cmake 2013-11-18 21:57:39 UTC (rev 12716) +++ trunk/cmake/modules/tcl-related.cmake 2013-11-18 22:52:41 UTC (rev 12717) @@ -34,12 +34,15 @@ option(USE_INCRTCL_VERSION_4 "Use version 4 of Itcl and Itcl, version 4.1 of Iwidgets" OFF) +option(USE_TCL_TK_STUBS "Use Tcl/Tk stubs libraries" OFF) + # Depending on these above options and system resources may also determine # the following variables which are largely self-explanatory unless documented # further. #TCL_INCLUDE_PATH -#TCL_LIBRARY +#TCL_LIBRARY (Always the non-stub version) +#TCL_STUB_LIBRARY (Always the stub version) #ITCL_INCLUDE_PATH #ITCL_LIBRARY #HAVE_ITCL (On when itcl header and library have been found. @@ -49,7 +52,8 @@ # when itclDecls.h. Otherwise, undefined. # Used for source file configuration.) #TK_INCLUDE_PATH -#TK_LIBRARY +#TK_LIBRARY (Always the non-stub version) +#TK_STUB_LIBRARY (Always the stub version) #ITK_INCLUDE_PATH #ITK_LIBRARY #HAVE_ITK (On when itcl header and library have been found. @@ -61,11 +65,13 @@ if(ENABLE_tcl) message(STATUS "Start determining consistent system data for Tcl and friends") - find_package(TCL QUIET) + find_package(TclStub QUIET) if(TCL_FOUND) message(STATUS "Looking for include paths and libraries for Tcl - found") message(STATUS "TCL_INCLUDE_PATH = ${TCL_INCLUDE_PATH}") message(STATUS "TCL_LIBRARY = ${TCL_LIBRARY}") + message(STATUS "TCL_STUB_LIBRARY = ${TCL_STUB_LIBRARY}") + get_filename_component(TCL_LIBRARY_PATH ${TCL_LIBRARY} PATH) message(STATUS "TCL_LIBRARY_PATH = ${TCL_LIBRARY_PATH}") @@ -182,6 +188,7 @@ set(TK_INCLUDE_PATH ${TK_INCLUDE_PATH} ${X11_INCLUDE_DIR}) message(STATUS "TK_INCLUDE_PATH = ${TK_INCLUDE_PATH}") message(STATUS "TK_LIBRARY = ${TK_LIBRARY}") + message(STATUS "TK_STUB_LIBRARY = ${TK_STUB_LIBRARY}") get_filename_component(TK_LIBRARY_PATH ${TK_LIBRARY} PATH) message(STATUS "TK_LIBRARY_PATH = ${TK_LIBRARY_PATH}") Modified: trunk/utils/CMakeLists.txt =================================================================== --- trunk/utils/CMakeLists.txt 2013-11-18 21:57:39 UTC (rev 12716) +++ trunk/utils/CMakeLists.txt 2013-11-18 22:52:41 UTC (rev 12717) @@ -78,7 +78,7 @@ include_directories(${ITCL_INCLUDE_PATH}) endif(HAVE_ITCL) - add_executable(pltcl pltcl.c) + add_executable(pltcl pltcl.c ${CMAKE_SOURCE_DIR}/bindings/tcl/tclMain.c) target_link_libraries(pltcl plplot${LIB_TAG} plplottcltk${LIB_TAG} ${ITCL_LIBRARY} ${TCL_LIBRARY}) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-19 04:07:26
|
Revision: 12718 http://sourceforge.net/p/plplot/code/12718 Author: airwin Date: 2013-11-19 04:07:23 +0000 (Tue, 19 Nov 2013) Log Message: ----------- Create a new library called plplottcltk_Main whose source code is bindings/tcl/tclMain.c and bindings/tk/tkMain.c. Both of those files contain code that should not be part of plplottcltk since such code destroys the possibility of treating plplottcktk as a pure Tcl/Tk extension which can depend on the stub versions of the Tcl/Tk libraries. This new library is helpful when starting C applications (pltcl, plserver, xtk01, xtk02, and xtk04) which depend on the plplottcltk library so use it to link those applications. Tested by Alan W. Irwin <ai...@us...> on Linux using the -DENABLE_tcl=ON, -DENABLE_itcl=ON, -DENABLE_tk=ON, -DENABLE_itk=ON, and -DUSE_TCL_TK_STUBS=ON CMake options using the test_noninteractive, test_interactive, and test_wish_standard_examples target in the build tree. All was well other than the known issue that the latter target still has a segfault at the end that occurs on execution of the Tcl exit command. These good test results mean there is only one more thing that needs to be done before we can make -DUSE_TCL_TK_STUBS=ON the default; make build-system changes so the tkwin "device" (the shared object that needs to be built so that "package require Plplotter" will work) will build and work properly for the -DUSE_TCL_TK_STUBS=ON case. Modified Paths: -------------- trunk/bindings/tcl/CMakeLists.txt trunk/bindings/tk/CMakeLists.txt trunk/cmake/modules/plplot_version.cmake trunk/examples/tk/CMakeLists.txt trunk/utils/CMakeLists.txt Modified: trunk/bindings/tcl/CMakeLists.txt =================================================================== --- trunk/bindings/tcl/CMakeLists.txt 2013-11-18 22:52:41 UTC (rev 12717) +++ trunk/bindings/tcl/CMakeLists.txt 2013-11-19 04:07:23 UTC (rev 12718) @@ -57,21 +57,18 @@ ) if(BUILD_SHARED_LIBS) - SET_SOURCE_FILES_PROPERTIES(${tclmatrix${LIB_TAG}_LIB_SRCS} + set_source_files_properties(${tclmatrix${LIB_TAG}_LIB_SRCS} PROPERTIES COMPILE_FLAGS "-DUSINGDLL" ) endif(BUILD_SHARED_LIBS) - if(USE_TCL_TK_STUBS) - set_source_files_properties( - ${tclmatrix${LIB_TAG}_LIB_SRCS} - PROPERTIES COMPILE_DEFINITIONS USE_TCL_STUBS - ) - endif(USE_TCL_TK_STUBS) - add_library(tclmatrix${LIB_TAG} ${tclmatrix${LIB_TAG}_LIB_SRCS}) if(USE_TCL_TK_STUBS) target_link_libraries(tclmatrix${LIB_TAG} ${TCL_STUB_LIBRARY}) + set_target_properties( + tclmatrix${LIB_TAG} + PROPERTIES COMPILE_DEFINITIONS USE_TCL_STUBS + ) else(USE_TCL_TK_STUBS) target_link_libraries(tclmatrix${LIB_TAG} ${TCL_LIBRARY}) endif(USE_TCL_TK_STUBS) @@ -137,12 +134,19 @@ set(plplottcltk${LIB_TAG}_LIB_SRCS tclAPI.c - #tclMain.c ) + + set(plplottcltk_Main${LIB_TAG}_LIB_SRCS + tclMain.c + ) + if(BUILD_SHARED_LIBS) set_source_files_properties(${plplottcltk${LIB_TAG}_LIB_SRCS} PROPERTIES COMPILE_FLAGS "-DUSINGDLL" ) + set_source_files_properties(${plplottcltk_Main${LIB_TAG}_LIB_SRCS} + PROPERTIES COMPILE_FLAGS "-DUSINGDLL" + ) endif(BUILD_SHARED_LIBS) if(USE_TCL_TK_STUBS) @@ -171,6 +175,16 @@ ) endif(USE_TCL_TK_STUBS) + set( + plplottcltk_Main${LIB_TAG}_link_libraries + plplot${LIB_TAG} + ${TCL_LIBRARY} + ) + set( + libplplottcltk_Main${LIB_TAG}_LINK_FLAGS + ${TCL_LIBRARY} + ) + if(ENABLE_itcl) include_directories(${ITCL_INCLUDE_PATH}) set( @@ -186,6 +200,20 @@ ${libplplottcltk${LIB_TAG}_LINK_FLAGS} ${ITCL_LIBRARY} ) + + set( + libplplottcltk_Main${LIB_TAG}_COMPILE_FLAGS + "${libplplottcltk_Main${LIB_TAG}_COMPILE_FLAGS} -I${ITCL_INCLUDE_PATH}" + ) + set(plplottcltk_Main${LIB_TAG}_link_libraries + ${plplottcltk_Main${LIB_TAG}_link_libraries} + ${ITCL_LIBRARY} + ) + set( + libplplottcltk_Main${LIB_TAG}_LINK_FLAGS + ${libplplottcltk_Main${LIB_TAG}_LINK_FLAGS} + ${ITCL_LIBRARY} + ) endif(ENABLE_itcl) if(ENABLE_tk) @@ -195,8 +223,13 @@ ${CMAKE_SOURCE_DIR}/bindings/tk/plframe.c ${CMAKE_SOURCE_DIR}/bindings/tk/plr.c ${CMAKE_SOURCE_DIR}/bindings/tk/tcpip.c + ) + + set(plplottcltk_Main${LIB_TAG}_LIB_SRCS + ${plplottcltk_Main${LIB_TAG}_LIB_SRCS} ${CMAKE_SOURCE_DIR}/bindings/tk/tkMain.c ) + include_directories(${TK_INCLUDE_PATH}) # Transform TK_INCLUDE_PATH (which is a list) to blank-delimited flag form. string(REGEX REPLACE ";" " -I" TKLIB_COMPILE_FLAGS "-I${TK_INCLUDE_PATH}") @@ -204,21 +237,56 @@ libplplottcltk${LIB_TAG}_COMPILE_FLAGS "${libplplottcltk${LIB_TAG}_COMPILE_FLAGS} ${TKLIB_COMPILE_FLAGS}" ) + + set( + libplplottcltk_Main${LIB_TAG}_COMPILE_FLAGS + "${libplplottcltk_Main${LIB_TAG}_COMPILE_FLAGS} ${TKLIB_COMPILE_FLAGS}" + ) + if(BUILD_SHARED_LIBS) set_source_files_properties(${plplottcltk${LIB_TAG}_LIB_SRCS} PROPERTIES COMPILE_FLAGS "-DUSINGDLL" ) + set_source_files_properties(${plplottcltk_Main${LIB_TAG}_LIB_SRCS} + PROPERTIES COMPILE_FLAGS "-DUSINGDLL" + ) endif(BUILD_SHARED_LIBS) - set(plplottcltk${LIB_TAG}_link_libraries - ${plplottcltk${LIB_TAG}_link_libraries} + + if(USE_TCL_TK_STUBS) + set(plplottcltk${LIB_TAG}_link_libraries + ${plplottcltk${LIB_TAG}_link_libraries} + ${TK_STUB_LIBRARY} + ${X11_X11_LIB} + ) + set( + libplplottcltk${LIB_TAG}_LINK_FLAGS + ${libplplottcltk${LIB_TAG}_LINK_FLAGS} + ${TK_STUB_LIBRARY} + ) + else(USE_TCL_TK_STUBS) + set(plplottcltk${LIB_TAG}_link_libraries + ${plplottcltk${LIB_TAG}_link_libraries} + ${TK_LIBRARY} + ${X11_X11_LIB} + ) + set( + libplplottcltk${LIB_TAG}_LINK_FLAGS + ${libplplottcltk${LIB_TAG}_LINK_FLAGS} + ${TK_LIBRARY} + ) + endif(USE_TCL_TK_STUBS) + + set(plplottcltk_Main${LIB_TAG}_link_libraries + ${plplottcltk_Main${LIB_TAG}_link_libraries} ${TK_LIBRARY} ${X11_X11_LIB} ) set( - libplplottcltk${LIB_TAG}_LINK_FLAGS - ${libplplottcltk${LIB_TAG}_LINK_FLAGS} + libplplottcltk_Main${LIB_TAG}_LINK_FLAGS + ${libplplottcltk_Main${LIB_TAG}_LINK_FLAGS} ${TK_LIBRARY} ) + if(ENABLE_itk) include_directories(${ITK_INCLUDE_PATH}) set( @@ -234,6 +302,20 @@ ${libplplottcltk${LIB_TAG}_LINK_FLAGS} ${ITK_LIBRARY} ) + + set( + libplplottcltk_Main${LIB_TAG}_COMPILE_FLAGS + "${libplplottcltk_Main${LIB_TAG}_COMPILE_FLAGS} -I${ITK_INCLUDE_PATH}" + ) + set(plplottcltk_Main${LIB_TAG}_link_libraries + ${plplottcltk_Main${LIB_TAG}_link_libraries} + ${ITK_LIBRARY} + ) + set( + libplplottcltk_Main${LIB_TAG}_LINK_FLAGS + ${libplplottcltk_Main${LIB_TAG}_LINK_FLAGS} + ${ITK_LIBRARY} + ) endif(ENABLE_itk) endif(ENABLE_tk) @@ -244,20 +326,34 @@ "${libplplottcltk${LIB_TAG}_LINK_FLAGS}" ) + pkg_config_link_flags( + libplplottcltk_Main${LIB_TAG}_LINK_FLAGS + "${libplplottcltk_Main${LIB_TAG}_LINK_FLAGS}" + ) + + add_library(plplottcltk${LIB_TAG} ${plplottcltk${LIB_TAG}_LIB_SRCS}) + add_library(plplottcltk_Main${LIB_TAG} ${plplottcltk_Main${LIB_TAG}_LIB_SRCS}) + if(USE_TCL_TK_STUBS) - set_source_files_properties( - ${plplottcltk${LIB_TAG}_LIB_SRCS} - PROPERTIES COMPILE_DEFINITIONS USE_TCL_STUBS - ) + if(ENABLE_tk) + set_target_properties( + plplottcltk${LIB_TAG} + PROPERTIES COMPILE_DEFINITIONS "USE_TCL_STUBS;USE_TK_STUBS" + ) + else(ENABLE_tk) + set_target_properties( + plplottcltk${LIB_TAG} + PROPERTIES COMPILE_DEFINITIONS USE_TCL_STUBS + ) + endif(ENABLE_tk) endif(USE_TCL_TK_STUBS) - add_library(plplottcltk${LIB_TAG} ${plplottcltk${LIB_TAG}_LIB_SRCS}) - if(NON_TRANSITIVE) # empty list ==> non-transitive linking for everything that links to # libtclmatrixd and libplplottcltkd in the shared libraries case. target_link_libraries(tclmatrix${LIB_TAG} LINK_INTERFACE_LIBRARIES) target_link_libraries(plplottcltk${LIB_TAG} LINK_INTERFACE_LIBRARIES) + target_link_libraries(plplottcltk_Main${LIB_TAG} LINK_INTERFACE_LIBRARIES) # This configures the pkg-config method to use non-transitive linking. set(PC_REQUIRES_TAG "Requires.private") else(NON_TRANSITIVE) @@ -274,6 +370,11 @@ ${plplottcltk${LIB_TAG}_link_libraries} ) + target_link_libraries( + plplottcltk_Main${LIB_TAG} + ${plplottcltk_Main${LIB_TAG}_link_libraries} + ) + if(USE_RPATH) get_target_property(LIB_INSTALL_RPATH plplot${LIB_TAG} INSTALL_RPATH) set_target_properties(plplottcltk${LIB_TAG} @@ -283,6 +384,14 @@ INSTALL_RPATH "${LIB_INSTALL_RPATH}" INSTALL_NAME_DIR "${LIB_DIR}" ) + + set_target_properties(plplottcltk_Main${LIB_TAG} + PROPERTIES + SOVERSION ${plplottcltk_Main_SOVERSION} + VERSION ${plplottcltk_Main_VERSION} + INSTALL_RPATH "${LIB_INSTALL_RPATH}" + INSTALL_NAME_DIR "${LIB_DIR}" + ) else(USE_RPATH) set_target_properties(plplottcltk${LIB_TAG} PROPERTIES @@ -290,6 +399,14 @@ VERSION ${plplottcltk_VERSION} INSTALL_NAME_DIR "${LIB_DIR}" ) + + set_target_properties(plplottcltk_Main${LIB_TAG} + PROPERTIES + SOVERSION ${plplottcltk_Main_SOVERSION} + VERSION ${plplottcltk_Main_VERSION} + INSTALL_NAME_DIR "${LIB_DIR}" + ) + endif(USE_RPATH) install(TARGETS plplottcltk${LIB_TAG} @@ -299,6 +416,13 @@ RUNTIME DESTINATION ${BIN_DIR} ) + install(TARGETS plplottcltk_Main${LIB_TAG} + EXPORT export_plplot + ARCHIVE DESTINATION ${LIB_DIR} + LIBRARY DESTINATION ${LIB_DIR} + RUNTIME DESTINATION ${BIN_DIR} + ) + set(plplottcltk${LIB_TAG}_INSTALLED_HEADERS pltcl.h ) @@ -439,5 +563,29 @@ @ONLY ) install(FILES ${PC_CONFIGURED_FILE} DESTINATION ${PKG_CONFIG_DIR}) + + set(PC_DATA "tcl:Tcl/Tk:Tcl/Tk bindings, :plplottcltk_Main${LIB_TAG}") + + string(REGEX REPLACE "^(.*):.*:.*:.*$" "\\1" BINDING ${PC_DATA}) + set(PC_FILE_SUFFIX "-${BINDING}") + set(PC_REQUIRES "plplot${LIB_TAG}") + string(REGEX REPLACE "^.*:(.*):.*:.*$" "\\1" PC_SHORT_NAME ${PC_DATA}) + string(REGEX REPLACE "^.*:.*:(.*):.*$" "\\1" PC_LONG_NAME ${PC_DATA}) + string(REGEX REPLACE "^.*:.*:.*:(.*)$" "\\1" PC_LIBRARY_NAME ${PC_DATA}) + set(PC_LINK_FLAGS "${lib${PC_LIBRARY_NAME}_LINK_FLAGS}") + set(PC_COMPILE_FLAGS "${lib${PC_LIBRARY_NAME}_COMPILE_FLAGS}") + if(NON_TRANSITIVE) + set(PC_LINK_FLAGS "-lplplot${LIB_TAG} ${PC_LINK_FLAGS}") + endif(NON_TRANSITIVE) + set(PC_LINK_FLAGS "-l${PC_LIBRARY_NAME} ${PC_LINK_FLAGS}") + set(PC_CONFIGURED_FILE + ${CMAKE_BINARY_DIR}/pkgcfg/plplot${LIB_TAG}${PC_FILE_SUFFIX}.pc + ) + configure_file( + ${CMAKE_SOURCE_DIR}/pkgcfg/plplot-template.pc.in + ${PC_CONFIGURED_FILE} + @ONLY + ) + install(FILES ${PC_CONFIGURED_FILE} DESTINATION ${PKG_CONFIG_DIR}) endif(PKG_CONFIG_EXECUTABLE) endif(ENABLE_tcl) Modified: trunk/bindings/tk/CMakeLists.txt =================================================================== --- trunk/bindings/tk/CMakeLists.txt 2013-11-18 22:52:41 UTC (rev 12717) +++ trunk/bindings/tk/CMakeLists.txt 2013-11-19 04:07:23 UTC (rev 12718) @@ -103,7 +103,7 @@ endif(BUILD_SHARED_LIBS) add_executable(plserver plserver.c) - target_link_libraries(plserver plplot${LIB_TAG} plplottcltk${LIB_TAG} ${TK_LIBRARY} ${TCL_LIBRARY}) + target_link_libraries(plserver plplot${LIB_TAG} plplottcltk_Main${LIB_TAG} plplottcltk${LIB_TAG} ${TK_LIBRARY} ${TCL_LIBRARY}) if(USE_RPATH) get_target_property(LIB_INSTALL_RPATH plplot${LIB_TAG} INSTALL_RPATH) Modified: trunk/cmake/modules/plplot_version.cmake =================================================================== --- trunk/cmake/modules/plplot_version.cmake 2013-11-18 22:52:41 UTC (rev 12717) +++ trunk/cmake/modules/plplot_version.cmake 2013-11-19 04:07:23 UTC (rev 12718) @@ -67,6 +67,9 @@ set(plplottcltk_SOVERSION 10) set(plplottcltk_VERSION ${plplottcltk_SOVERSION}.0.0) +set(plplottcltk_Main_SOVERSION 0) +set(plplottcltk_Main_VERSION ${plplottcltk_Main_SOVERSION}.0.0) + set(plplotwxwidgets_SOVERSION 0) set(plplotwxwidgets_VERSION ${plplotwxwidgets_SOVERSION}.0.0) Modified: trunk/examples/tk/CMakeLists.txt =================================================================== --- trunk/examples/tk/CMakeLists.txt 2013-11-18 22:52:41 UTC (rev 12717) +++ trunk/examples/tk/CMakeLists.txt 2013-11-19 04:07:23 UTC (rev 12718) @@ -174,7 +174,7 @@ set_source_files_properties(${TK_SRC_FILE} PROPERTIES COMPILE_FLAGS "-DUSINGDLL" ) endif(BUILD_SHARED_LIBS AND CORE_BUILD) - target_link_libraries(${TK_EXE} plplottcltk${LIB_TAG} tclmatrix${LIB_TAG} plplot${LIB_TAG} ${TK_LIBRARY} ${TCL_LIBRARY} ${MATH_LIB}) + target_link_libraries(${TK_EXE} plplottcltk_Main${LIB_TAG} plplottcltk${LIB_TAG} tclmatrix${LIB_TAG} plplot${LIB_TAG} ${TK_LIBRARY} ${TCL_LIBRARY} ${MATH_LIB}) set_property(GLOBAL APPEND PROPERTY TARGETS_examples_tk ${TK_EXE}) endforeach(TK_SRC_FILE ${tk_SRC}) set_property(GLOBAL APPEND PROPERTY TARGETS_examples_tk tclIndex_examples_tk) Modified: trunk/utils/CMakeLists.txt =================================================================== --- trunk/utils/CMakeLists.txt 2013-11-18 22:52:41 UTC (rev 12717) +++ trunk/utils/CMakeLists.txt 2013-11-19 04:07:23 UTC (rev 12718) @@ -78,9 +78,9 @@ include_directories(${ITCL_INCLUDE_PATH}) endif(HAVE_ITCL) - add_executable(pltcl pltcl.c ${CMAKE_SOURCE_DIR}/bindings/tcl/tclMain.c) + add_executable(pltcl pltcl.c) - target_link_libraries(pltcl plplot${LIB_TAG} plplottcltk${LIB_TAG} ${ITCL_LIBRARY} ${TCL_LIBRARY}) + 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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-20 06:21:29
|
Revision: 12720 http://sourceforge.net/p/plplot/code/12720 Author: airwin Date: 2013-11-20 06:21:25 +0000 (Wed, 20 Nov 2013) Log Message: ----------- Allow tkwin "device" (actually the shared object that is dynamically loaded by the "package require Plplotter command) to use stub versions of the Tcl and Tk libraries. This completes the USE_TCL_TK_STUBS work without any build or run-time issues that can be attributed to using the stub versions of the Tcl/Tk libraries. Therefore, set USE_TCL_TK_STUBS=ON by default. Modified Paths: -------------- trunk/cmake/modules/tcl-related.cmake trunk/cmake/modules/tk.cmake trunk/drivers/CMakeLists.txt Modified: trunk/cmake/modules/tcl-related.cmake =================================================================== --- trunk/cmake/modules/tcl-related.cmake 2013-11-20 05:41:51 UTC (rev 12719) +++ trunk/cmake/modules/tcl-related.cmake 2013-11-20 06:21:25 UTC (rev 12720) @@ -34,7 +34,7 @@ option(USE_INCRTCL_VERSION_4 "Use version 4 of Itcl and Itcl, version 4.1 of Iwidgets" OFF) -option(USE_TCL_TK_STUBS "Use Tcl/Tk stubs libraries" OFF) +option(USE_TCL_TK_STUBS "Use Tcl/Tk stubs libraries" ON) # Depending on these above options and system resources may also determine # the following variables which are largely self-explanatory unless documented Modified: trunk/cmake/modules/tk.cmake =================================================================== --- trunk/cmake/modules/tk.cmake 2013-11-20 05:41:51 UTC (rev 12719) +++ trunk/cmake/modules/tk.cmake 2013-11-20 06:21:25 UTC (rev 12720) @@ -54,6 +54,16 @@ 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}") @@ -68,12 +78,10 @@ set( tk_SOURCE ${CMAKE_SOURCE_DIR}/bindings/tcl/tclAPI.c - ${CMAKE_SOURCE_DIR}/bindings/tcl/tclMain.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 - ${CMAKE_SOURCE_DIR}/bindings/tk/tkMain.c ) # All source that is in libtclmatrix set( @@ -105,46 +113,19 @@ if(PLD_tkwin) set(tkwin_COMPILE_FLAGS - "-I${TCL_INCLUDE_PATH} ${TKLIB_COMPILE_FLAGS} -I\"${CMAKE_SOURCE_DIR}\"/bindings/tcl -I\"${CMAKE_BINARY_DIR}\"/bindings/tcl -I\"${CMAKE_SOURCE_DIR}\"/bindings/tk-x-plat -I\"${CMAKE_SOURCE_DIR}\"/bindings/tk" - ) - set(tkwin_LINK_FLAGS plplottcltk${LIB_TAG} ${TCL_LIBRARY} ${TK_LIBRARY} ${X11_LIBRARIES}) + "-I${TCL_INCLUDE_PATH} ${TKLIB_COMPILE_FLAGS} -I\"${CMAKE_SOURCE_DIR}\"/bindings/tcl -I\"${CMAKE_BINARY_DIR}\"/bindings/tcl -I\"${CMAKE_SOURCE_DIR}\"/bindings/tk-x-plat -I\"${CMAKE_SOURCE_DIR}\"/bindings/tk" + ) + + if(USE_TCL_TK_STUBS) + set(tkwin_LINK_FLAGS plplottcltk${LIB_TAG} ${TCL_STUB_LIBRARY} ${TK_STUB_LIBRARY} ${X11_LIBRARIES}) + else(USE_TCL_TK_STUBS) + set(tkwin_LINK_FLAGS plplottcltk${LIB_TAG} ${TCL_LIBRARY} ${TK_LIBRARY} ${X11_LIBRARIES}) + endif(USE_TCL_TK_STUBS) + set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${TCL_LIBRARY} ${TK_LIBRARY}) set( tkwin_SOURCE ${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/tcl/tclMain.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 - ${CMAKE_SOURCE_DIR}/bindings/tk/tkMain.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) Modified: trunk/drivers/CMakeLists.txt =================================================================== --- trunk/drivers/CMakeLists.txt 2013-11-20 05:41:51 UTC (rev 12719) +++ trunk/drivers/CMakeLists.txt 2013-11-20 06:21:25 UTC (rev 12720) @@ -220,6 +220,14 @@ DESTINATION ${DRV_DIR} ) endforeach(SOURCE_ROOT_NAME ${DRIVERS_LIST}) + + if(PLD_tkwin AND USE_TCL_TK_STUBS) + set_target_properties( + tkwin + PROPERTIES COMPILE_DEFINITIONS "USE_TCL_STUBS;USE_TK_STUBS" + ) + endif(PLD_tkwin AND USE_TCL_TK_STUBS) + if(TEST_DYNDRIVERS AND NOT CMAKE_CROSSCOMPILING) add_custom_target(test_dyndrivers ALL ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-20 22:58:03
|
Revision: 12725 http://sourceforge.net/p/plplot/code/12725 Author: airwin Date: 2013-11-20 22:58:00 +0000 (Wed, 20 Nov 2013) Log Message: ----------- Extirpate anything having to do with Fortran 77. These changes were quite intrusive because I went out of my way to search for any mention of "77" in our source tree and followed up with an edit or deletion of the file where appropriate. Tested by Alan W. Irwin <ai...@us...> on Linux using the test_noninteractive target in the build tree. More comprehensive tests to follow. Modified Paths: -------------- trunk/bindings/CMakeLists.txt trunk/bindings/f95/plstubs.h trunk/bindings/f95/readme_f95.txt trunk/bindings/f95/scstubs.c trunk/bindings/f95/sfstubsf95.f90 trunk/cmake/FindPLplot.cmake trunk/cmake/modules/fortran.cmake trunk/cmake/modules/plplot_version.cmake trunk/cmake/modules/summary.cmake trunk/doc/Doxyfile.in trunk/doc/docbook/src/CMakeLists.txt trunk/doc/docbook/src/advanced.xml trunk/doc/docbook/src/api-c.xml trunk/doc/docbook/src/api.xml trunk/doc/docbook/src/fortran95.xml trunk/doc/docbook/src/intro.xml trunk/doc/docbook/src/libraries.xml trunk/doc/docbook/src/plplotdoc.xml.in trunk/examples/CMakeLists.txt trunk/examples/Makefile.examples.in trunk/examples/f95/CMakeLists.txt trunk/examples/f95/plf95demos.inc.in trunk/examples/f95/x17f.f90 trunk/examples/f95/x20f.f90 trunk/examples/plplot_configure.cmake_installed_examples.in trunk/include/pldll.h.in trunk/pkgcfg/README trunk/plplot_test/CMakeLists.txt trunk/plplot_test/plplot-test.sh.in trunk/plplot_test/test_diff.sh.in trunk/plplot_test/test_f95.sh.in trunk/scripts/check_api_completeness.sh trunk/scripts/style_source.sh Removed Paths: ------------- trunk/bindings/f77/ trunk/cmake/modules/TestF77CmdLine.cmake trunk/cmake/modules/TestF77CmdLine.f trunk/doc/docbook/src/api-fortran77.xml trunk/doc/docbook/src/fortran77.xml trunk/examples/f77/ trunk/plplot_test/test_f77.sh.in Modified: trunk/bindings/CMakeLists.txt =================================================================== --- trunk/bindings/CMakeLists.txt 2013-11-20 19:25:53 UTC (rev 12724) +++ trunk/bindings/CMakeLists.txt 2013-11-20 22:58:00 UTC (rev 12725) @@ -23,7 +23,6 @@ # python, java, lua, and octave). add_subdirectory(swig-support) add_subdirectory(c++) -add_subdirectory(f77) add_subdirectory(f95) add_subdirectory(tcl) add_subdirectory(tk) Modified: trunk/bindings/f95/plstubs.h =================================================================== --- trunk/bindings/f95/plstubs.h 2013-11-20 19:25:53 UTC (rev 12724) +++ trunk/bindings/f95/plstubs.h 2013-11-20 22:58:00 UTC (rev 12725) @@ -157,9 +157,9 @@ // Each stub must have an entry here. //-------------------------------------------------------------------------- -// N.B. By default the g77 compiler appends second underscore to name if +// N.B. By default the gfortran compiler appends second underscore to name if // the original name contains any underscore at all. According to info -// g77, "This is done to ensure compatibility with code produced by many +// gfortran, "This is done to ensure compatibility with code produced by many // UNIX Fortran compilers." However, other fortran compilers do not have // this default naming scheme so to avoid trouble I have #defined two // variations of the embedded underscore names, one with and one without @@ -174,7 +174,7 @@ #define PLADV FNAME( PLADV, pladv ) #define PLARC FNAME( PLARC, plarc ) #define PLAXES7 FNAME( PLAXES7, plaxes7 ) -#define PLBIN FNAME( PLBINF77, plbinf77 ) +#define PLBIN FNAME( PLBINF95, plbinf95 ) #define PLBOP FNAME( PLBOP, plbop ) #define PLBOX37 FNAME( PLBOX37, plbox37 ) #define PLBOX7 FNAME( PLBOX7, plbox7 ) @@ -192,18 +192,18 @@ #define PLCON17 FNAME( PLCON17, plcon17 ) #define PLCON27 FNAME( PLCON27, plcon27 ) #define PLCONT7 FNAME( PLCONT7, plcont7 ) -#define PLCPSTRM FNAME( PLCPSTRMF77, plcpstrmf77 ) +#define PLCPSTRM FNAME( PLCPSTRMF95, plcpstrmf95 ) #define PLCTIME FNAME( PLCTIME, plctime ) #define PLEND FNAME( PLEND, plend ) #define PLEND1 FNAME( PLEND1, plend1 ) #define PLENV FNAME( PLENV, plenv ) #define PLENV0 FNAME( PLENV0, plenv0 ) #define PLEOP FNAME( PLEOP, pleop ) -#define PLERRX FNAME( PLERRXF77, plerrxf77 ) -#define PLERRY FNAME( PLERRYF77, plerryf77 ) +#define PLERRX FNAME( PLERRXF95, plerrxf95 ) +#define PLERRY FNAME( PLERRYF95, plerryf95 ) #define PLFAMADV FNAME( PLFAMADV, plfamadv ) -#define PLFILL FNAME( PLFILLF77, plfillf77 ) -#define PLFILL3 FNAME( PLFILL3F77, plfill3f77 ) +#define PLFILL FNAME( PLFILLF95, plfillf95 ) +#define PLFILL3 FNAME( PLFILL3F95, plfill3f95 ) #define PLFLUSH FNAME( PLFLUSH, plflush ) #define PLFONT FNAME( PLFONT, plfont ) #define PLFONTLD FNAME( PLFONTLD, plfontld ) @@ -226,8 +226,8 @@ #define PLGLEVEL FNAME( PLGLEVEL, plglevel ) #define PLGPAGE FNAME( PLGPAGE, plgpage ) #define PLGRA FNAME( PLGRA, plgra ) -#define PLGRADIENT FNAME( PLGRADIENTF77, plgradientf77 ) -#define PLGRIDDATA FNAME( PLGRIDDATAF77, plgriddataf77 ) +#define PLGRADIENT FNAME( PLGRADIENTF95, plgradientf95 ) +#define PLGRIDDATA FNAME( PLGRIDDATAF95, plgriddataf95 ) #define PLGSPA FNAME( PLGSPA, plgspa ) #define PLGSTRM FNAME( PLGSTRM, plgstrm ) #define PLGVER7 FNAME( PLGVER7, plgver7 ) @@ -236,9 +236,9 @@ #define PLGXAX FNAME( PLGXAX, plgxax ) #define PLGYAX FNAME( PLGYAX, plgyax ) #define PLGZAX FNAME( PLGZAX, plgzax ) -#define PLHIST FNAME( PLHISTF77, plhistf77 ) +#define PLHIST FNAME( PLHISTF95, plhistf95 ) #define PLHLSRGB FNAME( PLHLSRGB, plhlsrgb ) -#define PLIMAGE FNAME( PLIMAGEF77, plimagef77 ) +#define PLIMAGE FNAME( PLIMAGEF95, plimagef95 ) #define PLIMAGEFR07 FNAME( PLIMAGEFR07, plimagefr07 ) #define PLIMAGEFR17 FNAME( PLIMAGEFR17, plimagefr17 ) #define PLIMAGEFR27 FNAME( PLIMAGEFR27, plimagefr27 ) @@ -249,23 +249,23 @@ #define PLLEGEND_CNV_TEXT FNAME( PLLEGEND07_CNV_TEXT, pllegend07_cnv_text ) #define PLLEGEND FNAME( PLLEGEND07, pllegend07 ) #define PLLIGHTSOURCE FNAME( PLLIGHTSOURCE, pllightsource ) -#define PLLINE FNAME( PLLINEF77, pllinef77 ) -#define PLLINE3 FNAME( PLLINE3F77, plline3f77 ) +#define PLLINE FNAME( PLLINEF95, pllinef95 ) +#define PLLINE3 FNAME( PLLINE3F95, plline3f95 ) #define PLLSTY FNAME( PLLSTY, pllsty ) #define PLMAP7 FNAME( PLMAP7, plmap7 ) #define PLMERIDIANS7 FNAME( PLMERIDIANS7, plmeridians7 ) -#define PLMESH FNAME( PLMESHF77, plmeshf77 ) -#define PLMESHC FNAME( PLMESHCF77, plmeshcf77 ) +#define PLMESH FNAME( PLMESHF95, plmeshf95 ) +#define PLMESHC FNAME( PLMESHCF95, plmeshcf95 ) #define PLMKSTRM FNAME( PLMKSTRM, plmkstrm ) #define PLMTEX7 FNAME( PLMTEX7, plmtex7 ) #define PLMTEX37 FNAME( PLMTEX37, plmtex37 ) -#define PLOT3D FNAME( PLOT3DF77, plot3df77 ) -#define PLOT3DC FNAME( PLOT3DCF77, plot3dcf77 ) +#define PLOT3D FNAME( PLOT3DF95, plot3df95 ) +#define PLOT3DC FNAME( PLOT3DCF95, plot3dcf95 ) #if STUB_LINKAGE == STUB_STDCALL || STUB_LINKAGE == STUB_FORTRAN -#define CALL_PLOT3DC PLOT3DCF77 +#define CALL_PLOT3DC PLOT3DCF95 #elif STUB_LINKAGE == STUB_LAU -#define CALL_PLOT3DC plot3dcf77_ +#define CALL_PLOT3DC plot3dcf95_ #else #define CALL_PLOT3DC PLOT3DC #endif @@ -273,26 +273,26 @@ #define PLPARSEOPTS7 FNAME( PLPARSEOPTS7, plparseopts7 ) #define PLPAT FNAME( PLPAT, plpat ) #define PLPATH FNAME( PLPATH, plpath ) -#define PLPOIN FNAME( PLPOINF77, plpoinf77 ) -#define PLPOIN3 FNAME( PLPOIN3F77, plpoin3f77 ) -#define PLPOLY3 FNAME( PLPOLY3F77, plpoly3f77 ) +#define PLPOIN FNAME( PLPOINF95, plpoinf95 ) +#define PLPOIN3 FNAME( PLPOIN3F95, plpoin3f95 ) +#define PLPOLY3 FNAME( PLPOLY3F95, plpoly3f95 ) #define PLPREC FNAME( PLPREC, plprec ) #define PLPSTY FNAME( PLPSTY, plpsty ) #define PLPTEX7 FNAME( PLPTEX7, plptex7 ) #define PLPTEX37 FNAME( PLPTEX37, plptex37 ) -#define PLRANDD FNAME( PLRANDDF77, plranddf77 ) +#define PLRANDD FNAME( PLRANDDF95, plranddf95 ) #define PLREPLOT FNAME( PLREPLOT, plreplot ) #define PLRGBHLS FNAME( PLRGBHLS, plrgbhls ) #define PLSCHR FNAME( PLSCHR, plschr ) -#define PLSCMAP0 FNAME( PLSCMAP0F77, plscmap0f77 ) -#define PLSCMAP0A FNAME( PLSCMAP0AF77, plscmap0af77 ) +#define PLSCMAP0 FNAME( PLSCMAP0F95, plscmap0f95 ) +#define PLSCMAP0A FNAME( PLSCMAP0AF95, plscmap0af95 ) #define PLSCMAP0N FNAME( PLSCMAP0N, plscmap0n ) -#define PLSCMAP1 FNAME( PLSCMAP1F77, plscmap1f77 ) -#define PLSCMAP1A FNAME( PLSCMAP1AF77, plscmap1af77 ) -#define PLSCMAP1L FNAME( PLSCMAP1LF77, plscmap1lf77 ) -#define PLSCMAP1L2 FNAME( PLSCMAP1L2F77, plscmap1l2f77 ) -#define PLSCMAP1LA FNAME( PLSCMAP1LAF77, plscmap1laf77 ) -#define PLSCMAP1LA2 FNAME( PLSCMAP1LA2F77, plscmap1la2f77 ) +#define PLSCMAP1 FNAME( PLSCMAP1F95, plscmap1f95 ) +#define PLSCMAP1A FNAME( PLSCMAP1AF95, plscmap1af95 ) +#define PLSCMAP1L FNAME( PLSCMAP1LF95, plscmap1lf95 ) +#define PLSCMAP1L2 FNAME( PLSCMAP1L2F95, plscmap1l2f95 ) +#define PLSCMAP1LA FNAME( PLSCMAP1LAF95, plscmap1laf95 ) +#define PLSCMAP1LA2 FNAME( PLSCMAP1LA2F95, plscmap1la2f95 ) #define PLSCMAP1N FNAME( PLSCMAP1N, plscmap1n ) #define PLSCMAP1_RANGE FNAME( PLSCMAP1_RANGE, plscmap1_range ) #define PLSCOL0 FNAME( PLSCOL0, plscol0 ) @@ -336,7 +336,7 @@ #define PLSPAGE FNAME( PLSPAGE, plspage ) #define PLSPAL07 FNAME( PLSPAL07, plspal07 ) #define PLSPAL17 FNAME( PLSPAL17, plspal17 ) -#define PLSPAUSE FNAME( PLSPAUSEF77, plspausef77 ) +#define PLSPAUSE FNAME( PLSPAUSEF95, plspausef95 ) #define PLSSTRM FNAME( PLSSTRM, plsstrm ) #define PLSSUB FNAME( PLSSUB, plssub ) #define PLSSYM FNAME( PLSSYM, plssym ) @@ -348,15 +348,15 @@ #define PLSTRING7 FNAME( PLSTRING7, plstring7 ) #define PLSTRING37 FNAME( PLSTRING37, plstring37 ) #define PLSTRIPA FNAME( PLSTRIPA, plstripa ) -#define PLSTRIPC FNAME( PLSTRIPCF77, plstripcf77 ) +#define PLSTRIPC FNAME( PLSTRIPCF95, plstripcf95 ) #define PLSTRIPD FNAME( PLSTRIPD, plstripd ) #define PLSTYL FNAME( PLSTYL, plstyl ) -#define PLSURF3D FNAME( PLSURF3DF77, plsurf3df77 ) -#define PLSVECT FNAME( PLSVECTF77, plsvectf77 ) +#define PLSURF3D FNAME( PLSURF3DF95, plsurf3df95 ) +#define PLSVECT FNAME( PLSVECTF95, plsvectf95 ) #define PLSVPA FNAME( PLSVPA, plsvpa ) #define PLSXAX FNAME( PLSXAX, plsxax ) #define PLSYAX FNAME( PLSYAX, plsyax ) -#define PLSYM FNAME( PLSYMF77, plsymf77 ) +#define PLSYM FNAME( PLSYMF95, plsymf95 ) #define PLSZAX FNAME( PLSZAX, plszax ) #define PLTEXT FNAME( PLTEXT, pltext ) #define PLTIMEFMT7 FNAME( PLTIMEFMT7, pltimefmt7 ) @@ -371,7 +371,7 @@ #define PLW3D FNAME( PLW3D, plw3d ) #define PLWIDTH FNAME( PLWIDTH, plwidth ) #define PLWIND FNAME( PLWIND, plwind ) -#define PLXORMOD FNAME( PLXORMODF77, plxormodf77 ) +#define PLXORMOD FNAME( PLXORMODF95, plxormodf95 ) #ifdef PL_DEPRECATE #define PLRGB FNAME( PLRGB, plrgb ) Modified: trunk/bindings/f95/readme_f95.txt =================================================================== --- trunk/bindings/f95/readme_f95.txt 2013-11-20 19:25:53 UTC (rev 12724) +++ trunk/bindings/f95/readme_f95.txt 2013-11-20 22:58:00 UTC (rev 12725) @@ -7,7 +7,6 @@ ------------ The Fortran 95 bindings for PLplot have been set up with the following considerations in mind: -- reuse the bindings for FORTRAN 77 if possible - provide alternative calls for the various routines to take advantage of the features of Fortran 95, most notably, to simplify the interface - provide a module that takes care of all the details @@ -90,7 +89,7 @@ real(kind=plflt), dimension(:) :: x, y ! - ! Fortran 95, method 1 (compatible with FORTRAN 77) + ! Fortran 95, method 1 ! icenter = 1 nbin = size(x) @@ -116,8 +115,6 @@ Method 2 is preferred, as it is most "Fortran 95" in character. - - Linking DLLs on Windows ----------------------- On Windows it is necessary to specify which routines and functions in Modified: trunk/bindings/f95/scstubs.c =================================================================== --- trunk/bindings/f95/scstubs.c 2013-11-20 19:25:53 UTC (rev 12724) +++ trunk/bindings/f95/scstubs.c 2013-11-20 22:58:00 UTC (rev 12725) @@ -37,7 +37,7 @@ static void ( STDCALL *plmapform )( PLINT *, PLFLT *, PLFLT * ); // Note: slightly different prototype than // (*mapform)! // Slightly different to (*label_func) as we don't support PLPointer for -// additional data in f77. +// additional data in f95. // Note the hidden argument! static void ( STDCALL *pllabelfunc )( PLINT *, PLFLT *, char *, PLINT *, PLINT ); @@ -1347,7 +1347,6 @@ c_plslabelfunc( NULL, NULL ); } -// Provided for symmetry with FORTRAN 77 void PLSLABELFUNC_NONE( void ) { @@ -1462,7 +1461,6 @@ c_plstransform( NULL, NULL ); } -// Provided for symmetry with FORTRAN 77 void PLSTRANSFORM3( void ) { Modified: trunk/bindings/f95/sfstubsf95.f90 =================================================================== --- trunk/bindings/f95/sfstubsf95.f90 2013-11-20 19:25:53 UTC (rev 12724) +++ trunk/bindings/f95/sfstubsf95.f90 2013-11-20 22:58:00 UTC (rev 12725) @@ -23,15 +23,12 @@ ! ! ! This file contains the interfaces for Fortran 95: -! - it includes the actual FORTRAN routines from the FORTRAN 77 bindings +! - it includes the actual FORTRAN routines from the FORTRAN 95 bindings ! - it includes interfaces to the C routines from these bindings ! - it defines a few Fortran 95 specific items and interfaces ! ! NB -! This module is written in fixed form, because that way we can reuse -! the FORTRAN 77 bindings (including the original file is not possible: -! the "end" statement has to be replaced by the "end subroutine" -! statement) +! This module is written in fixed form. ! To enable a redefinition of certain interfaces, we actually have ! two modules. ! @@ -1013,7 +1010,7 @@ real(kind=plflt), dimension(:) :: x, y integer :: center - call plbinf77( size(x), x, y, center ) + call plbinf95( size(x), x, y, center ) end subroutine plbin subroutine plcolorbar_1( p_colorbar_width, p_colorbar_height, & @@ -1097,38 +1094,38 @@ integer :: iflags iflags = convert_to_int( flags ) - call plcpstrmf77( iplsr, iflags ) + call plcpstrmf95( iplsr, iflags ) end subroutine plcpstrm subroutine plerrx( xmin, xmax, y ) real(kind=plflt), dimension(:) :: xmin, xmax, y - call plerrxf77( size(xmin), xmin, xmax, y ) + call plerrxf95( size(xmin), xmin, xmax, y ) end subroutine plerrx subroutine plerry( x, ymin, ymax ) real(kind=plflt), dimension(:) :: x, ymin, ymax - call plerryf77( size(x), x, ymin, ymax ) + call plerryf95( size(x), x, ymin, ymax ) end subroutine plerry subroutine plfill( x, y ) real(kind=plflt), dimension(:) :: x, y - call plfillf77( size(x), x, y ) + call plfillf95( size(x), x, y ) end subroutine plfill subroutine plfill3( x, y, z ) real(kind=plflt), dimension(:) :: x, y, z - call plfill3f77( size(x), x, y, z ) + call plfill3f95( size(x), x, y, z ) end subroutine plfill3 subroutine plgradient( x, y, angle ) real(kind=plflt), dimension(:) :: x, y real(kind=plflt) :: angle - call plgradientf77( size(x), x, y, angle ) + call plgradientf95( size(x), x, y, angle ) end subroutine plgradient subroutine plgriddata( x, y, z, xg, yg, zg, type, data ) @@ -1137,7 +1134,7 @@ real(kind=plflt) :: data integer :: type - call plgriddataf77( x, y, z, size(x), xg, size(xg), yg, size(yg), zg, & + call plgriddataf95( x, y, z, size(x), xg, size(xg), yg, size(yg), zg, & type, data ) return @@ -1148,7 +1145,7 @@ real(kind=plflt) :: datmin, datmax integer :: nbin, oldwin - call plhistf77( size(data), data, datmin, datmax, nbin, oldwin ) + call plhistf95( size(data), data, datmin, datmax, nbin, oldwin ) end subroutine plhist ! subroutine plimagefr( idata, xmin, xmax, ymin, ymax, zmin, zmax, & @@ -1162,7 +1159,7 @@ ! ! nx = size(idata,1) ! ny = size(idata,2) -! call plimagefrf77( idata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, & +! call plimagefrf95( idata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, & ! dxmin, dxmax, dymin, dymax, valuemin, valuemax ) ! end subroutine plimagefr @@ -1176,7 +1173,7 @@ nx = size(idata,1) ny = size(idata,2) - call plimagef77( idata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, & + call plimagef95( idata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, & dxmin, dxmax, dymin, dymax ) end subroutine plimage @@ -1279,13 +1276,13 @@ subroutine plline( x, y ) real(kind=plflt), dimension(:) :: x, y - call pllinef77( size(x), x, y ) + call pllinef95( size(x), x, y ) end subroutine plline subroutine plline3( x, y, z ) real(kind=plflt), dimension(:) :: x, y, z - call plline3f77( size(x), x, y, z ) + call plline3f95( size(x), x, y, z ) end subroutine plline3 subroutine plmap1(mapform,mapname,minx,maxx,miny,maxy) @@ -1347,7 +1344,7 @@ real(kind=plflt), dimension(:) :: x, y real(kind=plflt), dimension(:,:) :: z - call plmeshf77( x, y, z, size(x), size(y), opt, size(x)) + call plmeshf95( x, y, z, size(x), size(y), opt, size(x)) end subroutine plmesh @@ -1356,7 +1353,7 @@ real(kind=plflt), dimension(:) :: x, y, clevel real(kind=plflt), dimension(:,:) :: z - call plmeshcf77( x, y, z, size(x), size(y), opt, & + call plmeshcf95( x, y, z, size(x), size(y), opt, & clevel, size(clevel), size(x)) end subroutine plmeshc @@ -1369,7 +1366,7 @@ integer :: iside iside = convert_to_int(side) - call plot3df77( x, y, z, size(x), size(y), opt, iside, size(x)) + call plot3df95( x, y, z, size(x), size(y), opt, iside, size(x)) end subroutine plot3d @@ -1378,7 +1375,7 @@ real(kind=plflt), dimension(:) :: x, y, clevel real(kind=plflt), dimension(:,:) :: z - call plot3dcf77( x, y, z, size(x), size(y), opt, clevel, & + call plot3dcf95( x, y, z, size(x), size(y), opt, clevel, & size(clevel), size(x)) end subroutine plot3dc @@ -1389,7 +1386,7 @@ integer :: ipause ipause = convert_to_int( lpause ) - call plspausef77( ipause ) + call plspausef95( ipause ) end subroutine plspause subroutine plsurf3d( x, y, z, opt, clevel ) @@ -1397,7 +1394,7 @@ real(kind=plflt), dimension(:) :: x, y, clevel real(kind=plflt), dimension(:,:) :: z - call plsurf3df77( x, y, z, size(x), size(y), opt, clevel, & + call plsurf3df95( x, y, z, size(x), size(y), opt, clevel, & size(clevel), size(x)) end subroutine plsurf3d @@ -1406,14 +1403,14 @@ integer :: code real(kind=plflt), dimension(:) :: x, y - call plpoinf77( size(x), x, y, code ) + call plpoinf95( size(x), x, y, code ) end subroutine plpoin subroutine plpoin3( x, y, z, code ) integer :: code real(kind=plflt), dimension(:) :: x, y, z - call plpoin3f77( size(x), x, y, z, code ) + call plpoin3f95( size(x), x, y, z, code ) end subroutine plpoin3 subroutine plpoly3( x, y, z, draw, ifcc ) @@ -1429,40 +1426,40 @@ do i = 1,size(draw) idraw(i) = convert_to_int( draw(i) ) enddo - call plpoly3f77( size(x), x, y, z, idraw, iifcc ) + call plpoly3f95( size(x), x, y, z, idraw, iifcc ) end subroutine plpoly3 real (kind=plflt) function plrandd() - external plranddf77 - real(kind=plflt) :: plranddf77 + external plranddf95 + real(kind=plflt) :: plranddf95 - plrandd = plranddf77() + plrandd = plranddf95() end function plrandd subroutine plscmap0( r, g, b ) integer, dimension(:) :: r, g, b - call plscmap0f77( r, g, b, size(r) ) + call plscmap0f95( r, g, b, size(r) ) end subroutine plscmap0 subroutine plscmap0a( r, g, b, a ) integer, dimension(:) :: r, g, b real(kind=plflt), dimension(:) :: a - call plscmap0af77( r, g, b, a, size(r) ) + call plscmap0af95( r, g, b, a, size(r) ) end subroutine plscmap0a subroutine plscmap1( r, g, b ) integer, dimension(:) :: r, g, b - call plscmap1f77( r, g, b, size(r) ) + call plscmap1f95( r, g, b, size(r) ) end subroutine plscmap1 subroutine plscmap1a( r, g, b, a ) integer, dimension(:) :: r, g, b real(kind=plflt), dimension(:) :: a - call plscmap1af77( r, g, b, a, size(r) ) + call plscmap1af95( r, g, b, a, size(r) ) end subroutine plscmap1a subroutine plscmap1l( rgbtype, intensity, coord1, coord2, coord3, alt_hue_path) @@ -1478,7 +1475,7 @@ do i = 1,size(alt_hue_path) ialt_hue_path(i) = convert_to_int( alt_hue_path(i) ) enddo - call plscmap1lf77( type, size(intensity), intensity, coord1, coord2, coord3, ialt_hue_path ) + call plscmap1lf95( type, size(intensity), intensity, coord1, coord2, coord3, ialt_hue_path ) end subroutine plscmap1l subroutine plscmap1l2( rgbtype, intensity, coord1, coord2, coord3) @@ -1488,7 +1485,7 @@ integer :: type type = convert_to_int( rgbtype ) - call plscmap1l2f77( type, size(intensity), intensity, coord1, coord2, coord3) + call plscmap1l2f95( type, size(intensity), intensity, coord1, coord2, coord3) end subroutine plscmap1l2 subroutine plscmap1la( rgbtype, intensity, coord1, coord2, coord3, a, alt_hue_path) @@ -1504,7 +1501,7 @@ do i = 1,size(alt_hue_path) ialt_hue_path(i) = convert_to_int( alt_hue_path(i) ) enddo - call plscmap1laf77( type, size(intensity), intensity, coord1, coord2, coord3, a, ialt_hue_path ) + call plscmap1laf95( type, size(intensity), intensity, coord1, coord2, coord3, a, ialt_hue_path ) end subroutine plscmap1la subroutine plscmap1la2( rgbtype, intensity, coord1, coord2, coord3, a) @@ -1514,7 +1511,7 @@ integer :: type type = convert_to_int( rgbtype ) - call plscmap1la2f77( type, size(intensity), intensity, coord1, coord2, coord3, a) + call plscmap1la2f95( type, size(intensity), intensity, coord1, coord2, coord3, a) end subroutine plscmap1la2 subroutine plstripc(id, xspec, yspec, xmin, xmax, xjump, & @@ -1553,7 +1550,7 @@ s7 = transfer( string7, s7 ) s8 = transfer( string8, s8 ) s9 = transfer( string9, s9 ) - call plstripcf77(id, s1, s2, xmin, xmax, xjump, & + call plstripcf95(id, s1, s2, xmin, xmax, xjump, & ymin, ymax, xlpos, ylpos, iy_ascl, iacc, & colbox, collab, colline, styline, & s3, s4, s5, s6, & @@ -1567,21 +1564,21 @@ integer ifill ifill = convert_to_int(fill) - call plsvectf77( arrowx, arrowy, size(arrowx), ifill ) + call plsvectf95( arrowx, arrowy, size(arrowx), ifill ) end subroutine plsvect subroutine plsym( x, y, code ) integer :: code real(kind=plflt), dimension(:) :: x, y - call plsymf77( size(x), x, y, code ) + call plsymf95( size(x), x, y, code ) end subroutine plsym subroutine plxormod( mode, status ) logical :: mode, status integer :: imode, istatus imode = convert_to_int(mode) - call plxormodf77( imode, istatus) + call plxormodf95( imode, istatus) status = convert_to_log(istatus) end subroutine plxormod end module plplot Modified: trunk/cmake/FindPLplot.cmake =================================================================== --- trunk/cmake/FindPLplot.cmake 2013-11-20 19:25:53 UTC (rev 12724) +++ trunk/cmake/FindPLplot.cmake 2013-11-20 22:58:00 UTC (rev 12725) @@ -36,15 +36,6 @@ set( PLplot_LIBRARIES ${PLplot_LIBRARIES} ${PLplot_cxx_LIBRARY} ) endif( PLplot_cxx_LIBRARY ) - # find f77 bindings - find_library( PLplot_f77_LIBRARY - NAMES plplotf77d - PATHS /usr/local/lib /usr/lib - ) - if( PLplot_f77_LIBRARY ) - set( PLplot_LIBRARIES ${PLplot_LIBRARIES} ${PLplot_f77_LIBRARY} ) - endif( PLplot_f77_LIBRARY ) - # find f90 bindings find_library( PLplot_f90_LIBRARY NAMES plplotf90d Deleted: trunk/cmake/modules/TestF77CmdLine.cmake =================================================================== --- trunk/cmake/modules/TestF77CmdLine.cmake 2013-11-20 19:25:53 UTC (rev 12724) +++ trunk/cmake/modules/TestF77CmdLine.cmake 2013-11-20 22:58:00 UTC (rev 12725) @@ -1,53 +0,0 @@ -# cmake/modules/TestF77CmdLine.cmake -# -# F77 binding configuration -# -# Copyright (C) 2006 Andrew Ross -# -# 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; version 2 of the License. -# -# 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 the file PLplot; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -# Check if iargc() works -IF(NOT DEFINED CMAKE_F77_CMD_LINE) - MESSAGE(STATUS "Check for f77 command line support") - TRY_COMPILE(CMAKE_F77_CMD_LINE - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/cmake/modules/TestF77CmdLine.f - OUTPUT_VARIABLE OUTPUT) - -# Iargc support is broken for with g77 and shared libraries on cygwin -# (as of 2005-12-05, but this problem has been known -# for several years, see http://cygwin.com/ml/cygwin/2005-11/msg00891.html). - IF (CYGWIN AND CMAKE_Fortran_COMPILER_ID MATCHES ".*g77.*") - MESSAGE(STATUS "Check for f77 command line support - turning off - ${CMAKE_Fortran_COMPILER_ID} ") - SET (CMAKE_F77_CMD_LINE OFF) - ENDIF (CYGWIN AND CMAKE_Fortran_COMPILER_ID MATCHES ".*g77.*") - - IF (CMAKE_F77_CMD_LINE) - MESSAGE(STATUS "Check for f77 command line support - found") - SET (F77_CMD_LINE 1 CACHE INTERNAL - "Does the f77 compiler support command line arguments") - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log - "Determining if the f77 compiler has command line argument support passed with " - "the following output:\n${OUTPUT}\n\n") - ELSE (CMAKE_F77_CMD_LINE) - MESSAGE(STATUS "Check for f77 command line support - not found") - SET (F77_CMD_LINE 0 CACHE INTERNAL - "Does the f77 compiler support command line arguments") - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log - "Determining if the f77 compiler has command line argument support failed with " - "the following output:\n${OUTPUT}\n\n") - ENDIF (CMAKE_F77_CMD_LINE) -ENDIF(NOT DEFINED CMAKE_F77_CMD_LINE) Deleted: trunk/cmake/modules/TestF77CmdLine.f =================================================================== --- trunk/cmake/modules/TestF77CmdLine.f 2013-11-20 19:25:53 UTC (rev 12724) +++ trunk/cmake/modules/TestF77CmdLine.f 2013-11-20 22:58:00 UTC (rev 12725) @@ -1,21 +0,0 @@ - implicit none - character*100 command - integer narg, iargc -c get number of command-line arguments - narg = iargc() -c get command name. Apparently this does not always give back the -c command name on all systems, but all that is required for the -c getarg(0 call by the interface logic is that a valid string is -c returned. (All we are really interested in is the subsequent -c arguments.) - call getarg(0, command) - if(narg.gt.0) call getarg(1, command) -c ran into one case (Cygwin) where under certain badly linked -c circumstances, iargc() could return -1 - if(narg.lt.0) then - call exit(0) - else - call exit(1) - endif - stop - end Modified: trunk/cmake/modules/fortran.cmake =================================================================== --- trunk/cmake/modules/fortran.cmake 2013-11-20 19:25:53 UTC (rev 12724) +++ trunk/cmake/modules/fortran.cmake 2013-11-20 22:58:00 UTC (rev 12725) @@ -1,6 +1,6 @@ # cmake/modules/fortran.cmake # -# F77/F95 binding configuration +# F95 binding configuration # # Copyright (C) 2006 Andrew Ross # @@ -19,41 +19,33 @@ # along with the file PLplot; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# Module for determining F77/F95 bindings configuration options +# Module for determining F95 bindings configuration options # Options to enable Fortran bindings if(DEFAULT_NO_BINDINGS) - option(ENABLE_f77 "Enable f77 bindings" OFF) option(ENABLE_f95 "Enable f95 bindings" OFF) else(DEFAULT_NO_BINDINGS) - option(ENABLE_f77 "Enable f77 bindings" OFF) option(ENABLE_f95 "Enable f95 bindings" ON) endif(DEFAULT_NO_BINDINGS) -if(ENABLE_f77 OR ENABLE_f95) - set(ENABLE_fortran ON) -endif(ENABLE_f77 OR ENABLE_f95) - -if(ENABLE_fortran AND NOT PLPLOT_Fortran_COMPILER_WORKS) +if(Enable_f95 AND NOT PLPLOT_Fortran_COMPILER_WORKS) workaround_9220(Fortran PLPLOT_Fortran_COMPILER_WORKS) if(NOT PLPLOT_Fortran_COMPILER_WORKS) message(STATUS "WARNING: no working Fortran compiler so disabling Fortran bindings and examples.") - set(ENABLE_f77 OFF CACHE BOOL "Enable f77 bindings" FORCE) set(ENABLE_f95 OFF CACHE BOOL "Enable f95 bindings" FORCE) endif(NOT PLPLOT_Fortran_COMPILER_WORKS) -endif(ENABLE_fortran AND NOT PLPLOT_Fortran_COMPILER_WORKS) +endif(Enable_f95 AND NOT PLPLOT_Fortran_COMPILER_WORKS) -if(ENABLE_f77 OR ENABLE_f95) +if(ENABLE_f95) # Find and check Fortran compiler. enable_language(Fortran OPTIONAL) if(NOT CMAKE_Fortran_COMPILER_WORKS) message(STATUS "WARNING: no working Fortran compiler so disabling Fortran bindings and examples.") - set(ENABLE_f77 OFF CACHE BOOL "Enable f77 bindings" FORCE) set(ENABLE_f95 OFF CACHE BOOL "Enable f95 bindings" FORCE) endif(NOT CMAKE_Fortran_COMPILER_WORKS) -endif(ENABLE_f77 OR ENABLE_f95) +endif(ENABLE_f95) -if(ENABLE_f77 OR ENABLE_f95) +if(ENABLE_f95) # Don't compile Fortran 95 binding if compiler doesn't support it if(ENABLE_f95 AND NOT CMAKE_Fortran_COMPILER_SUPPORTS_F90) message(STATUS "WARNING: " @@ -62,25 +54,17 @@ set(ENABLE_f95 OFF CACHE BOOL "Enable f95 bindings" FORCE) endif(ENABLE_f95 AND NOT CMAKE_Fortran_COMPILER_SUPPORTS_F90) - # Set installation location for f77 include files - set(F77_INCLUDE_DIR ${LIB_DIR}/fortran/include/${PACKAGE} - CACHE PATH "installation location for f95 modules" - ) - # Set installation location for f95 modules. set(F95_MOD_DIR ${LIB_DIR}/fortran/modules/${PACKAGE} CACHE PATH "installation location for f95 modules" ) - # Check if f77/f95 style command line parsing is possible - include(TestF77CmdLine) - # Check if isnan is available as a fortran function include(TestFortranIsnan) # Determine which Fortran compiler we have. We do not need to # this for all compilers, just the ones that have a test in - # bindings/f77/plstubs.h and bindings/f95/plstubs.h + # bindings/f95/plstubs.h message(STATUS "NOTICE: " "Found: ${CMAKE_Fortran_COMPILER}") if(CMAKE_Fortran_COMPILER MATCHES ".*/ifort.*") @@ -101,4 +85,4 @@ set(TARGET_FORTRAN "CVF" CACHE STRING "Target Fortran Compiler") endif(CMAKE_Fortran_COMPILER MATCHES ".*/F90.*" AND WIN32_OR_CYGWIN) -endif(ENABLE_f77 OR ENABLE_f95) +endif(ENABLE_f95) Modified: trunk/cmake/modules/plplot_version.cmake =================================================================== --- trunk/cmake/modules/plplot_version.cmake 2013-11-20 19:25:53 UTC (rev 12724) +++ trunk/cmake/modules/plplot_version.cmake 2013-11-20 22:58:00 UTC (rev 12725) @@ -52,9 +52,6 @@ set(plplotdmd_SOVERSION 1) set(plplotdmd_VERSION ${plplotdmd_SOVERSION}.0.0) -set(plplotf77_SOVERSION 9) -set(plplotf77_VERSION ${plplotf77_SOVERSION}.1.1) - set(plplotf95_SOVERSION 10) set(plplotf95_VERSION ${plplotf95_SOVERSION}.0.0) Modified: trunk/cmake/modules/summary.cmake =================================================================== --- trunk/cmake/modules/summary.cmake 2013-11-20 19:25:53 UTC (rev 12724) +++ trunk/cmake/modules/summary.cmake 2013-11-20 22:58:00 UTC (rev 12725) @@ -74,13 +74,13 @@ CMAKE_CXX_COMPILER CMAKE_CXX_FLAGS: ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS}") endif(CMAKE_CXX_COMPILER_WORKS) -if(ENABLE_f77 OR ENABLE_f95) +if(ENABLE_f95) set( _output_results "${_output_results} CMAKE_Fortran_COMPILER CMAKE_Fortran_FLAGS: ${CMAKE_Fortran_COMPILER} ${CMAKE_Fortran_FLAGS} Target Fortran: ${TARGET_FORTRAN}") -endif(ENABLE_f77 OR ENABLE_f95) +endif(ENABLE_f95) if(ENABLE_python) set( @@ -110,15 +110,23 @@ HAVE_AGG: ${HAVE_AGG} HAVE_SHAPELIB: ${HAVE_SHAPELIB} Language Bindings: -ENABLE_f77: ${ENABLE_f77} ENABLE_f95: ${ENABLE_f95} -ENABLE_cxx: ${ENABLE_cxx} ENABLE_java: ${ENABLE_java} -ENABLE_python: ${ENABLE_python} ENABLE_octave: ${ENABLE_octave} -ENABLE_tcl: ${ENABLE_tcl} ENABLE_itcl: ${ENABLE_itcl} -ENABLE_tk: ${ENABLE_tk} ENABLE_itk: ${ENABLE_itk} -ENABLE_pdl: ${ENABLE_pdl} ENABLE_wxwidgets: ${ENABLE_wxwidgets} -ENABLE_ada: ${ENABLE_ada} ENABLE_d: ${ENABLE_d} -ENABLE_ocaml: ${ENABLE_ocaml} ENABLE_lua: ${ENABLE_lua} -ENABLE_qt: ${ENABLE_qt} ENABLE_pyqt4: ${ENABLE_pyqt4} +ENABLE_ada: ${ENABLE_ada} +ENABLE_cxx: ${ENABLE_cxx} +ENABLE_d: ${ENABLE_d} +ENABLE_f95: ${ENABLE_f95} +ENABLE_java: ${ENABLE_java} +ENABLE_lua: ${ENABLE_lua} +ENABLE_ocaml: ${ENABLE_ocaml} +ENABLE_octave: ${ENABLE_octave} +ENABLE_pdl: ${ENABLE_pdl} +ENABLE_python: ${ENABLE_python} +ENABLE_qt: ${ENABLE_qt} +ENABLE_pyqt4: ${ENABLE_pyqt4} +ENABLE_tcl: ${ENABLE_tcl} +ENABLE_itcl: ${ENABLE_itcl} +ENABLE_tk: ${ENABLE_tk} +ENABLE_itk: ${ENABLE_itk} +ENABLE_wxwidgets: ${ENABLE_wxwidgets} ") message("${_output_results}") endmacro(summary) Modified: trunk/doc/Doxyfile.in =================================================================== --- trunk/doc/Doxyfile.in 2013-11-20 19:25:53 UTC (rev 12724) +++ trunk/doc/Doxyfile.in 2013-11-20 22:58:00 UTC (rev 12725) @@ -705,8 +705,7 @@ # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = "@CMAKE_BINARY_DIR@/bindings/f77/plplot_parameters.h" \ - "@CMAKE_SOURCE_DIR@/bindings/f95/plplot_parameters.h" \ +EXCLUDE = "@CMAKE_SOURCE_DIR@/bindings/f95/plplot_parameters.h" \ "@CMAKE_BINARY_DIR@/bindings/f95/plplot_parameters.h" \ "@CMAKE_SOURCE_DIR@/bindings/python/plplot.py" \ "@CMAKE_BINARY_DIR@/bindings/python/plplot.py" Modified: trunk/doc/docbook/src/CMakeLists.txt =================================================================== --- trunk/doc/docbook/src/CMakeLists.txt 2013-11-20 19:25:53 UTC (rev 12724) +++ trunk/doc/docbook/src/CMakeLists.txt 2013-11-20 22:58:00 UTC (rev 12725) @@ -47,14 +47,12 @@ ${CMAKE_CURRENT_SOURCE_DIR}/api.xml ${CMAKE_CURRENT_SOURCE_DIR}/api-c.xml ${CMAKE_CURRENT_SOURCE_DIR}/api-compat.xml - ${CMAKE_CURRENT_SOURCE_DIR}/api-fortran77.xml ${CMAKE_CURRENT_SOURCE_DIR}/api-fortran95.xml ${CMAKE_CURRENT_SOURCE_DIR}/api-internal.xml ${CMAKE_CURRENT_SOURCE_DIR}/api-obsolete.xml ${CMAKE_CURRENT_SOURCE_DIR}/bibliography.xml ${CMAKE_CURRENT_SOURCE_DIR}/c.xml ${CMAKE_CURRENT_SOURCE_DIR}/deploying.xml - ${CMAKE_CURRENT_SOURCE_DIR}/fortran77.xml ${CMAKE_CURRENT_SOURCE_DIR}/fortran95.xml ${CMAKE_CURRENT_SOURCE_DIR}/cplus.xml ${CMAKE_CURRENT_SOURCE_DIR}/drivers.xml Modified: trunk/doc/docbook/src/advanced.xml =================================================================== --- trunk/doc/docbook/src/advanced.xml 2013-11-20 19:25:53 UTC (rev 12724) +++ trunk/doc/docbook/src/advanced.xml 2013-11-20 22:58:00 UTC (rev 12725) @@ -2553,7 +2553,7 @@ use non-continuous line styles. Further, one may specify arbitrary coordinate mappings from array indices to world coordinates, such as for contours in a polar coordinate system. In this case it is best - to draw the distinction between the C, Fortran 95, and Fortran 77 + to draw the distinction between the C and Fortran 95 interfaces so these are handled in turn. </para> @@ -2656,194 +2656,6 @@ </para> </sect2> - <sect2 id="contour-plots-f77"> - <title>Contour Plots from the Fortran 77 interface</title> - - <para> - The routines mentioned above are not recommended for use directly - from Fortran 77 due to the need to pass a function pointer. That is, - the transformation function is written in C and can not generally - be changed by the user. The call for routine &plcontfortran77; from - Fortran 77 is then: - </para> - - <para> - <funcsynopsis> - <funcprototype> - <funcdef> - call <function>plcont</function> - </funcdef> - <paramdef><parameter>z</parameter></paramdef> - <paramdef><parameter>nx</parameter></paramdef> - <paramdef><parameter>ny</parameter></paramdef> - <paramdef><parameter>kx</parameter></paramdef> - <paramdef><parameter>lx</parameter></paramdef> - <paramdef><parameter>ky</parameter></paramdef> - <paramdef><parameter>ly</parameter></paramdef> - <paramdef><parameter>clevel</parameter></paramdef> - <paramdef><parameter>nlevel</parameter></paramdef> - </funcprototype> - </funcsynopsis> - </para> - - <para> - When called from Fortran 77, this routine has the same effect as when invoked - from C. The interpretation of all parameters (see &plcont;) is also the - same except there is no transformation function supplied as the last - parameter. Instead, a 6-element array specifying coefficients to use in the - transformation is supplied via the named common block - <literal>plplot</literal> (see code). - Since this approach is somewhat - inflexible, the user is recommended to call either of &plcon0;, &plcon1;, or - &plcon2; instead for Fortran 77. - </para> - - <para> - The three routines recommended for use from Fortran 77 are &plcon0;, - &plcon1;, and &plcon2;. These routines are similar to existing - commercial plot package contour plotters in that they offer - successively higher complexity, with &plcon0; utilizing no - transformation arrays, while those used by &plcon1; and &plcon2; - are one and two dimensional, respectively. The call syntax for - each is - </para> - - <para> - <funcsynopsis> - <funcprototype> - <funcdef> - call <function>plcon0</function> - </funcdef> - <paramdef><parameter>z</parameter></paramdef> - <paramdef><parameter>nx</parameter></paramdef> - <paramdef><parameter>ny</parameter></paramdef> - <paramdef><parameter>kx</parameter></paramdef> - <paramdef><parameter>lx</parameter></paramdef> - <paramdef><parameter>ky</parameter></paramdef> - <paramdef><parameter>ly</parameter></paramdef> - <paramdef><parameter>clevel</parameter></paramdef> - <paramdef><parameter>nlevel</parameter></paramdef> - </funcprototype> - </funcsynopsis> - - <funcsynopsis> - <funcprototype> - <funcdef> - call <function>plcon1</function> - </funcdef> - <paramdef><parameter>z</parameter></paramdef> - <paramdef><parameter>nx</parameter></paramdef> - <paramdef><parameter>ny</parameter></paramdef> - <paramdef><parameter>kx</parameter></paramdef> - <paramdef><parameter>lx</parameter></paramdef> - <paramdef><parameter>ky</parameter></paramdef> - <paramdef><parameter>ly</parameter></paramdef> - <paramdef><parameter>clevel</parameter></paramdef> - <paramdef><parameter>nlevel</parameter></paramdef> - <paramdef><parameter>xg1</parameter></paramdef> - <paramdef><parameter>yg1</parameter></paramdef> - </funcprototype> - </funcsynopsis> - - <funcsynopsis> - <funcprototype> - <funcdef> - call <function>plcon2</function> - </funcdef> - <paramdef><parameter>z</parameter></paramdef> - <paramdef><parameter>nx</parameter></paramdef> - <paramdef><parameter>ny</parameter></paramdef> - <paramdef><parameter>kx</parameter></paramdef> - <paramdef><parameter>lx</parameter></paramdef> - <paramdef><parameter>ky</parameter></paramdef> - <paramdef><parameter>ly</parameter></paramdef> - <paramdef><parameter>clevel</parameter></paramdef> - <paramdef><parameter>nlevel</parameter></paramdef> - <paramdef><parameter>xg2</parameter></paramdef> - <paramdef><parameter>yg2</parameter></paramdef> - </funcprototype> - </funcsynopsis> - </para> - - <para> - The &plcon0; routine is implemented via a call to &plcont; with a - very simple (identity) transformation function, while &plcon1; and - &plcon2; use interpolating transformation functions as well as - a call to - &plcont;. - </para> - - <para> - The transformation arrays are used by these routines to specify a - mapping between the computational coordinate system and the - physical one. For example, the transformation to polar coordinates - might look like: - </para> - - <para> - <programlisting> do i = 1, NX - do j = 1, NY - xg(i, j) = r(i) * cos( theta(j) ) - yg(i, j) = r(i) * sin( theta(j) ) - enddo - enddo</programlisting> - </para> - - <para> - assuming the user had already set up arrays <literal>r</literal> - and <literal>theta</literal> to specify the (r, θ) values at - the gridpoints in his system. For this example, it is recommended - that the user add an additional cell in theta such that - <literal>xg(i, NY+1) = xg(i, 1)</literal> and <literal>yg(i, NY+1) - = yg(i, 1)</literal> so that the contours show the proper periodic - behavior in θ (see also example program 9). - </para> - - <para> - The transformation function not only specifies the transformation - at grid points, but also at intermediate locations, via linear - interpolation. For example, in the <literal>pltr1</literal> - transformation function used by &plcon1;, the 1-d interpolation to - get <literal>tx</literal> as a function of <literal>x</literal> - looks like (in C): - </para> - - <para> - <programlisting> ul = (PLINT)x; - ur = ul + 1; - du = x - ul; - - xl = *(xg+ul); - xr = *(xg+ur); - - *tx = xl * (1-du) + xr * du;</programlisting> - </para> - - <para> - while in Fortran 77 this might look like: - </para> - - <para> - <programlisting> lxl = x - lxr = lxl + 1 - dx = x - lxl - - xl = xg(lxl) - xr = xg(lxr) - - tx = xl * (1-dx) + xr * dx</programlisting> - </para> - - </sect2> - - <sect2 id="shade-plots-f77"> - <title>Shade Plots from the Fortran 77 interface</title> - <para> - NEEDS DOCUMENTATION. Follow the plshade* and plshades* usage in - <filename>examples/f77/x??f.f</filename>. - </para> - </sect2> - </sect1> <sect1 id="legends"> Modified: trunk/doc/docbook/src/api-c.xml =================================================================== --- trunk/doc/docbook/src/api-c.xml 2013-11-20 19:25:53 UTC (rev 12724) +++ trunk/doc/docbook/src/api-c.xml 2013-11-20 22:58:00 UTC (rev 12725) @@ -92,7 +92,7 @@ </variablelist> <para> - This function is currently available in C, f77, f95 and python. + This function is currently available in C, f95 and python. </para> <para> Deleted: trunk/doc/docbook/src/api-fortran77.xml =================================================================== --- trunk/doc/docbook/src/api-fortran77.xml 2013-11-20 19:25:53 UTC (rev 12724) +++ trunk/doc/docbook/src/api-fortran77.xml 2013-11-20 22:58:00 UTC (rev 12725) @@ -1,1024 +0,0 @@ -<!-- -*- mode: nxml -*- --> -<!-- - api-fortran77.xml: "The Specialized Fortran 77 API for PLplot" chapter - -Copyright (C) 1994 Geoffrey Furnish and Maurice LeBrun -Copyright (C) 1999, 2000, 2001, 2002, 2003 Rafael Laboissiere -Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Alan W. Irwin -Copyright (C) 2003 Joao Cardoso -Copyright (C) 2004 Andrew Ross - -Redistribution and use in source (XML DocBook) and "compiled" forms -(HTML, PDF, PostScript, DVI, TeXinfo and so forth) with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code (XML DocBook) must retain the -above copyright notice, this list of conditions and the following -disclaimer as the first lines of this file unmodified. - -2. Redistributions in compiled form (transformed to other DTDs, -converted to HTML, PDF, PostScript, and other formats) must -reproduce the above copyright notice, this list of conditions and -the following disclaimer in the documentation and/or other -materials provided with the distribution. - -Important: THIS DOCUMENTATION IS PROVIDED BY THE PLPLOT PROJECT "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PLPLOT PROJECT BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---> - -<chapter id="API-FORTRAN-77"> - <title>The Specialized Fortran 77 API for PLplot</title> - - <para> - The purpose of this Chapter is to document the API for each Fortran 77 function - in PLplot that differs substantially (usually in argument lists) - from the common API that has already been - documented in <xref linkend="API"/>. - </para> - - <para> - Normally, the common API is wrapped in such a way for Fortran 77 that there is - and one-to-one correspondence between each Fortran 77 and C argument - (see <xref linkend="fortran77"/> - for discussion). However, for certain routines documented in this - chapter the Fortran 77 argument lists - necessarily differ substantially from the C versions. - </para> - - <para> - This chapter is incomplete and NEEDS DOCUMENTATION of, e.g., the Fortran 77 - equivalent of the plshade C routines. - </para> - - - <sect1 id="plcon0" renderas="sect3"> - <title> - <function>plcon0</function>: Contour plot, identity mapping for Fortran 77 - </title> - - <para> - <funcsynopsis> - <funcprototype> - <funcdef> - <function>plcon0</function> - </funcdef> - <paramdef><parameter>z</parameter></paramdef> - <paramdef><parameter>nx</parameter></paramdef> - <paramdef><parameter>ny</parameter></paramdef> - <paramdef><parameter>kx</parameter></paramdef> - <paramdef><parameter>lx</parameter></paramdef> - <paramdef><parameter>ky</parameter></paramdef> - <paramdef><parameter>ly</parameter></paramdef> - <paramdef><parameter>clevel</parameter></paramdef> - <paramdef><parameter>nlevel</parameter></paramdef> - </funcprototype> - </funcsynopsis> - </para> - - <para> - Draws a contour plot of the data in - <literal><parameter>z</parameter>[<parameter>nx</parameter>][<parameter>ny</parameter>]</literal>, - using the <literal><parameter>nlevel</parameter></literal> contour - levels specified by <literal><parameter>clevel</parameter></literal>. - Only the region of the array from - <literal><parameter>kx</parameter></literal> to - <literal><parameter>lx</parameter></literal> and from - <literal><parameter>ky</parameter></literal> to - <literal><parameter>ly</parameter></literal> is plotted out. See - <xref linkend="contour-plots"/> for more information. - </para> - - <variablelist> - <varlistentry> - <term> - <parameter>z</parameter> - (<literal>PLFLT **</literal>, input) - </term> - <listitem> - <para> - Pointer to a vectored two-dimensional array containing data to - be contoured. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - <parameter>nx, ny</parameter> - (<literal>PLINT</literal>, input) - </term> - <listitem> - <para> - Physical dimensions of array - <literal><parameter>z</parameter></literal>. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - <parameter>kx, lx</parameter> - (<literal>PLINT</literal>, input) - </term> - <listitem> - <para> - Range of <literal>x</literal> indices to consider. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - <parameter>ky, ly</parameter> - (<literal>PLINT</literal>, input) - </term> - <listitem> - <para> - Range of <literal>y</literal> indices to consider. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - <parameter>clevel</parameter> - (<literal>PLFLT *</literal>, input) - </term> - <listitem> - <para> - Pointer to array specifying levels at which to draw contours. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - <parameter>nlevel</parameter> - (<literal>PLINT</literal>, input) - </term> - <listitem> - <para> - Number of contour levels to draw. - </para> - </listitem> - </varlistentry> - </variablelist> - <para> - NOTE: this function is intended for use from a Fortran 77 caller only. - The C user should instead call &plcont; using the built-in - transformation function <function>pltr0</function> for the same - capability. - </para> - </sect1> - - <sect1 id="plcon1" renderas="sect3"> - <title> - <function>plcon1</function>: Contour plot, general 1-d mapping for - Fortran 77 - </title> - - <para> - <funcsynopsis> - <funcprototype> - <funcdef> - <function>plcon1</function> - </funcdef> - <paramdef><parameter>z</parameter></paramdef> - <paramdef><parameter>nx</parameter></paramdef> - <paramdef><parameter>ny</parameter></paramdef> - <paramdef><parameter>kx</parameter></paramdef> - <paramdef><parameter>lx</parameter></paramdef> - <paramdef><parameter>ky</parameter></paramdef> - <paramdef><parameter>ly</parameter></paramdef> - <paramdef><parameter>clevel</parameter></paramdef> - <paramdef><parameter>nlevel</parameter></paramdef> - <paramdef><parameter>xg</parameter></paramdef> - <paramdef><parameter>yg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - </para> - - <para> - Draws a contour plot of the data in - <literal><parameter>z</parameter>[<parameter>nx</parameter>][<parameter>ny</parameter>]</literal>, - using the <literal><parameter>nlevel</parameter></literal> contour - levels specified by <literal><parameter>clevel</parameter></literal>. - Only the region of the array from - <literal><parameter>kx</parameter></literal> to - <literal><parameter>lx</parameter></literal> and from - <literal><parameter>ky</parameter></literal> to - <literal><parameter>ly</parameter></literal> is plotted out. The - arrays <literal><parameter>xg</parameter></literal> and - <literal><parameter>yg</parameter></literal> are used to specify the - transformation between array indices and world coordinates. See - <xref linkend="contour-plots"/> for more information. - </para> - - <variablelist> - <varlistentry> - <term> - <parameter>z</parameter> - (<literal>PLFLT **</literal>, input) - </term> - <listitem> - <para> - Pointer to a vectored two-dimensional array containing data to - be contoured. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - <parameter>nx, ny</parameter> - (<literal>PLINT</literal>, input) - </term> - <listitem> - <para> - Physical dimensions of array - <literal><parameter>z</parameter></literal>. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - <parameter>kx, lx</parameter> - (<literal>PLINT</literal>, input) - </term> - <listitem> - <para> - Range of <literal>x</literal> indices to consider. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - <parameter>ky, ly</parameter> - (<literal>PLINT</literal>, input) - </term> - <listitem> - <para> - Range of <literal>y</literal> indices to consider. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - <parameter>clevel</parameter> - (<literal>PLFLT *</literal>, input) - </term> - <listitem> - <para> - Pointer to array specifying levels at which to draw contours. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - <parameter>nlevel</parameter> - (<literal>PLINT</literal>, input) - </term> - <listitem> - <para> - Number of contour levels to draw. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - <parameter>xg, yg</parameter> - (<literal>PLFLT *</literal>, input) - </term> - <listitem> - <para> - Pointers to arrays which specify the transformation from array - indices to world coordinates. These must be one-dimensional - arrays, used for a transformation of the form: - <literal>tx</literal> = <literal>f(x)</literal>, - <literal>ty</literal> = <literal>f(y)</literal>. Function - values at locations between grid points are obtained via linear - interpolation. - </para> - </listitem> - </varlistentry> - </variablelist> - <para> - NOTE: this function is intended for use from a Fortran 77 caller only. - The C user should instead call &plcont; using the built-in - transformation function <function>pltr1</function> for the same - capability. - </para> - - </sect1> - - <sect1 id="plcon2" renderas="sect3"> - <title> - <function>plcon2</function>: Contour plot, general 2-d mapping for - Fortran 77 - </title> - - <para> - <funcsynopsis> - <funcprototype> - <funcdef> - <function>plcon2</function> - </funcdef> - <paramdef><parameter>z</parameter></paramdef> - <paramdef><parameter>nx</parameter></paramdef> - <paramdef><parameter>ny</parameter></paramdef> - <paramdef><parameter>kx</parameter></paramdef> - <paramdef><parameter>lx</parameter></paramdef> - <paramdef><parameter>ky</parameter></paramdef> - <paramdef><parameter>ly</parameter></paramdef> - <paramdef><parameter>clevel</parameter></paramdef> - <paramdef><parameter>nlevel</parameter></paramdef> - <paramdef><parameter>xg</parameter></paramdef> - <paramdef><parameter>yg</parameter></paramdef> - </funcprototype> - </funcsynopsis> - </para> - <para> - Draws a contour plot of the data in - <literal><parameter>z</parameter>[<parameter>nx</parameter>][<parameter>ny</parameter>]</literal>, - using the <literal><parameter>nlevel</parameter></literal> contour - levels specified by <literal><parameter>clevel</parameter></literal>. - Only the region of the array from - <literal><parameter>kx</parameter></literal> to - <literal><parameter>lx</parameter></literal> and from - <literal><parameter>ky</parameter></literal> to - <literal><parameter>ly</parameter></literal> is plotted out. The - arrays <literal><parameter>xg</parameter></literal> and - <literal><parameter>yg</parameter></literal> are used to specify the - transformation between array indices and world coordinates. See - <xref linkend="contour-plots"/> for more information. - </para> - - <variablelist> - <varlistentry> - <term> - <parameter>z</parameter> - (<literal>PLFLT **</literal>, input) - </term> - <listitem> - <para> - Pointer to a vectored two-dimensional array containing data to - be contoured. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - <parameter>nx, ny</parameter> - (<literal>PLINT</literal>, input) - </term> - <listitem> - <para> - Physical dimensions of array - <literal><parameter>z</parameter></literal>. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - <parameter>kx, lx</parameter> (<literal>PLINT</literal>, input) - </term> - <listitem> - <para> - Range of <literal>x</literal> indices to consider. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - <parameter>ky, ly</parameter> - (<literal>PLINT</literal>, input) - </term> - <listitem> - <para> - Range of <literal>y</literal> indices to consider. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term> - ... [truncated message content] |
From: <ai...@us...> - 2013-11-21 02:25:03
|
Revision: 12728 http://sourceforge.net/p/plplot/code/12728 Author: airwin Date: 2013-11-21 02:24:57 +0000 (Thu, 21 Nov 2013) Log Message: ----------- Completely update NEWS file to point to sources of news about PLplot. Modified Paths: -------------- trunk/NEWS Added Paths: ----------- trunk/OLD-NEWS Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2013-11-21 01:37:53 UTC (rev 12727) +++ trunk/NEWS 2013-11-21 02:24:57 UTC (rev 12728) @@ -1,597 +1,19 @@ -Late news first +This file contains no PLplot news. Instead it points to the places where +you can find such news. -************************* 5.1.0 NEWS *************************************** +For short news items about PLplot stretching back to +2001 look at http://sourceforge.net/p/plplot/news/?source=navbar -Important Changes to Existing Features +For current release notes see README.release -The Windows port of PLplot has been completely refurbished. PLplot now -runs on Windows 98 (and perhaps even Windows 95 although that is -untested), Windows NT, and Windows 2000. See -plplot/sys/win32/msdev/README.TXT and -plplot/sys/win32/msdev/INSTALL.TXT for details. Please direct all -questions about this Windows port to Olof Svensson. - -The examples were extensively expanded for each front end to be the -union of the previous results for all front ends. For example, you -should now expect to get the same results for the 10 pages of the -contouring (ninth) example regardless of whether you are running that -example from Tcl, C, Python, Java (and eventually C++, Fortran, and -Perl). +For older release notes stretching back to 5.5.0 see OLD-README.release. -We have finished converting all Python examples to use the Numeric -module (from the Numpy project) wherever possible. This module allows -high-level array manipulations at C speeds that are quite useful in -preparing data to be plotted. The xw??.py examples are no longer -stand-alone scripts. Instead, they are now organized as modules that -are imported into python scripts such as pythondemos.py or prova.py. +For still older release announcements, see -API change: +http://plplot.sourceforge.net/announce/announce-plplot-5.3.1.xhtml +http://plplot.sourceforge.net/announce/announce-plplot-5.3.0.xhtml +http://plplot.sourceforge.net/announce/announce-plplot-5.2.1.html +http://plplot.sourceforge.net/announce/announce-plplot-5.1.0.html -plxormod now returns a status. - -plssub now no longer has a forced page advance inside it (which was -confusing some drivers). More specific page initialization is used -inside of plssub instead. If this change causes you some problems, see -the examples for the proper way to terminate pages and sub-pages. - -We no longer support the variety of make commands on the non-GNU/Linux -unices. Instead, we now only support the GNU version of make which is -well documented and which can be downloaded from -ftp://ftp.gnu.org/pub/gnu/make. - -The DocBook API chapter (and the man pages and Octave help built from -that chapter) now have complete documentation of the meaning of the -function parameters. The overall documentation and our website content -have been improved as well. - -Important New Features - -A new cgm (Computer Graphics Metafile) driver has been added. This -relies on libcd.a which is not maintained any more. Nevertheless -libcd.a is a free library that works well and does its job so for our -cgm user's convenience we have put a copy of the cd1.3.tar.gz tarball -for building this library from source in our file release area. Our -tests indicate the cgm driver is now stable. - -Dynamical loading of device drivers. We have 29 (!) different devices -for output plots, but only one of those is selected by the user for a -given plot. Thus, dynamic loading of device drivers makes your -executables substantially smaller. Caveats: Your Unix must support -shared libraries (this happens automatically for most Linux -distributions), xwin and tk drivers are static-only for now (until we -arrange for the PLplot library itself to be dynamically loaded from -the Tcl/Tk front-end). Use the --enable-dyndrivers configure option to -get access to dynamic loading of device drivers. - -We now have an experimental Java front end. The PLplot API accessible -from Java is still incomplete, but it is large enough currently to do -all planned examples other than x16.java and x18.java. See -plplot/examples/java/README.javademos for directions about how to get -access to the Java front end for PLplot. - -We now have a new tk (ntk) driver (--enable-ntk) whose goal is to -provide the tk driver functionality using a simpler, cleaner -design. This is "a work in progress" because its functionality, -although working, is still quite limited compared to the traditional -tk driver. - -We now have the beginnings of a Pyqt GUI for PLplot thanks to -Alessandro Mirone. See examples/python/README.pythondemos for -directions about how to access it. - -We now have an experimental plimage function for PLplot thanks (again) -to Alessandro Mirone. Try the experimental x20c example to see how to -work with images in PLplot at the moment, but note the plimage API may -change in the future. - -Important Bug fixes - -Interactive color palettes now work for the plframe Tk GUI. This -important feature allows you to interactively adjust the cmap0 -(discrete) and cmap1 (continuous) colors for a particular plot. - -Remaining Important Bugs - -The shaded 3D plots (see Example 8) have problems with the edges of -hidden shaded regions. Our judgement is this donated plotsh3d code is -too difficult to fix and should be completely replaced. Any -volunteers? Meanwhile, with Example 8 we do get a taste of the nice -effects you can have with 3D shaded plots. - -There is no page control for the plframe widget for multi-page plots -in 5.1.0. This has now been fixed in CVS and will get into the next -release. - -Have fun with this latest stable release of PLplot! - -Alan W. Irwin for the PLplot core team, 2002 January 31 - -************************* 5.0.4 NEWS ********************************** - -Important Changes: - -(1) Default orientation for the ljii, ljiip, psc, ps, and pstex drivers has -been rotated from seascape (upside-down landscape) by 180 deg to landscape. -With this change no special 180 deg latex rotations will be required to get -true landscape mode (top of the plot on the left of the page as opposed to -on the right of the page for seascape mode). If you still require seascape -for some reason for these drivers, use the -ori 2. command-line option or -else use plsdiori(2.) or plsetopt("ori", "2."). - -(2) The installation location for examples has been changed to -$prefix/lib/plplot<ver>/examples to be in better conformance with the FHS. - -Important Bug fixes: - -(1) Many improvements to the octave front end. - -(2) Many improvements to the xfig driver. - -(3) If the overall aspect ratio is changed by the -geometry, -a, or -portrait -options or else by the combination of the -ori 1 and -freeaspect options, the -character aspect ratio remains unaffected. For example, when the overall -aspect ratio is changed now, circular symbols remain circular rather than -turning into ellipses as in the old code. - -(4) Software pattern fills now rotate correctly with the rest of the plot -when the -ori option is used. This fix affects all drivers (e.g., xwin, -psc) which do not handle their own pattern fills. (Previously the rotation -angle for software pattern fills was mistakenly doubled by two calls to the -orientation transformation routine.) - -Important New Features: - -(1) Portrait mode. Use the -portrait option on the command line or else -plsetopt("portrait", "") to get this option which only currently affects the -ljii, ljiip, ps, psc, and pstex drivers. This option is especially useful -for yplot, the yorick front-end to PLplot. yplot previously maintained -separate (==> hard-to-maintain and buggy) portrait versions of the psc, ps, -and ljiip drivers. Those will no longer be necessary with this PLplot -core change, and in fact portrait mode is now available for a much wider -range of drivers. - -(2) -drvopt command-line option (or else use plsetopt("drvopt","option")). -This allows setting options for particular drivers. For example, the --drvopt text option for the psc or ps driver allows use of Adobe fonts (This -is poorly documented currently, but for now see notes in ps.c for more -details). - -(3) New pstex driver. This is not currently documented, but there is post -from João Cardoso on plplot_devel -(http://www.geocrawler.com/archives/3/10834/2001/4/50/5536095/) that gives -the recipe (ignore the configuration stuff and start with the ./x01c -command). The idea is to emulate the pstex output of the xfig application -so that latex can be used to directly process the file output from the -PLplot pstex driver. - -Have fun with this latest stable release of PLplot! - -Alan W. Irwin - -************************* 5.0.3 NEWS ************************************** - - -The important changes are as follows: - -(1) General PNG and JPEG drivers have been added which are based on the -libgd library (available for Unix/Linux/Mac/Windows). These drivers -encourage the use of PLplot for web applications because the PNG and JPEG -formats are so favoured for the web. We classify these two drivers as -late-beta and we are sufficiently confident of them that we configure them -by default if you have the appropriate headers and libraries installed from -libgd, libpng, libjpeg, and zlib. (You need at least libgd-1.7 to obtain -good PNG images, and at least libgd-1.8 to obtain JPEG images under PLplot.) -For more information on libgd and the additional required libraries please -visit http://www.boutell.com/gd/. - -(2) The GNUSVGA driver (see plplot/sys/dos/djgpp) has been rewritten -to use DJGPP V2+ and GRX V2+. The improved driver adds: a cross hair mode; a -locate mode; double buffering; and an XOR mode to the "screen" driver, all -of which now give the driver most functions of the XWIN driver. It also -fixes up: handling of key and mouse events; colormap setting with "-bg" -switch; and now allows non-fatal/ non-volatile switching between graphics -and text mode (i.e. it no longer clobbers the computer, and now preserves the -screen). Additionally (and optionally) the DJGPP driver family now includes -support for TIFF, BMP, and JPG drivers, and the ability to do "hot key" -screen-dumps of the screen images to these formats. - -(3) Octave is a mostly Matlab compatible high-level language intended for -numerical computations. An octave front end has been available for some -years for PLplot-4.99 and has, in fact, been maintained as a Debian package. -However, this PLplot 5.0.3 release is the first attempt to integrate the -octave front end with PLplot-5. See the README INSTALL USAGE and FGA -(frequently given answers) files in bindings/octave to find out how to use -this front end. Recently, an absolute octave newbie (AWI) was able to get -all the demos mentioned in INSTALL to work interactively for a Debian potato -system. Nevertheless, we classify this version of the front end as mid to -late beta because it has not been tested for a wide variety of environments -yet. We would welcome reports for this front end. - -(4) An experimental Perl front end is just getting underway for PLplot. This -is an exciting project because it adds an important web-scripting -environment to PLplot. Usually, documentation trails code, but in this case -we have the unusual situation where we have parsed our API documentation -chapter (written in DocBook/XML) to create Perl wrappers for the common -PLplot API. With this start we have been able to create the demonstration -Perl script x01.pl which produces identical results to the standard x01c -demo (that was written in C). For instructions on how to get the Perl -binding to work, read bindings/perl5/README. More perl script demos are in -the works, and we welcome your participation (via the plplot-devel mailing -list, subscribe at http://sourceforge.net/mail/?group_id=2915) in helping to -develop this front end . - -(5) A GNOME-compatible driver has been written for PLplot. At this point, -the driver is being rapidly developed with many exciting interactive -capabilities being considered. If you want to get in on the development of -this driver we urge you to subscribe to the plplot-devel mailing list (see -http://sourceforge.net/mail/?group_id=2915). We classify this driver as -alpha because the interactive features are not complete, but already it is -stable enough to view most of the demonstrations without problems. If you -want to try this for yourself, use --enable-gnome when you configure PLplot, -and for any demo specify gnome as the driver. - -(6) Many other small changes. The important ones include the following: - -(a) A test script. After you have built and installed the demo programmes -(go to $prefix/share/doc/plplot/examples and execute make cdemos in the c -directory, fdemos in the f77 directory, cxxdemos in the c++ directory) then -plplot-test.sh will generate all possible postscript file results for all -demos. (Use the --help option to explore other file driver possibilities.) -This script is an excellent way to test that you have built everything -properly on your system. - -(b) A plplot-config configuration script to help you build your PLplot -applications. Do plplot-config --help to learn how to use it. - -(b') We have changed a library name. The matrix library core name is now -libtclmatrix. A d suffix is applied to the name (just as for all other -libraries) if the library is built with --with-double=yes configured. If -you are using the plplot-config script to help link your applications, then -this library name change should be transparent to you. - -(c) Added plshades routine to make life much easier for generating -continuously shaded plots. See x16c for a demonstration. - -(d) Small change in exclusion API for shade plots. (If you are not -excluding regions of your shade plots this does not affect you.) For an -example of the new exclusion API for plshades see x16c.c. The excluded -annulus now actually is smooth--a nice improvement. See plshades.c for the -changes to the plshade exclusion API. - -(e) Added argument list processing for xw??.py demos. - -(f) Bug fix. Clip was not being applied to fills, now is. - -(g) x10.tcl and x15.tcl added to demos. - -(h) float --> PLFLT throughout the code. This change exterminates much of -the single precision that was contaminating the code (with consequent large -roundoff errors that differed from machine to machine) when ---with-double=yes is configured. Comparison of 32-bit and 64-bit results -for x??c now indicates identical postscript files except for date (of -course) and the x05c and x16c examples (which still must have some -single-precision contaminating them somewhere.) Other demos still need to be -checked for single-precision contamination in addition to the fundamental -x??c examples. - -(i) Package relocatability put in. This is essential for building debs and -rpm's. - -(j) Assorted documentation improvements including adding a Chapter entitled -"Notes for each Operating System that We Support". So far only filled with -somewhat sparse information on Unix/Linux. If you want to contribute some -documentation for other platforms, feel free to send the material to AWI, -and he will include it. - -Reports are welcome (especially using plplot-test.sh) for all OS/hardware -combinations. It is only through such reports (and patches that work for -you) that we can improve our cross-platform support. - -Alan W. Irwin - -************************* 5.0.2 NEWS ************************************* - -Note we also have some innovation in the new release as well as bug fixing. - -(1) The python xw??.py examples should now work right out of the box -without fooling around with PYTHONPATH. - -(2) Install file locations now conform to the FHS. So, for example, -you will find the examples installed at -$prefix/share/doc/plplot/examples. - -(3) The content of the documentation source has been greatly improved -from 5.0.1. We have now completely finished going through the doc -directory for several generations of notes on various topics and -incorporated all this material (with substantial updates and -expansions) into our docbook source. The result is new docbook -sections/chapters on devices, driver functions, plrender and -metafiles, familying, interactive output devices, color, and C and -fortran bindings. We have added API sections that are specialized to C -and fortran. We have also added a bibliography and reorganized the -material so that all the reference material (bibliography and API -sections) appear at the back of the document. We have now removed -virtually all the old files in doc so there is no longer the potential -of getting confused with these older generations of documentation. - -We don't anticipate the addition of too many more chapters or sections -to the documentation, but some refinement of the existing -chapters/sections still needs to be done. If you are interested in -helping with this effort, please contact yours truly -(ir...@be...). - -(4) Our DocBook source can be built into PLplot documentation in a -variety of formats (currently html, dvi, postscript, pdf, info, and -man). Our CVS does not have these files because they are generated -rather than source files. However, you can always get the latest forms -of these results from http://www.plplot.org/resources/docbook-manual/, -and for your convenience we have also bundled these results into the -doc directory of the 5.0.2 tarball. - -Please send bug reports, comments, and questions to the PLplot list, -and have fun (and profit) with the new 5.0.2 release of plplot! - -Alan - -************************* 5.0.1 NEWS *************************************** - -Note we also have some innovation in the new release as well as bug fixing. - -(1) The documentation building process has been changed completely over to -DocBook 4.1 XML. To see the nice html, postscript, pdf, dvi, info, and man -results of this effort, please look at -http://www.plplot.org/resources/docbook-manual/ - -(2) The content of the documentation source has been greatly improved from -previous versions. However, more work is always needed on documentation -content, and if you have an interest in helping out with this aspect of -plplot, please contact yours truly (Alan W. Irwin). - -(3) The header file style has been changed to be similar to that of X. That -is every header file reference in source should have the prefix plplot, e.g., - -#include "plplot/plConfig.h" - -This gives much less potential for nameclashes, if the headers are stored in, -e.g., /usr/include/plplot. It also means that the -I parameter stays the -same as it was before on the compile line. - -(4) The library names have been changed so they are in a more consistent style -now that gives more protection against nameclashes. All library tags -(suffixes to the core name of libplplot, libplmatrix, etc.) are -now gone except for d for double precision and nothing for single precision -or the libplmatrix library (which is always single precision even if -you have configured double precision). To indicate what the library names -that were used to build plrender, execute the installed -$prefix/bin/plplot_linkage. On my current system this emits the following -line: --L/usr/local/plplot/lib -lplplotd -lplmatrix -litk3.1 -ltk8.2 -litcl3.1 --ltcl8.2 -L/usr/X11R6/lib -lX11 -lvga -ldl -lm -lg2c -Wl,-rpath --Wl,/usr/local/plplot/lib - -Your system (if it isn't Debian potato) will have a different link line -emitted by $prefix/bin/plplot_linkage. That is the one to use! - -(5) Python now works! (at least in widgetless mode). Configure python (which -happens by default), and try out the new widgetless examples, xw??.py. -You will like them! These examples all require double precision. Eventually, -we plan to add Tk widget capabilities to these examples. Any help -would be appreciated. - -(6) Fortran now works with double precision and Linux! (It always worked -well with single precision before, but it is nice to have this generality.) - -Please send bug reports, comments, and questions to this list, and -have fun (and profit) with the new 5.0.1 release of plplot! - -Alan - -************************* 5.0.0 NEWS *************************************** - -Greetings to all, - -And you thought it would /NEVER/ happen. :-). - -I am pleased to announce that PLplot version 5.0.0 has been released. -The rest of this email will attempt to explain exactly what this means -in more detail. - -Now for a little background. We are done with the 4.99 x, x=abc... -business, as well as the dated snapshots. Dated snapshots are being -replaced by providing anonymous cvs access through plplot.org. So -anyone who wants to track day-to-day development, or follow progress -on their patch submissions, etc, will be able to do that by using cvs. - -In addition to that, we will provide real releases which are supposed -to be stable, or at least to get stable over a short time. The -releasing naming conventions will follow the Linux tradition. Even -releases are supposed to be stable, and only bug fixes and -stabilization patches will be applied to these. Thus, 5.0.0 is the -first in this strain. If people find minor little nits that need -fixing, this will result in 5.0.1, 5.0.2, etc. We hope it doesn`t get -too far... Ongoing feature development will proceed in the 5.1 -strain. - -The release and versioning business is coordinated with cvs in the -following manner. Stable releases go on a branch. Ongoing -development continues on the cvs head. To be really cvs technical, we -provide a branch point tag, a branch tag, and release tags. So, to be -totally explicit, I did the following operations today when preparing -the 5.0.0 release: - -1) cvs tag bp_v5_0 -2) cvs rtag -b -r bp_v5_0 v5_0 plplot -3) cvs tag v5_0_0 -4) cvs export -r v5_0_0 plplot -5) mv plplot/ plplot-5.0.0 -6) tar cvzf plplot-5.0.0.tar.gz plplot-5.0.0/ - -Step 1 labels the state of the repository at the point in time when we -fork the 5.0 release branch. The name of the branch point for the 5.0 -release, is bp_v5_0. Step 2 creates a cvs "branch tag" for referring -to the head of this branch. The name of this tag is v5_0. Step 3 -creates a tag for the specific release 5.0.0, with tag name v5_0_0. -In the current case, there were no changes made between any of these -steps, so steps 1, 2, and 3 all refer to the same versions of the -files. But as we move on from here, people who wish to participate in -stabilizing the 5.0 branch will need to check out the head of this -branch via: - - cvs co -r v5_0 plplot - -Then they can do stabilization oriented development, submit context -diffs, and the core team will apply these patches, and eventually at -various points along the way, we will tag v5_0_1, v5_0_2, etc. So, -the thing to understand here is that "v5_0" is the branch tag. It is -a floating reference, which alwasy points to the head of this branch. -Non branch tags just refer to static file versions, labelling a single -specific collection of file versions for all of time. - -Henceforth, the main line of deveopment, which we will call 5.1, -proceeds on the cvs head. There is no branch tag for this. To see -the ongoing develoment work on the 5.1 branch, just do: - - cvs co plplot - -Use update to track ongoing work, etc. We may possibly tag a few -interesting points along the way as v5_1_0, v5_1_1, etc, but there -will not be a branch tag for this. Eventually, when 5.1 development -seems to have run its course, we will fork another branch for 5.2, -making a new branch point tag bp_v5_2, a branch tag v5_2 to refer to -the head of the branch holding the 5.2 release strain, and occasional -tags for specific 5.2.x releases. - -Hopefully that is comprehensible to people with a cvs background. See -the CVS faq for more background. We`ll try to put this kind of info -on the web site somewhere as we get better organized. - -Anyway, in addition to the cvs access mechanisms described above, we -also are providing the 5.0.0 release as a .tar.gz file. Steps 4, 5, -and 6 show exactly how this was created, guaranteeing that the -plplot-5.0.0.tar.gz file contains exactly the file versions that were -tagged as v5_0_0 in step 3, but omitting the CVS control information. -This tarball release is appropriate for people who just want the code -in a packaged form, and aren`t interested in tracking the cvs -development specifically, or even in using cvs to fetch identified -versions. This file has been uploaded to the plplot.org ftp site. -You can get it via: - - /<EMAIL: PROTECTED>:/pub/plplot/plplot-5.0.0.tar.gz - -Eventually we will get the http://www.plplot.org web site updated to reflect -this, and also figure out how to identify this file release on the -sourceforge.net project page for plplot. Someone will post messages -about that as we progress in these other areas. - -Anyway, the bottom line is, right now you can get PLplot 5.0.0, either -by anonymous ftp, or by anonymous cvs. - -Now for a word about the contents of 5.0.0. - -The main thing that has happened over the past three years since I -escaped graduate school, is that we`ve been trying to fix bugs in the -autoconf support, and in the Tcl/Tk driver, and in color handling of -the X driver. There have been a great many bugs rooted out of the -system over this period of time, and I would encourage all PLplot -users worldwide, to upgrade to 5.0.0 at this time. This release is -known to work with 8.x strain Tcl/Tk releases, Itcl 3 releases, Python -1.5, etc. The problems with X color management are believed to be -resolved in a manner that is generally satisfactory (there`s always -room for improvement in this area, but the current state is a big leg -up over where it was before in the 4.99j or in the early snapshots). -And numerous patch submissions from users worldwide have been -integrated (although admittedly there are more outstanding, pending -core team review). There is also a new Mac driver by Rob Managan. -Currently just the necessary source and doc files, but we will get his -Mac CW project support goods uploaded to ftp.plplot.org at some point -too. So, there`s been lots of improvement since the last release, and -I hope people will endeavor to upgrade to this new version. If things -go wrong, please submit patches to sourceforge.net, and we`ll work on -getting it stabilized. - -In the midst of such endeavors, please note the distinction between -bug fixes to 5.0.x, and feature development for ongoing 5.1. The new -stuff is going to go into 5.1. 5.0.x is really there just to have an -up to date stable and official release for those who don`t want to -track ongoing development. As such, don`t expect major new features -to appear in 5.0.x releases, just fixes that relate to platform -support, minor bugs, etc. - -So, what lays ahead for 5.1? Well, like I said before, that depends a -lot on what people contribute. My personal actions will focus in the -short term on better Tcl package participation and improved Python -module interaction. But there are more drivers in the works, web -integration opportunities, more plot types, variations, and viewing -overhauls, etc, that various people have expressed interest in. More -news as it happens. - -Remember that you can track it all by subscribing to -<EMAIL: PROTECTED>, or by reviewing the lists chronology in -geocrawler. Or, you can use the cvs history command (also easily -accessible in Emacs fromt he version control pane), to see what people -are doing, track your patch submissions to see when they get in, etc. - -Cheers to all, - -Geoffrey Furnish - -********************* 4.99j NEWS ********************************************* - -This is the 10th beta release (4.99j) of what will eventually become -the PLplot 5.0 distribution. At this point I'm mainly trying to root out the -remaining bugs and system dependencies, but there will undoubtably be a -few improvements yet before the final version sees the light of day. - -Please refer to the following files for more information: - -README General introduction, where to get more information, etc. -NEWS This file -CHANGES Log of changes to plplot in reverse chronological order. -ToDo Describes what's on the agenda (no promises, however :-). -FAQ Frequently answered questions. -INSTALL Installation notes - -Also see the system-specific documentation under sys/<system-name>. -The manual is being updated! More below. - -You can get the PLplot distribution by anonymous ftp from: - - /ano...@di...:/plplot - -in .zip or .tar.gz form. The most up-to-date (not very, at this point) -manual (in .ps and .dvi form) and info document files are available there as -well. - - -For more detail of these changes, consult CHANGES. - -************************************************************************** -Version 4.99j: Summary of major changes -************************************************************************** - -A massive update. Major changes follow: - -- A major upgrade of the configure scripts. Now uses Autoconf 2.3 to -generate. You can now build PLplot in an arbitrary temporary directory, -typing <path>/configure and then make. This allows building from a -read-only file system, or setting up multiple build directories using -different build options simultaneously. Help entries now available for all -recognized configure command line options. Confusing a --with-<opt> with a ---enable-<opt> is now detected and flagged as an error. The option to skip -loading the defaults file is now invoked by using --without-defaults or ---with-defaults=no to be more like typical configure parameters. Added ---with-nobraindead (not for general use). Better support of shared -libraries (in principle), and better handling of the install procedure. Run -results are sent to the file config.summary, so you can type "ls config.*" -to see all the informational files created by configure. Searches for -Fortran compiler if enable_f77=yes. If that isn't found, switches to f2c. -If that isn't found, enable_f77 is set to "no" (Fortran interface layer is -omitted). Added --with-dbmalloc, for linking with a debugging malloc -library. Support generation of shared lib on Linux, using ELF tools. - -- Better internal debug handling and reporting. Files where DEBUG is -defined only generate debug output if the debug stream variable is -set (e.g. via -debug). Uses stdarg capability, first time I've used -this in PLplot, so be on the lookout for portability problems with this. -If all goes well I have other uses of stdargs in mind. - +For extremely old release notes for PLplot-5.1.0 +and previous see OLD-NEWS. Copied: trunk/OLD-NEWS (from rev 12726, trunk/NEWS) =================================================================== --- trunk/OLD-NEWS (rev 0) +++ trunk/OLD-NEWS 2013-11-21 02:24:57 UTC (rev 12728) @@ -0,0 +1,597 @@ +Late news first + +************************* 5.1.0 NEWS *************************************** + +Important Changes to Existing Features + +The Windows port of PLplot has been completely refurbished. PLplot now +runs on Windows 98 (and perhaps even Windows 95 although that is +untested), Windows NT, and Windows 2000. See +plplot/sys/win32/msdev/README.TXT and +plplot/sys/win32/msdev/INSTALL.TXT for details. Please direct all +questions about this Windows port to Olof Svensson. + +The examples were extensively expanded for each front end to be the +union of the previous results for all front ends. For example, you +should now expect to get the same results for the 10 pages of the +contouring (ninth) example regardless of whether you are running that +example from Tcl, C, Python, Java (and eventually C++, Fortran, and +Perl). + +We have finished converting all Python examples to use the Numeric +module (from the Numpy project) wherever possible. This module allows +high-level array manipulations at C speeds that are quite useful in +preparing data to be plotted. The xw??.py examples are no longer +stand-alone scripts. Instead, they are now organized as modules that +are imported into python scripts such as pythondemos.py or prova.py. + +API change: + +plxormod now returns a status. + +plssub now no longer has a forced page advance inside it (which was +confusing some drivers). More specific page initialization is used +inside of plssub instead. If this change causes you some problems, see +the examples for the proper way to terminate pages and sub-pages. + +We no longer support the variety of make commands on the non-GNU/Linux +unices. Instead, we now only support the GNU version of make which is +well documented and which can be downloaded from +ftp://ftp.gnu.org/pub/gnu/make. + +The DocBook API chapter (and the man pages and Octave help built from +that chapter) now have complete documentation of the meaning of the +function parameters. The overall documentation and our website content +have been improved as well. + +Important New Features + +A new cgm (Computer Graphics Metafile) driver has been added. This +relies on libcd.a which is not maintained any more. Nevertheless +libcd.a is a free library that works well and does its job so for our +cgm user's convenience we have put a copy of the cd1.3.tar.gz tarball +for building this library from source in our file release area. Our +tests indicate the cgm driver is now stable. + +Dynamical loading of device drivers. We have 29 (!) different devices +for output plots, but only one of those is selected by the user for a +given plot. Thus, dynamic loading of device drivers makes your +executables substantially smaller. Caveats: Your Unix must support +shared libraries (this happens automatically for most Linux +distributions), xwin and tk drivers are static-only for now (until we +arrange for the PLplot library itself to be dynamically loaded from +the Tcl/Tk front-end). Use the --enable-dyndrivers configure option to +get access to dynamic loading of device drivers. + +We now have an experimental Java front end. The PLplot API accessible +from Java is still incomplete, but it is large enough currently to do +all planned examples other than x16.java and x18.java. See +plplot/examples/java/README.javademos for directions about how to get +access to the Java front end for PLplot. + +We now have a new tk (ntk) driver (--enable-ntk) whose goal is to +provide the tk driver functionality using a simpler, cleaner +design. This is "a work in progress" because its functionality, +although working, is still quite limited compared to the traditional +tk driver. + +We now have the beginnings of a Pyqt GUI for PLplot thanks to +Alessandro Mirone. See examples/python/README.pythondemos for +directions about how to access it. + +We now have an experimental plimage function for PLplot thanks (again) +to Alessandro Mirone. Try the experimental x20c example to see how to +work with images in PLplot at the moment, but note the plimage API may +change in the future. + +Important Bug fixes + +Interactive color palettes now work for the plframe Tk GUI. This +important feature allows you to interactively adjust the cmap0 +(discrete) and cmap1 (continuous) colors for a particular plot. + +Remaining Important Bugs + +The shaded 3D plots (see Example 8) have problems with the edges of +hidden shaded regions. Our judgement is this donated plotsh3d code is +too difficult to fix and should be completely replaced. Any +volunteers? Meanwhile, with Example 8 we do get a taste of the nice +effects you can have with 3D shaded plots. + +There is no page control for the plframe widget for multi-page plots +in 5.1.0. This has now been fixed in CVS and will get into the next +release. + +Have fun with this latest stable release of PLplot! + +Alan W. Irwin for the PLplot core team, 2002 January 31 + +************************* 5.0.4 NEWS ********************************** + +Important Changes: + +(1) Default orientation for the ljii, ljiip, psc, ps, and pstex drivers has +been rotated from seascape (upside-down landscape) by 180 deg to landscape. +With this change no special 180 deg latex rotations will be required to get +true landscape mode (top of the plot on the left of the page as opposed to +on the right of the page for seascape mode). If you still require seascape +for some reason for these drivers, use the -ori 2. command-line option or +else use plsdiori(2.) or plsetopt("ori", "2."). + +(2) The installation location for examples has been changed to +$prefix/lib/plplot<ver>/examples to be in better conformance with the FHS. + +Important Bug fixes: + +(1) Many improvements to the octave front end. + +(2) Many improvements to the xfig driver. + +(3) If the overall aspect ratio is changed by the -geometry, -a, or -portrait +options or else by the combination of the -ori 1 and -freeaspect options, the +character aspect ratio remains unaffected. For example, when the overall +aspect ratio is changed now, circular symbols remain circular rather than +turning into ellipses as in the old code. + +(4) Software pattern fills now rotate correctly with the rest of the plot +when the -ori option is used. This fix affects all drivers (e.g., xwin, +psc) which do not handle their own pattern fills. (Previously the rotation +angle for software pattern fills was mistakenly doubled by two calls to the +orientation transformation routine.) + +Important New Features: + +(1) Portrait mode. Use the -portrait option on the command line or else +plsetopt("portrait", "") to get this option which only currently affects the +ljii, ljiip, ps, psc, and pstex drivers. This option is especially useful +for yplot, the yorick front-end to PLplot. yplot previously maintained +separate (==> hard-to-maintain and buggy) portrait versions of the psc, ps, +and ljiip drivers. Those will no longer be necessary with this PLplot +core change, and in fact portrait mode is now available for a much wider +range of drivers. + +(2) -drvopt command-line option (or else use plsetopt("drvopt","option")). +This allows setting options for particular drivers. For example, the +-drvopt text option for the psc or ps driver allows use of Adobe fonts (This +is poorly documented currently, but for now see notes in ps.c for more +details). + +(3) New pstex driver. This is not currently documented, but there is post +from João Cardoso on plplot_devel +(http://www.geocrawler.com/archives/3/10834/2001/4/50/5536095/) that gives +the recipe (ignore the configuration stuff and start with the ./x01c +command). The idea is to emulate the pstex output of the xfig application +so that latex can be used to directly process the file output from the +PLplot pstex driver. + +Have fun with this latest stable release of PLplot! + +Alan W. Irwin + +************************* 5.0.3 NEWS ************************************** + + +The important changes are as follows: + +(1) General PNG and JPEG drivers have been added which are based on the +libgd library (available for Unix/Linux/Mac/Windows). These drivers +encourage the use of PLplot for web applications because the PNG and JPEG +formats are so favoured for the web. We classify these two drivers as +late-beta and we are sufficiently confident of them that we configure them +by default if you have the appropriate headers and libraries installed from +libgd, libpng, libjpeg, and zlib. (You need at least libgd-1.7 to obtain +good PNG images, and at least libgd-1.8 to obtain JPEG images under PLplot.) +For more information on libgd and the additional required libraries please +visit http://www.boutell.com/gd/. + +(2) The GNUSVGA driver (see plplot/sys/dos/djgpp) has been rewritten +to use DJGPP V2+ and GRX V2+. The improved driver adds: a cross hair mode; a +locate mode; double buffering; and an XOR mode to the "screen" driver, all +of which now give the driver most functions of the XWIN driver. It also +fixes up: handling of key and mouse events; colormap setting with "-bg" +switch; and now allows non-fatal/ non-volatile switching between graphics +and text mode (i.e. it no longer clobbers the computer, and now preserves the +screen). Additionally (and optionally) the DJGPP driver family now includes +support for TIFF, BMP, and JPG drivers, and the ability to do "hot key" +screen-dumps of the screen images to these formats. + +(3) Octave is a mostly Matlab compatible high-level language intended for +numerical computations. An octave front end has been available for some +years for PLplot-4.99 and has, in fact, been maintained as a Debian package. +However, this PLplot 5.0.3 release is the first attempt to integrate the +octave front end with PLplot-5. See the README INSTALL USAGE and FGA +(frequently given answers) files in bindings/octave to find out how to use +this front end. Recently, an absolute octave newbie (AWI) was able to get +all the demos mentioned in INSTALL to work interactively for a Debian potato +system. Nevertheless, we classify this version of the front end as mid to +late beta because it has not been tested for a wide variety of environments +yet. We would welcome reports for this front end. + +(4) An experimental Perl front end is just getting underway for PLplot. This +is an exciting project because it adds an important web-scripting +environment to PLplot. Usually, documentation trails code, but in this case +we have the unusual situation where we have parsed our API documentation +chapter (written in DocBook/XML) to create Perl wrappers for the common +PLplot API. With this start we have been able to create the demonstration +Perl script x01.pl which produces identical results to the standard x01c +demo (that was written in C). For instructions on how to get the Perl +binding to work, read bindings/perl5/README. More perl script demos are in +the works, and we welcome your participation (via the plplot-devel mailing +list, subscribe at http://sourceforge.net/mail/?group_id=2915) in helping to +develop this front end . + +(5) A GNOME-compatible driver has been written for PLplot. At this point, +the driver is being rapidly developed with many exciting interactive +capabilities being considered. If you want to get in on the development of +this driver we urge you to subscribe to the plplot-devel mailing list (see +http://sourceforge.net/mail/?group_id=2915). We classify this driver as +alpha because the interactive features are not complete, but already it is +stable enough to view most of the demonstrations without problems. If you +want to try this for yourself, use --enable-gnome when you configure PLplot, +and for any demo specify gnome as the driver. + +(6) Many other small changes. The important ones include the following: + +(a) A test script. After you have built and installed the demo programmes +(go to $prefix/share/doc/plplot/examples and execute make cdemos in the c +directory, fdemos in the f77 directory, cxxdemos in the c++ directory) then +plplot-test.sh will generate all possible postscript file results for all +demos. (Use the --help option to explore other file driver possibilities.) +This script is an excellent way to test that you have built everything +properly on your system. + +(b) A plplot-config configuration script to help you build your PLplot +applications. Do plplot-config --help to learn how to use it. + +(b') We have changed a library name. The matrix library core name is now +libtclmatrix. A d suffix is applied to the name (just as for all other +libraries) if the library is built with --with-double=yes configured. If +you are using the plplot-config script to help link your applications, then +this library name change should be transparent to you. + +(c) Added plshades routine to make life much easier for generating +continuously shaded plots. See x16c for a demonstration. + +(d) Small change in exclusion API for shade plots. (If you are not +excluding regions of your shade plots this does not affect you.) For an +example of the new exclusion API for plshades see x16c.c. The excluded +annulus now actually is smooth--a nice improvement. See plshades.c for the +changes to the plshade exclusion API. + +(e) Added argument list processing for xw??.py demos. + +(f) Bug fix. Clip was not being applied to fills, now is. + +(g) x10.tcl and x15.tcl added to demos. + +(h) float --> PLFLT throughout the code. This change exterminates much of +the single precision that was contaminating the code (with consequent large +roundoff errors that differed from machine to machine) when +--with-double=yes is configured. Comparison of 32-bit and 64-bit results +for x??c now indicates identical postscript files except for date (of +course) and the x05c and x16c examples (which still must have some +single-precision contaminating them somewhere.) Other demos still need to be +checked for single-precision contamination in addition to the fundamental +x??c examples. + +(i) Package relocatability put in. This is essential for building debs and +rpm's. + +(j) Assorted documentation improvements including adding a Chapter entitled +"Notes for each Operating System that We Support". So far only filled with +somewhat sparse information on Unix/Linux. If you want to contribute some +documentation for other platforms, feel free to send the material to AWI, +and he will include it. + +Reports are welcome (especially using plplot-test.sh) for all OS/hardware +combinations. It is only through such reports (and patches that work for +you) that we can improve our cross-platform support. + +Alan W. Irwin + +************************* 5.0.2 NEWS ************************************* + +Note we also have some innovation in the new release as well as bug fixing. + +(1) The python xw??.py examples should now work right out of the box +without fooling around with PYTHONPATH. + +(2) Install file locations now conform to the FHS. So, for example, +you will find the examples installed at +$prefix/share/doc/plplot/examples. + +(3) The content of the documentation source has been greatly improved +from 5.0.1. We have now completely finished going through the doc +directory for several generations of notes on various topics and +incorporated all this material (with substantial updates and +expansions) into our docbook source. The result is new docbook +sections/chapters on devices, driver functions, plrender and +metafiles, familying, interactive output devices, color, and C and +fortran bindings. We have added API sections that are specialized to C +and fortran. We have also added a bibliography and reorganized the +material so that all the reference material (bibliography and API +sections) appear at the back of the document. We have now removed +virtually all the old files in doc so there is no longer the potential +of getting confused with these older generations of documentation. + +We don't anticipate the addition of too many more chapters or sections +to the documentation, but some refinement of the existing +chapters/sections still needs to be done. If you are interested in +helping with this effort, please contact yours truly +(ir...@be...). + +(4) Our DocBook source can be built into PLplot documentation in a +variety of formats (currently html, dvi, postscript, pdf, info, and +man). Our CVS does not have these files because they are generated +rather than source files. However, you can always get the latest forms +of these results from http://www.plplot.org/resources/docbook-manual/, +and for your convenience we have also bundled these results into the +doc directory of the 5.0.2 tarball. + +Please send bug reports, comments, and questions to the PLplot list, +and have fun (and profit) with the new 5.0.2 release of plplot! + +Alan + +************************* 5.0.1 NEWS *************************************** + +Note we also have some innovation in the new release as well as bug fixing. + +(1) The documentation building process has been changed completely over to +DocBook 4.1 XML. To see the nice html, postscript, pdf, dvi, info, and man +results of this effort, please look at +http://www.plplot.org/resources/docbook-manual/ + +(2) The content of the documentation source has been greatly improved from +previous versions. However, more work is always needed on documentation +content, and if you have an interest in helping out with this aspect of +plplot, please contact yours truly (Alan W. Irwin). + +(3) The header file style has been changed to be similar to that of X. That +is every header file reference in source should have the prefix plplot, e.g., + +#include "plplot/plConfig.h" + +This gives much less potential for nameclashes, if the headers are stored in, +e.g., /usr/include/plplot. It also means that the -I parameter stays the +same as it was before on the compile line. + +(4) The library names have been changed so they are in a more consistent style +now that gives more protection against nameclashes. All library tags +(suffixes to the core name of libplplot, libplmatrix, etc.) are +now gone except for d for double precision and nothing for single precision +or the libplmatrix library (which is always single precision even if +you have configured double precision). To indicate what the library names +that were used to build plrender, execute the installed +$prefix/bin/plplot_linkage. On my current system this emits the following +line: +-L/usr/local/plplot/lib -lplplotd -lplmatrix -litk3.1 -ltk8.2 -litcl3.1 +-ltcl8.2 -L/usr/X11R6/lib -lX11 -lvga -ldl -lm -lg2c -Wl,-rpath +-Wl,/usr/local/plplot/lib + +Your system (if it isn't Debian potato) will have a different link line +emitted by $prefix/bin/plplot_linkage. That is the one to use! + +(5) Python now works! (at least in widgetless mode). Configure python (which +happens by default), and try out the new widgetless examples, xw??.py. +You will like them! These examples all require double precision. Eventually, +we plan to add Tk widget capabilities to these examples. Any help +would be appreciated. + +(6) Fortran now works with double precision and Linux! (It always worked +well with single precision before, but it is nice to have this generality.) + +Please send bug reports, comments, and questions to this list, and +have fun (and profit) with the new 5.0.1 release of plplot! + +Alan + +************************* 5.0.0 NEWS *************************************** + +Greetings to all, + +And you thought it would /NEVER/ happen. :-). + +I am pleased to announce that PLplot version 5.0.0 has been released. +The rest of this email will attempt to explain exactly what this means +in more detail. + +Now for a little background. We are done with the 4.99 x, x=abc... +business, as well as the dated snapshots. Dated snapshots are being +replaced by providing anonymous cvs access through plplot.org. So +anyone who wants to track day-to-day development, or follow progress +on their patch submissions, etc, will be able to do that by using cvs. + +In addition to that, we will provide real releases which are supposed +to be stable, or at least to get stable over a short time. The +releasing naming conventions will follow the Linux tradition. Even +releases are supposed to be stable, and only bug fixes and +stabilization patches will be applied to these. Thus, 5.0.0 is the +first in this strain. If people find minor little nits that need +fixing, this will result in 5.0.1, 5.0.2, etc. We hope it doesn`t get +too far... Ongoing feature development will proceed in the 5.1 +strain. + +The release and versioning business is coordinated with cvs in the +following manner. Stable releases go on a branch. Ongoing +development continues on the cvs head. To be really cvs technical, we +provide a branch point tag, a branch tag, and release tags. So, to be +totally explicit, I did the following operations today when preparing +the 5.0.0 release: + +1) cvs tag bp_v5_0 +2) cvs rtag -b -r bp_v5_0 v5_0 plplot +3) cvs tag v5_0_0 +4) cvs export -r v5_0_0 plplot +5) mv plplot/ plplot-5.0.0 +6) tar cvzf plplot-5.0.0.tar.gz plplot-5.0.0/ + +Step 1 labels the state of the repository at the point in time when we +fork the 5.0 release branch. The name of the branch point for the 5.0 +release, is bp_v5_0. Step 2 creates a cvs "branch tag" for referring +to the head of this branch. The name of this tag is v5_0. Step 3 +creates a tag for the specific release 5.0.0, with tag name v5_0_0. +In the current case, there were no changes made between any of these +steps, so steps 1, 2, and 3 all refer to the same versions of the +files. But as we move on from here, people who wish to participate in +stabilizing the 5.0 branch will need to check out the head of this +branch via: + + cvs co -r v5_0 plplot + +Then they can do stabilization oriented development, submit context +diffs, and the core team will apply these patches, and eventually at +various points along the way, we will tag v5_0_1, v5_0_2, etc. So, +the thing to understand here is that "v5_0" is the branch tag. It is +a floating reference, which alwasy points to the head of this branch. +Non branch tags just refer to static file versions, labelling a single +specific collection of file versions for all of time. + +Henceforth, the main line of deveopment, which we will call 5.1, +proceeds on the cvs head. There is no branch tag for this. To see +the ongoing develoment work on the 5.1 branch, just do: + + cvs co plplot + +Use update to track ongoing work, etc. We may possibly tag a few +interesting points along the way as v5_1_0, v5_1_1, etc, but there +will not be a branch tag for this. Eventually, when 5.1 development +seems to have run its course, we will fork another branch for 5.2, +making a new branch point tag bp_v5_2, a branch tag v5_2 to refer to +the head of the branch holding the 5.2 release strain, and occasional +tags for specific 5.2.x releases. + +Hopefully that is comprehensible to people with a cvs background. See +the CVS faq for more background. We`ll try to put this kind of info +on the web site somewhere as we get better organized. + +Anyway, in addition to the cvs access mechanisms described above, we +also are providing the 5.0.0 release as a .tar.gz file. Steps 4, 5, +and 6 show exactly how this was created, guaranteeing that the +plplot-5.0.0.tar.gz file contains exactly the file versions that were +tagged as v5_0_0 in step 3, but omitting the CVS control information. +This tarball release is appropriate for people who just want the code +in a packaged form, and aren`t interested in tracking the cvs +development specifically, or even in using cvs to fetch identified +versions. This file has been uploaded to the plplot.org ftp site. +You can get it via: + + /<EMAIL: PROTECTED>:/pub/plplot/plplot-5.0.0.tar.gz + +Eventually we will get the http://www.plplot.org web site updated to reflect +this, and also figure out how to identify this file release on the +sourceforge.net project page for plplot. Someone will post messages +about that as we progress in these other areas. + +Anyway, the bottom line is, right now you can get PLplot 5.0.0, either +by anonymous ftp, or by anonymous cvs. + +Now for a word about the contents of 5.0.0. + +The main thing that has happened over the past three years since I +escaped graduate school, is that we`ve been trying to fix bugs in the +autoconf support, and in the Tcl/Tk driver, and in color handling of +the X driver. There have been a great many bugs rooted out of the +system over this period of time, and I would encourage all PLplot +users worldwide, to upgrade to 5.0.0 at this time. This release is +known to work with 8.x strain Tcl/Tk releases, Itcl 3 releases, Python +1.5, etc. The problems with X color management are believed to be +resolved in a manner that is generally satisfactory (there`s always +room for improvement in this area, but the current state is a big leg +up over where it was before in the 4.99j or in the early snapshots). +And numerous patch submissions from users worldwide have been +integrated (although admittedly there are more outstanding, pending +core team review). There is also a new Mac driver by Rob Managan. +Currently just the necessary source and doc files, but we will get his +Mac CW project support goods uploaded to ftp.plplot.org at some point +too. So, there`s been lots of improvement since the last release, and +I hope people will endeavor to upgrade to this new version. If things +go wrong, please submit patches to sourceforge.net, and we`ll work on +getting it stabilized. + +In the midst of such endeavors, please note the distinction between +bug fixes to 5.0.x, and feature development for ongoing 5.1. The new +stuff is going to go into 5.1. 5.0.x is really there just to have an +up to date stable and official release for those who don`t want to +track ongoing development. As such, don`t expect major new features +to appear in 5.0.x releases, just fixes that relate to platform +support, minor bugs, etc. + +So, what lays ahead for 5.1? Well, like I said before, that depends a +lot on what people contribute. My personal actions will focus in the +short term on better Tcl package participation and improved Python +module interaction. But there are more drivers in the works, web +integration opportunities, more plot types, variations, and viewing +overhauls, etc, that various people have expressed interest in. More +news as it happens. + +Remember that you can track it all by subscribing to +<EMAIL: PROTECTED>, or by reviewing the lists chronology in +geocrawler. Or, you can use the cvs history command (also easily +accessible in Emacs fromt he version control pane), to see what people +are doing, track your patch submissions to see when they get in, etc. + +Cheers to all, + +Geoffrey Furnish + +********************* 4.99j NEWS ********************************************* + +This is the 10th beta release (4.99j) of what will eventually become +the PLplot 5.0 distribution. At this point I'm mainly trying to root out the +remaining bugs and system dependencies, but there will undoubtably be a +few improvements yet before the final version sees the light of day. + +Please refer to the following files for more information: + +README General introduction, where to get more information, etc. +NEWS This file +CHANGES Log of changes to plplot in reverse chronological order. +ToDo Describes what's on the agenda (no promises, however :-). +FAQ Frequently answered questions. +INSTALL Installation notes + +Also see the system-specific documentation under sys/<system-name>. +The manual is being updated! More below. + +You can get the PLplot distribution by anonymous ftp from: + + /ano...@di...:/plplot + +in .zip or .tar.gz form. The most up-to-date (not very, at this point) +manual (in .ps and .dvi form) and info document files are available there as +well. + + +For more detail of these changes, consult CHANGES. + +************************************************************************** +Version 4.99j: Summary of major changes +************************************************************************** + +A massive update. Major changes follow: + +- A major upgrade of the configure scripts. Now uses Autoconf 2.3 to +generate. You can now build PLplot in an arbitrary temporary directory, +typing <path>/configure and then make. This allows building from a +read-only file system, or setting up multiple build directories using +different build options simultaneously. Help entries now available for all +recognized configure command line options. Confusing a --with-<opt> with a +--enable-<opt> is now detected and flagged as an error. The option to skip +loading the defaults file is now invoked by using --without-defaults or +--with-defaults=no to be more like typical configure parameters. Added +--with-nobraindead (not for general use). Better support of shared +libraries (in principle), and better handling of the install procedure. Run +results are sent to the fi... [truncated message content] |
From: <ai...@us...> - 2013-11-21 02:52:09
|
Revision: 12730 http://sourceforge.net/p/plplot/code/12730 Author: airwin Date: 2013-11-21 02:52:05 +0000 (Thu, 21 Nov 2013) Log Message: ----------- Reorganize news files a bit more. Modified Paths: -------------- trunk/NEWS Added Paths: ----------- trunk/OLDER-NEWS Removed Paths: ------------- trunk/doc/NEWS Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2013-11-21 02:51:25 UTC (rev 12729) +++ trunk/NEWS 2013-11-21 02:52:05 UTC (rev 12730) @@ -15,5 +15,8 @@ http://plplot.sourceforge.net/announce/announce-plplot-5.2.1.html http://plplot.sourceforge.net/announce/announce-plplot-5.1.0.html -For extremely old release notes for PLplot-5.1.0 -and previous see OLD-NEWS. +For release notes for 4.99j (some also covered in slightly different +format in OLDER-NEWS) through PLplot-5.1.0, see OLD-NEWS. + +For key e-mails from 1993 to the release announcement for 5.0.2 see +OLDER-NEWS. Copied: trunk/OLDER-NEWS (from rev 12726, trunk/doc/NEWS) =================================================================== --- trunk/OLDER-NEWS (rev 0) +++ trunk/OLDER-NEWS 2013-11-21 02:52:05 UTC (rev 12730) @@ -0,0 +1,1316 @@ +This file is a concatanation of Major PLplot announcements (mostly about +releases) in reverse chronological order. + +************************************************************************** +Version 5.0.2: Release announcement +************************************************************************** + +From ir...@uv... Thu Feb 15 09:40:02 2001 +Date: Sat, 10 Feb 2001 14:22:30 -0800 (PST) +From: Alan W. Irwin <ir...@uv...> +To: plplot_general <plp...@li...> +Subject: [Plplot-general] plplot-5.0.2 has been released + +It has been a month since PLplot-5.0.1, and we thought another stable +release was appropriate at this time. + +Get this new PLplot-5.0.2 as a tarball file release at +http://sourceforge.net/projects/plplot. It was created from the current CVS +head which has benefited quite a lot from steady bug fixing over the last +month (for example, file familying now works, and the plmeta now properly +outputs to pipes). + +Version 5.0.2 supersedes all previous versions. Please note that for +improved stability you should use the tarball release and not the CVS HEAD. +(We try things on the HEAD which might momentarily break plplot from time to +time.) + +Note we also have some innovation in the new release as well as bug fixing. + +(1) The python xw??.py examples should now work right out of the box without +fooling around with PYTHONPATH. + +(2) Install file locations now conform to the FHS. So, for example, you +will find the examples installed at $prefix/share/doc/plplot/examples. + +(3) The content of the documentation source has been greatly improved from +5.0.1. We have now completely finished going through the doc directory for +several generations of notes on various topics and incorporated all this +material (with substantial updates and expansions) into our docbook source. +The result is new docbook sections/chapters on devices, driver functions, +plrender and metafiles, familying, interactive output devices, color, and C +and fortran bindings. We have added API sections that are specialized to C +and fortran. We have also added a bibliography and reorganized the material +so that all the reference material (bibliography and API sections) appear at +the back of the document. We have now removed virtually all the old files +in doc so there is no longer the potential of getting confused with these +older generations of documentation. + +We don't anticipate the addition of too many more chapters or sections to +the documentation, but some refinement of the existing chapters/sections +still needs to be done. If you are interested in helping with this effort, +please contact yours truly (ir...@be...). + +(4) Our DocBook source can be built into PLplot documentation in a variety +of formats (currently html, dvi, postscript, pdf, info, and man). Our CVS +does not have these files because they are generated rather than source +files. However, you can always get the latest forms of these results from +http://www.plplot.org/resources/docbook-manual/, and for your convenience we +have also bundled these results into the doc directory of the 5.0.2 tarball. + +Tests: + +Release version 5.0.2 has been extensively tested on Debian potato with +double precision configured. The cdemos, cxxdemos (c++), fdemos (fortran), +tcldemos, tkdemos, and the new standalone xw??.py python demos all now work +well on potato. Similar tests show good results on RedHat 6.2 except for +Tcl/Tk whose 8.0 version on RH 6.2 is too old for us to support. We have not +yet upgraded our test box to RedHat 7.0 (which does include a Tcl/Tk/iTcl +version that we support), and until we do this upgrade, we would appreciate +any RedHat 7.0 reports our users could give us. Similar tests (excluding +Tcl/Tk and python because we would have had to download configure, build, +and install these packages ourselves) show good results on solaris (SunOS +5.6 Generic_105181-23 sun4u sparc SUNW,Ultra-2 = solaris 2.6). + +Putting on my yplot (http://sourceforge.net/projects/yplot) hat momentarily, +I have also rebuilt yplot, the convenient yorick front end to plplot. The +new yplot version (to be released soon) is based on plplot-5.0.2 libraries, +and I have just confirmed it gives excellent results for a wide variety of +36 different scientific plots from my present research. + +Please send bug reports, comments, and questions to this list, and +have fun (and profit) with the new 5.0.2 release of plplot! + +Alan W. Irwin + +email: ir...@be... +phone: 250-727-2902 FAX: 250-721-7715 +snail-mail: +Dr. Alan W. Irwin +Department of Physics and Astronomy, +University of Victoria, P.O. Box 3055, +Victoria, British Columbia, Canada, V8W 3P6 +__________________________ + +Linux-powered astrophysics +__________________________ + + +************************************************************************** +Version 5.0.1: Release announcement +************************************************************************** + +From: "Alan W. Irwin" <ir...@uv...> +To: plplot_general <plp...@li...> +Subject: [Plplot-general] plplot-5.0.1 has been released. +Date: Sat, 13 Jan 2001 08:59:42 -0800 (PST) + +Get this new stable version as a tarball file release at +http://sourceforge.net/projects/plplot. It was created from the current +CVS head which has benefited quite a lot from steady bug fixing over the +last few months. Version 5.0.1 supersedes all previous versions. +(Please note that for stability you should use the tarball release and +not the CVS HEAD. We ordinarily make no guarantees about the stability of +the HEAD since we want to be free to try things on the HEAD which might +break plplot from time to time.) + +Note we also have some innovation in the new release as well as bug fixing. + +(1) The documentation building process has been changed completely over to +DocBook 4.1 XML. To see the nice html, postscript, pdf, dvi, info, and man +results of this effort, please look at +http://www.plplot.org/resources/docbook-manual/ + +(2) The content of the documentation source has been greatly improved from +previous versions. However, more work is always needed on documentation +content, and if you have an interest in helping out with this aspect of +plplot, please contact yours truly (Alan W. Irwin). + +(3) The header file style has been changed to be similar to that of X. That +is every header file reference in source should have the prefix plplot, e.g., + +#include "plplot/plConfig.h" + +This gives much less potential for nameclashes, if the headers are stored in, +e.g., /usr/include/plplot. It also means that the -I parameter stays the +same as it was before on the compile line. + +(4) The library names have been changed so they are in a more consistent style +now that gives more protection against nameclashes. All library tags +(suffixes to the core name of libplplot, libplmatrix, etc.) are +now gone except for d for double precision and nothing for single precision +or the libplmatrix library (which is always single precision even if +you have configured double precision). To indicate what the library names +that were used to build plrender, execute the installed +$prefix/bin/plplot_linkage. On my current system this emits the following +line: +-L/usr/local/plplot/lib -lplplotd -lplmatrix -litk3.1 -ltk8.2 -litcl3.1 +-ltcl8.2 -L/usr/X11R6/lib -lX11 -lvga -ldl -lm -lg2c -Wl,-rpath +-Wl,/usr/local/plplot/lib + +Your system (if it isn't Debian potato) will have a different link line +emitted by $prefix/bin/plplot_linkage. That is the one to use! + +(5) Python now works! (at least in widgetless mode). Configure python (which +happens by default), and try out the new widgetless examples, xw??.py. +You will like them! These examples all require double precision. Eventually, +we plan to add Tk widget capabilities to these examples. Any help +would be appreciated. + +(6) Fortran now works with double precision and Linux! (It always worked +well with single precision before, but it is nice to have this generality.) + +Tests: + +Release version 5.0.1 has been extensively tested on Debian potato with double +precision configured. The cdemos, cxxdemos (c++), fdemos (fortran), +tcldemos, tkdemos, and the new standalone xw??.py python demos all now work +well on potato. Similar tests show good results on RedHat 6.2 except for +Tcl/Tk whose 8.0 version on RH 6.2 is too old for us to support. We have not +yet upgraded our test box to RedHat 7.0, and until we do, we would +appreciate any RedHat 7.0 reports our users could give us. We have also been +able to configure, build, and install the software on a solaris system, but +so far only minimalist testing has been done on that system. + +Putting on my yplot (http://sourceforge.net/projects/yplot) hat momentarily, +I have recently rebuilt yplot, the convenient yorick front end to plplot. +The new yplot version (to be released soon) is based on plplot-5.0.1 +libraries, and I have just confirmed it gives excellent results for a wide +variety of 36 different scientific plots from my present research. + +Please send bug reports, comments, and questions to this list, and +have fun (and profit) with the new 5.0.1 release of plplot! + +Alan + +email: ir...@be... +phone: 250-727-2902 FAX: 250-721-7715 +snail-mail: +Dr. Alan W. Irwin +Department of Physics and Astronomy, +University of Victoria, P.O. Box 3055, +Victoria, British Columbia, Canada, V8W 3P6 +__________________________ + +Linux-powered astrophysics +__________________________ + +************************************************************************** +Version 5.0.0: Release announcement +************************************************************************** + +From: Geoffrey Furnish <fu...@ac...> +Date: Fri, 12 May 2000 12:27:34 -0700 (PDT) +To: plp...@pl... +Subject: [Plplot-general] PLplot 5.0.0 is released + +Greetings to all, + +And you thought it would /NEVER/ happen. :-). + +I am pleased to announce that PLplot version 5.0.0 has been released. +The rest of this email will attempt to explain exactly what this means +in more detail. + +First off, thanks to all the core team members who have helped with +various tasks that I could not attend to. Not the least of which, is +the simple issue of deciding to do it, right now. + +Now for a little background. We are done with the 4.99 x, x=abc... +business, as well as the dated snapshots. Dated snapshots are being +replaced by providing anonymous cvs access through plplot.org. So +anyone who wants to track day-to-day development, or follow progress +on their patch submissions, etc, will be able to do that by using cvs. + +In addition to that, we will provide real releases which are supposed +to be stable, or at least to get stable over a short time. The +releasing naming conventions will follow the Linux tradition. Even +releases are supposed to be stable, and only bug fixes and +stabilization patches will be applied to these. Thus, 5.0.0 is the +first in this strain. If people find minor little nits that need +fixing, this will result in 5.0.1, 5.0.2, etc. We hope it doesn't get +too far... Ongoing feature development will proceed in the 5.1 +strain. + +The release and versioning business is coordinated with cvs in the +following manner. Stable releases go on a branch. Ongoing +development continues on the cvs head. To be really cvs technical, we +provide a branch point tag, a branch tag, and release tags. So, to be +totally explicit, I did the following operations today when preparing +the 5.0.0 release: + +1) cvs tag bp_v5_0 +2) cvs rtag -b -r bp_v5_0 v5_0 plplot +3) cvs tag v5_0_0 +4) cvs export -r v5_0_0 plplot +5) mv plplot/ plplot-5.0.0 +6) tar cvzf plplot-5.0.0.tar.gz plplot-5.0.0/ + +Step 1 labels the state of the repository at the point in time when we +fork the 5.0 release branch. The name of the branch point for the 5.0 +release, is bp_v5_0. Step 2 creates a cvs "branch tag" for referring +to the head of this branch. The name of this tag is v5_0. Step 3 +creates a tag for the specific release 5.0.0, with tag name v5_0_0. +In the current case, there were no changes made between any of these +steps, so steps 1, 2, and 3 all refer to the same versions of the +files. But as we move on from here, people who wish to participate in +stabilizing the 5.0 branch will need to check out the head of this +branch via: + + cvs co -r v5_0 plplot + +Then they can do stabilization oriented development, submit context +diffs, and the core team will apply these patches, and eventually at +various points along the way, we will tag v5_0_1, v5_0_2, etc. So, +the thing to understand here is that "v5_0" is the branch tag. It is +a floating reference, which alwasy points to the head of this branch. +Non branch tags just refer to static file versions, labelling a single +specific collection of file versions for all of time. + +Henceforth, the main line of deveopment, which we will call 5.1, +proceeds on the cvs head. There is no branch tag for this. To see +the ongoing develoment work on the 5.1 branch, just do: + + cvs co plplot + +Use update to track ongoing work, etc. We may possibly tag a few +interesting points along the way as v5_1_0, v5_1_1, etc, but there +will not be a branch tag for this. Eventually, when 5.1 development +seems to have run its course, we will fork another branch for 5.2, +making a new branch point tag bp_v5_2, a branch tag v5_2 to refer to +the head of the branch holding the 5.2 release strain, and occasional +tags for specific 5.2.x releases. + +Hopefully that is comprehensible to people with a cvs background. See +the CVS faq for more background. We'll try to put this kind of info +on the web site somewhere as we get better organized. + +Anyway, in addition to the cvs access mechanisms described above, we +also are providing the 5.0.0 release as a .tar.gz file. Steps 4, 5, +and 6 show exactly how this was created, guaranteeing that the +plplot-5.0.0.tar.gz file contains exactly the file versions that were +tagged as v5_0_0 in step 3, but omitting the CVS control information. +This tarball release is appropriate for people who just want the code +in a packaged form, and aren't interested in tracking the cvs +development specifically, or even in using cvs to fetch identified +versions. This file has been uploaded to the plplot.org ftp site. +You can get it via: + + /ano...@ft...:/pub/plplot/plplot-5.0.0.tar.gz + +Eventually we will get the www.plplot.org web site updated to reflect +this, and also figure out how to identify this file release on the +sourceforge.net project page for plplot. Someone will post messages +about that as we progress in these other areas. + +Anyway, the bottom line is, right now you can get PLplot 5.0.0, either +by anonymous ftp, or by anonymous cvs. + +Now for a word about the contents of 5.0.0. + +The main thing that has happened over the past three years since I +escaped graduate school, is that we've been trying to fix bugs in the +autoconf support, and in the Tcl/Tk driver, and in color handling of +the X driver. There have been a great many bugs rooted out of the +system over this period of time, and I would encourage all PLplot +users worldwide, to upgrade to 5.0.0 at this time. This release is +known to work with 8.x strain Tcl/Tk releases, Itcl 3 releases, Python +1.5, etc. The problems with X color management are believed to be +resolved in a manner that is generally satisfactory (there's always +room for improvement in this area, but the current state is a big leg +up over where it was before in the 4.99j or in the early snapshots). +And numerous patch submissions from users worldwide have been +integrated (although admittedly there are more outstanding, pending +core team review). There is also a new Mac driver by Rob Managan. +Currently just the necessary source and doc files, but we will get his +Mac CW project support goods uploaded to ftp.plplot.org at some point +too. So, there's been lots of improvement since the last release, and +I hope people will endeavor to upgrade to this new version. If things +go wrong, please submit patches to sourceforge.net, and we'll work on +getting it stabilized. + +In the midst of such endeavors, please note the distinction between +bug fixes to 5.0.x, and feature development for ongoing 5.1. The new +stuff is going to go into 5.1. 5.0.x is really there just to have an +up to date stable and official release for those who don't want to +track ongoing development. As such, don't expect major new features +to appear in 5.0.x releases, just fixes that relate to platform +support, minor bugs, etc. + +So, what lays ahead for 5.1? Well, like I said before, that depends a +lot on what people contribute. My personal actions will focus in the +short term on better Tcl package participation and improved Python +module interaction. But there are more drivers in the works, web +integration opportunities, more plot types, variations, and viewing +overhauls, etc, that various people have expressed interest in. More +news as it happens. + +Remember that you can track it all by subscribing to +pl...@pl..., or by reviewing the lists chronology in +geocrawler. Or, you can use the cvs history command (also easily +accessible in Emacs fromt he version control pane), to see what people +are doing, track your patch submissions to see when they get in, etc. + +Cheers to all, + +-- +Geoffrey Furnish Actel Corporation fu...@ac... +Senior Staff Engineer 955 East Arques Ave voice: 408-522-7528 +Placement & Routing Sunnyvale, CA 94086-4533 fax: 408-522-8041 + +"... because only those who write the code truly control the project." + -- Jamie Zawinski + +_______________________________________________ + +************************************************************************** +Historic PLplot reorganization (at sourceforge) message +************************************************************************** + +From: Geoffrey Furnish <fu...@ac...> +Date: Wed, 12 Apr 2000 11:57:44 -0700 (PDT) +To: plp...@pl... +Subject: [Plplot-general] Welcome to the new era of PLplot! + +Hello Everyone, + +Welcome to the new era of PLplot! + +With many apologies to all for the extreme delays that have been +incurred over the past months, it gives me great pleasure to be able +at this time, to finally provide details of the reorganization of the +PLplot project. + +As most of you know, PLplot was hosted at dino.ph.utexas.edu during +the time that Maurice and I were employed at the Institute for Fusion +Studies, at the University of Texas at Austin. dino continued as the +host for PLplot after we each moved on, but we were searching for a +suitable place to relocate the project. As I am sure you all know, +the open source software movement has gained a lot of steam in recent +times, and there were a number of organizations willing to host +PLplot. Of course we deeply appreciate the offers of sponsorship +tendered by all of these organizations. However, it turned out that +the technical challenges of hosting a project like this, were not fully +appreciated by all such sponsoring agencies. Curiously, we were a +little hobbled in a sense, by being just a hair ahead of the curve, +and wound up sinking significant amounts of effort into rehosting +PLplot at two sites that ultimately simply didn't have the +sophistication to quite bring the task to closure. + +The final resting place, is sourceforge.net, operated by VA Linux. +PLplot now has its own domain, plplot.org, and a variety of services +accessible through this domain. The domain is hosted by +sourceforge.net. I will explain the current services available +through this domain below. If anyone in the user base wants to thank +VA Linux for their sponsorship of the PLplot project, you could send +email to Chris DiBona <ch...@va...> to express your +appreciation. Our web site will also contain attribution to this +effect, once we get it put together. + +Now, on to the list of services provided through plplot.org. + +First, the new official web site for PLplot is www.plplot.org. Randy +is the web master, and will be bringing this up as time permits. For +starters, he has imported the prior PLplot web site by Noel Gorelick, +and will be expanding from here. + +Second, we now export the PLplot CVS repository via anonymous CVS at +cvs.plplot.org. From now on, anyone will be able to obtain the latest +version of PLplot using anonymous CVS. CVS has become the darling +source control system of the open source movement, and deservedly so. +I won't take the time in this message to attempt to explain this in +detail. There are other resources on the net, and at sourceforge.net +in particular, which do this job. The very short story is that you +can do this: + setenv CVSROOT :pserver:ano...@cv...:/cvsroot/plplot + cvs login + <no password required, just hit return> + cvs co plplot +Once you have done this, you will be able to track ongoing development +(if you wish) by doing a "cvs update" from time to time. + +Third, there will be anonymous ftp as well. We don't have anything up +there yet, so information will be forthcoming on this once we finally +put some files up there. Probably we will put up the same files that +were on dino, providing the historical "releases", and in the future +we may make pacakged tarballs of future releases. Anyway, more info +on that once there is something concrete to report. + +Fourth, there is a new mailing list, "plp...@pl...". All +subscribers to the old list (pl...@di...) have been +transfered to the new list. Also, a few people who've sent me email +over the last fewmonths have been added as well (that is, the requests +I could still locate in my inbox :-). You should've just received a +message from the list manager explaining to you how you can interact +with it. Sourceforge.net uses "mailman", which is a bit different +from what we used before (majordomo), but there is plenty to like +about mailman if you haven't encountered it before. Primarily it +interacts with subscribers through a web interface, so you have much +greater personal control over how it interacts with you. In +particular, I hope that this will finally put an end to the +desperation "get me off this list" problem we were having before. +Please, if you want off, just go the mailman management page, and do +the job! But you can also use it to control numerous delivery options +including digesting, etc. + +One thing that we were not able to do, is to get the old majordomo +mailing list archives, directly imported into the new list manager. +We'll probably put those historic list archives up on the anon ftp +site somewhere so you can still get them if you want. Anyway, mailing +list traffic from this point forward /is/ being archived, just not +combined with the old stuff. Oh well. + +Anyway, "plp...@pl..." supercedes the old list. The old +one is down anyway as everyone probably knows. The story on that is +that dino actually suffered a cataclysmic hardware failure last fall, +just as we were about to move off to sourceforge. This resulted in +lost time as we scurried to restore the filesystems, recover the +PLplot cvs repository, etc. If anybody wants to thank the IFS staffer +who exerted heroic effort to help us recover from this disaster, you +could send email to Jim Dibble <di...@pe...>, to +express your gratitude. He worked really hard to help dig us out of +that ditch. + +Besides "plp...@pl...", there is also +"plp...@pl...", to which cvs commit messages will be sent +when developers with write access to the repository commit changes. +If you haven't used cvs before, let me just say that these commit +messages are an extremely valuable way to keep abreast of what is +going on in a software development project. It results in a certain +amount of email, so if that bothers you, you won't want to be on that +list (or you should make sure you have a filtering agent so you can +control the inbound flux to your liking). But if you just want to +have a very low-overhead way to keep tabs on what is going on, who's +done what when, who's patches have been applied to the repository, +etc, subscribing to plp...@pl... is an excellent idea. If +you are one of the people who makes occasional patch submissions, you +might want to subscribe at least long enough to watch for when your +changes go in, for example. + +Fifth, there is a "project page" at sourceforge.net: + http://sourceforge.net/project/?group_id=2915 +We will probably have a link to this somewhere on the www.plplot.org +home page. Anyway, people who are tapped into how sourceforge works, +may find this useful. Frankly, none of the current developers have a +clue what to do with all this stuff, so we're all learning here, and +will all have to collectively help educate ourselves about how to get +the most value out of this. Anyway, one thing that is fairly easy to +access from here, is a browsable portal onto the CVS repository, +orchestrated through "CVS Web", modified by sourceforge.net. There is +lots to explore at sourceforge.net, far more than I am even remotely +aware of or could convey in this message. We will all have to learn +together how to best exploit this resource for the open source +community. + +Finally, a word about people. As long time participants on this +mailing list will remember, there has long been a lot of frustration +over the difficulty of getting patches into PLplot. This has +primarily been a function of the fact that Maurice and I are both out +of the university scene now, holding down real day jobs with real +professional commitments, and simply haven't been able to provide the +bandwidth to support the pace of development of an open source project +like PLplot. We (and here "we" means the entire PLplot community) +certainly appreciate and have benefited from the valuable +contributions offered by many over the years, but my personal failure +to rapidly incorporate everyone's work, has been a key liability for +the project. Correcting this critical problem, was one of the primary +goals in seeking a rehosting arrangement for PLplot. + +This vision has now FINALLY! been realized. At this time, there are a +total of five people with write access to the repository: + +myself +Maurice +Alan W. Irwin +James Phillips (randy) +Rafael Laboissiere + +Alan and Rafael have been overhauling the documentation of late, and +that will be showing up for public consumption before long. And Randy +is picking up the webmaster role. + +Exactly how we will deal with inbound patch submissions has not been +fully worked out, but my point here is, at least /I/ am no longer the +bottleneck. We have a publicly accessible host, we are exporting the +CVS repo through anoncvs, and we have multiple people who can act to +get patches applied. These are the reasons for regarding this as the +dawn of the new era of PLplot. I would like to take this chance to +publicly thank Alan, Randy and Rafael for joining Maurice and I in +this capacity, and for both the work they have already done, and will +be doing as we move forward. + +it has been a long time in coming (too long), but I hope that all +PLplot users everywhere will share my enthusiasm as we enter the new +millenium with a revitalized PLplot project. + +I suppose in closing, it would be good to say some words about what is +really going on with the software itself. Curiously, this is the part +I am least able to address. And in a strange but real sense, that is +the best part of this message. I have no idea what is ahead of us. +It really just depends on what the world wide open source developer +community pulls out of their hats (keyboards). + +Onward Ho! + +-- +Geoffrey Furnish Actel Corporation fu...@ac... +Senior Staff Engineer 955 East Arques Ave voice: 408-522-7528 +Placement & Routing Sunnyvale, CA 94086-4533 fax: 408-522-8041 + +"... because only those who write the code truly control the project." + -- Jamie Zawinski + +_______________________________________________ + + +************************************************************************** +Version 4.99i: Summary of major changes +************************************************************************** + +Primarily a bug-fix release. Major changes: + +- Changed distribution status to GPL/LGPL. See "Copyright". Other + administrative file name changes. + +- Various small bugs in configure & build fixed. + +- Bug in code to keep track of window world coordinates fixed (symptoms: + core dump would occur after the 65th page if pleop() was used to end the + page rather than pladv()). Thanks to Ian Searle for providing a + demonstration of the bug. + +- Bugs fixed in core routines + TK driver handling of colormap when + saturation = 0; i.e. grayscale plots. Thanks to Radey Shouman for his + help. + +- Fixed a bug that was preventing the exponential label from showing up + under certain circumstances (3-D plots). + +- Conex device (tek emulator under DOS) driver support added in tek.c; + contributed by Mark Olesen. + +- Bug fixed in X driver that was causing a "Bad Match" error upon startup + on some systems. + +- Postscript driver: + Fixed bug in current point update after state change. + Fix to allow cmap1 color selections to appear in grayscale; + contributed by Radey Shouman. + +- Tk driver: Fix to allow a TK main window to be associated with each + PLStream (so x14c now can use either the TK or DP driver), also fix to + properly update plserver's X-driver when cmap state is + changed. Contributed by Radey Shouman. + +- pltek: Now checks for the terminal type and provides some rudimentary + decisions based on the TERM setting. The xterm is unaffected, but with + a terminal type of "tekterm", the 'Page >' prompt is printed on the + graphics screen so that the plot can be seen without having pltek flash + back to the text screen immediately. Contributed by Mark Olesen. + +- Updated DOS/EMX driver provided by Mark Olesen; see sys/dos/emx for + more detail. + +- Amiga driver: Updated to work with new version. Now has configure + script for SKsh users -- is now trivial to configure and build. A + fall-back Makefile is also provided. Several bugs fixed, notably one in + changing the screen mode. A compiled version of the PLplot library + (SAS/C 6.2, IEEE single precision floats, optimized) and plrender are + now available in the ~ftp/plplot/amiga directory on dino.ph.utexas.edu. + +- The "plpr" script (used when choosing "Print" from Tk driver) now + defaults to using color postscript as output. + +************************************************************************** +Version 4.99h: Summary of major changes +************************************************************************** + +This was to be a quick bug fix update, but I got going on several major +changes plus addition of user contributions. So there are some important +new capabilities as well as a lot of bug fixes. + +Note: as a result of a lack of time, most of the DOS drivers and the Amiga +driver have not been upgraded to work with the new configure/build files. +The DOS DJGPP port is one exception. So these are essentially useless +until these are done. I will issue another beta as soon as these are +done, hopefully within a week or two. + +------------------------------------------------------------------------ +Configuration, building, and installation: + +Completely new configuration script! The new configure script is +built using GNU autoconf, and great care was taken in its construction. +Highlights: + +1) It is capable of doing basically everything it did before. Packages + are included by typing e.g. --enable-tk or --disable-tk, etc. Major + options are set by typing e.g. --with-gcc or --without-opt, etc. There + is a startup file so you can customize on a per-site basis like before. + Although now, shell variables are used to store settings rather than m4 + variables, and only are substituted in the various files at the end of + the configure script. + +2) The Makefile components are usable on non-Unix systems. Notably the + dependencies -- the Makefile is constructed by concatenating several + text files together. The setting of configuration defaults on a + non-Unix system is similarly easier than before. Just keep around + custom copies of plConfig.h and plDevs.h. It's better to have + 'configure' build these for you, of course. + +3) The configure script is fully automatic. It should find all the major + capabilities needed by PLplot if your system supports them, with no + user intervention required. + +4) The object file dependency list is now constructed using "gcc -MM" + (like "makedepend", only better), making it much more robust. + +5) Much better support for shared libraries. Works under HPUX and SunOS + now, with Solaris, Irix, OSF-1 probably not far behind if someone wants + to fill in the details. AIX probably I will get to, and Geoff has + started on the Linux shared library build. + +6) The new header file plConfig.h makes it much easier to get portable + code, by concentrating all the hacks in one place and using configure + to set them accordingly. + +See the cf/README file for more info. It works pretty much without +user intervention now, though. + +------------------------------------------------------------------------ +The second major addition: a Tcl PLplot API and interpreter. This means +you can now make PLplot calls from Tcl. An interpreter -- pltcl (an +extended tclsh) is provided. Be sure to check out the demo programs as +follows: + +foobar% pltcl +% source demos.tcl +% 1 +% 2 + +etc, up through 7. Not all PLplot C API calls are supported by the Tcl +API yet. + +As part of this development a Tcl extension was created to handle matrices +(arrays). Right now it supports 1-d, 2-d, and 3-d arrays. Eventually +it will be improved a bit more and better documented and released to +the Tcl/TK community. For now, read doc/tclMatrix.doc and check +out the Tcl demos. + +------------------------------------------------------------------------ + +Other changes: + +- Another major cleanup of the core source files. + +- Ability to make point, line, and polygon plots in 3-d added. + (Contributed by Geoff Furnish.) + +- Changes to support returning the cursor location in world coordinates + given a mouse click, if supported by the driver (only used by windows + driver so far -- a lot of work remains for the rest of the package to + use it). Supports multiple windows per page, and gets the correct set + of world coordinates for the plot selected. Contributed by Paul + Casteels. + +- Function to plot map backgrounds added, where the map data is read from + the specified map data file (examples provided). Contributed by Wesley + Ebisuzaki. + +- Fast point plot ability added. Call plpoin with code=-1 for a 4X or so + speed increase in point plots. + +- Search path for needed files improved and made more consistent. + (Contributed by Mark Olesen). + +- Can now save a plot from the Tk/DP driver and have the colors turn + out correctly. + +- Previous problems re: mono X displays fixed. + +- Multiple sequential bop or eop's are now munged together, making it + easier to avoid blank pages. + +- Can now change the number of subpages at any time. + +- Fixed problems in tek drivers caused by entering cbreak mode -- + this was fouling up user input (tty) requests. Now it goes into cbreak + mode when switching to the graphics screen, and back to canonical mode + when switching to the text screen. Also, this is all usable now on + systems without an ANSI libc. + +- Added new driver -- HP Laserjet III in HPGL emulation mode (lj_hpgl). + Contributed by Conrad Steenberg. + +- Greatly improved support for embedded plframe use (directly from + plserver or a plframe-extended wish). See tk01, tk02, tk03 for more + info. Many minor improvements and a few bugs squashed in the Tk driver. + + +************************************************************************** +Version 4.99g: Summary of major changes (gigantic update) +************************************************************************** + +This was a very big update, sorry for the delay. The changes may cause +some inconvenience, and while we can't promise an end to that :-), will +try to hold them to a minimum before the "big" 5.0 release. As we get +closer, there are some changes we will make in the "now or never" frame of +mind, meant to positively affect future versions without causing too much +difficulty now. + + +- Document: + +We have made substantial progress towards converting the (previously +LaTeX) document into LaTeXinfo. This gives us the capability to have both +a high quality (yes, if you work at it hard enough) printed manual as well +as a hypertext-like online document, using info. There are many info +readers around but the most famous is the one built into Emacs. Both +documents are now available but still need considerable work, and +unfortunately are still largely based on information as of the beta +plplot4.0 series. Based on the number and importance of the changes since +then, we an updated manual is desperately needed! And it is coming...the +contents of the doc directory represents work in progress. + + +- configuration, building, and installation: + +configure has been improved so that it runs more like GNU configure. You +can run it from the root directory (although I don't necessarily advise +doing so) and use the GNU configure --prefix option for setting the +location to install PLplot (more useful). + +THE DEFAULT INSTALL DIRECTORY PROCEDURE HAS BEEN CHANGED!!!!! +Now PLplot by default installs into: + prefix-dir/ + bin/ + lib/ + include/ + doc/ + tcl/ +It had to be done before it was too late. Makefile overrides default +value of INSTALL_DIR if m4 macro PREFIX is defined. Also check out +the script "mklinks". + + +- Tcl-DP driver added! + +Yes, finally finished, and it works great everywhere but on Crays (sigh -- +and I thought I fixed that in the Tcl-DP 3.1 distribution). By using the +DP driver you bypass all the difficulties with using Xauth (or the +security problems of doing without it) in the TK driver. The Tcl-DP +driver is much more usable. It's even distributable -- tested between an +HP and a Sun (as server), and between an IBM RS-6000 and HP (as server). +Just specify -server_host (and -user if necessary), and it will try to +start up a plserver under your user account (need to have .rhost info set +appropriately). Great at increasing responsiveness of the GUI, and screen +dumps always save to the local machine. + + +- TK interface improvements. + +The TK interface (using either the TK or DP drivers) has been greatly +enhanced. "plserver" can be used exactly like an extended "wish" now (the +TK windowing shell). It has been extended to know about "plframe" widgets +and how to interact with the PLplot/TK/DP drivers. There are documented +interfaces and demos now for building your own extended wish using the +plframe widget, as well as an illustration of direct plotting using PLplot +from Tcl (through the plframe widget). Color map manipulation tools added +for cmap0 and cmap1. Support for user-modifiable keystroke invocation of +menu items added. The following are the defaults keymappings as set in +pldefaults.tcl, their meaning is clear: + + global key_zoom_select; set key_zoom_select "z" + global key_zoom_reset; set key_zoom_reset "r" + global key_print; set key_print "p" + global key_save_again; set key_save_again "s" + global key_scroll_right; set key_scroll_right "Right" + global key_scroll_left; set key_scroll_left "Left" + global key_scroll_up; set key_scroll_up "Up" + global key_scroll_down; set key_scroll_down "Down" + global key_scroll_slow; set key_scroll_slow "3" + global key_scroll_fast; set key_scroll_fast "15" + global key_scroll_faster; set key_scroll_faster "75" + +The last three indicate the number of pixels to scroll each time one +keystroke is processed. To get the "fast" setting, press Shift-cursor. +You get the "faster" setting by using shift-ctrl-cursor. + + +- Area fill support added. + +Now you can do color (hardware) fills. Only recognized on certain drivers +(postscript, all X-based drivers, all Tek4107 devices, and Amiga). +Tektronix devices even recognize hardware pattern fills (obtained by a +negative fill index). Devices that don't know about hardware fills +automatically get a software pattern fill. + + +- Color map usage improved. + +I have finally implemented the dual cmap0/cmap1 color scheme I have long +talked about. cmap0 is typically for fixed colors, like axes, labels, +lines, etc. Color 0 of cmap0 should now be the background! It may not +always be enforced now but it eventually will be, as well as possible. +cmap1 is envisioned as a continuous tone color palette. cmap0 contains +the "normal" colors that you set by plcol(<number>) (now plcol0(<number>) +is preferred). cmap1 contains colors set indirectly, by specifying +"position in cmap1 space" -- a floating point number from 0 to 1 (previous +to that a mapping between position and color must have been specified). +This scheme has the advantage that you can take advantage of as many or +few colors as the output device supports. For example, with postscript +which supports arbitrarily many colors (the printer itself is another +story), you can get 256 different colors, because that's as many as I +currently provide storage for. On X-windows with 8 plane displays I get a +lot less with a shared colormap (custom colormap support is almost done), +maybe around 50-100, depending on window manager. And this scheme is even +useful on as few as 16 colors, as is commonly available (Tek 4107 +emulation is fairly common on the PC, Mac, and Amiga). You do so by +limiting the number of colors in cmap0, leaving most for use in cmap1. +plshade() function enhanced to work with either color map -- see example +program x16c for a demonstration. + +If at all possible, try to play with x16c using the TK or DP driver -- +modifying the color map interactively is simply wonderful. Especially try +modifying cmap1, and then loading in the alternate palettes cmap1b.pal and +cmap1c.pal (cmap1a.pal is the default), and play with it; you will get a +much better idea how it works while I get around to documenting it! + + +- Revamped Tek drivers, added explicit support for: Versaterm (Mac), and +VLT (Amiga). [explicit mskermit(DOS) support was added in the last +release] Tek4107 driver improved to actually work on a real tek 4107 +(thanks to Paul Kirschner). Commands to set color palette now are sent +from PLplot. + + +- Postscript output behaves better with ghostview -- it actually +backspaces correctly (hey hey, finally). + + +- X driver: lots of changes to support color map1 and custom color +maps. Right now does NOT use a custom color map by default since I didn't +think it was quite ready for the big time, especially as part of the +TK/DP driver. There are some internal settings the adventurous can +play with. Function added for capturing mouse events added (thanks to +Radey Shouman); this soon should lead to a way of returning world +coordinates at the mouse position. + + +- Improved DOS driver support (see Changes.log and the drivers) + + +- All source files handling API: replaced call to plexit() on simple +(recoverable) errors with simply printing the error message (via +plabort()) and returning. Should help avoid loss of computer time in some +critical circumstances (during a long batch run, for example). + + +- behavior of exit handler changed to be more useful for users who want +greater control of execution. + + +- plus lots of bug fixes, memory leaks plugged, compilation warnings +eliminated, etc. + + +************************************************************************** +Version 4.99g notes distributed by e-mail: +************************************************************************** + +From: Maurice LeBrun <mj...@di...> +Subject: Some comments on 4.99g +To: plp...@di... +Date: Fri, 27 May 94 4:32:26 CDT + +Just some varied comments about this last release. + +This release (PLplot 4.99g) was very long awaited, and very draining. +There have been several new capabilities that I thought were too crucial +to wait any longer before adding them, as well as many minor improvements, +bug fixes, and user-contributions. There are a lot of energetic users-of +and contributers-to PLplot. A bit to my surprise, I might say. (But +then, recently when I talked to Sze Tan, the original author, he said the +same thing..) + +No doubt there will be some difficulties encountered with this release. +There may have to be a bug fix release before long to fix problems, so +please let me know of difficulties. It might help to post them to the +mailing list so that other people don't have to experience the same. + +This is the last big release before 5.0, the rest I hope are relatively +minor updates. With 5.0, we aim for (a) most known bugs to be killed, (b) +all capabilities we've been working on to be finished, (c) all significant +capabilities be documented, and (d) the package tested on all platforms +listed as "supported". We are approaching this goal, but are a little +ways from it yet. However you may still get your chance to help out :-). +More on that later. + +Some comments on the new capabilities: + +A big newbie is the Tcl-DP driver. Fixes some of the inherent problems +in the TK driver send mechanism, and is distributable across a network. +It really works, I've tried it (for some configurations at least). +Nothing like zooming in on a plot at workstation speeds when the renderer +front-end is running on a machine half the world away (yes, I've even +done it between Texas and Japan). + +Lots of cool improvements to the TK interface. Check out the color +palette manipulation tools. Certain menus have keystroke equivalents now +(e.g. hit 'z'), making simple operations much nicer (thanks, Dave, for the +suggestion). + +Support for direct usage of the plframe widget as a Tcl/TK extension. +This is very important since Tcl/TK, especially when taking all the cool +extensions into account, is *THE* way to program X-based applications +(IMO). Sophisticated user interfaces to scientific codes under X, using +the PLplot widget (among others) are just waiting to be built... + +Color map 1 support -- this is designed to enable the type of continous +color plots you can get in other graphics packages (e.g. I'm thinking of +NCSA Ximage) but in a more flexible way, allowing intuitive modification, +and display on a number of devices. This capability comes in through the +new color palette -- cmap1, and you take a look at x16c to see the effect. +Preferably using multiple color (supported) devices, and for the best +effect using the TK or DP driver, playing with the color palette using the +new menu options. Thanks again to Wesley Ebisuzaki for contributing +"plshade()", the function doing the shading here. Note: plshade is the +best way for limited number of colors, but for a larger number of colors +(and grid points) a different algorithm would be optimal, something that +is more discrete. At 0th approximation, you might try a function that +just fills each grid cell with a constant color. Suggestions appreciated. +Also, the TK driver right now does not proper clip polygons (on zooms), +because the algorithm to do so hasn't been implemented. Any interested +parties? + +Work on the updated manual is underway and so far it's looking pretty good... + +-- +Maurice LeBrun mj...@di... +Institute for Fusion Studies, University of Texas at Austin + +Faire de la bonne cuisine demande un certain temps. Si on vous fait +attendre, c'est pour mieux vous servir, et vous plaire. + [menu of restaurant Antoine, New Orleans] + + +************************************************************************** +Version 4.99d additional notes +************************************************************************** + +From: Maurice LeBrun <mj...@di...> +Subject: Some comments about plplot 4.99d. +To: plp...@di... +Date: Wed, 27 Oct 93 17:08:53 CDT + +I thought I'd mention a few other things in association with this latest +release. There may be a smaller release before long, to address those +(hopefully minor) problems that arise. Then I will take a break from +plplot development for a short while, and after that my major push will be +to update the document, a few more enhancements, and slow down a bit. + +The TK driver was a tremendous push, but I expect it to be worth it. It +has the basic functionality that I've always wanted, along with a huge +potential for customization. It is my intention that people can build +arbitrary Tcl/TK applications that just happen to use plplot widgets to +plot into. I plan to construct at least one demo of how to do such a +thing, and it will be interesting to see what kinds of variations people +come up with. Tcl/TK programming is so easy that there should be lots (I +can't believe I was actually considering doing a Motif-based driver). +Writing a widget, on the other hand, is hard work, but now that's more or +less history. + +Also, as I constructed the Tcl/TK driver I tried to add the required +increases in functionality to plplot in a rather generic way. The stuff +you would ordinarily use a GUI for can typically be handled from the +command line in fact -- like page layout, zooms, and orientation +(independent of the output driver). This is because of the new driver +interface functions that sit between the library proper and the driver. +They are located in plcore.c if you are interested, and do 4 +transformations so far -- orientation (you can even rotate by a fractional +amount, but I never bothered making it come out perfect! :-), altering the +window into plot space (zoom), altering the window into device space +(page layout, good for adding margins), and global device coordinate +transformation (good for making page dumps to an arbitrary device). +Other windowing drivers should be able to use these facilities without +too much trouble. Eventually I hope to intercept other commands at +the interface layer, and decide what to do based on the intelligence +of the driver. This might be used to handle device dependent fonts, +hardware color fill, and so forth. + +At this point, I'm feeling the need to release the package in a more +"official" way than I have in the past. So my main priority will be to +bring the documentation up to sync with the rest of the package. I would +also like to accomplish the first 4 or so things on my 'ToDo' list, and as +it should involve about 1/10 of the effort of the original TK driver (I +hope :-) expect it to happen in a much shorter time frame than the 8 +months or so this release has taken. I'll probably introduce some +compatibility problems at that time in an effort to consolidate, but after +5.0 will be very careful about breaking old software. + +In another change, I would like to ask for volunteers to maintain versions +of plplot for specific platforms. These people could get prerelease +versions in order to make whatever fixes are needed ahead of time. We are +most likely to have the package be up-to-date on the following systems: +HP-UX, Linux; less likely on the following: SunOS, AIX, Unicos, Super-UX, +Amiga, and maybe not at all on any others. It would be good for someone +to put in shared library support for any system that supports them (so far +I've only done it under HP-UX). I am gradually moving away from +supporting the Amiga driver so could use some help here. Geoff has +abandoned the DOS drivers and is leaning away from supporting the OS/2 +driver, so here again target platform developers are needed. + +-- +Maurice LeBrun mj...@di... +Institute for Fusion Studies, University of Texas at Austin + +Faire de la bonne cuisine demande un certain temps. Si on vous fait +attendre, c'est pour mieux vous servir, et vous plaire. + [menu of restaurant Antoine, New Orleans] + + + + +************************************************************************** +Version 4.99d pre-announcement plus assorted e-mail notes leading up to 4.99d +************************************************************************** + +Pre-announcement +---------------- + +As I mentioned in the previous plplot beta update, I have been working on a +plplot TCL/TK driver under Unix/X (if you're not running Unix/X you might as +well skip this message). Well, I am now far enough along that I can +confidently say it will see the light of day before too long, on the order of +weeks I hope. It should be really nice, too, and am letting everybody know +ahead of time so that you can go get the TCL/TK distribution (if you don't +have it already) and start playing with it. TCL is an embeddable interpreter +in the spirit of Perl, and TK a Motif-like toolkit. They are free and very +high quality; furthermore, constructing the script language & interpreter +together with a toolkit appears to be an outrageously useful thing to do. +You have to try it to see why. For more info, consult the substantial +documentation (and demos) for TCL/TK. I have appended the FAQ to the end of +this message. To quickly find the section on how to get TCL/TK and assorted +other stuff, search on the string "Tcl/Tk Package Catalog". + +Moving on, the basic code is done and I am finally getting simple plots out. +What I have is the following: + +User-code + | + plplot tk driver plserver + TCL interpreter <------ tk send ------> interpreter + | | + data writer ---- named pipe -----> data reader + | + child X window + +The user-code and the renderer (tentatively called plserver, I may change +this) form a client/server relationship, and are separate processes. Under +typical usage, where the user-code starts first, it forks (vfork on systems +that support it) and execs the renderer. TCL/TK communication (via X +properties) is used between their embedded interpreters to send commands back +and forth (note: an extended version of TCL called TCL-DP allows sockets +to be used for this, and I will eventually try to extend the model to +allow distribution across a network). The existence of an interpreter in +each process (actually each plplot stream that uses tk too) allows for +a very easy & robust method of sending commands between processes. +The data goes through via an alternate channel (fifo for now, maybe socket +later) for maximum speed. + +Also I will support an alternate configuration where the server launches +applications, telling them what plplot widget to plot to. Lots of nice +possibilities there. + +By offloading the GUI-building code into a simple script language, it becomes +easy to build menus, buttons, scrollbars, etc. All of these will be +configurable by the user, as well as the ability to map events (such as +button presses) to functions calls in your own program. But you will need to +learn TCL/TK to get maximum benefit. Even without additional effort, +however, you will be able to use the new driver's menus to do zooming, dump +to file, etc. + +More later.. + +-- +Maurice LeBrun mj...@di... +Institute for Fusion Studies, University of Texas at Austin + +Faire de la bonne cuisine demande un certain temps. Si on vous fait +attendre, c'est pour mieux vous servir, et vous plaire. + [menu of restaurant Antoine, New Orleans] + +From: Maurice J. LeBrun <mj...@di...> +Subject: slowness of the TK driver over the net +To: wd...@ct... +Date: Thu, 19 Aug 93 11:24:46 CDT +Cc: fu...@di..., gr...@di..., + mj...@di... + +> Also, I used plrender to render a meta file on dino and display on +> ctrss2. One thing that I noticed is that it seems to take much longer for +> the plots to be displayed running the tk driver than just the standard X +> driver. Do you notice that locally on dino? Also, do you have a good demo +> meta file lying around that I could grab and try? I could not get plrender +> to go backwards with my meta file using the tk driver and wonder if it is +> because the meta file was generated by an ancient version of plplot. +> +> Dave + +The current incarnation of the TK driver is going to run a bit slow +over a network because of the way messages are passed between the +user code and the renderer. In this case plrender is the user code +and it forks the actual renderer. + +The TK send command does IPC by storing messages in an X property +of the display. This means that when running over a network, messages +must travel from the X client to the X server and then back again. +Kind of sick, I know. So for the time being I recommend using the TK +driver primarily locally. + +Eventually I will switch to a scheme where the renderer runs on the +display server. I don't think there will be many changes required for +this to work. The FIFO becomes a socket, and the TK send is replaced by +Tcl-DP's send (which uses sockets). I have to work out how to start the +remote renderer. Probably it could try doing a remsh (or rsh on systems +that don't have remsh), and if it fails for security or other reasons, +tell the user to start the renderer manually using some specified socket +for communication. I don't feel like getting into all this now but that's +sort of how it will look. + +-- +Maurice LeBrun mj...@di... +Institute for Fusion Studies, University of Texas at Austin + +Faire de la bonne cuisine demande un certain temps. Si on vous fait +attendre, c'est pour mieux vous servir, et vous plaire. + [menu of restaurant Antoine, New Orleans] + +Date: Tue, 7 Sep 93 23:55:50 -0500 +From: Maurice J. LeBrun <mj...@di...> +To: fu...@di..., gr...@di..., + mj...@di..., wd...@di... +Subject: CVS update notice + +Update of /u/tpc/cvs/plplot/sys/unix +In directory dino:/u/mjl/devel/plplot4p99d/sys/unix + +Modified Files: + makefile.m4 +Log Message: +Now passes in INSTALL_DIR as a string containing the installation +directory, typically /usr/local/plplot. Files that get this information +include plfont.c (for use in the font search path), plserver.c (for use in +th... [truncated message content] |
From: <arj...@us...> - 2013-11-21 11:06:14
|
Revision: 12731 http://sourceforge.net/p/plplot/code/12731 Author: arjenmarkus Date: 2013-11-21 11:06:09 +0000 (Thu, 21 Nov 2013) Log Message: ----------- Make the pausing in running the Tk examples optional. The pausing may occur both in the examples themselves via the plspause command and by the plxframe widget. It is made optional via the auxiliary command ::plw::set_pause. Also make sure that the standard wish examples are drawn in a window of suitable size (the plstdwin command is responsible for this) Modified Paths: -------------- trunk/bindings/tk/plwidget.tcl trunk/examples/tk/standard_examples.in trunk/examples/tk/tkdemos.tcl Modified: trunk/bindings/tk/plwidget.tcl =================================================================== --- trunk/bindings/tk/plwidget.tcl 2013-11-21 02:52:05 UTC (rev 12730) +++ trunk/bindings/tk/plwidget.tcl 2013-11-21 11:06:09 UTC (rev 12731) @@ -2,7 +2,7 @@ #---------------------------------------------------------------------------- # PLPLOT TK/TCL graphics renderer # plplot window initialization procs -# +# # Maurice LeBrun # IFS, University of Texas at Austin # 29-May-1993 @@ -10,7 +10,7 @@ # Note: to keep namespace problems to a minimum, all procs defined here begin # with "pl". These are further subdivided into "plw::" for button- or # menu-accessible commands, or "pl_" for utility commands. -# +# # anything in 'plw::' should really be considered private. If they are # needed externally (i.e. in user code) then we should rename them or expose # them. @@ -131,6 +131,7 @@ # Set up bop/eop handling when running tcl scripts from a plserver global plstate_bopseen; set plstate_bopseen($w) 0 + global plstate_pause; set plstate_pause($w) 1 $w.plwin configure -bopcmd "plw::bop $w" $w.plwin configure -eopcmd "plw::eop $w" } @@ -141,6 +142,7 @@ #---------------------------------------------------------------------------- # plw::setup_defaults # plw::set_zoom_handler +# plw::set_pause # # Set up default settings. #---------------------------------------------------------------------------- @@ -221,6 +223,12 @@ set user_zoom_handler($w) $zoom_handler } +proc plw::set_pause {w pause} { + global plstate_pause + + set plstate_pause($w) $pause +} + #---------------------------------------------------------------------------- # plw::create_TopRow # @@ -276,7 +284,7 @@ label $w.ftop.lstat -anchor w -relief raised plw::label_push $w "[string range $w 1 end]" pack append $w.ftop $w.ftop.lstat \ - {right expand fill} + {right expand fill} } #---------------------------------------------------------------------------- @@ -423,7 +431,7 @@ proc plw::create_pmenu_orient {w} { global pmenu; set m $pmenu($w).orient - $pmenu($w) add cascade -label "Orient" -menu $m + $pmenu($w) add cascade -label "Orient" -menu $m menu $m $m configure -postcommand "plw::update_orient $w" @@ -595,10 +603,10 @@ # Set up palette tools $m add command -label "Palette 0" \ - -command "plcmap0_edit $w.plwin $w" + -command "plcmap0_edit $w.plwin $w" $m add command -label "Palette 1" \ - -command "plcmap1_edit $w.plwin $w" + -command "plcmap1_edit $w.plwin $w" # Palettes - options (another cascade) @@ -696,7 +704,7 @@ global key_resume global key_zoom_select global key_zoom_back - global key_zoom_forward + global key_zoom_forward global key_zoom_reset global key_print global key_save_again @@ -734,7 +742,7 @@ $key_scroll_right "plw::view_scroll $w 1 0 $state" \ $key_scroll_left "plw::view_scroll $w -1 0 $state" \ $key_scroll_up "plw::view_scroll $w 0 -1 $state" \ - $key_scroll_down "plw::view_scroll $w 0 1 $state" + $key_scroll_down "plw::view_scroll $w 0 1 $state" # Pass keypress event info back to client. @@ -823,11 +831,11 @@ proc plw::bop {w} { global plot_menu_on; if !$plot_menu_on return - global plstate_resume plstate_bopseen + global plstate_resume plstate_bopseen plstate_pause # There was a previous bop, deal with it. - if $plstate_bopseen($w) { + if {$plstate_bopseen($w)} { update idletasks plw::label_push $w "press <Enter> to continue." tkwait variable plstate_resume($w) @@ -847,7 +855,7 @@ # i.e. control is returned to the interpreter before the next time this proc # is called, there will be no pause. - set plstate_bopseen($w) 1 + set plstate_bopseen($w) $plstate_pause($w) set id2 [after idle "global plstate_bopseen; set plstate_bopseen($w) 0"] } @@ -882,7 +890,7 @@ # # The closelink command was added in the hopes of making the dp driver # cleanup a bit more robust, but doesn't seem to have any effect except -# to slow things down quite a bit. +# to slow things down quite a bit. #---------------------------------------------------------------------------- proc plw::end {w} { @@ -1195,7 +1203,7 @@ # zoomopts($w,1): # 0 first and last points specified determine opposite corners # of zoom box. -# 1 box is centered about the first point clicked on, +# 1 box is centered about the first point clicked on, # perimeter follows mouse (default) # #---------------------------------------------------------------------------- @@ -1438,7 +1446,7 @@ #---------------------------------------------------------------------------- proc plw::view_select {w x0 y0 x1 y1} { - + # Adjust arguments to be in bounds and properly ordered (xl < xr, etc) set xl [min $x0 $x1] @@ -1504,7 +1512,7 @@ if { $nxl < 0.0 } then { set nxl 0.0 set nxr [expr 2.0 * $xl] - } + } if { $nxr > 1.0 } then { set nxr 1.0 set nxl [expr 2.0 * $xl - 1.0] @@ -1700,7 +1708,7 @@ #---------------------------------------------------------------------------- proc plw::fixview {w hscroll vscroll} { - + # Create scrollbars if they don't already exist. set created_sb 0 @@ -1825,11 +1833,11 @@ global plot_menu_on; if !$plot_menu_on return global plmenu_lstat plmenu_lstat_depth - if { ![info exists plmenu_lstat_depth] || ![info exists plmenu_lstat_depth($w)] } { + if { ![info exists plmenu_lstat_depth] || ![info exists plmenu_lstat_depth($w)] } { set plmenu_lstat_depth($w) -1 } if {$plmenu_lstat_depth($w) < 9} { - incr plmenu_lstat_depth($w) + incr plmenu_lstat_depth($w) } { puts stderr "plw::label_push: you just hit the max stack depth" } @@ -1848,7 +1856,7 @@ global plot_menu_on; if !$plot_menu_on return global plmenu_lstat plmenu_lstat_depth - if ![info exists plmenu_lstat_depth] { + if ![info exists plmenu_lstat_depth] { puts stderr "plw::label_pop: no stack defined yet, strange.." return } Modified: trunk/examples/tk/standard_examples.in =================================================================== --- trunk/examples/tk/standard_examples.in 2013-11-21 02:52:05 UTC (rev 12730) +++ trunk/examples/tk/standard_examples.in 2013-11-21 11:06:09 UTC (rev 12731) @@ -7,6 +7,16 @@ # continued ones with a trailing backslash like this one \ 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. +# 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 +# 0 1 2 Modified: trunk/examples/tk/tkdemos.tcl =================================================================== --- trunk/examples/tk/tkdemos.tcl 2013-11-21 02:52:05 UTC (rev 12730) +++ trunk/examples/tk/tkdemos.tcl 2013-11-21 11:06:09 UTC (rev 12731) @@ -57,7 +57,8 @@ } "*wish*" - "*tclsh*" { - # use 'wish" method + # use 'wish" method (size of the window is determined by plstdwin) + plstdwin . plframe .plw set plwin .plw } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arj...@us...> - 2013-11-22 13:36:25
|
Revision: 12739 http://sourceforge.net/p/plplot/code/12739 Author: arjenmarkus Date: 2013-11-22 13:36:22 +0000 (Fri, 22 Nov 2013) Log Message: ----------- Enable the ntk device for Windows. The changes involved are: - CMake accepts the ntk device on Windows, even though there is no X11 library - interp->result is replaced by Tcl_GetStringResult(interp) - the name of the plframe widget is always a fixed but valid widget name. This part will have to be revisited - use the plwindow field as the title? Modified Paths: -------------- trunk/cmake/modules/tcl-related.cmake trunk/drivers/ntk.c Modified: trunk/cmake/modules/tcl-related.cmake =================================================================== --- trunk/cmake/modules/tcl-related.cmake 2013-11-22 13:32:42 UTC (rev 12738) +++ trunk/cmake/modules/tcl-related.cmake 2013-11-22 13:36:22 UTC (rev 12739) @@ -179,8 +179,14 @@ endif(ENABLE_tk AND NOT TK_FOUND) if(ENABLE_tk AND NOT X11_FOUND) - message(STATUS "WARNING: X11 not found so disabling Tk interface code") - set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE) + if(WIN32 AND NOT CYGWIN) + message(STATUS "WARNING: X11 not found, turning off Tk devices that depend on it") + set(PLD_tk OFF CACHE BOOL "Enable Tk device" FORCE) + set(PLD_tkwin OFF CACHE BOOL "Enable Tk device" FORCE) + else(WIN32 AND NOT CYGWIN) + message(STATUS "WARNING: X11 not found so disabling Tk interface code") + set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE) + endif(WIN32 AND NOT CYGWIN) endif(ENABLE_tk AND NOT X11_FOUND) if(ENABLE_tk) Modified: trunk/drivers/ntk.c =================================================================== --- trunk/drivers/ntk.c 2013-11-22 13:32:42 UTC (rev 12738) +++ trunk/drivers/ntk.c 2013-11-22 13:36:22 UTC (rev 12739) @@ -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", interp->result ); + fprintf( stderr, "%s\n", Tcl_GetStringResult(interp) ); } } @@ -239,9 +239,9 @@ if ( pls->geometry != NULL ) sscanf( pls->geometry, "%dx%d", &xmax, &ymax ); - if ( pls->plwindow != NULL ) +/* if ( pls->plwindow != NULL ) strcpy( base, pls->plwindow ); - else + 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", interp->result ); + fprintf( stderr, "%s\n", Tcl_GetStringResult(interp) ); plexit( "No such tk server." ); } } @@ -301,9 +301,11 @@ // Set up device parameters Tcl_Eval( interp, "tk scaling" ); // pixels per mm - ppm = (PLFLT) atof( interp->result ) / ( 25.4 / 72. ); + ppm = (PLFLT) atof( Tcl_GetStringResult(interp) ) / ( 25.4 / 72. ); plP_setpxl( ppm, ppm ); plP_setphy( xmin, xmax * scale, ymin, ymax * scale ); + + tk_cmd( "update" ); } static void @@ -371,11 +373,11 @@ { tk_cmd( "update" ); tk_cmd( "info exists keypress" ); - sscanf( interp->result, "%d", &st ); + sscanf( Tcl_GetStringResult(interp), "%d", &st ); } tk_cmd( "set keypress" ); - sscanf( interp->result, "%d", &key ); + sscanf( Tcl_GetStringResult(interp), "%d", &key ); //fprintf(stderr,"\n%d\n", key);fflush(stderr); tk_cmd( "unset keypress" ); st = 0; @@ -433,7 +435,7 @@ { tk_cmd( "update" ); tk_cmd( "winfo exists $plf.f2.c$ccanv" ); - sscanf( interp->result, "%d", &st ); + sscanf( Tcl_GetStringResult(interp), "%d", &st ); } st = 0; // this give a "Segmentation fault", even after checking for the canvas! @@ -450,16 +452,16 @@ { tk_cmd( "update" ); tk_cmd( "info exists xloc" ); - sscanf( interp->result, "%d", &st ); + sscanf( Tcl_GetStringResult(interp), "%d", &st ); } tk_cmd( "set xloc" ); - sscanf( interp->result, "%d", &gin.pX ); + sscanf( Tcl_GetStringResult(interp), "%d", &gin.pX ); tk_cmd( "set yloc" ); - sscanf( interp->result, "%d", &gin.pY ); + sscanf( Tcl_GetStringResult(interp), "%d", &gin.pY ); tk_cmd( "set bloc" ); - sscanf( interp->result, "%d", &gin.button ); + sscanf( Tcl_GetStringResult(interp), "%d", &gin.button ); tk_cmd( "set sloc" ); - sscanf( interp->result, "%d", &gin.state ); + sscanf( Tcl_GetStringResult(interp), "%d", &gin.state ); gin.dX = (PLFLT) gin.pX / xmax; gin.dY = 1. - (PLFLT) gin.pY / ymax; 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. |
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 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. |