You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(33) |
Jun
|
Jul
(30) |
Aug
(2) |
Sep
|
Oct
(30) |
Nov
(136) |
Dec
(59) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(255) |
Feb
(169) |
Mar
(322) |
Apr
(185) |
May
(33) |
Jun
(89) |
Jul
(47) |
Aug
(59) |
Sep
(40) |
Oct
(31) |
Nov
(74) |
Dec
(84) |
2002 |
Jan
(163) |
Feb
(78) |
Mar
(23) |
Apr
(5) |
May
(22) |
Jun
(75) |
Jul
(143) |
Aug
(48) |
Sep
(111) |
Oct
(58) |
Nov
(124) |
Dec
(278) |
2003 |
Jan
(106) |
Feb
(276) |
Mar
(354) |
Apr
(97) |
May
(14) |
Jun
(3) |
Jul
(7) |
Aug
(21) |
Sep
(83) |
Oct
(110) |
Nov
(3) |
Dec
(119) |
2004 |
Jan
(318) |
Feb
(409) |
Mar
(68) |
Apr
(23) |
May
(105) |
Jun
(147) |
Jul
(69) |
Aug
(53) |
Sep
(23) |
Oct
(14) |
Nov
(15) |
Dec
(63) |
2005 |
Jan
(146) |
Feb
(69) |
Mar
(157) |
Apr
(127) |
May
(166) |
Jun
(8) |
Jul
(5) |
Aug
(3) |
Sep
(8) |
Oct
(17) |
Nov
(29) |
Dec
(34) |
2006 |
Jan
(3) |
Feb
(4) |
Mar
(1) |
Apr
(70) |
May
(241) |
Jun
(82) |
Jul
(344) |
Aug
(196) |
Sep
(87) |
Oct
(57) |
Nov
(121) |
Dec
(86) |
2007 |
Jan
(60) |
Feb
(67) |
Mar
(102) |
Apr
(28) |
May
(13) |
Jun
(29) |
Jul
(38) |
Aug
(56) |
Sep
(91) |
Oct
(89) |
Nov
(50) |
Dec
(68) |
2008 |
Jan
(87) |
Feb
(47) |
Mar
(100) |
Apr
(34) |
May
(65) |
Jun
(54) |
Jul
(98) |
Aug
(128) |
Sep
(109) |
Oct
(141) |
Nov
(40) |
Dec
(206) |
2009 |
Jan
(176) |
Feb
(226) |
Mar
(134) |
Apr
(84) |
May
(152) |
Jun
(85) |
Jul
(91) |
Aug
(153) |
Sep
(141) |
Oct
(59) |
Nov
(87) |
Dec
(75) |
2010 |
Jan
(58) |
Feb
(41) |
Mar
(51) |
Apr
(74) |
May
(81) |
Jun
(39) |
Jul
(30) |
Aug
(43) |
Sep
(76) |
Oct
(59) |
Nov
(62) |
Dec
(52) |
2011 |
Jan
(125) |
Feb
(41) |
Mar
(96) |
Apr
(53) |
May
(21) |
Jun
(23) |
Jul
(48) |
Aug
(71) |
Sep
(37) |
Oct
(81) |
Nov
(60) |
Dec
(32) |
2012 |
Jan
(51) |
Feb
(23) |
Mar
|
Apr
(8) |
May
(2) |
Jun
|
Jul
(8) |
Aug
(25) |
Sep
(4) |
Oct
(32) |
Nov
(17) |
Dec
(2) |
2013 |
Jan
(8) |
Feb
(2) |
Mar
(9) |
Apr
(9) |
May
(37) |
Jun
(48) |
Jul
(63) |
Aug
(42) |
Sep
(59) |
Oct
(83) |
Nov
(141) |
Dec
(133) |
2014 |
Jan
(57) |
Feb
(58) |
Mar
(58) |
Apr
(25) |
May
(14) |
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <ai...@us...> - 2013-12-13 19:28:00
|
Revision: 12864 http://sourceforge.net/p/plplot/code/12864 Author: airwin Date: 2013-12-13 19:27:57 +0000 (Fri, 13 Dec 2013) Log Message: ----------- Make filter_rpath function robust against the case where none of CMAKE_C_IMPLICIT_LINK_DIRECTORIES, CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES, or CMAKE_FORTRAN_IMPLICIT_LINK_DIRECTORIES are defined. This should never happen according to the CMake documentation, but Phil apparently found a case where it did happen for the "Visual Studio 11" generator (for VS2012). My conclusion is that generator is severely broken, but nevertheless making this function robust for the case when none of these variables are defined cannot be a bad thing to do. Modified Paths: -------------- trunk/cmake/modules/plplot_functions.cmake Modified: trunk/cmake/modules/plplot_functions.cmake =================================================================== --- trunk/cmake/modules/plplot_functions.cmake 2013-12-13 18:27:43 UTC (rev 12863) +++ trunk/cmake/modules/plplot_functions.cmake 2013-12-13 19:27:57 UTC (rev 12864) @@ -207,8 +207,12 @@ ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES} ${CMAKE_FORTRAN_IMPLICIT_LINK_DIRECTORIES} ) - list(REMOVE_DUPLICATES directories_to_be_removed) + if(directories_to_be_removed) + list(REMOVE_DUPLICATES directories_to_be_removed) + endif(directories_to_be_removed) + + if(directories_to_be_removed) list(REMOVE_ITEM internal_rpath ${directories_to_be_removed}) endif(directories_to_be_removed) endif(internal_rpath) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-12-13 18:27:46
|
Revision: 12863 http://sourceforge.net/p/plplot/code/12863 Author: airwin Date: 2013-12-13 18:27:43 +0000 (Fri, 13 Dec 2013) Log Message: ----------- Reinstate all tests again. Fixed some bogus logic I recently introduced concerning PLD_psc (which of course does not exist and PLD_ps should be used instead). Modified Paths: -------------- trunk/plplot_test/CMakeLists.txt Modified: trunk/plplot_test/CMakeLists.txt =================================================================== --- trunk/plplot_test/CMakeLists.txt 2013-12-13 10:18:08 UTC (rev 12862) +++ trunk/plplot_test/CMakeLists.txt 2013-12-13 18:27:43 UTC (rev 12863) @@ -29,6 +29,19 @@ ) set(TEST_DEVICE psc CACHE STRING "device used for ctest") + # There is no PLD_psc or PLD_psttfc and the PLD_ps and PLD_psttf + # variables must be used instead. All other PLD_* names correspond + # to exact device names. So adjust for this complicated naming + # scheme in a general way in case some other TEST_DEVICE is chosen + # in the future. + if(TEST_DEVICE STREQUAL "psc") + set(PLD_TEST_DEVICE ${PLD_ps}) + elseif(TEST_DEVICE STREQUAL "psttfc") + set(PLD_TEST_DEVICE ${PLD_psttf}) + else(TEST_DEVICE STREQUAL "psc") + set(PLD_TEST_DEVICE ${PLD_${TEST_DEVICE}}) + endif(TEST_DEVICE STREQUAL "psc") + set(TEST_SCRIPT "./plplot-test.sh --verbose") set(TEST_SCRIPT_DEVICE "${TEST_SCRIPT} --device=${TEST_DEVICE}") @@ -97,14 +110,14 @@ set(test_output_files_LIST) set(examples_compare_DEPENDS) - if(PLD_${TEST_DEVICE}) + if(PLD_TEST_DEVICE) add_test(examples_c ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=c" ) list(APPEND examples_compare_DEPENDS examples_c) list_example_files(. ${TEST_DEVICE} c output_list) list(APPEND test_output_files_LIST ${output_list}) - endif(PLD_${TEST_DEVICE}) + endif(PLD_TEST_DEVICE) if(ENABLE_cxx) configure_file( @@ -113,14 +126,14 @@ @ONLY ) list(APPEND SCRIPTS test_cxx.sh) - if(PLD_${TEST_DEVICE}) + if(PLD_TEST_DEVICE) add_test(examples_cxx ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=cxx" ) list(APPEND examples_compare_DEPENDS examples_cxx) list_example_files(. ${TEST_DEVICE} cxx output_list) list(APPEND test_output_files_LIST ${output_list}) - endif(PLD_${TEST_DEVICE}) + endif(PLD_TEST_DEVICE) endif(ENABLE_cxx) if(ENABLE_f95) @@ -130,14 +143,14 @@ @ONLY ) list(APPEND SCRIPTS test_f95.sh) - if(PLD_${TEST_DEVICE}) + if(PLD_TEST_DEVICE) add_test(examples_f95 ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=f95" ) list(APPEND examples_compare_DEPENDS examples_f95) list_example_files(. ${TEST_DEVICE} f95 output_list) list(APPEND test_output_files_LIST ${output_list}) - endif(PLD_${TEST_DEVICE}) + endif(PLD_TEST_DEVICE) endif(ENABLE_f95) if(ENABLE_java) @@ -147,14 +160,14 @@ @ONLY ) list(APPEND SCRIPTS test_java.sh) - if(PLD_${TEST_DEVICE}) + if(PLD_TEST_DEVICE) add_test(examples_java ${SH_EXECUTABLE} -c "${JAVA_TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=java" ) list(APPEND examples_compare_DEPENDS examples_java) list_example_files(. ${TEST_DEVICE} j output_list) list(APPEND test_output_files_LIST ${output_list}) - endif(PLD_${TEST_DEVICE}) + endif(PLD_TEST_DEVICE) endif(ENABLE_java) if(ENABLE_octave) @@ -172,14 +185,14 @@ @ONLY ) list(APPEND SCRIPTS test_octave.sh) - if(PLD_${TEST_DEVICE}) + if(PLD_TEST_DEVICE) add_test(examples_octave ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=octave" ) list(APPEND examples_compare_DEPENDS examples_octave) list_example_files(. ${TEST_DEVICE} o output_list) list(APPEND test_output_files_LIST ${output_list}) - endif(PLD_${TEST_DEVICE}) + endif(PLD_TEST_DEVICE) endif(ENABLE_octave) if(ENABLE_python) @@ -189,14 +202,14 @@ @ONLY ) list(APPEND SCRIPTS test_python.sh) - if(PLD_${TEST_DEVICE}) + if(PLD_TEST_DEVICE) add_test(examples_python ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=python" ) list(APPEND examples_compare_DEPENDS examples_python) list_example_files(. ${TEST_DEVICE} p output_list) list(APPEND test_output_files_LIST ${output_list}) - endif(PLD_${TEST_DEVICE}) + endif(PLD_TEST_DEVICE) endif(ENABLE_python) if(ENABLE_tcl) @@ -215,14 +228,14 @@ ${CMAKE_CURRENT_BINARY_DIR}/test_tcl.sh @ONLY ) - if(PLD_${TEST_DEVICE}) + if(PLD_TEST_DEVICE) add_test(examples_tcl ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=tcl" ) list(APPEND examples_compare_DEPENDS examples_tcl) list_example_files(. ${TEST_DEVICE} t output_list) list(APPEND test_output_files_LIST ${output_list}) - endif(PLD_${TEST_DEVICE}) + endif(PLD_TEST_DEVICE) set(PLTCL_DIR ${BIN_DIR}) # Transform drive-letter form to leading-slash form, see comment above. string(REGEX REPLACE "^(.):" "/\\1/" PLTCL_DIR ${PLTCL_DIR}) @@ -240,14 +253,14 @@ @ONLY ) list(APPEND SCRIPTS test_pdl.sh) - if(PLD_${TEST_DEVICE}) + if(PLD_TEST_DEVICE) add_test(examples_pdl ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=pdl" ) list(APPEND examples_compare_DEPENDS examples_pdl) list_example_files(. ${TEST_DEVICE} pdl output_list) list(APPEND test_output_files_LIST ${output_list}) - endif(PLD_${TEST_DEVICE}) + endif(PLD_TEST_DEVICE) endif(ENABLE_pdl) if(ENABLE_ada) @@ -257,14 +270,14 @@ @ONLY ) list(APPEND SCRIPTS test_ada.sh) - if(PLD_${TEST_DEVICE}) + if(PLD_TEST_DEVICE) add_test(examples_ada ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=ada" ) list(APPEND examples_compare_DEPENDS examples_ada) list_example_files(. ${TEST_DEVICE} a output_list) list(APPEND test_output_files_LIST ${output_list}) - endif(PLD_${TEST_DEVICE}) + endif(PLD_TEST_DEVICE) endif(ENABLE_ada) if(ENABLE_ocaml) @@ -274,14 +287,14 @@ @ONLY ) list(APPEND SCRIPTS test_ocaml.sh) - if(PLD_${TEST_DEVICE}) + if(PLD_TEST_DEVICE) add_test(examples_ocaml ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=ocaml" ) list(APPEND examples_compare_DEPENDS examples_ocaml) list_example_files(. ${TEST_DEVICE} ocaml output_list) list(APPEND test_output_files_LIST ${output_list}) - endif(PLD_${TEST_DEVICE}) + endif(PLD_TEST_DEVICE) endif(ENABLE_ocaml) if(ENABLE_lua) @@ -291,14 +304,14 @@ @ONLY ) list(APPEND SCRIPTS test_lua.sh) - if(PLD_${TEST_DEVICE}) + if(PLD_TEST_DEVICE) add_test(examples_lua ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=lua" ) list(APPEND examples_compare_DEPENDS examples_lua) list_example_files(. ${TEST_DEVICE} lua output_list) list(APPEND test_output_files_LIST ${output_list}) - endif(PLD_${TEST_DEVICE}) + endif(PLD_TEST_DEVICE) endif(ENABLE_lua) if(ENABLE_d) @@ -308,18 +321,18 @@ @ONLY ) list(APPEND SCRIPTS test_d.sh) - if(PLD_${TEST_DEVICE}) + if(PLD_TEST_DEVICE) add_test(examples_d ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=d" ) list(APPEND examples_compare_DEPENDS examples_d) list_example_files(. ${TEST_DEVICE} d output_list) list(APPEND test_output_files_LIST ${output_list}) - endif(PLD_${TEST_DEVICE}) + endif(PLD_TEST_DEVICE) endif(ENABLE_d) # Run C examples with different drivers - if(PLD_psc) + if(PLD_ps) if (NOT TEST_DEVICE STREQUAL "psc") add_test(examples_psc ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=psc" @@ -327,7 +340,7 @@ list_example_files(. psc c output_list) list(APPEND test_output_files_LIST ${output_list}) endif(NOT TEST_DEVICE STREQUAL "psc") - endif(PLD_psc) + endif(PLD_ps) if(PLD_psttf) add_test(examples_psttfc This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2013-12-13 10:18:11
|
Revision: 12862 http://sourceforge.net/p/plplot/code/12862 Author: jbauck Date: 2013-12-13 10:18:08 +0000 (Fri, 13 Dec 2013) Log Message: ----------- Merge my edits with Andrew's from 12852. Modified Paths: -------------- trunk/bindings/ada/plplot.adb trunk/bindings/ada/plplot.ads trunk/bindings/ada/plplot_thin.ads trunk/bindings/ada/plplot_traditional.adb trunk/bindings/ada/plplot_traditional.ads trunk/examples/ada/x22a.adb trunk/examples/ada/xthick22a.adb Modified: trunk/bindings/ada/plplot.adb =================================================================== --- trunk/bindings/ada/plplot.adb 2013-12-13 05:28:03 UTC (rev 12861) +++ trunk/bindings/ada/plplot.adb 2013-12-13 10:18:08 UTC (rev 12862) @@ -2332,15 +2332,12 @@ -- Draw a line connecting two points, accounting for coordinate transform - procedure Draw_Line_Segment - (n : Integer; - x1 : Long_Float; - y1 : Long_Float; - x2 : Long_Float; - y2 : Long_Float) is + procedure Draw_Line_With_Transform + (Num_Segments : Integer; + x1, y1, x2, y2 : Long_Float) is begin - plpath(n, x1, y1, x2, y2); - end Draw_Line_Segment; + plpath(Num_Segments, x1, y1, x2, y2); + end Draw_Line_With_Transform; -- Plots array y against x for n points using ASCII code "code". Modified: trunk/bindings/ada/plplot.ads =================================================================== --- trunk/bindings/ada/plplot.ads 2013-12-13 05:28:03 UTC (rev 12861) +++ trunk/bindings/ada/plplot.ads 2013-12-13 10:18:08 UTC (rev 12862) @@ -1506,12 +1506,9 @@ -- Draw a line connecting two points, accounting for coordinate transform - procedure Draw_Line_Segment - (n : Integer; - x1 : Long_Float; - y1 : Long_Float; - x2 : Long_Float; - y2 : Long_Float); + procedure Draw_Line_With_Transform + (Num_Segments : Integer; + x1, y1, x2, y2 : Long_Float); -- Plots array y against x for n points using ASCII code "code". Modified: trunk/bindings/ada/plplot_thin.ads =================================================================== --- trunk/bindings/ada/plplot_thin.ads 2013-12-13 05:28:03 UTC (rev 12861) +++ trunk/bindings/ada/plplot_thin.ads 2013-12-13 10:18:08 UTC (rev 12862) @@ -1272,6 +1272,7 @@ plpat(nlin : PLINT; inc : PL_Integer_Array; del : PL_Integer_Array); pragma Import(C, plpat, "c_plpat"); + -- Draw a line connecting two points, accounting for coordinate transforms. procedure Modified: trunk/bindings/ada/plplot_traditional.adb =================================================================== --- trunk/bindings/ada/plplot_traditional.adb 2013-12-13 05:28:03 UTC (rev 12861) +++ trunk/bindings/ada/plplot_traditional.adb 2013-12-13 10:18:08 UTC (rev 12862) @@ -2247,13 +2247,10 @@ -- Draw a line connecting two points, accounting for coordinate transform procedure plpath - (n : Integer; - x1 : Long_Float; - y1 : Long_Float; - x2 : Long_Float; - y2 : Long_Float) is + (Num_Segments : Integer; + x1, y1, x2, y2 : Long_Float) is begin - PLplot_Thin.plpath(n, x1, y1, x2, y2); + PLplot_Thin.plpath(Num_Segments, x1, y1, x2, y2); end plpath; Modified: trunk/bindings/ada/plplot_traditional.ads =================================================================== --- trunk/bindings/ada/plplot_traditional.ads 2013-12-13 05:28:03 UTC (rev 12861) +++ trunk/bindings/ada/plplot_traditional.ads 2013-12-13 10:18:08 UTC (rev 12862) @@ -1413,13 +1413,11 @@ Spacings : Integer_Array_1D); + -- Draw a line connecting two points, accounting for coordinate transform procedure plpath - (n : Integer; - x1 : Long_Float; - y1 : Long_Float; - x2 : Long_Float; - y2 : Long_Float); + (Num_Segments : Integer; + x1, y1, x2, y2 : Long_Float); -- Plots array y against x for n points using ASCII code "code". Modified: trunk/examples/ada/x22a.adb =================================================================== --- trunk/examples/ada/x22a.adb 2013-12-13 05:28:03 UTC (rev 12861) +++ trunk/examples/ada/x22a.adb 2013-12-13 10:18:08 UTC (rev 12862) @@ -2,7 +2,7 @@ -- Simple vector plot example --- Copyright (C) 2008 Jerry Bauck +-- Copyright (C) 2008, 2013 Jerry Bauck -- This file is part of PLplot. @@ -22,6 +22,7 @@ with System, + System.Address_To_Access_Conversions, Ada.Numerics, Ada.Numerics.Long_Elementary_Functions, PLplot_Traditional, @@ -40,7 +41,6 @@ arrow2_x : Real_Vector(0 .. 5) := (-0.5, 0.3, 0.3, 0.5, 0.3, 0.3); arrow2_y : Real_Vector(0 .. 5) := ( 0.0, 0.0, 0.2, 0.0, -0.2, 0.0); - xmax_data : Long_Float; -- Vector plot of the circulation about the origin procedure circulation is @@ -122,7 +122,8 @@ end loop; plenv(xmin, xmax, ymin, ymax, 0, 0); - pllab("(x)", "(y)", "#frPLplot Example 22 - constriction (arrow style"&Integer'image(astyle)&")"); + pllab("(x)", "(y)", "#frPLplot Example 22 - constriction (arrow style" & + Integer'image(astyle) & ")"); plcol0(2); plvect(u, v, -1.0, pltr2'access, cgrid2'Address); plcol0(1); @@ -136,79 +137,87 @@ data : PLPointer); pragma Convention(C, transform); - procedure transform - (x, y : Long_Float; - xt, yt : out Long_Float; - data : PLPointer) - is + -- Global transform function for a constriction using data passed in + -- This is the same transformation used in constriction. + procedure transform(x, y : Long_Float; xt, yt : out Long_Float; Data : PLPointer) is + + -- Convert the generic pointer represented as System.Address to a proper Ada pointer aka + -- access variable. Recall that PLpointer is a subtype of System.Address. + package Data_Address_Conversions is new System.Address_To_Access_Conversions(Long_Float); + Data_Pointer : Data_Address_Conversions.Object_Pointer; -- An Ada access variable + xmax : Long_Float; begin + Data_Pointer := Data_Address_Conversions.To_Pointer(Data); + xmax := Data_Pointer.all; xt := x; - yt := y / 4.0 * ( 3.0 - cos( pi * x / xmax_data ) ); + yt := y / 4.0 * (3.0 - cos(Pi * x / xmax)); end transform; - -- Vector plot of flow through a constricted pipe - -- with a coordinate transformation + + -- Vector plot of flow through a constricted pipe with a coordinate transform procedure constriction2 is dx, dy, x, y : Long_Float; xmin, xmax, ymin, ymax : Long_Float; Q, b : Long_Float; nx : constant Integer := 20; ny : constant Integer := 20; - nc : constant Integer := 11; - nseg : constant Integer := 20; - u, v : Real_Matrix(0 .. nx - 1, 0 .. ny -1); - clev : Real_Vector(0 .. nc - 1); cgrid2 : aliased Transformation_Data_Type_2 (x_Last => nx - 1, y_Last => ny - 1); + u, v : Real_Matrix(0 .. nx - 1, 0 .. ny - 1); + nc : constant Integer := 11; + nseg : constant Integer := 20; + clev : Real_Vector(0 .. nc - 1); begin dx := 1.0; dy := 1.0; - xmin := Long_Float(-nx / 2) * dx; + xmin := Long_Float(-nx / 2) * dx; -- Careful; Ada / rounds, C / truncates. xmax := Long_Float( nx / 2) * dx; ymin := Long_Float(-ny / 2) * dy; ymax := Long_Float( ny / 2) * dy; - - xmax_data := xmax; - plstransform( transform'Unrestricted_Access, System.Null_Address ); + plstransform(transform'Unrestricted_Access, xmax'Address); + cgrid2.nx := nx; + cgrid2.ny := ny; Q := 2.0; + for i in 0 .. nx - 1 loop x := (Long_Float(i - nx / 2) + 0.5) * dx; - for j in 0 .. ny - 1 loop - y := (Long_Float(j - ny / 2) + 0.5) * dy; - cgrid2.xg(i, j) := x; - cgrid2.yg(i, j) := y; - b := ymax / 4.0 * (3.0 - cos(pi * x / xmax)); - u(i, j) := Q * ymax / b; - v(i, j) := 0.0; + for j in 0 .. ny - 1 loop + y := (Long_Float(j - ny / 2) + 0.5) * dy; + cgrid2.xg(i, j) := x; + cgrid2.yg(i, j) := y; + b := ymax / 4.0 * (3.0 - cos(Pi * x / xmax)); + u(i, j) := Q * ymax / b; + v(i, j) := 0.0; end loop; end loop; - - for i in 0 .. nc - 1 loop - clev(i) := Q + Long_Float(i) * Q / Long_Float( nc - 1 ); - end loop; + for i in 0 .. nc - 1 loop + clev(i) := Q + Long_Float(i) * Q / Long_Float(nc - 1); + end loop; + plenv(xmin, xmax, ymin, ymax, 0, 0); pllab("(x)", "(y)", "#frPLplot Example 22 - constriction with plstransform"); plcol0(2); - plshades(u, Null, xmin + dx / 2.0, xmax - dx / 2.0, - ymin + dy / 2.0, ymax - dy / 2.0, - clev, 0.0, 1, 1.0, - plfill'access, False, Null, System.Null_Address); - plvect(u, v, -1.0, pltr2'access, cgrid2'Address); - plpath( nseg, xmin, ymax, xmax, ymax ); - plpath( nseg, xmin, ymin, xmax, ymin ); + plshades(u, Null, + xmin + dx / 2.0, xmax - dx / 2.0, ymin + dy / 2.0, ymax - dy / 2.0, + clev, 0.0, 1, 1.0, plfill'access, False, Null, System.Null_Address); + plvect(u, v, + -1.0, pltr2'access, cgrid2'Address); + + -- Plot edges using plpath (which accounts for coordinate transformation) rather than plline + plpath(nseg, xmin, ymax, xmax, ymax); + plpath(nseg, xmin, ymin, xmax, ymin); plcol0(1); - - -- Clear the global transform. - Clear_Custom_Coordinate_Transform; - -- or... - -- plstransform(null, System.Null_Address); - + + Clear_Custom_Coordinate_Transform; + -- or... + -- plstransform(null, System.Null_Address); end constriction2; + -- Vector plot of the gradient of a shielded potential (see example 9) procedure potential is @@ -318,7 +327,6 @@ -- Generates several simple vector plots. ---------------------------------------------------------------------------- begin - -- Parse and process command line arguments plparseopts(PL_PARSE_FULL); @@ -339,10 +347,10 @@ -- Reset arrow style to the default by passing two NULL arrays. -- This line uses the awkward method of the C API to reset the default arrow style. - plsvect(System.Null_Address, System.Null_Address, False); + -- plsvect(System.Null_Address, System.Null_Address, False); -- This method of resetting the default arrow style is a little more Ada-friendly... - -- plsvect; + plsvect; -- ... as is this one which is identical but for name. -- Reset_Vector_Arrow_Style; Modified: trunk/examples/ada/xthick22a.adb =================================================================== --- trunk/examples/ada/xthick22a.adb 2013-12-13 05:28:03 UTC (rev 12861) +++ trunk/examples/ada/xthick22a.adb 2013-12-13 10:18:08 UTC (rev 12862) @@ -2,7 +2,7 @@ -- Simple vector plot example --- Copyright (C) 2008 Jerry Bauck +-- Copyright (C) 2008, 2013 Jerry Bauck -- This file is part of PLplot. @@ -22,6 +22,7 @@ with System, + System.Address_To_Access_Conversions, Ada.Numerics, Ada.Numerics.Long_Elementary_Functions, PLplot, @@ -33,17 +34,14 @@ PLplot, PLplot_Auxiliary; - - procedure xthick22a is -- Pairs of points making the line segments used to plot the user defined arrow arrow_x : Real_Vector(0 .. 5) := (-0.5, 0.5, 0.3, 0.5, 0.3, 0.5); arrow_y : Real_Vector(0 .. 5) := ( 0.0, 0.0, 0.2, 0.0, -0.2, 0.0); arrow2_x : Real_Vector(0 .. 5) := (-0.5, 0.3, 0.3, 0.5, 0.3, 0.3); arrow2_y : Real_Vector(0 .. 5) := ( 0.0, 0.0, 0.2, 0.0, -0.2, 0.0); - - xmax_data : Long_Float; + -- Vector plot of the circulation about the origin procedure circulation is dx, dy, x, y : Long_Float; @@ -139,80 +137,88 @@ data : PLPointer); pragma Convention(C, transform); - procedure transform - (x, y : Long_Float; - xt, yt : out Long_Float; - data : PLPointer) - is + -- Global transform function for a constriction using data passed in + -- This is the same transformation used in constriction. + procedure transform(x, y : Long_Float; xt, yt : out Long_Float; Data : PLPointer) is + + -- Convert the generic pointer represented as System.Address to a proper Ada pointer aka + -- access variable. Recall that PLpointer is a subtype of System.Address. + package Data_Address_Conversions is new System.Address_To_Access_Conversions(Long_Float); + Data_Pointer : Data_Address_Conversions.Object_Pointer; -- An Ada access variable + xmax : Long_Float; begin + Data_Pointer := Data_Address_Conversions.To_Pointer(Data); + xmax := Data_Pointer.all; xt := x; - yt := y / 4.0 * ( 3.0 - cos( pi * x / xmax_data ) ); + yt := y / 4.0 * (3.0 - cos(Pi * x / xmax)); end transform; - -- Vector plot of flow through a constricted pipe - -- with a coordinate transformation + -- Vector plot of flow through a constricted pipe with a coordinate transform procedure constriction2 is dx, dy, x, y : Long_Float; xmin, xmax, ymin, ymax : Long_Float; Q, b : Long_Float; nx : constant Integer := 20; ny : constant Integer := 20; - nc : constant Integer := 11; - nseg : constant Integer := 20; - u, v : Real_Matrix(0 .. nx - 1, 0 .. ny -1); - clev : Real_Vector(0 .. nc - 1); cgrid2 : aliased Transformation_Data_Type_2 (x_Last => nx - 1, y_Last => ny - 1); + u, v : Real_Matrix(0 .. nx - 1, 0 .. ny - 1); + nc : constant Integer := 11; + nseg : constant Integer := 20; + clev : Real_Vector(0 .. nc - 1); begin dx := 1.0; dy := 1.0; - xmin := Long_Float(-nx / 2) * dx; + xmin := Long_Float(-nx / 2) * dx; -- Careful; Ada / rounds, C / truncates. xmax := Long_Float( nx / 2) * dx; ymin := Long_Float(-ny / 2) * dy; ymax := Long_Float( ny / 2) * dy; - xmax_data := xmax; - - Set_Custom_Coordinate_Transform(transform'Unrestricted_Access, System.Null_Address); - + Set_Custom_Coordinate_Transform(transform'Unrestricted_Access, xmax'Address); + + cgrid2.nx := nx; + cgrid2.ny := ny; Q := 2.0; + for i in 0 .. nx - 1 loop x := (Long_Float(i - nx / 2) + 0.5) * dx; - for j in 0 .. ny - 1 loop - y := (Long_Float(j - ny / 2) + 0.5) * dy; - cgrid2.xg(i, j) := x; - cgrid2.yg(i, j) := y; - b := ymax / 4.0 * (3.0 - cos(pi * x / xmax)); - u(i, j) := Q * ymax / b; - v(i, j) := 0.0; + for j in 0 .. ny - 1 loop + y := (Long_Float(j - ny / 2) + 0.5) * dy; + cgrid2.xg(i, j) := x; + cgrid2.yg(i, j) := y; + b := ymax / 4.0 * (3.0 - cos(Pi * x / xmax)); + u(i, j) := Q * ymax / b; + v(i, j) := 0.0; end loop; end loop; - for i in 0 .. nc - 1 loop - clev(i) := Q + Long_Float(i) * Q / Long_Float( nc - 1 ); - end loop; + for i in 0 .. nc - 1 loop + clev(i) := Q + Long_Float(i) * Q / Long_Float(nc - 1); + end loop; - Set_Environment(xmin, xmax, ymin, ymax, Not_Justified, Linear_Box_Plus); + Set_Environment(xmin, xmax, ymin, ymax, 0, 0); Write_Labels("(x)", "(y)", "#frPLplot Example 22 - constriction with plstransform"); Set_Pen_Color(Yellow); - Shade_Regions(u, Null, xmin + dx / 2.0, xmax - dx / 2.0, - ymin + dy / 2.0, ymax - dy / 2.0, - clev, 0.0, 1, 1.0, - Fill_Polygon'access, False, Null, System.Null_Address); - Vector_Plot(u, v, -1.0, Plot_Transformation_2'access, cgrid2'Address); - Draw_Line_Segment( nseg, xmin, ymax, xmax, ymax ); - Draw_Line_Segment( nseg, xmin, ymin, xmax, ymin ); + Shade_Regions(u, Null, + xmin + dx / 2.0, xmax - dx / 2.0, ymin + dy / 2.0, ymax - dy / 2.0, + clev, 0.0, 1, 1.0, Fill_Polygon'access, False, Null, System.Null_Address); + Vector_Plot(u, v, + -1.0, Plot_Transformation_2'access, cgrid2'Address); + + -- Plot edges using plpath (which accounts for coordinate transformation) rather than plline + Draw_Line_With_Transform(nseg, xmin, ymax, xmax, ymax); + Draw_Line_With_Transform(nseg, xmin, ymin, xmax, ymin); Set_Pen_Color(Red); - - -- Clear the global transform. - Clear_Custom_Coordinate_Transform; + Clear_Custom_Coordinate_Transform; + -- or... + -- plstransform(null, System.Null_Address); end constriction2; - - + + -- Vector plot of the gradient of a shielded potential (see example 9) procedure potential is nper : constant Integer := 100; @@ -342,13 +348,13 @@ -- Reset arrow style to the default by passing two NULL arrays. -- This line uses the awkward method of the C API to reset the default arrow style. - Set_Arrow_Style_For_Vector_Plots(System.Null_Address, System.Null_Address, False); + -- Set_Arrow_Style_For_Vector_Plots(System.Null_Address, System.Null_Address, False); -- This method of resetting the default arrow style is a little more Ada-friendly... -- plsvect; -- ... as is this one which is identical but for name. - -- Reset_Vector_Arrow_Style; + Reset_Vector_Arrow_Style; potential; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-12-13 05:28:07
|
Revision: 12861 http://sourceforge.net/p/plplot/code/12861 Author: airwin Date: 2013-12-13 05:28:03 +0000 (Fri, 13 Dec 2013) Log Message: ----------- More useful debug printout of TCL_DIR. Modified Paths: -------------- trunk/bindings/tcl/tclAPI.c Modified: trunk/bindings/tcl/tclAPI.c =================================================================== --- trunk/bindings/tcl/tclAPI.c 2013-12-12 22:09:07 UTC (rev 12860) +++ trunk/bindings/tcl/tclAPI.c 2013-12-13 05:28:03 UTC (rev 12861) @@ -695,6 +695,7 @@ int pls_auto_path( Tcl_Interp *interp ) { + int debug = plsc->debug; char *buf, *ptr = NULL, *dn; int return_code = TCL_OK; #ifdef DEBUG @@ -706,6 +707,8 @@ // Add TCL_DIR #ifdef TCL_DIR + if( debug ) + fprintf( stderr, "adding %s to auto_path\n", TCL_DIR ); Tcl_SetVar( interp, "dir", TCL_DIR, TCL_GLOBAL_ONLY ); if ( tcl_cmd( interp, "set auto_path [linsert $auto_path 0 $dir]" ) == TCL_ERROR ) { @@ -713,7 +716,6 @@ goto finish; } #ifdef DEBUG - fprintf( stderr, "adding %s to auto_path\n", TCL_DIR ); path = Tcl_GetVar( interp, "auto_path", 0 ); fprintf( stderr, "auto_path is %s\n", path ); #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-12-12 22:09:09
|
Revision: 12860 http://sourceforge.net/p/plplot/code/12860 Author: airwin Date: 2013-12-12 22:09:07 +0000 (Thu, 12 Dec 2013) Log Message: ----------- Fix build system bug recently introduced for combination of disabled qt and disabled dynamic devices. (Thanks to Phil Rosenberg for spotting this.) Modified Paths: -------------- trunk/src/CMakeLists.txt Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2013-12-12 21:51:56 UTC (rev 12859) +++ trunk/src/CMakeLists.txt 2013-12-12 22:09:07 UTC (rev 12860) @@ -200,8 +200,10 @@ else(ENABLE_DYNDRIVERS) set(libplplot${LIB_TAG}_LINK_LIBRARIES ${DRIVERS_LINK_FLAGS}) set(LIB_INSTALL_RPATH ${LIB_INSTALL_RPATH} ${DRIVERS_RPATH}) - # Update the target COMPILE_DEFINITIONS and INCLUDE_DIRECTORIES - set_qt_target_properties(plplot${LIB_TAG}) + if(ANY_QT_DEVICE) + # Update the target COMPILE_DEFINITIONS and INCLUDE_DIRECTORIES + set_qt_target_properties(plplot${LIB_TAG}) + endif(ANY_QT_DEVICE) endif(ENABLE_DYNDRIVERS) #message("DEBUG: LIB_INSTALL_RPATH = ${LIB_INSTALL_RPATH}") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-12-12 21:51:59
|
Revision: 12859 http://sourceforge.net/p/plplot/code/12859 Author: airwin Date: 2013-12-12 21:51:56 +0000 (Thu, 12 Dec 2013) Log Message: ----------- Describe epa_build. Modified Paths: -------------- trunk/README.release Modified: trunk/README.release =================================================================== --- trunk/README.release 2013-12-12 21:29:52 UTC (rev 12858) +++ trunk/README.release 2013-12-12 21:51:56 UTC (rev 12859) @@ -27,7 +27,9 @@ 3.1 NUMERIC_INCLUDE_PATH ==> NUMPY_INCLUDE_PATH 3.2 Major overhaul of the build system and bindings for Tcl and friends 3.3 Substantial overhaul of the build system for the Qt-components of PLplot +3.4 The epa_build project has been implemented + 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) @@ -107,6 +109,7 @@ 5.67 NUMERIC_INCLUDE_PATH ==> NUMPY_INCLUDE_PATH 5.68 Major overhaul of the build system and bindings for Tcl and friends 5.69 Substantial overhaul of the build system for the Qt-components of PLplot +5.70 The epa_build project has been implemented 1. OFFICIAL NOTICES FOR USERS SINCE 5.9.10 (the previous development release) @@ -197,10 +200,9 @@ now been split (see remarks in the above OFFICIAL NOTICES for more details). Many bugs have been fixed, and all tests documented in examples/tcl/README.tcldemos and examples/tk/README.tkdemos have now -been implemented as tests via the build system (FIXME. Make sure -Arjen has done this for the last runAllDemos.tcl test by the release -or else rewrite this statment) to help avoid any regressions in the -build system and bindings for Tcl and friends in the future. +been implemented as tests via the build system to help avoid any +regressions in the build system and bindings for Tcl and friends in +the future. 3.3 Substantial overhaul of the build system for the Qt-components of PLplot @@ -210,6 +212,49 @@ examples/c++/qt_example for the non-dynamic drivers case have been resolved. +3.4 The epa_build project has been implemented + +The goal of this project is to make builds of recent versions of +PLplot dependencies (and PLplot itself) much more convenient on all +platforms. Once this goal is realized, it should make the full power +of PLplot (which depends on the existence and quality of its +dependencies) readily available on all platforms. The epa_build +project uses the power of CMake (especially the ExternalProject_Add +command which is why we chose to use the suffix "epa_" in the name of +epa_build) to organize downloading, updating, configuring, building, +testing, and installing of any kind (not just those with CMake-based +build systems) of software project with full dependency support +between all the various builds. For those users who are not +satisified with the PLplot dependencies on their systems, learn how to +use the epa_build project by consulting cmake/epa_build/README. + +The epa_build project is in pretty good shape on Linux; epa_build +configurations work properly for build tools such as Tcl/Tk8.6, Itcl, +Itk, and Iwidgets and for regular packages such as pango (needed for +the cairo device driver), qt4_lite (needed for the qt device driver), +the wxwidgets software package (needed for the wxwidgets device +driver), and many smaller, but useful PLplot dependencies such as +shapelib, libqhull, and libharu. The total build time is roughly an +hour for an ordinary PC which is not much of a price to pay to get +access to up-to-date versions of virtually all dependencies of PLplot. +In fact, the only known dependency of PLplot not currently covered by +epa_build is octave. In principle, it should be straightforward to +add an epa_build configurations for octave and its many dependencies, +but that possibility has not been explored yet. + +In principle, epa_build should work out of the box on Mac OS X +platforms, but we haven't tested on that platform yet. + +Our testing for MinGW/MSYS and Cygwin shows the epa_build project is +still in fairly rough shape on Windows. It is known that the "plplot" +case (PLplot with all its dependencies) fails in various ways on all +Windows platforms. Those issues are being actively worked on. Note, +however, that the "plplot_lite" case (PLplot with all the minor +dependencies but without Tcl etc., build tools and without the pango, +qt4_lite, and wxwidgets dependencies) has been shown to work on +MinGW/MSYS and should probably also work on Cygwin although we haven't +tested that specific case yet. + 4. OFFICIAL NOTICES FOR USERS SINCE 5.8.0 (the previous stable release) (5.9.11) Backwards-incompatible API change. The numerical symbolic @@ -1623,10 +1668,9 @@ now been split (see remarks in the above OFFICIAL NOTICES for more details). Many bugs have been fixed, and all tests documented in examples/tcl/README.tcldemos and examples/tk/README.tkdemos have now -been implemented as tests via the build system (FIXME. Make sure -Arjen has done this for the last runAllDemos.tcl test by the release -or else rewrite this statment) to help avoid any regressions in the -build system and bindings for Tcl and friends in the future. +been implemented as tests via the build system to help avoid any +regressions in the build system and bindings for Tcl and friends in +the future. 5.69 Substantial overhaul of the build system for the Qt-components of PLplot @@ -1636,3 +1680,45 @@ examples/c++/qt_example for the non-dynamic drivers case have been resolved. +5.70 The epa_build project has been implemented + +The goal of this project is to make builds of recent versions of +PLplot dependencies (and PLplot itself) much more convenient on all +platforms. Once this goal is realized, it should make the full power +of PLplot (which depends on the existence and quality of its +dependencies) readily available on all platforms. The epa_build +project uses the power of CMake (especially the ExternalProject_Add +command which is why we chose to use the suffix "epa_" in the name of +epa_build) to organize downloading, updating, configuring, building, +testing, and installing of any kind (not just those with CMake-based +build systems) of software project with full dependency support +between all the various builds. For those users who are not +satisified with the PLplot dependencies on their systems, learn how to +use the epa_build project by consulting cmake/epa_build/README. + +The epa_build project is in pretty good shape on Linux; epa_build +configurations work properly for build tools such as Tcl/Tk8.6, Itcl, +Itk, and Iwidgets and for regular packages such as pango (needed for +the cairo device driver), qt4_lite (needed for the qt device driver), +the wxwidgets software package (needed for the wxwidgets device +driver), and many smaller, but useful PLplot dependencies such as +shapelib, libqhull, and libharu. The total build time is roughly an +hour for an ordinary PC which is not much of a price to pay to get +access to up-to-date versions of virtually all dependencies of PLplot. +In fact, the only known dependency of PLplot not currently covered by +epa_build is octave. In principle, it should be straightforward to +add an epa_build configurations for octave and its many dependencies, +but that possibility has not been explored yet. + +In principle, epa_build should work out of the box on Mac OS X +platforms, but we haven't tested on that platform yet. + +Our testing for MinGW/MSYS and Cygwin shows the epa_build project is +still in fairly rough shape on Windows. It is known that the "plplot" +case (PLplot with all its dependencies) fails in various ways on all +Windows platforms. Those issues are being actively worked on. Note, +however, that the "plplot_lite" case (PLplot with all the minor +dependencies but without Tcl etc., build tools and without the pango, +qt4_lite, and wxwidgets dependencies) has been shown to work on +MinGW/MSYS and should probably also work on Cygwin although we haven't +tested that specific case yet. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-12-12 21:29:56
|
Revision: 12858 http://sourceforge.net/p/plplot/code/12858 Author: andrewross Date: 2013-12-12 21:29:52 +0000 (Thu, 12 Dec 2013) Log Message: ----------- Fix from Phil Rosenberg for compile errors in plplot versions of snprintf and snscanf if the library versions are not available. Modified Paths: -------------- trunk/src/plctrl.c Modified: trunk/src/plctrl.c =================================================================== --- trunk/src/plctrl.c 2013-12-12 19:53:59 UTC (rev 12857) +++ trunk/src/plctrl.c 2013-12-12 21:29:52 UTC (rev 12858) @@ -3000,8 +3000,8 @@ va_list args; va_start( args, format ); - ret = vsprintf( buffer, fmt, args ); - va_end( argptr ); + ret = vsprintf( buffer, format, args ); + va_end( args ); // Check if overrun occured if ( ret > n - 1 ) @@ -3030,10 +3030,10 @@ { int ret; - va_list argptr; - va_start( argptr, format ); - ret = vsscanf( buffer, fmt, args ); - va_end( argptr ); + va_list args; + va_start( args, format ); + ret = vsscanf( buffer, format, args ); + va_end( args ); return ret; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-12-12 19:54:02
|
Revision: 12857 http://sourceforge.net/p/plplot/code/12857 Author: airwin Date: 2013-12-12 19:53:59 +0000 (Thu, 12 Dec 2013) Log Message: ----------- Official announcement of Agg backend and freetype deprecation for the wxwidgets device driver. Modified Paths: -------------- trunk/README.release Modified: trunk/README.release =================================================================== --- trunk/README.release 2013-12-12 19:51:12 UTC (rev 12856) +++ trunk/README.release 2013-12-12 19:53:59 UTC (rev 12857) @@ -131,17 +131,6 @@ to use the constants on the right. No changes in source code or scripts should be required of other users. -(5.9.11) Backwards-incompatible API change. Our Fortran 77 bindings -and examples have been completely removed because Fortran 95 is just a -much better language which we have been supporting for a long time, -and our judgement call based on user feedback we have received is -nobody is interested in plotting using strict Fortran 77 language -constructs any more. However, if there is still some Fortran 77 -source code out there that uses PLplot, typically the only change you -should have to do to port it to our Fortran 95 bindings is to place -the command "use plplot" as the first line of the source code of the -main routine. - (5.9.11) Backwards-incompatible API change. The PLplot build system and bindings for Tcl and friends have had a major overhaul, see below. Part of this change was to split the former libplplottcltk into two @@ -153,6 +142,24 @@ plotting applications (e.g., pltcl, plrender, and xtk0[124].c) that link to libplplottcltk. +(5.9.11) Backwards-incompatible change. Our Fortran 77 bindings +and examples have been completely removed because Fortran 95 is just a +much better language which we have been supporting for a long time, +and our judgement call based on user feedback we have received is +nobody is interested in plotting using strict Fortran 77 language +constructs any more. However, if there is still some Fortran 77 +source code out there that uses PLplot, typically the only change you +should have to do to port it to our Fortran 95 bindings is to place +the command "use plplot" as the first line of the source code of the +main routine. + +(5.9.11) Deprecation. The functionality of the AGG backend and +FreeType option in the wxwidgets device driver is provided (and in +some cases exceeded) by other backends and options that we have +implemented for this device driver. The AGG backend and Freetype +option are therefore deprecated with the intention to remove them in a +future release. + 2. Tests made for release 5.9.11 None at this time. @@ -226,17 +233,6 @@ to use the constants on the right. No changes in source code or scripts should be required of other users. -(5.9.11) Backwards-incompatible API change. Our Fortran 77 bindings -and examples have been completely removed because Fortran 95 is just a -much better language which we have been supporting for a long time, -and our judgement call based on user feedback we have received is -nobody is interested in plotting using strict Fortran 77 language -constructs any more. However, if there is still some Fortran 77 -source code out there that uses PLplot, typically the only change you -should have to do to port it to our Fortran 95 bindings is to place -the command "use plplot" as the first line of the source code of the -main routine. - (5.9.11) Backwards-incompatible API change. The PLplot build system and bindings for Tcl and friends have had a major overhaul, see below. Part of this change was to split the former libplplottcltk into two @@ -248,6 +244,24 @@ plotting applications (e.g., pltcl, plrender, and xtk0[124].c) that link to libplplottcltk. +(5.9.11) Backwards-incompatible change. Our Fortran 77 bindings +and examples have been completely removed because Fortran 95 is just a +much better language which we have been supporting for a long time, +and our judgement call based on user feedback we have received is +nobody is interested in plotting using strict Fortran 77 language +constructs any more. However, if there is still some Fortran 77 +source code out there that uses PLplot, typically the only change you +should have to do to port it to our Fortran 95 bindings is to place +the command "use plplot" as the first line of the source code of the +main routine. + +(5.9.11) Deprecation. The functionality of the AGG backend and +FreeType option in the wxwidgets device driver is provided (and in +some cases exceeded) by other backends and options that we have +implemented for this device driver. The AGG backend and Freetype +option are therefore deprecated with the intention to remove them in a +future release. + (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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-12-12 19:51:16
|
Revision: 12856 http://sourceforge.net/p/plplot/code/12856 Author: andrewross Date: 2013-12-12 19:51:12 +0000 (Thu, 12 Dec 2013) Log Message: ----------- Fix case of variable name in cmake fortran support. Modified Paths: -------------- trunk/cmake/modules/fortran.cmake Modified: trunk/cmake/modules/fortran.cmake =================================================================== --- trunk/cmake/modules/fortran.cmake 2013-12-12 18:49:15 UTC (rev 12855) +++ trunk/cmake/modules/fortran.cmake 2013-12-12 19:51:12 UTC (rev 12856) @@ -28,13 +28,13 @@ option(ENABLE_f95 "Enable f95 bindings" ON) endif(DEFAULT_NO_BINDINGS) -if(Enable_f95 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_f95 OFF CACHE BOOL "Enable f95 bindings" FORCE) endif(NOT PLPLOT_Fortran_COMPILER_WORKS) -endif(Enable_f95 AND NOT PLPLOT_Fortran_COMPILER_WORKS) +endif(ENABLE_f95 AND NOT PLPLOT_Fortran_COMPILER_WORKS) if(ENABLE_f95) # Find and check Fortran compiler. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-12-12 18:49:18
|
Revision: 12855 http://sourceforge.net/p/plplot/code/12855 Author: airwin Date: 2013-12-12 18:49:15 +0000 (Thu, 12 Dec 2013) Log Message: ----------- Provide soft landing when Qt is not available and when Qt is available but not with a version number that meets our minimum requirements and/or not with the components that are required. (Thanks to Phil Rosenberg for reporting this issue.) Tested by Alan W. Irwin <ai...@us...> by locally changing the minimum version required and/or the required components to non-existent ones to make sure that cmake drops all the Qt-related devices and the qt bindings and finishes without errors in those cases. Modified Paths: -------------- trunk/cmake/modules/qt.cmake Modified: trunk/cmake/modules/qt.cmake =================================================================== --- trunk/cmake/modules/qt.cmake 2013-12-12 18:03:36 UTC (rev 12854) +++ trunk/cmake/modules/qt.cmake 2013-12-12 18:49:15 UTC (rev 12855) @@ -90,34 +90,12 @@ set(ENABLE_qt OFF CACHE BOOL "Enable Qt bindings" FORCE) endif(ENABLE_qt AND NOT PLD_extqt) -# All qt devices depend on ENABLE_qt -if(NOT ENABLE_qt) - message(STATUS - "WARNING: ENABLE_qt is OFF so " - "setting all qt devices to OFF." - ) - set(ANY_QT_DEVICE OFF) -endif(NOT ENABLE_qt) - -if(NOT ANY_QT_DEVICE) - set(PLD_bmpqt OFF CACHE BOOL "Enable Qt Windows bmp device" FORCE) - set(PLD_jpgqt OFF CACHE BOOL "Enable Qt jpg device" FORCE) - set(PLD_pngqt OFF CACHE BOOL "Enable Qt png device" FORCE) - set(PLD_ppmqt OFF CACHE BOOL "Enable Qt ppm device" FORCE) - set(PLD_tiffqt OFF CACHE BOOL "Enable Qt tiff device" FORCE) - set(PLD_epsqt OFF CACHE BOOL "Enable Qt EPS device" FORCE) - set(PLD_pdfqt OFF CACHE BOOL "Enable Qt PDF device" FORCE) - set(PLD_qtwidget OFF CACHE BOOL "Enable Qt interactive device" FORCE) - set(PLD_svgqt OFF CACHE BOOL "Enable Qt SVG device" FORCE) - set(PLD_extqt OFF CACHE BOOL "Enable Qt ext device" FORCE) - set(PLD_memqt OFF CACHE BOOL "Enable Qt mem device" FORCE) -endif(NOT ANY_QT_DEVICE) - -if(ANY_QT_DEVICE) +if(ENABLE_qt) # Use a minimum version corresponding to the version installed by - # Debian Wheezy. I assume all other non-enterprise Linux distros - # have this version of Qt4 or later. - find_package(Qt4 4.8.2 REQUIRED QtCore QtGui QtSvg) + # Debian Wheezy. I assume all other non-enterprise Linux distros, + # Mac OS X, and Windows platforms also give access to this version + # of Qt4 or later. + find_package(Qt4 4.8.2 COMPONENTS QtCore QtGui QtSvg) # QT4_FOUND is defined to be true or false by find_package(Qt4 ...) if(QT4_FOUND) @@ -154,13 +132,35 @@ filter_rpath(qt_RPATH) #message("qt_LIBRARY_DIR = ${qt_LIBRARY_DIR}") else(QT4_FOUND) - message(STATUS "WARNING: Qt4 development environment not found so " - "disabling all qt devices." + message(STATUS "WARNING: Suitable Qt4 development environment not found so disabling Qt bindings." ) - set(ANY_QT_DEVICE OFF) + set(ENABLE_qt OFF CACHE BOOL "Enable Qt bindings" FORCE) endif(QT4_FOUND) -endif(ANY_QT_DEVICE) +endif(ENABLE_qt) +# All qt devices depend on ENABLE_qt +if(NOT ENABLE_qt) + message(STATUS + "WARNING: ENABLE_qt is OFF so " + "setting all qt devices to OFF." + ) + set(ANY_QT_DEVICE OFF) +endif(NOT ENABLE_qt) + +if(NOT ANY_QT_DEVICE) + set(PLD_bmpqt OFF CACHE BOOL "Enable Qt Windows bmp device" FORCE) + set(PLD_jpgqt OFF CACHE BOOL "Enable Qt jpg device" FORCE) + set(PLD_pngqt OFF CACHE BOOL "Enable Qt png device" FORCE) + set(PLD_ppmqt OFF CACHE BOOL "Enable Qt ppm device" FORCE) + set(PLD_tiffqt OFF CACHE BOOL "Enable Qt tiff device" FORCE) + set(PLD_epsqt OFF CACHE BOOL "Enable Qt EPS device" FORCE) + set(PLD_pdfqt OFF CACHE BOOL "Enable Qt PDF device" FORCE) + set(PLD_qtwidget OFF CACHE BOOL "Enable Qt interactive device" FORCE) + set(PLD_svgqt OFF CACHE BOOL "Enable Qt SVG device" FORCE) + set(PLD_extqt OFF CACHE BOOL "Enable Qt ext device" FORCE) + set(PLD_memqt OFF CACHE BOOL "Enable Qt mem device" FORCE) +endif(NOT ANY_QT_DEVICE) + if(ENABLE_pyqt4 AND NOT ENABLE_python) message(STATUS "WARNING: ENABLE_python is OFF so " This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-12-12 18:03:38
|
Revision: 12854 http://sourceforge.net/p/plplot/code/12854 Author: airwin Date: 2013-12-12 18:03:36 +0000 (Thu, 12 Dec 2013) Log Message: ----------- Fix one issue recently reported by Phil Rosenberg; -DENABLE_qt=OFF now skips everything to do with Qt detection. Modified Paths: -------------- trunk/cmake/modules/qt.cmake Modified: trunk/cmake/modules/qt.cmake =================================================================== --- trunk/cmake/modules/qt.cmake 2013-12-11 20:35:24 UTC (rev 12853) +++ trunk/cmake/modules/qt.cmake 2013-12-12 18:03:36 UTC (rev 12854) @@ -69,6 +69,50 @@ endif(NOT CMAKE_CXX_COMPILER_WORKS) endif(ANY_QT_DEVICE) +if(DEFAULT_NO_BINDINGS) + option(ENABLE_qt "Enable Qt bindings" OFF) + option(ENABLE_pyqt4 "Enable pyqt4 Python extension module" OFF) +else(DEFAULT_NO_BINDINGS) + option(ENABLE_qt "Enable Qt bindings" ON) + option(ENABLE_pyqt4 "Enable pyqt4 Python extension module" ON) +endif(DEFAULT_NO_BINDINGS) + +# ENABLE_qt depends on PLD_extqt +if(NOT ANY_QT_DEVICE) + set(PLD_extqt OFF CACHE BOOL "Enable Qt ext device" FORCE) +endif(NOT ANY_QT_DEVICE) + +if(ENABLE_qt AND NOT PLD_extqt) + message(STATUS + "WARNING: PLD_extqt is OFF so " + "setting ENABLE_qt to OFF." + ) + set(ENABLE_qt OFF CACHE BOOL "Enable Qt bindings" FORCE) +endif(ENABLE_qt AND NOT PLD_extqt) + +# All qt devices depend on ENABLE_qt +if(NOT ENABLE_qt) + message(STATUS + "WARNING: ENABLE_qt is OFF so " + "setting all qt devices to OFF." + ) + set(ANY_QT_DEVICE OFF) +endif(NOT ENABLE_qt) + +if(NOT ANY_QT_DEVICE) + set(PLD_bmpqt OFF CACHE BOOL "Enable Qt Windows bmp device" FORCE) + set(PLD_jpgqt OFF CACHE BOOL "Enable Qt jpg device" FORCE) + set(PLD_pngqt OFF CACHE BOOL "Enable Qt png device" FORCE) + set(PLD_ppmqt OFF CACHE BOOL "Enable Qt ppm device" FORCE) + set(PLD_tiffqt OFF CACHE BOOL "Enable Qt tiff device" FORCE) + set(PLD_epsqt OFF CACHE BOOL "Enable Qt EPS device" FORCE) + set(PLD_pdfqt OFF CACHE BOOL "Enable Qt PDF device" FORCE) + set(PLD_qtwidget OFF CACHE BOOL "Enable Qt interactive device" FORCE) + set(PLD_svgqt OFF CACHE BOOL "Enable Qt SVG device" FORCE) + set(PLD_extqt OFF CACHE BOOL "Enable Qt ext device" FORCE) + set(PLD_memqt OFF CACHE BOOL "Enable Qt mem device" FORCE) +endif(NOT ANY_QT_DEVICE) + if(ANY_QT_DEVICE) # Use a minimum version corresponding to the version installed by # Debian Wheezy. I assume all other non-enterprise Linux distros @@ -117,50 +161,6 @@ endif(QT4_FOUND) endif(ANY_QT_DEVICE) -if(DEFAULT_NO_BINDINGS) - option(ENABLE_qt "Enable Qt bindings" OFF) - option(ENABLE_pyqt4 "Enable pyqt4 Python extension module" OFF) -else(DEFAULT_NO_BINDINGS) - option(ENABLE_qt "Enable Qt bindings" ON) - option(ENABLE_pyqt4 "Enable pyqt4 Python extension module" ON) -endif(DEFAULT_NO_BINDINGS) - -# ENABLE_qt depends on PLD_extqt -if(NOT ANY_QT_DEVICE) - set(PLD_extqt OFF CACHE BOOL "Enable Qt ext device" FORCE) -endif(NOT ANY_QT_DEVICE) - -if(ENABLE_qt AND NOT PLD_extqt) - message(STATUS - "WARNING: PLD_extqt is OFF so " - "setting ENABLE_qt to OFF." - ) - set(ENABLE_qt OFF CACHE BOOL "Enable Qt bindings" FORCE) -endif(ENABLE_qt AND NOT PLD_extqt) - -# All qt devices depend on ENABLE_qt -if(NOT ENABLE_qt) - message(STATUS - "WARNING: ENABLE_qt is OFF so " - "setting all qt devices to OFF." - ) - set(ANY_QT_DEVICE OFF) -endif(NOT ENABLE_qt) - -if(NOT ANY_QT_DEVICE) - set(PLD_bmpqt OFF CACHE BOOL "Enable Qt Windows bmp device" FORCE) - set(PLD_jpgqt OFF CACHE BOOL "Enable Qt jpg device" FORCE) - set(PLD_pngqt OFF CACHE BOOL "Enable Qt png device" FORCE) - set(PLD_ppmqt OFF CACHE BOOL "Enable Qt ppm device" FORCE) - set(PLD_tiffqt OFF CACHE BOOL "Enable Qt tiff device" FORCE) - set(PLD_epsqt OFF CACHE BOOL "Enable Qt EPS device" FORCE) - set(PLD_pdfqt OFF CACHE BOOL "Enable Qt PDF device" FORCE) - set(PLD_qtwidget OFF CACHE BOOL "Enable Qt interactive device" FORCE) - set(PLD_svgqt OFF CACHE BOOL "Enable Qt SVG device" FORCE) - set(PLD_extqt OFF CACHE BOOL "Enable Qt ext device" FORCE) - set(PLD_memqt OFF CACHE BOOL "Enable Qt mem device" FORCE) -endif(NOT ANY_QT_DEVICE) - if(ENABLE_pyqt4 AND NOT ENABLE_python) message(STATUS "WARNING: ENABLE_python is OFF so " This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-12-11 20:35:27
|
Revision: 12853 http://sourceforge.net/p/plplot/code/12853 Author: andrewross Date: 2013-12-11 20:35:24 +0000 (Wed, 11 Dec 2013) Log Message: ----------- Alternative implementation of remove_characters which avoids the valgrind warnings when the code is compiled with -O3. Modified Paths: -------------- trunk/src/pllegend.c Modified: trunk/src/pllegend.c =================================================================== --- trunk/src/pllegend.c 2013-12-11 12:06:41 UTC (rev 12852) +++ trunk/src/pllegend.c 2013-12-11 20:35:24 UTC (rev 12853) @@ -933,16 +933,20 @@ static void remove_characters( char *string, const char *characters ) { - size_t length = strlen( string ); - size_t prefix_length = strcspn( string, characters ); - if ( prefix_length < length ) + char *src, *dst; + const char *ptr; + for(src=dst=string; *src != '\0'; src++) { - // Remove first matching character by shifting tail of string - // (including null-terminator) down by one. - memmove( string + prefix_length, string + prefix_length + 1, length - prefix_length ); - // Recurse to remove any remaining specified characters. - remove_characters( string, characters ); + ptr = characters; + while ( (*ptr != '\0') && (*src != *ptr) ) + ptr++; + if (*src != *ptr) + { + *dst = *src; + dst++; + } } + *dst = '\0'; } //-------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-12-11 12:06:44
|
Revision: 12852 http://sourceforge.net/p/plplot/code/12852 Author: andrewross Date: 2013-12-11 12:06:41 +0000 (Wed, 11 Dec 2013) Log Message: ----------- Implement plpath for Ada bindings and update example 22 to remove the remaining differences. Modified Paths: -------------- trunk/bindings/ada/plplot.adb trunk/bindings/ada/plplot.ads trunk/bindings/ada/plplot_thin.ads trunk/bindings/ada/plplot_traditional.adb trunk/bindings/ada/plplot_traditional.ads trunk/examples/ada/x22a.adb trunk/examples/ada/xthick22a.adb Modified: trunk/bindings/ada/plplot.adb =================================================================== --- trunk/bindings/ada/plplot.adb 2013-12-11 10:11:54 UTC (rev 12851) +++ trunk/bindings/ada/plplot.adb 2013-12-11 12:06:41 UTC (rev 12852) @@ -2331,6 +2331,18 @@ end Set_Fill_Pattern; + -- Draw a line connecting two points, accounting for coordinate transform + procedure Draw_Line_Segment + (n : Integer; + x1 : Long_Float; + y1 : Long_Float; + x2 : Long_Float; + y2 : Long_Float) is + begin + plpath(n, x1, y1, x2, y2); + end Draw_Line_Segment; + + -- Plots array y against x for n points using ASCII code "code". -- plpoin procedure Draw_Points Modified: trunk/bindings/ada/plplot.ads =================================================================== --- trunk/bindings/ada/plplot.ads 2013-12-11 10:11:54 UTC (rev 12851) +++ trunk/bindings/ada/plplot.ads 2013-12-11 12:06:41 UTC (rev 12852) @@ -1505,6 +1505,15 @@ Spacings : Integer_Array_1D); + -- Draw a line connecting two points, accounting for coordinate transform + procedure Draw_Line_Segment + (n : Integer; + x1 : Long_Float; + y1 : Long_Float; + x2 : Long_Float; + y2 : Long_Float); + + -- Plots array y against x for n points using ASCII code "code". -- plpoin procedure Draw_Points Modified: trunk/bindings/ada/plplot_thin.ads =================================================================== --- trunk/bindings/ada/plplot_thin.ads 2013-12-11 10:11:54 UTC (rev 12851) +++ trunk/bindings/ada/plplot_thin.ads 2013-12-11 12:06:41 UTC (rev 12852) @@ -1272,7 +1272,13 @@ plpat(nlin : PLINT; inc : PL_Integer_Array; del : PL_Integer_Array); pragma Import(C, plpat, "c_plpat"); + -- Draw a line connecting two points, accounting for coordinate transforms. + procedure + plpath(n : PLINT; x1 : PLFLT; y1 : PLFLT; x2 : PLFLT; y2 : PLFLT); + pragma Import(C, plpath, "c_plpath"); + + -- Plots array y against x for n points using ASCII code "code". procedure Modified: trunk/bindings/ada/plplot_traditional.adb =================================================================== --- trunk/bindings/ada/plplot_traditional.adb 2013-12-11 10:11:54 UTC (rev 12851) +++ trunk/bindings/ada/plplot_traditional.adb 2013-12-11 12:06:41 UTC (rev 12852) @@ -2245,6 +2245,18 @@ end plpat; + -- Draw a line connecting two points, accounting for coordinate transform + procedure plpath + (n : Integer; + x1 : Long_Float; + y1 : Long_Float; + x2 : Long_Float; + y2 : Long_Float) is + begin + PLplot_Thin.plpath(n, x1, y1, x2, y2); + end plpath; + + -- Plots array y against x for n points using ASCII code "code". procedure plpoin (x, y : Real_Vector; Modified: trunk/bindings/ada/plplot_traditional.ads =================================================================== --- trunk/bindings/ada/plplot_traditional.ads 2013-12-11 10:11:54 UTC (rev 12851) +++ trunk/bindings/ada/plplot_traditional.ads 2013-12-11 12:06:41 UTC (rev 12852) @@ -1413,6 +1413,15 @@ Spacings : Integer_Array_1D); + -- Draw a line connecting two points, accounting for coordinate transform + procedure plpath + (n : Integer; + x1 : Long_Float; + y1 : Long_Float; + x2 : Long_Float; + y2 : Long_Float); + + -- Plots array y against x for n points using ASCII code "code". procedure plpoin (x, y : Real_Vector; Modified: trunk/examples/ada/x22a.adb =================================================================== --- trunk/examples/ada/x22a.adb 2013-12-11 10:11:54 UTC (rev 12851) +++ trunk/examples/ada/x22a.adb 2013-12-11 12:06:41 UTC (rev 12852) @@ -33,8 +33,6 @@ PLplot_Traditional, PLplot_Auxiliary; - - procedure x22a is -- Pairs of points making the line segments used to plot the user defined arrow arrow_x : Real_Vector(0 .. 5) := (-0.5, 0.5, 0.3, 0.5, 0.3, 0.5); @@ -42,6 +40,7 @@ arrow2_x : Real_Vector(0 .. 5) := (-0.5, 0.3, 0.3, 0.5, 0.3, 0.3); arrow2_y : Real_Vector(0 .. 5) := ( 0.0, 0.0, 0.2, 0.0, -0.2, 0.0); + xmax_data : Long_Float; -- Vector plot of the circulation about the origin procedure circulation is @@ -102,7 +101,7 @@ xmax := Long_Float( nx / 2) * dx; ymin := Long_Float(-ny / 2) * dy; ymax := Long_Float( ny / 2) * dy; - + Q := 2.0; for i in 0 .. nx - 1 loop x := (Long_Float(i - nx / 2) + 0.5) * dx; @@ -129,7 +128,88 @@ plcol0(1); end constriction; + -- This spec is necessary in order to enforce C calling conventions, used + -- in the callback by intervening C code. + procedure transform + (x, y : Long_Float; + xt, yt : out Long_Float; + data : PLPointer); + pragma Convention(C, transform); + procedure transform + (x, y : Long_Float; + xt, yt : out Long_Float; + data : PLPointer) + is + begin + xt := x; + yt := y / 4.0 * ( 3.0 - cos( pi * x / xmax_data ) ); + end transform; + + -- Vector plot of flow through a constricted pipe + -- with a coordinate transformation + procedure constriction2 is + dx, dy, x, y : Long_Float; + xmin, xmax, ymin, ymax : Long_Float; + Q, b : Long_Float; + nx : constant Integer := 20; + ny : constant Integer := 20; + nc : constant Integer := 11; + nseg : constant Integer := 20; + u, v : Real_Matrix(0 .. nx - 1, 0 .. ny -1); + clev : Real_Vector(0 .. nc - 1); + cgrid2 : aliased Transformation_Data_Type_2 + (x_Last => nx - 1, + y_Last => ny - 1); + begin + dx := 1.0; + dy := 1.0; + + xmin := Long_Float(-nx / 2) * dx; + xmax := Long_Float( nx / 2) * dx; + ymin := Long_Float(-ny / 2) * dy; + ymax := Long_Float( ny / 2) * dy; + + xmax_data := xmax; + + plstransform( transform'Unrestricted_Access, System.Null_Address ); + + Q := 2.0; + for i in 0 .. nx - 1 loop + x := (Long_Float(i - nx / 2) + 0.5) * dx; + for j in 0 .. ny - 1 loop + y := (Long_Float(j - ny / 2) + 0.5) * dy; + cgrid2.xg(i, j) := x; + cgrid2.yg(i, j) := y; + b := ymax / 4.0 * (3.0 - cos(pi * x / xmax)); + u(i, j) := Q * ymax / b; + v(i, j) := 0.0; + end loop; + end loop; + + for i in 0 .. nc - 1 loop + clev(i) := Q + Long_Float(i) * Q / Long_Float( nc - 1 ); + end loop; + + plenv(xmin, xmax, ymin, ymax, 0, 0); + pllab("(x)", "(y)", "#frPLplot Example 22 - constriction with plstransform"); + plcol0(2); + plshades(u, Null, xmin + dx / 2.0, xmax - dx / 2.0, + ymin + dy / 2.0, ymax - dy / 2.0, + clev, 0.0, 1, 1.0, + plfill'access, False, Null, System.Null_Address); + plvect(u, v, -1.0, pltr2'access, cgrid2'Address); + plpath( nseg, xmin, ymax, xmax, ymax ); + plpath( nseg, xmin, ymin, xmax, ymin ); + plcol0(1); + + -- Clear the global transform. + Clear_Custom_Coordinate_Transform; + -- or... + -- plstransform(null, System.Null_Address); + + end constriction2; + -- Vector plot of the gradient of a shielded potential (see example 9) procedure potential is nper : constant Integer := 100; @@ -254,6 +334,8 @@ -- Set arrow style using arrow2_x and arrow2_y then plot using these filled arrows. plsvect(arrow2_x, arrow2_y, True); constriction(2); + + constriction2; -- Reset arrow style to the default by passing two NULL arrays. -- This line uses the awkward method of the C API to reset the default arrow style. Modified: trunk/examples/ada/xthick22a.adb =================================================================== --- trunk/examples/ada/xthick22a.adb 2013-12-11 10:11:54 UTC (rev 12851) +++ trunk/examples/ada/xthick22a.adb 2013-12-11 12:06:41 UTC (rev 12852) @@ -41,8 +41,9 @@ arrow_y : Real_Vector(0 .. 5) := ( 0.0, 0.0, 0.2, 0.0, -0.2, 0.0); arrow2_x : Real_Vector(0 .. 5) := (-0.5, 0.3, 0.3, 0.5, 0.3, 0.3); arrow2_y : Real_Vector(0 .. 5) := ( 0.0, 0.0, 0.2, 0.0, -0.2, 0.0); + + xmax_data : Long_Float; - -- Vector plot of the circulation about the origin procedure circulation is dx, dy, x, y : Long_Float; @@ -128,8 +129,90 @@ Vector_Plot(u, v, -1.0, Plot_Transformation_2'access, cgrid2'Address); Set_Pen_Color(Red); end constriction; + + + -- This spec is necessary in order to enforce C calling conventions, used + -- in the callback by intervening C code. + procedure transform + (x, y : Long_Float; + xt, yt : out Long_Float; + data : PLPointer); + pragma Convention(C, transform); + procedure transform + (x, y : Long_Float; + xt, yt : out Long_Float; + data : PLPointer) + is + begin + xt := x; + yt := y / 4.0 * ( 3.0 - cos( pi * x / xmax_data ) ); + end transform; + + -- Vector plot of flow through a constricted pipe + -- with a coordinate transformation + procedure constriction2 is + dx, dy, x, y : Long_Float; + xmin, xmax, ymin, ymax : Long_Float; + Q, b : Long_Float; + nx : constant Integer := 20; + ny : constant Integer := 20; + nc : constant Integer := 11; + nseg : constant Integer := 20; + u, v : Real_Matrix(0 .. nx - 1, 0 .. ny -1); + clev : Real_Vector(0 .. nc - 1); + cgrid2 : aliased Transformation_Data_Type_2 + (x_Last => nx - 1, + y_Last => ny - 1); + begin + dx := 1.0; + dy := 1.0; + + xmin := Long_Float(-nx / 2) * dx; + xmax := Long_Float( nx / 2) * dx; + ymin := Long_Float(-ny / 2) * dy; + ymax := Long_Float( ny / 2) * dy; + + xmax_data := xmax; + + Set_Custom_Coordinate_Transform(transform'Unrestricted_Access, System.Null_Address); + + Q := 2.0; + for i in 0 .. nx - 1 loop + x := (Long_Float(i - nx / 2) + 0.5) * dx; + for j in 0 .. ny - 1 loop + y := (Long_Float(j - ny / 2) + 0.5) * dy; + cgrid2.xg(i, j) := x; + cgrid2.yg(i, j) := y; + b := ymax / 4.0 * (3.0 - cos(pi * x / xmax)); + u(i, j) := Q * ymax / b; + v(i, j) := 0.0; + end loop; + end loop; + + for i in 0 .. nc - 1 loop + clev(i) := Q + Long_Float(i) * Q / Long_Float( nc - 1 ); + end loop; + + Set_Environment(xmin, xmax, ymin, ymax, Not_Justified, Linear_Box_Plus); + Write_Labels("(x)", "(y)", "#frPLplot Example 22 - constriction with plstransform"); + Set_Pen_Color(Yellow); + Shade_Regions(u, Null, xmin + dx / 2.0, xmax - dx / 2.0, + ymin + dy / 2.0, ymax - dy / 2.0, + clev, 0.0, 1, 1.0, + Fill_Polygon'access, False, Null, System.Null_Address); + Vector_Plot(u, v, -1.0, Plot_Transformation_2'access, cgrid2'Address); + Draw_Line_Segment( nseg, xmin, ymax, xmax, ymax ); + Draw_Line_Segment( nseg, xmin, ymin, xmax, ymin ); + Set_Pen_Color(Red); + + -- Clear the global transform. + Clear_Custom_Coordinate_Transform; + + end constriction2; + + -- Vector plot of the gradient of a shielded potential (see example 9) procedure potential is nper : constant Integer := 100; @@ -254,7 +337,9 @@ -- Set arrow style using arrow2_x and arrow2_y then plot using these filled arrows. Set_Arrow_Style_For_Vector_Plots(arrow2_x, arrow2_y, True); constriction(2); - + + constriction2; + -- Reset arrow style to the default by passing two NULL arrays. -- This line uses the awkward method of the C API to reset the default arrow style. Set_Arrow_Style_For_Vector_Plots(System.Null_Address, System.Null_Address, False); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-12-11 10:11:57
|
Revision: 12851 http://sourceforge.net/p/plplot/code/12851 Author: andrewross Date: 2013-12-11 10:11:54 +0000 (Wed, 11 Dec 2013) Log Message: ----------- Fix an inconsistent call to delete. Modified Paths: -------------- trunk/examples/c++/x33.cc Modified: trunk/examples/c++/x33.cc =================================================================== --- trunk/examples/c++/x33.cc 2013-12-11 09:44:26 UTC (rev 12850) +++ trunk/examples/c++/x33.cc 2013-12-11 10:11:54 UTC (rev 12851) @@ -280,7 +280,7 @@ pls->wind( 0.0, 1.0, 0.0, 1.0 ); pls->ptex( 0.5, 0.5, 0.0, 0.0, 0.5, title ); - delete label; + delete [] label; } void This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-12-11 09:44:29
|
Revision: 12850 http://sourceforge.net/p/plplot/code/12850 Author: airwin Date: 2013-12-11 09:44:26 +0000 (Wed, 11 Dec 2013) Log Message: ----------- Advertise the recent improvements in our build system for the Qt-related components of the build. Modified Paths: -------------- trunk/README.release Modified: trunk/README.release =================================================================== --- trunk/README.release 2013-12-11 09:35:08 UTC (rev 12849) +++ trunk/README.release 2013-12-11 09:44:26 UTC (rev 12850) @@ -26,6 +26,7 @@ 3.1 NUMERIC_INCLUDE_PATH ==> NUMPY_INCLUDE_PATH 3.2 Major overhaul of the build system and bindings for Tcl and friends +3.3 Substantial overhaul of the build system for the Qt-components of PLplot 4. OFFICIAL NOTICES FOR USERS SINCE 5.8.0 (the previous stable release) @@ -105,6 +106,7 @@ 5.66 Substantial additions to the doxygen documentation 5.67 NUMERIC_INCLUDE_PATH ==> NUMPY_INCLUDE_PATH 5.68 Major overhaul of the build system and bindings for Tcl and friends +5.69 Substantial overhaul of the build system for the Qt-components of PLplot 1. OFFICIAL NOTICES FOR USERS SINCE 5.9.10 (the previous development release) @@ -193,6 +195,14 @@ or else rewrite this statment) to help avoid any regressions in the build system and bindings for Tcl and friends in the future. +3.3 Substantial overhaul of the build system for the Qt-components of PLplot + +As a result of these improvements compiling and linking of our +Qt-related components just got a lot more rational, and the +long-standing memory management issues reported by valgrind for +examples/c++/qt_example for the non-dynamic drivers case have been +resolved. + 4. OFFICIAL NOTICES FOR USERS SINCE 5.8.0 (the previous stable release) (5.9.11) Backwards-incompatible API change. The numerical symbolic @@ -1603,3 +1613,12 @@ Arjen has done this for the last runAllDemos.tcl test by the release or else rewrite this statment) to help avoid any regressions in the build system and bindings for Tcl and friends in the future. + +5.69 Substantial overhaul of the build system for the Qt-components of PLplot + +As a result of these improvements compiling and linking of our +Qt-related components just got a lot more rational, and the +long-standing memory management issues reported by valgrind for +examples/c++/qt_example for the non-dynamic drivers case have been +resolved. + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-12-11 09:35:14
|
Revision: 12849 http://sourceforge.net/p/plplot/code/12849 Author: airwin Date: 2013-12-11 09:35:08 +0000 (Wed, 11 Dec 2013) Log Message: ----------- Sort out a large number of small issues with the Qt-related parts of our build system. Implement ndp_UseQt4.cmake which is a greatly modified form of UseQt4.cmake that replaces all instances of add_definitions and include_directories (both of which set directory properties which causes all kinds of undesireable/unneeded extra compile flags for non-qt PLplot components) with collecting the information in variables. In that module, define a new function called set_qt_target_properties to update target COMPILE_DEFINITIONS and INCLUDE_DIRECTORIES with the appropriate variables where that information has been stored. Use set_qt_target_properties (rather than include(UseQt4)) everywhere a Qt-component of PLplot is being built. Fix a test_interactive bug (bad Makefile dependency for the qt_example part of that test) for the traditional build case for the installed examples. Bump the minimum Qt4 version to 4.8.2 and limit the number of components to the minumum (QtCore, QtGui, and QtSvg) required by PLplot. Refine the compile flags configured in the plplotd-qt.pc file to make a better traditional installed-examples build of qt_example. The constraint of disabling Qt-related parts of PLplot whenever dynamic drivers were turned off has now been removed. Tested by Alan W. Irwin <ai...@us...> on Linux using scripts/comprehensive_test.sh --cmake_added_options "-DDEFAULT_NO_DEVICES=ON -DDEFAULT_NO_BINDINGS=ON -DENABLE_qt=ON -DENABLE_pyqt4=ON -DENABLE_python=ON -DENABLE_cxx=ON -DPLD_epsqt=ON -DPLD_pdfqt=ON -DPLD_qtwidget=ON -DPLD_bmpqt=ON -DPLD_jpgqt=ON -DPLD_pngqt=ON -DPLD_ppmqt=ON -DPLD_tiffqt=ON -DPLD_extqt=ON -DPLD_memqt=ON -DPLD_svgqt=ON" where those extra options were just to limit the tests to all the Qt possibilities and not much more (to make the tests go faster while still keeping their comprehensive nature). For the critical static and nondynamic cases, I used valgrind on qt_example to show all these fixups for the Qt components of the PLplot build have solved the major valgrind issues that occurred before for that example when dynamic devices were turned off. Modified Paths: -------------- trunk/bindings/qt_gui/CMakeLists.txt trunk/bindings/qt_gui/pyqt4/CMakeLists.txt trunk/cmake/modules/qt.cmake trunk/drivers/CMakeLists.txt trunk/examples/CMakeLists.txt trunk/examples/Makefile.examples.in trunk/examples/c++/CMakeLists.txt trunk/src/CMakeLists.txt Added Paths: ----------- trunk/cmake/modules/ndp_UseQt4.cmake Modified: trunk/bindings/qt_gui/CMakeLists.txt =================================================================== --- trunk/bindings/qt_gui/CMakeLists.txt 2013-12-11 09:01:35 UTC (rev 12848) +++ trunk/bindings/qt_gui/CMakeLists.txt 2013-12-11 09:35:08 UTC (rev 12849) @@ -1,7 +1,7 @@ # bindings/qt_gui/CMakeLists.txt ### Process this file with cmake to produce Makefile ### -# Copyright (C) 2006 Alan W. Irwin +# Copyright (C) 2006-2013 Alan W. Irwin # # This file is part of PLplot. # @@ -20,7 +20,6 @@ if(ENABLE_qt) # Set up Qt4-based build environment. - include(${QT_USE_FILE}) if(NOT QT_LIBRARIES) message(FATAL_ERROR "include(${QT_USE_FILE}) failed in bindings/qt_gui subdirectory.") endif(NOT QT_LIBRARIES) @@ -33,18 +32,11 @@ ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/include ) - if(qt_COMPILE_FLAGS) - set_source_files_properties( - ${qt_SOURCE} - PROPERTIES COMPILE_FLAGS "${qt_COMPILE_FLAGS} -DUSINGDLL" - ) - #message("qt_COMPILE_FLAGS = ${qt_COMPILE_FLAGS}") - else(qt_COMPILE_FLAGS) - set_source_files_properties( - ${qt_SOURCE} - PROPERTIES COMPILE_FLAGS "-DUSINGDLL" - ) - endif(qt_COMPILE_FLAGS) + + set_source_files_properties( + ${qt_SOURCE} + PROPERTIES COMPILE_FLAGS "-DUSINGDLL" + ) if(ANY_QT_DEVICE) add_library(plplotqt${LIB_TAG} ${qt_SOURCE}) add_dependencies(plplotqt${LIB_TAG} moc_outfile_generated) @@ -57,6 +49,9 @@ ${MATH_LIB} ${QT_LIBRARIES} ) + # Update the target COMPILE_DEFINITIONS and INCLUDE_DIRECTORIES + set_qt_target_properties(plplotqt${LIB_TAG}) + if(NON_TRANSITIVE) # Note that there are implicit references to classes in QtCore, QtGui and QtSvg # so we need to add all three to the list of libraries to link to plplotqtd. @@ -142,7 +137,7 @@ 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 "${qt_COMPILE_FLAGS}") + set(PC_COMPILE_FLAGS "${pc_qt_COMPILE_FLAGS}") 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 Modified: trunk/bindings/qt_gui/pyqt4/CMakeLists.txt =================================================================== --- trunk/bindings/qt_gui/pyqt4/CMakeLists.txt 2013-12-11 09:01:35 UTC (rev 12848) +++ trunk/bindings/qt_gui/pyqt4/CMakeLists.txt 2013-12-11 09:35:08 UTC (rev 12849) @@ -1,8 +1,8 @@ -# bindings/python/CMakeLists.txt +# bindings/qt_gui/pyqt4/CMakeLists.txt ### Process this file with cmake to produce Makefile ### # Copyright (C) 2009 Hazen Babcock -# Copyright (C) 2009 Alan W. Irwin +# Copyright (C) 2009-2013 Alan W. Irwin # # This file is part of PLplot. # @@ -84,11 +84,14 @@ plplot_pyqt4 plplotqt${LIB_TAG} plplot${LIB_TAG} - ${QT_LIBRARIES} ${PYTHON_LIBRARIES} + ${QT_LIBRARIES} ) add_dependencies(plplot_pyqt4 generate_pyqt4_source) + # Update the target COMPILE_DEFINITIONS and INCLUDE_DIRECTORIES + set_qt_target_properties(plplot_pyqt4) + if(USE_RPATH) set_target_properties( plplot_pyqt4 Added: trunk/cmake/modules/ndp_UseQt4.cmake =================================================================== --- trunk/cmake/modules/ndp_UseQt4.cmake (rev 0) +++ trunk/cmake/modules/ndp_UseQt4.cmake 2013-12-11 09:35:08 UTC (rev 12849) @@ -0,0 +1,248 @@ +# - Use Module for QT4 +# Sets up C and C++ to use Qt 4. It is assumed that FindQt.cmake +# has already been loaded. See FindQt.cmake for information on +# how to load Qt 4 into your CMake project. + +# The "ndp_" prefix of this filename stands for "no directory +# property". That is, this version of the current (CMake-2.8.12.1) +# version of UseQt4.cmake uses variables to transmit results rather +# than using directory properties (which are much too blunt an +# instrument for transmitting results since they affect all +# compilations, not just those which are Qt-specific). + +# Copyright 2013 Alan W. Irwin under the license below + +#============================================================================= +# Copyright 2005-2009 Kitware, Inc. +# All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: + +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. + +# * Redistributions in binary form 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. + +# * Neither the names of Kitware, Inc., the Insight Software Consortium, +# nor the names of their contributors may be used to endorse or promote +# products derived from this software without specific prior written +# permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "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 COPYRIGHT +# HOLDER OR CONTRIBUTORS 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 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# When the original_logic variable is false, add_definitions and +# include_directories calls are all replaced by collecting all -D +# options for Qt in the QT_COMPILE_DEFINITIONS list, and collecting +# all arguments to include_directories for Qt in the +# NP_INCLUDE_DIRECTORIES list. Afterwards, NP_QT_COMPILE_DEFINITIONS +# is constructed from QT_COMPILE_DEFINITIONS by removing the -D +# prefixes for each element of that list, and QT_INCLUDE_DIRECTORIES +# is constructed by prepending either "-I" or "-isystem " to each +# element of NP_QT_INCLUDE_DIRECTORIES. (The "NP_" prefix for variable +# names stands for "no prefix", and is the one used in general for +# CMake logic except for the pkg-config case where the +# variant of the variables without the "NP_" prefix is used instead. + +set(original_logic OFF) + +if(original_logic) + add_definitions(${QT_DEFINITIONS}) + set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG QT_DEBUG) + set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG) + set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG) + set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG) + if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) + set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_DEBUG) + endif() + + if(QT_INCLUDE_DIRS_NO_SYSTEM) + include_directories(${QT_INCLUDE_DIR}) + else(QT_INCLUDE_DIRS_NO_SYSTEM) + include_directories(SYSTEM ${QT_INCLUDE_DIR}) + endif(QT_INCLUDE_DIRS_NO_SYSTEM) +else(original_logic) + set(QT_COMPILE_DEFINITIONS ${QT_DEFINITIONS}) + set(NP_QT_INCLUDE_DIRECTORIES ${QT_INCLUDE_DIR}) +endif(original_logic) + +set(QT_LIBRARIES "") +set(QT_LIBRARIES_PLUGINS "") + +if (QT_USE_QTMAIN) + if (Q_WS_WIN) + set(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY}) + endif () +endif () + +if(QT_DONT_USE_QTGUI) + set(QT_USE_QTGUI 0) +else() + set(QT_USE_QTGUI 1) +endif() + +if(QT_DONT_USE_QTCORE) + set(QT_USE_QTCORE 0) +else() + set(QT_USE_QTCORE 1) +endif() + +if (QT_USE_QT3SUPPORT) + if(original_logic) + add_definitions(-DQT3_SUPPORT) + else(original_logic) + list(APPEND QT_COMPILE_DEFINITIONS -DQT3_SUPPORT) + endif(original_logic) +endif () + +# list dependent modules, so dependent libraries are added +set(QT_QT3SUPPORT_MODULE_DEPENDS QTGUI QTSQL QTXML QTNETWORK QTCORE) +# This original_logic code contains an incorrect dependency. +#set(QT_QTSVG_MODULE_DEPENDS QTGUI QTXML QTCORE) +set(QT_QTSVG_MODULE_DEPENDS QTGUI QTCORE) +set(QT_QTUITOOLS_MODULE_DEPENDS QTGUI QTXML QTCORE) +set(QT_QTHELP_MODULE_DEPENDS QTGUI QTSQL QTXML QTNETWORK QTCORE) +if(QT_QTDBUS_FOUND) + set(QT_PHONON_MODULE_DEPENDS QTGUI QTDBUS QTCORE) +else() + set(QT_PHONON_MODULE_DEPENDS QTGUI QTCORE) +endif() +set(QT_QTDBUS_MODULE_DEPENDS QTXML QTCORE) +set(QT_QTXMLPATTERNS_MODULE_DEPENDS QTNETWORK QTCORE) +set(QT_QAXCONTAINER_MODULE_DEPENDS QTGUI QTCORE) +set(QT_QAXSERVER_MODULE_DEPENDS QTGUI QTCORE) +set(QT_QTSCRIPTTOOLS_MODULE_DEPENDS QTGUI QTCORE) +set(QT_QTWEBKIT_MODULE_DEPENDS QTXMLPATTERNS QTGUI QTCORE) +set(QT_QTDECLARATIVE_MODULE_DEPENDS QTSCRIPT QTSVG QTSQL QTXMLPATTERNS QTGUI QTCORE) +set(QT_QTMULTIMEDIA_MODULE_DEPENDS QTGUI QTCORE) +set(QT_QTOPENGL_MODULE_DEPENDS QTGUI QTCORE) +set(QT_QTSCRIPT_MODULE_DEPENDS QTCORE) +set(QT_QTGUI_MODULE_DEPENDS QTCORE) +set(QT_QTTEST_MODULE_DEPENDS QTCORE) +set(QT_QTXML_MODULE_DEPENDS QTCORE) +set(QT_QTSQL_MODULE_DEPENDS QTCORE) +set(QT_QTNETWORK_MODULE_DEPENDS QTCORE) + +# Qt modules (in order of dependence) +foreach(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF QTNSPLUGIN + QAXSERVER QAXCONTAINER QTDECLARATIVE QTSCRIPT QTSVG QTUITOOLS QTHELP + QTWEBKIT PHONON QTSCRIPTTOOLS QTMULTIMEDIA QTXMLPATTERNS QTGUI QTTEST + QTDBUS QTXML QTSQL QTNETWORK QTCORE) + + if (QT_USE_${module} OR QT_USE_${module}_DEPENDS) + if (QT_${module}_FOUND) + if(QT_USE_${module}) + string(REPLACE "QT" "" qt_module_def "${module}") + if(original_logic) + add_definitions(-DQT_${qt_module_def}_LIB) + else(original_logic) + list(APPEND QT_COMPILE_DEFINITIONS -DQT_${qt_module_def}_LIB) + endif(original_logic) + if(original_logic) + if(QT_INCLUDE_DIRS_NO_SYSTEM) + include_directories(${QT_${module}_INCLUDE_DIR}) + else(QT_INCLUDE_DIRS_NO_SYSTEM) + include_directories(SYSTEM ${QT_${module}_INCLUDE_DIR}) + endif(QT_INCLUDE_DIRS_NO_SYSTEM) + else(original_logic) + list(APPEND NP_QT_INCLUDE_DIRECTORIES ${QT_${module}_INCLUDE_DIR}) + endif(original_logic) + endif() + + # For the case when QT_USE_${module} is false but + # QT_USE_${module}_DEPENDS is true, the following logic + # implies transitive linking. But we let that go.... + set(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIBRARY}) + set(QT_LIBRARIES_PLUGINS ${QT_LIBRARIES_PLUGINS} ${QT_${module}_PLUGINS}) + + if(QT_IS_STATIC) + set(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIB_DEPENDENCIES}) + endif() + + foreach(depend_module ${QT_${module}_MODULE_DEPENDS}) + set(QT_USE_${depend_module}_DEPENDS 1) + endforeach() + else () + message("Qt ${module} library not found.") + endif () + endif () + +endforeach() + +if(NOT original_logic) + # QT_COMPILE_DEFINITIONS is only used for the pkg-config case. + # NP_QT_COMPILE_DEFINITIONS is equivalent to QT_COMPILE_DEFINITIONS with + # the -D prefixes removed. Also, check the assumption that + # QT_COMPILE_DEFINITIONS contains nothing but -D... options. + set(NP_QT_COMPILE_DEFINITIONS) + foreach(definition ${QT_COMPILE_DEFINITIONS}) + if(definition MATCHES "^-D") + string(REGEX REPLACE "^-D" "" new_definition ${definition}) + list(APPEND NP_QT_COMPILE_DEFINITIONS ${new_definition}) + else(definition MATCHES "^-D") + message(STATUS "QT_DEFINITIONS = ${QT_DEFINITIONS}") + message(FATAL_ERROR "An element of QT_DEFINITIONS does not start with \"-D\"") + endif(definition MATCHES "^-D") + endforeach(definition ${QT_COMPILE_DEFINITIONS}) + message(STATUS "NP_QT_COMPILE_DEFINITIONS = ${NP_QT_COMPILE_DEFINITIONS}") + message(STATUS "QT_COMPILE_DEFINITIONS = ${QT_COMPILE_DEFINITIONS}") + + # QT_INCLUDE_DIRECTORIES is only used for the pkg-config case. + # It is equivalent to NP_QT_INCLUDE_DIRECTORIES with "-I" + # or "-isystem " suffixes prepended. + + set(QT_INCLUDE_DIRECTORIES) + foreach(directory ${NP_QT_INCLUDE_DIRECTORIES}) + if(QT_INCLUDE_DIRS_NO_SYSTEM) + list(APPEND QT_INCLUDE_DIRECTORIES "-I${directory}") + else(QT_INCLUDE_DIRS_NO_SYSTEM) + list(APPEND QT_INCLUDE_DIRECTORIES "-isystem ${directory}") + endif(QT_INCLUDE_DIRS_NO_SYSTEM) + endforeach(directory ${QT_INCLUDE_DIR}) + + message(STATUS "NP_QT_INCLUDE_DIRECTORIES = ${NP_QT_INCLUDE_DIRECTORIES}") + message(STATUS "QT_INCLUDE_DIRECTORIES = ${QT_INCLUDE_DIRECTORIES}") + + # Function to set appropriate target properties for Qt-related build targets. + function(set_qt_target_properties target) + # Actual target argument is just a string so only one level of + # indirection required to determine that string. + set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS ${NP_QT_COMPILE_DEFINITIONS}) + set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG ${NP_QT_COMPILE_DEFINITIONS} QT_DEBUG) + set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE ${NP_QT_COMPILE_DEFINITIONS} QT_NO_DEBUG) + set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO ${NP_QT_COMPILE_DEFINITIONS} QT_NO_DEBUG) + set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL ${NP_QT_COMPILE_DEFINITIONS} QT_NO_DEBUG) + if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) + set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_DEBUG) + endif(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) + # The only method of setting system versions of the include + # directories for the compiler to use to build a target is the + # target_include_directories function (outside of directory + # properties which which is a method we want to avoid since it + # affects every compilation in the directory and all + # subdirectories). However, target_include_directories was first + # available only for 2.8.12.1. So for previous versions (or if + # QT_INCLUDE_DIRS_NO_SYSTEM is true) drop the system qualifier for + # the include directories the compiler is to use, and specify + # those directories with set_property which is available for + # earlier versions of cmake. + if(QT_INCLUDE_DIRS_NO_SYSTEM OR ${CMAKE_VERSION} VERSION_LESS 2.8.12.1) + set_property(TARGET ${target} APPEND PROPERTY INCLUDE_DIRECTORIES ${NP_QT_INCLUDE_DIRECTORIES}) + else(QT_INCLUDE_DIRS_NO_SYSTEM OR ${CMAKE_VERSION} VERSION_LESS 2.8.12.1) + target_include_directories(${target} SYSTEM PRIVATE ${NP_QT_INCLUDE_DIRECTORIES}) + endif(QT_INCLUDE_DIRS_NO_SYSTEM OR ${CMAKE_VERSION} VERSION_LESS 2.8.12.1) + endfunction(set_qt_target_properties target) +endif(NOT original_logic) Modified: trunk/cmake/modules/qt.cmake =================================================================== --- trunk/cmake/modules/qt.cmake 2013-12-11 09:01:35 UTC (rev 12848) +++ trunk/cmake/modules/qt.cmake 2013-12-11 09:35:08 UTC (rev 12849) @@ -32,12 +32,17 @@ # PLD_svgqt - ON means the svgqt device is enabled. # PLD_extqt - ON means the extqt device is enabled. # PLD_memqt - ON means the memqt device is enabled. -# qt_COMPILE_FLAGS - individual COMPILE_FLAGS required to compile wxwidgets -# device. -# qt_LINK_FLAGS - list of full path names of libraries and +# pc_qt_COMPILE_FLAGS - Space-separated Qt4-related COMPILE_FLAGS required +# for the pkg-config configuration case +# where "include(${QT_USE_FILE})" has no effect. +# qt_COMPILE_FLAGS - empty. Use "include(${QT_USE_FILE})" instead +# (but only in directories where it is needed). +# qt_LINK_FLAGS - empty. Use "include(${QT_USE_FILE})" instead +# (but only in directories where it is needed). +# That command defines QT_LIBRARIES which should +# be used instead of the (now empty) qt_LINK_FLAGS. # qt_TARGETS - list of targets which the qt dynamic device # depends on. -# linker flags for dynamic wxwidgets device driver. # qt_RPATH - RPATH directory list for qt device driver. # DRIVERS_LINK_FLAGS - list of device LINK_FLAGS for case when # ENABLE_DYNDRIVERS OFF. (qt_TARGETS not included @@ -51,17 +56,6 @@ # PYQT_SIP_DIR - sip system directory # PYQT_SIP_FLAGS - sip command flags -# valgrind shows severe memory management problems with qt_example and -# qt_example either segfaults or hangs when ENABLE_DYNDRIVERS is OFF. -# I presume this is due to some linking issue for that case, but for -# now disable PLD_extqt when ENABLE_DYNDRIVERS is OFF until someone can -# investigate this issue further. - -if(PLD_extqt AND NOT ENABLE_DYNDRIVERS) - message(STATUS "WARNING: ENABLE_DYNDRIVERS is OFF so force PLD_extqt to be OFF") - set(PLD_extqt OFF CACHE BOOL "Enable Qt ext device" FORCE) -endif(PLD_extqt AND NOT ENABLE_DYNDRIVERS) - if(PLD_bmpqt OR PLD_jpgqt OR PLD_pngqt OR PLD_ppmqt OR PLD_tiffqt OR PLD_epsqt OR PLD_pdfqt OR PLD_qtwidget OR PLD_svgqt OR PLD_extqt OR PLD_memqt) set(ANY_QT_DEVICE ON) endif(PLD_bmpqt OR PLD_jpgqt OR PLD_pngqt OR PLD_ppmqt OR PLD_tiffqt OR PLD_epsqt OR PLD_pdfqt OR PLD_qtwidget OR PLD_svgqt OR PLD_extqt OR PLD_memqt) @@ -76,21 +70,42 @@ endif(ANY_QT_DEVICE) if(ANY_QT_DEVICE) - find_package(Qt4) + # Use a minimum version corresponding to the version installed by + # Debian Wheezy. I assume all other non-enterprise Linux distros + # have this version of Qt4 or later. + find_package(Qt4 4.8.2 REQUIRED QtCore QtGui QtSvg) + + # QT4_FOUND is defined to be true or false by find_package(Qt4 ...) if(QT4_FOUND) - if(PLD_svgqt AND ${QT_VERSION_MINOR} GREATER 2) - set(QT_USE_QTSVG 1) - endif(PLD_svgqt AND ${QT_VERSION_MINOR} GREATER 2) - # Do not include(${QT_USE_FILE}) here because it contaminates ALL - # build environments with Qt flags from the top-level directory on - # down. Instead include(${QT_USE_FILE}) only in certain subdirectories - # where it is necessary. + # Do not include(${QT_USE_FILE}) here because it contaminates ALL + # compile properties with Qt flags from (this) top-level directory + # on down. Use this alternative instead which includes a function + # set_qt_target_properties which should be called with the + # appropriate target argument whenever a Qt4-related target is built. + include(ndp_UseQt4) + + # QT_COMPILE_DEFINITIONS (used only for pc_qt_COMPILE_FLAGS below), + # QT_INCLUDE_DIRECTORIES (used only for pc_qt_COMPILE_FLAGS below), + # NP_COMPILE_DEFINITIONS (used only in set_qt_properties function), + # NP_QT_INCLUDE_DIRECTORIES (used only in set_qt_properties function), and + # QT_LIBRARIES (used wherever link with qt libraries is needed) + # are now defined. + + # Only used for pkg-config case. + set(pc_qt_COMPILE_FLAGS ${QT_COMPILE_DEFINES} ${QT_INCLUDE_DIRECTORIES}) + string(REGEX REPLACE ";" " " pc_qt_COMPILE_FLAGS "${pc_qt_COMPILE_FLAGS}") + # Work around pkg-config issues (see bug report + # <https://bugs.freedesktop.org/show_bug.cgi?id=72584>) with + # multiple -isystem tags by replacing them with "-I" + string(REGEX REPLACE "-isystem " "-I" pc_qt_COMPILE_FLAGS "${pc_qt_COMPILE_FLAGS}") + message(STATUS "pc_qt_COMPILE_FLAGS = ${pc_qt_COMPILE_FLAGS}") + + # These two must be explicitly empty since other alternative means + # are used. set(qt_COMPILE_FLAGS) - foreach(DIR ${QT_INCLUDES}) - set(qt_COMPILE_FLAGS "${qt_COMPILE_FLAGS} -I${DIR}") - endforeach(DIR ${QT_INCLUDES}) - - set(qt_LINK_FLAGS ${QT_LIBRARIES}) + set(qt_LINK_FLAGS) + + # ${QT_LIBRARY_DIR} defined by above find_package(Qt4 ...) call. set(qt_RPATH ${QT_LIBRARY_DIR}) filter_rpath(qt_RPATH) #message("qt_LIBRARY_DIR = ${qt_LIBRARY_DIR}") Modified: trunk/drivers/CMakeLists.txt =================================================================== --- trunk/drivers/CMakeLists.txt 2013-12-11 09:01:35 UTC (rev 12848) +++ trunk/drivers/CMakeLists.txt 2013-12-11 09:35:08 UTC (rev 12849) @@ -103,27 +103,34 @@ # device driver depends on. #message("${SOURCE_ROOT_NAME}_TARGETS = ${${SOURCE_ROOT_NAME}_TARGETS}") - if(SOURCE_ROOT_NAME STREQUAL "qt" AND NOT ENABLE_qt) + if(SOURCE_ROOT_NAME STREQUAL "qt") if(ANY_QT_DEVICE) add_library(${SOURCE_ROOT_NAME} MODULE ${${SOURCE_ROOT_NAME}_SOURCE}) - add_dependencies(${SOURCE_ROOT_NAME} moc_outfile_generated) - # Set up Qt4-based build environment. - include(${QT_USE_FILE}) + if(NOT ENABLE_qt) + # Note this code is never executed considering the way the + # build system is set up now (see cmake/modules/qt.cmake), + # but nevertheless keep it for the future in case we ever + # want to deal with the case where we want to build the qt + # device without building the plplotqtd library + add_dependencies(${SOURCE_ROOT_NAME} moc_outfile_generated) + endif(NOT ENABLE_qt) if(NOT QT_LIBRARIES) - message(FATAL_ERROR "include(${QT_USE_FILE}) failed in drivers subdirectory.") + message(FATAL_ERROR "Internal build system inconsistency. QT_LIBRARIESis empty but it should be populated") endif(NOT QT_LIBRARIES) target_link_libraries( ${SOURCE_ROOT_NAME} plplot${LIB_TAG} ${MATH_LIB} - ${${SOURCE_ROOT_NAME}_LINK_FLAGS} + ${QT_LIBRARIES} ${${SOURCE_ROOT_NAME}_TARGETS} ) + # Update the target COMPILE_DEFINITIONS and INCLUDE_DIRECTORIES + set_qt_target_properties(${SOURCE_ROOT_NAME}) else(ANY_QT_DEVICE) message(FATAL_ERROR "Internal build system inconsistency. Attempt to build dynamic qt device when ANY_QT_DEVICE is false.") endif(ANY_QT_DEVICE) - else(SOURCE_ROOT_NAME STREQUAL "qt" AND NOT ENABLE_qt) + else(SOURCE_ROOT_NAME STREQUAL "qt") add_library(${SOURCE_ROOT_NAME} MODULE ${${SOURCE_ROOT_NAME}_SOURCE}) target_link_libraries( ${SOURCE_ROOT_NAME} @@ -132,7 +139,7 @@ ${${SOURCE_ROOT_NAME}_LINK_FLAGS} ${${SOURCE_ROOT_NAME}_TARGETS} ) - endif(SOURCE_ROOT_NAME STREQUAL "qt" AND NOT ENABLE_qt) + endif(SOURCE_ROOT_NAME STREQUAL "qt") # ${SOURCE_ROOT_NAME}_RPATH originally set in cmake/modules files for # each driver in ${DRIVERS_LIST}. This is only used for the Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2013-12-11 09:01:35 UTC (rev 12848) +++ trunk/examples/CMakeLists.txt 2013-12-11 09:35:08 UTC (rev 12849) @@ -27,15 +27,13 @@ if(CORE_BUILD) # Configure Makefile.examples with some specific variables for the # traditional Makefile + pkg-config installed examples build. + + # cxx and tk subdirectories are special cases. if(PLD_ps) if(NOT ENABLE_ada) set(PSC_ADA_COMMENT "#") endif(NOT ENABLE_ada) - if(NOT ENABLE_cxx) - set(PSC_CXX_COMMENT "#") - endif(NOT ENABLE_cxx) - if(NOT ENABLE_d) set(PSC_D_COMMENT "#") endif(NOT ENABLE_d) @@ -75,7 +73,6 @@ else(PLD_ps) set(PSC_ADA_COMMENT "#") set(PSC_C_COMMENT "#") - set(PSC_CXX_COMMENT "#") set(PSC_D_COMMENT "#") set(PSC_F95_COMMENT "#") set(PSC_JAVA_COMMENT "#") @@ -86,6 +83,10 @@ set(PSC_TCL_COMMENT "#") endif(PLD_ps) + if(NOT(ENABLE_cxx AND (PLD_ps OR ENABLE_qt))) + set(CXX_COMMENT "#") + endif(NOT(ENABLE_cxx AND (PLD_ps OR ENABLE_qt))) + if(NOT ENABLE_tk) set(TK_COMMENT "#") endif(NOT ENABLE_tk) @@ -308,6 +309,14 @@ DESTINATION ${DATA_DIR}/examples/cmake/modules ) + # Install qt support file. + if(ANY_QT_DEVICE) + install(FILES + ${CMAKE_SOURCE_DIR}/cmake/modules/ndp_UseQt4.cmake + DESTINATION ${DATA_DIR}/examples/cmake/modules + ) + endif(ANY_QT_DEVICE) + # Install PLplot-specific language support files needed for CMake-based # build of installed examples. # N.B. This list of files must be maintained consistently with the file Modified: trunk/examples/Makefile.examples.in =================================================================== --- trunk/examples/Makefile.examples.in 2013-12-11 09:01:35 UTC (rev 12848) +++ trunk/examples/Makefile.examples.in 2013-12-11 09:35:08 UTC (rev 12849) @@ -53,20 +53,20 @@ @PSC_ADA_COMMENT@test_noninteractive: x01a.psc @PSC_ADA_COMMENT@@COMPARE_COMMENT@compare: x01a.psc -@PSC_CXX_COMMENT@all: c++/x01@EXEEXT@ -@PSC_CXX_COMMENT@c++/x01@EXEEXT@: -@PSC_CXX_COMMENT@ cd c++; $(MAKE) -@PSC_CXX_COMMENT@cxx_clean: -@PSC_CXX_COMMENT@ cd c++; $(MAKE) clean -@PSC_CXX_COMMENT@.PHONY: cxx_clean -@PSC_CXX_COMMENT@clean: cxx_clean -@PSC...@x0...c: c++/x01@EXEEXT@ -@PSC_CXX_COMMENT@ @echo Generate C++ results for psc device -@PSC_CXX_COMMENT@ ./plplot-test.sh --verbose --front-end=cxx --device=psc -@PSC_CXX_COMMENT@test_noninteractive: x01cxx.psc -@PSC_CXX_COMMENT@@COMPARE_COMMENT@compare: x01cxx.psc +@CXX_COMMENT@all: c++/x01@EXEEXT@ +@CXX_COMMENT@c++/x01@EXEEXT@: +@CXX_COMMENT@ cd c++; $(MAKE) +@CXX_COMMENT@cxx_clean: +@CXX_COMMENT@ cd c++; $(MAKE) clean +@CXX_COMMENT@.PHONY: cxx_clean +@CXX_COMMENT@clean: cxx_clean +@CXX...@x0...c: c++/x01@EXEEXT@ +@CXX_COMMENT@ @echo Generate C++ results for psc device +@CXX_COMMENT@ ./plplot-test.sh --verbose --front-end=cxx --device=psc +@CXX_COMMENT@test_noninteractive: x01cxx.psc +@CXX_COMMENT@@COMPARE_COMMENT@compare: x01cxx.psc # Just for c, c++, and tk directories -@PSC_CXX_COMMENT@test_interactive: c++/x01@EXEEXT@ +@CXX_COMMENT@test_interactive: c++/x01@EXEEXT@ @PSC_D_COMMENT@all: d/x01d@EXEEXT@ @PSC_D_COMMENT@d/x01d@EXEEXT@: Modified: trunk/examples/c++/CMakeLists.txt =================================================================== --- trunk/examples/c++/CMakeLists.txt 2013-12-11 09:01:35 UTC (rev 12848) +++ trunk/examples/c++/CMakeLists.txt 2013-12-11 09:35:08 UTC (rev 12849) @@ -145,8 +145,6 @@ if(ENABLE_qt) if(CORE_BUILD) set(BUILD_qt_example ON) - # Set up Qt4-based build environment. - include(${QT_USE_FILE}) if(NOT QT_LIBRARIES) message(FATAL_ERROR "include(${QT_USE_FILE}) failed in core build examples/c++ subdirectory.") endif(NOT QT_LIBRARIES) @@ -154,16 +152,11 @@ # Must find Qt4 all over again here rather than simply copying variables # from the core build to this installed examples build so that we can # access the qt4_wrap_cpp macro here. - find_package(Qt4) + find_package(Qt4 4.8.2 REQUIRED QtCore QtGui QtSvg) # To avoid Qt4 version mismatch make sure the Qt version matches that # used by the core build. if(QT4_FOUND AND QT_VERSION_MAJOR STREQUAL "${CORE_QT_VERSION_MAJOR}" AND QT_VERSION_MINOR STREQUAL "${CORE_QT_VERSION_MINOR}" AND QT_VERSION_PATCH STREQUAL "${CORE_QT_VERSION_PATCH}") - if(PLD_svgqt AND ${QT_VERSION_MINOR} GREATER 2) - set(QT_USE_QTSVG 1) - endif(PLD_svgqt AND ${QT_VERSION_MINOR} GREATER 2) - - # Set up Qt4-based build environment. - include(${QT_USE_FILE}) + include(ndp_UseQt4) if(NOT QT_LIBRARIES) message(FATAL_ERROR "include(${QT_USE_FILE}) failed in installed examples build examples/c++ subdirectory.") endif(NOT QT_LIBRARIES) @@ -185,6 +178,8 @@ ) add_executable(qt_example qt_example.cpp qt_PlotWindow.cpp ${QT_MOC_OUTFILES}) target_link_libraries(qt_example ${QT_LIBRARIES} plplotqt${LIB_TAG} plplot${LIB_TAG}) + # Update the target COMPILE_DEFINITIONS and INCLUDE_DIRECTORIES + set_qt_target_properties(qt_example) endif(BUILD_qt_example) endif(ENABLE_qt) endif(BUILD_TEST) Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2013-12-11 09:01:35 UTC (rev 12848) +++ trunk/src/CMakeLists.txt 2013-12-11 09:35:08 UTC (rev 12849) @@ -126,8 +126,6 @@ # moc files generated in the binary include directory. set(qt_dependency moc_outfile_generated) - # Set up Qt4-based build environment. - include(${QT_USE_FILE}) if(NOT QT_LIBRARIES) message(FATAL_ERROR "include(${QT_USE_FILE}) failed in src subdirectory.") endif(NOT QT_LIBRARIES) @@ -202,6 +200,8 @@ else(ENABLE_DYNDRIVERS) set(libplplot${LIB_TAG}_LINK_LIBRARIES ${DRIVERS_LINK_FLAGS}) set(LIB_INSTALL_RPATH ${LIB_INSTALL_RPATH} ${DRIVERS_RPATH}) + # Update the target COMPILE_DEFINITIONS and INCLUDE_DIRECTORIES + set_qt_target_properties(plplot${LIB_TAG}) endif(ENABLE_DYNDRIVERS) #message("DEBUG: LIB_INSTALL_RPATH = ${LIB_INSTALL_RPATH}") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-12-11 09:01:38
|
Revision: 12848 http://sourceforge.net/p/plplot/code/12848 Author: airwin Date: 2013-12-11 09:01:35 +0000 (Wed, 11 Dec 2013) Log Message: ----------- Improve filter_rpath function by taking advantage of the well-documented and maintained CMAKE_C_IMPLICIT_LINK_DIRECTORIES, CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES, and CMAKE_FORTRAN_IMPLICIT_LINK_DIRECTORIES variables to clean rpath information of standard directory locations instead of using the undocumented/poorly maintained internal variable CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES for the same task. The new set of variables is only available after C, CXX, and FORTRAN have been enabled so move include of shapelib module (which uses filter_rpath) to after when all the languages are defined. This fix sorted out an issue with the rpath used for qt_example which was being contaminated by a system location and thus giving the wrong location when a non-standard Qt location is used. Modified Paths: -------------- trunk/cmake/modules/plplot.cmake trunk/cmake/modules/plplot_functions.cmake Modified: trunk/cmake/modules/plplot.cmake =================================================================== --- trunk/cmake/modules/plplot.cmake 2013-12-11 08:37:43 UTC (rev 12847) +++ trunk/cmake/modules/plplot.cmake 2013-12-11 09:01:35 UTC (rev 12848) @@ -444,9 +444,6 @@ message(STATUS "X11_COMPILE_FLAGS = ${X11_COMPILE_FLAGS}") message(STATUS "X11_LIBRARIES = ${X11_LIBRARIES}") -# Support for shapelib library for reading shapefile map data -include(shapelib) - option(DEFAULT_NO_BINDINGS "All language bindings are disabled by default" OFF @@ -512,6 +509,8 @@ # ======================================================================= # additional library support # ======================================================================= +# Support for shapelib library for reading shapefile map data +include(shapelib) include(freetype) # On windows systems the math library is not separated so do not specify # it unless you are on a non-windows system. Modified: trunk/cmake/modules/plplot_functions.cmake =================================================================== --- trunk/cmake/modules/plplot_functions.cmake 2013-12-11 08:37:43 UTC (rev 12847) +++ trunk/cmake/modules/plplot_functions.cmake 2013-12-11 09:01:35 UTC (rev 12848) @@ -186,16 +186,31 @@ list(REMOVE_DUPLICATES CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES) endif(CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES) -# Filter all CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES list elements from -# rpath_in list. +# Filter all CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES list elements from +# rpath_in list. Note, this uses variables that are only defined after +# languages have been enabled but according to the documentation the +# logic is only invoked when the function is invoked so this should be +# OK _if care is used that this function is invoked only after the +# languages have been enabled_. C is enabled immediately so that will +# serve most purposes, but CXX and Fortran are enabled later so if +# you want those special system locations removed (unlikely but +# possible) then you are going to have to be somewhat more careful +# when this function is invoked. + function(filter_rpath rpath) #message("DEBUG: ${rpath} = ${${rpath}}") set(internal_rpath ${${rpath}}) if(internal_rpath) list(REMOVE_DUPLICATES internal_rpath) - if(CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES) - list(REMOVE_ITEM internal_rpath ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}) - endif(CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES) + set(directories_to_be_removed + ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES} + ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES} + ${CMAKE_FORTRAN_IMPLICIT_LINK_DIRECTORIES} + ) + list(REMOVE_DUPLICATES directories_to_be_removed) + if(directories_to_be_removed) + list(REMOVE_ITEM internal_rpath ${directories_to_be_removed}) + endif(directories_to_be_removed) endif(internal_rpath) #message("DEBUG: (filtered) ${rpath} = ${internal_rpath}") set(${rpath} ${internal_rpath} PARENT_SCOPE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-12-11 08:37:46
|
Revision: 12847 http://sourceforge.net/p/plplot/code/12847 Author: airwin Date: 2013-12-11 08:37:43 +0000 (Wed, 11 Dec 2013) Log Message: ----------- Add a qt4_lite epa_build configuration. Tested by Alan W. Irwin <ai...@us...> on Linux for epa_build with the build_epa_lite target which took ~15 minutes to complete on my ordinary PC. Since that build I have done extensive comprehensive testing of PLplot for the qt case using these qt4_lite install results, and no issues were found at all. Modified Paths: -------------- trunk/cmake/epa_build/CMakeLists.txt trunk/cmake/epa_build/plplot/CMakeLists.txt Added Paths: ----------- trunk/cmake/epa_build/qt4_lite/ trunk/cmake/epa_build/qt4_lite/CMakeLists.txt Modified: trunk/cmake/epa_build/CMakeLists.txt =================================================================== --- trunk/cmake/epa_build/CMakeLists.txt 2013-12-11 07:49:35 UTC (rev 12846) +++ trunk/cmake/epa_build/CMakeLists.txt 2013-12-11 08:37:43 UTC (rev 12847) @@ -397,6 +397,7 @@ plplot_lite wxwidgets pango + qt4_lite ) endif(BUILD_THE_BUILDTOOLS) Modified: trunk/cmake/epa_build/plplot/CMakeLists.txt =================================================================== --- trunk/cmake/epa_build/plplot/CMakeLists.txt 2013-12-11 07:49:35 UTC (rev 12846) +++ trunk/cmake/epa_build/plplot/CMakeLists.txt 2013-12-11 08:37:43 UTC (rev 12847) @@ -31,6 +31,7 @@ shapelib wxwidgets pango + qt4_lite ) # Do boilerplate tasks that must be done for each different project Added: trunk/cmake/epa_build/qt4_lite/CMakeLists.txt =================================================================== --- trunk/cmake/epa_build/qt4_lite/CMakeLists.txt (rev 0) +++ trunk/cmake/epa_build/qt4_lite/CMakeLists.txt 2013-12-11 08:37:43 UTC (rev 12847) @@ -0,0 +1,207 @@ +# qt4_lite/CMakeLists.txt + +# Configure the build of qt4_lite. + +# N.B. this file is generated so if you edit it you will lose all your +# changes the next time it is generated (typically by running +# either/both the update_added_packages.sh or update_pango_packages.sh +# scripts). If those scripts do not provide good results, then +# consider changing their source files (e.g., by editing the files +# used in those scripts) or add a patch to be run by those scripts. + +# Copyright (C) 2013 Alan W. Irwin + +# This file is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. + +# This file 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 +# Lesser General Public License for more details. + +# You should have received a copy of the GNU Lesser General Public +# License along with this file; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +# Many of the details of this epa_build configuration were derived from +# <http://www.linuxfromscratch.org/blfs/view/svn/x/qt4.html>. + +set(PACKAGE qt4_lite) + +# List of dependencies (most of which are build tools) which should be +# ignored. +set(ignored_dependencies_LIST ${extra_ignored_dependencies_list}) + +# The assumption here is that for Windows platforms Qt4 is self-contained +# and therefore does not rely on external libraries (at least if you configure +# the in-house version of those). For Linux platforms the dependencies will +# just have to be resolved by system versions rather than building a lot +# of additional packages. +set(dependencies_LIST) + +# Do boilerplate tasks that must be done for each different project +# that is configured as part of epa_build. +epa_boilerplate( + ignored_dependencies_LIST + PACKAGE + dependencies_LIST + dependencies_targets + EPA_PATH + source_PATH + ) + +set(CFLAGS "$ENV{CFLAGS}") +set(CXXFLAGS "$ENV{CXXFLAGS}") + +# Drop -fvisibility=hidden since that option may not work for Qt4. +# (May test this later if I get everything to work.) +string(REGEX REPLACE "-fvisibility=hidden" "" CFLAGS "${CFLAGS}") +string(REGEX REPLACE "-fvisibility=hidden" "" CXXFLAGS "${CXXFLAGS}") + +# Data that is related to downloads. +set(URL http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-everywhere-opensource-src-4.8.5.tar.gz) +# Temporary to save download bandwidth/time while debugging this. +set(URL /home/software/build_qt4/qt-everywhere-opensource-src-4.8.5.tar.gz) +set(DOWNLOAD_HASH_TYPE MD5) +set(DOWNLOAD_HASH 1864987bdbb2f58f8ae8b350dfdbe133) + +# Many of these are recommended by BLFS, but I have tried to use +# a consistent install prefix and I have also turned off as +# much as possible for this "lite" version. +set(config_arguments + + # Installation options: + -sysconfdir ${EPA_CMAKE_INSTALL_PREFIX}/etc/xdg + + # Configure options: + -release + -confirm-license + -opensource + # Need to be consistent with system versions of PyQt4/QtGui.so which need + # a libQtGui.so library which contains QWidget::accessibleName() const + # and QWidget::accessibleDescription() const. + -accessibility + + # Try to get rid of everything to do with sql by eliminating all possible + # drivers. + -no-sql-db2 + -no-sql-ibase + -no-sql-mysql + -no-sql-oci + -no-sql-odbc + -no-sql-psql + -no-sql-sqlite + -no-sql-sqlite2 + -no-sql-sqlite_symbian + -no-sql-symsql + -no-sql-tds + + -no-qt3support + -no-xmlpatterns + -no-multimedia + -no-audio-backend + -no-phonon + -no-phonon-backend + + # Need svg + -svg + + -no-webkit + -no-javascript-jit + -no-script + -no-scripttools + -no-declarative + -no-declarative-debug + # Third party libraries (drop if possible but if needed by PLplot, use + # in-house Qt4 versions of these to reduce dependencies): + -qt-zlib + -no-gif + -qt-libtiff + -qt-libpng + -no-libmng + -qt-libjpeg + -no-openssl + # Additional options: + + # Drop all components other than libs + -nomake tools + -nomake examples + -nomake demos + -nomake docs + -nomake translations + + -optimized-qmake + + # Need gui which happens by default (there is no -gui option) + # if you do not specify -no-gui + + -no-nis + -no-cups + -no-iconv + -no-dbus + + # Qt/X11 only: (leave everything default) + ) + +# Note QTDIR= below. Setting that environment variable is recommended by method 2 of BLFS. + +ExternalProject_Add( + build_qt4_lite + DEPENDS ${dependencies_targets} + URL ${URL} + URL_HASH ${DOWNLOAD_HASH_TYPE}=${DOWNLOAD_HASH} + CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} QTDIR=${EPA_CMAKE_INSTALL_PREFIX} "CFLAGS=${CFLAGS}" "CXXFLAGS=${CXXFLAGS}" ${source_PATH}/${EPA_CONFIGURE_COMMAND} ${config_arguments} + BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} QTDIR=${EPA_CMAKE_INSTALL_PREFIX} ${EPA_PARALLEL_MAKE_COMMAND} + BUILD_IN_SOURCE 0 + INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} QTDIR=${EPA_CMAKE_INSTALL_PREFIX} ${EPA_PARALLEL_MAKE_COMMAND} install + #STEP_TARGETS update configure build install test + ) + +add_custom_command( + OUTPUT + ${EPA_BASE}/Stamp/build_${PACKAGE}/build_${PACKAGE}-update + COMMAND ${CMAKE_COMMAND} -E echo "make two code fixups recommended by BLFS." + COMMAND ${SED_EXECUTABLE} -i -e "/#if/d" -e "/#error/d" -e "/#endif/d" ${EPA_BASE}/Source/build_${PACKAGE}/config.tests/unix/libmng/libmng.cpp + COMMAND ${SED_EXECUTABLE} -i "/CONFIG -/ a\\isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../.." ${EPA_BASE}/Source/build_${PACKAGE}/src/3rdparty/webkit/Source/WebKit2/DerivedSources.pro + APPEND + ) + +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/install_png.sh +"install -v -Dm644 ${EPA_BASE}/Source/build_${PACKAGE}/src/gui/dialogs/images/qtlogo-64.png ${EPA_CMAKE_INSTALL_PREFIX}/usr/share/pixmaps/qt4logo.png +install -v -Dm644 ${EPA_BASE}/Source/build_${PACKAGE}/tools/assistant/tools/assistant/images/assistant-128.png ${EPA_CMAKE_INSTALL_PREFIX}/usr/share/pixmaps/assistant-qt4.png +install -v -Dm644 ${EPA_BASE}/Source/build_${PACKAGE}/tools/designer/src/designer/images/designer.png ${EPA_CMAKE_INSTALL_PREFIX}/usr/share/pixmaps/designer-qt4.png +install -v -Dm644 ${EPA_BASE}/Source/build_${PACKAGE}/tools/linguist/linguist/images/icons/linguist-128-32.png ${EPA_CMAKE_INSTALL_PREFIX}/usr/share/pixmaps/linguist-qt4.png +install -v -Dm644 ${EPA_BASE}/Source/build_${PACKAGE}/tools/qdbus/qdbusviewer/images/qdbusviewer-128.png ${EPA_CMAKE_INSTALL_PREFIX}/usr/share/pixmaps/qdbusviewer-qt4.png +" + ) + +add_custom_command( + OUTPUT + ${EPA_BASE}/Stamp/build_${PACKAGE}/build_${PACKAGE}-install + COMMAND ${CMAKE_COMMAND} -E echo "install some addition png files recommended by BLFS." + COMMAND ${BASH_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/install_png.sh + APPEND + ) + +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/install_fixups.sh +"for file in `basename -a -s .prl ${EPA_CMAKE_INSTALL_PREFIX}/lib/lib*.prl`; do + sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\\1/' ${EPA_CMAKE_INSTALL_PREFIX}/lib/\${file}.prl + perl -pi -e \"s, -L\$PWD/?\\S+,,g\" ${EPA_CMAKE_INSTALL_PREFIX}/lib/pkgconfig/\${file##lib}.pc +done + +unset file +" + ) + +add_custom_command( + OUTPUT + ${EPA_BASE}/Stamp/build_${PACKAGE}/build_${PACKAGE}-install + COMMAND ${CMAKE_COMMAND} -E echo "install fixups recommended by BLFS." + COMMAND ${BASH_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/install_fixups.sh + APPEND + ) + +# N.B. I have explicitly ignored all post-install Qt4 configuration recommended +# by BLFS because I don't think that will be needed by PLplot. Property changes on: trunk/cmake/epa_build/qt4_lite/CMakeLists.txt ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2013-12-11 07:49:38
|
Revision: 12846 http://sourceforge.net/p/plplot/code/12846 Author: jbauck Date: 2013-12-11 07:49:35 +0000 (Wed, 11 Dec 2013) Log Message: ----------- Update Ada documentation for new arrow-resetting feature and variant Ada-specific implementations Modified Paths: -------------- trunk/doc/docbook/src/ada.xml Modified: trunk/doc/docbook/src/ada.xml =================================================================== --- trunk/doc/docbook/src/ada.xml 2013-12-11 07:26:37 UTC (rev 12845) +++ trunk/doc/docbook/src/ada.xml 2013-12-11 07:49:35 UTC (rev 12846) @@ -1,6 +1,5 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -*- mode: nxml -*- --> -<!-- +<?xml version='1.0' encoding='UTF-8'?> +<!-- -*- mode: nxml -*- --><!-- ada.xml: "Ada Language" chapter Copyright (C) 2008-2010 Jerry Bauck @@ -31,27 +30,20 @@ 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. ---> -<!-- -Note to self: Uncomment these lines when editing with Serna or XMLmind. -<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" -"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> ---> +--><!-- Note to self: Uncomment these lines when editing with Serna or XMLmind + or whatever, a validity check doesn't always fail. --><!-- This document was created with Syntext Serna Free. --> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []> <chapter id="ada"> <title>Ada Language</title> - <para>This document describes the Ada bindings to the PLplot technical plotting software, how to obtain the necessary software components, and how to use them together.</para> - <sect1 id="ada_overview"> <title>Overview</title> - <para>The Ada bindings for PLplot provide a way for Ada programmers to access the powerful PLplot technical plotting facilities directly from Ada programs while working completely in Ada; the Ada programmer never needs to know or worry that PLplot itself is written in another language.</para> - <para>There are a thin binding and two thick bindings provided. The thin binding presents the application programming interface (API) in a form very similar to the C API, although in 100% Ada. The thick bindings @@ -59,30 +51,24 @@ and add some ease-of-use features. It is expected that the thick bindings will be preferred.</para> </sect1> - <sect1 id="ada_bindings"> <title>The Bindings</title> - <para>The bindings are a re-expression and extension of the C-language API - and as such are a kind of abstract layer between the user's code and the + and as such are a kind of abstract layer between the user's code and the PLplot binary library. Additionally, there are a few capabilities not in the official API but nonetheless which are available to the C programmer which are included in the bindings and thus are directly available to the Ada programmer.</para> - <para>The thin binding is a layer between the thick bindings and the underlying C code. It is mainly a programming convenience for the developer of the bindings; this is a common implementation for foreign language bindings and for the most part, the user can ignore it.</para> - <para>There are two thick bindings provided for the convenience of the user. Either may be used and they both provide exactly the same - functionality. The thick bindings are the user's main concern with + functionality. The thick bindings are the user's main concern with programming for PLplot.</para> - <sect2 id="ada_thin"> <title>Thin Binding</title> - <para>The thin binding, in the files <literal>plplotthin.ads</literal> and <literal>plplotthin.adb</literal>, is mostly a direct and obvious mapping of the C application programming interface (API) to Ada. Thus, @@ -93,21 +79,18 @@ color using a number which is associated with a set of colors.) Various constants from the C API are also included here. Numeric types as defined in PLplot are associated with numeric types in Ada in the thin - binding by use of Ada's type system. Thus, the thin binding refers to + binding by use of Ada's type system. Thus, the thin binding refers to the PLplot-centric type <literal>PLFLT</literal> for floating-point types while the thick binding uses the usual Ada type <literal>Long_Float</literal>.</para> - <para>Many of the comments from the C source header file (similar in purpose to an Ada specification file) have been retained in the thin binding, even when they are no longer make sense. These might be pruned at some point to facilitate reading the Ada source.</para> - <para>Also included in the thin binding are some other declarations which help the Ada binding to mesh well with C by emulating certain data structures which are needed in some rather specialized usages as well as providing certain subprogram pointer types.</para> - <para>The Ada programmer working with either of the thick bindings will have to refer to the thin binding relatively rarely, if ever, and mainly to examine the subroutine pointer declarations and the several variant @@ -118,40 +101,34 @@ everything of interest to the user in the thick bindings and the user need not bother with the thin binding.</para> </sect2> - <sect2 id="ada_thick"> <title>The Thick Bindings</title> - <para>The thick bindings provide most of the information that the Ada programmer needs. Normally, only one of the two thick bindings would be used per user program but it should be possible to include both but that scenario would be unusual.</para> - <para>There are three main aspects of the thick bindings: providing an alternative access to the PLplot API, extending the PLplot functionality with some easy-to-use features, and overlaying Ada data structures and types.</para> - <para>In the first aspect, the thick bindings provide a fully Ada interface to the entire PLplot library. Packages are <literal>with</literal>-ed and <literal>use</literal>-d as normal Ada code. Ada arrays can be passed as usual, not requiring the array length or start or end indices to be passed separately. All necessary Ada types are made to match the underlying C types exactly.</para> - <para>The second aspect of the thick bindings is to provide some simplified ways to get a lot of plotting done with only one or two subroutine calls. For example, a single call to Simple_Plot can display - from one to five "<emphasis>y</emphasis>'s" as a function of a single - "<emphasis>x</emphasis>" with default plot appearances chosen to suit + from one to five "<emphasis>y</emphasis>'s" as a function of a single + "<emphasis>x</emphasis>" with default plot appearances chosen to suit many situations. Other simple plotters are available for - three-dimensional and contour plots. Manipulating PLplot's colors is + three-dimensional and contour plots. Manipulating PLplot's colors is similarly made easy and some default color schemes are provided.</para> - <para>The third main aspect of the thick binding is to use Ada data - structures and Ada's type system extensively to reduce the chances of + structures and Ada's type system extensively to reduce the chances of inappropriate actions. For example, Ada arrays are used throughout (as - opposed to C's + opposed to C's pointer-plus-offset-while-carrying-along-the-size-separately approach). Quantities which have natural range limits are <literal>subtype</literal>-d to reflect those constraints. The hope is @@ -160,19 +137,16 @@ reports at all. However, there remain a few instances where the typing could be improved and PLplot errors will still be reported from time to time.</para> - <para>Both the specification and body for the standard thick (and thin) binding contain the C subroutine name as a comment line immediately above the Ada procedure declaration; this should help in making the - associations between "Ada" names and "PLplot" names. Also, the + associations between "Ada" names and "PLplot" names. Also, the subroutine-specific comments from the C API have been retained verbatim.</para> </sect2> - <sect2 id="ada_thick_enhanced"> <title>Standard Thick Binding Using Enhanced Names</title> - - <para>The distinguishing feature of this thick binding (the "standard" + <para>The distinguishing feature of this thick binding (the "standard" binding) is to provide more descriptive names for PLplot subroutines, variables, constants, arguments, and other objects. Most Ada programmers will be more comfortable using these names. For example, in the C API as @@ -185,13 +159,12 @@ <literal>1</literal>. Many such numeric constants from the C API are given names in this thick binding. These renamed integers are discussed more fully in Section 7.2.</para> - <para>The disadvantage of this renaming is that it makes referring to the PLplot documentation somewhat awkward. There might be, at some time, a utility for easing this problem by providing an HTML file with links - so that a "normal" PLplot name can be linked to the "Ada" name along + so that a "normal" PLplot name can be linked to the "Ada" name along with the appropriate entry in the Ada specification, as well as another - HTML file with links from the "Ada" name directly to the PLplot web page + HTML file with links from the "Ada" name directly to the PLplot web page that documents that name. It might also be possible to provide an alternate version of the documentation with the enhanced names used. (The developer of the bindings has a sed file prepared which makes most @@ -199,34 +172,27 @@ retains the original C subprogram names as comments immediately above the function or procedure name in the code listing so it is relatively easy to locate the relevant item in the PLplot documentation.</para> - <para>One simple rule applies in reading the PLplot API documentation: the argument names are in the same order in Ada as in the PLplot documentation (the names are different) except that all array lengths are eliminated. The PLplot documentation, for each subroutine, shows a - "redacted" version which should be correct for Ada as well as other + "redacted" version which should be correct for Ada as well as other languages which have proper arrays.</para> - <para>The standard bindings are in the Ada files <literal>plplot.ads</literal> and <literal>plplot.adb</literal>.</para> </sect2> - <sect2 id="ada_thick_traditional"> <title>Thick Binding Using Traditional Names</title> - <para>This thick binding provides exactly the same functionality as the standard thick binding but retains the original names as used in the C code and the PLplot documentation.</para> - <para>The traditional bindings are in the Ada files <literal>plplot_traditional.ads</literal> and <literal>plplot_traditional.adb</literal>.</para> </sect2> </sect1> - <sect1 id="ada_examples"> <title>The Examples</title> - <para>An important part of the Ada bindings is the examples, some 33 of which demonstrate how to use many of the features of the PLplot package. These examples also serve as a test bed for the bindings in Ada and other @@ -235,21 +201,17 @@ been completely re-written in Ada (but retain a C flavor in the names that are given to objects). All of the Ada examples generate exactly the same Postscript as the C versions, Examples 14 and 17 excepted since those - operate interactively and don't (normally) make Postscript. Two versions + operate interactively and don't (normally) make Postscript. Two versions of each example are available, one calling the standard binding and the other the traditional binding. (In development, a sed script does almost all of the conversion automatically.)</para> </sect1> - <sect1 id="ada_obtaining"> <title>Obtaining the Software</title> - <para>There are three software components that you will need: an Ada compiler, the PLplot library, and the Ada bindings.</para> - <sect2 id="ada_obtaining_ada"> <title>Obtaining an Ada compiler</title> - <para>You will need an Ada compiler in order to use the Ada PLplot bindings. There are several compilers available. Here, we will focus on the free, open source compiler that is included with the GNU Compiler @@ -259,35 +221,27 @@ was originally developed at NYU, it has for many years been developed and supported commercially by AdaCore with academic and pro versions available.)</para> - <para>Your computer may already have GNAT installed, or you can download it from <ulink url="http://gcc.gnu.org/">gcc.gnu.org</ulink>. Another - route to obtaining GNAT is from the AdaCore page, <ulink - url="https://libre2.adacore.com/">libre2.adacore.com</ulink>. There are - versions for many operating systems and processors including Apple's OS + route to obtaining GNAT is from the AdaCore page, <ulink url="https://libre2.adacore.com/">libre2.adacore.com</ulink>. There are + versions for many operating systems and processors including Apple's OS X or its open source version Darwin, Linux, and Windows. The gcc and AdaCore versions differ in their licenses. Download the version that you need and follow the installation instructions.</para> </sect2> - <sect2 id="ada_obtaining_plplot"> <title>Download and install PLplot</title> - - <para>PLplot can be downloaded from the PLplot project page at <ulink - url="http://sourceforge.net/projects/plplot">sourceforge.net</ulink>. + <para>PLplot can be downloaded from the PLplot project page at <ulink url="http://sourceforge.net/projects/plplot">sourceforge.net</ulink>. Follow the installation instructions after downloading. The installation process requires that your computer has CMake installed. OS X users can try installing PLplot in its entirety from MacPorts. The advantage of using MacPorts is that all installation dependencies are automatically installed for you.</para> </sect2> - <sect2 id="ada_obtaining_bindings"> <title>The Ada bindings to PLplot</title> - <para>The third major software component is the bindings themselves; they are included with the PLplot software itself.</para> - <para>The bindings themselves are six Ada source files named (using GNAT filename extensions) <literal>plplot.ads</literal>, <literal>plplot.adb</literal>, @@ -299,23 +253,18 @@ later, in Section 9.</para> </sect2> </sect1> - <sect1 id="ada_howto"> <title>How to use the Ada bindings</title> - <sect2 id="ada_95_2005"> <title>Ada 95 versus Ada 2005</title> - <para>The bindings will work for either Ada 95 or Ada 2005 but there is a slightly subtle point regarding the use and declaration of vectors and matrices. The package <literal>PLplot_Auxiliary</literal> declares the types</para> - <programlisting> type Real_Vector is array (Integer range <>) of Long_Float; type Real_Matrix is array (Integer range <>, Integer range <>) of Long_Float; </programlisting> - <para>These declarations mimic exactly the declarations described in Annex G.3, Vector and Matrix Manipulation, of the Ada 2005 reference manual when the generic package therein described is specialized for @@ -324,7 +273,6 @@ <literal>Ada.Numerics.Long_Real_Arrays</literal> simply to gain access to these types and in the process require linking to the BLAS and LAPACK numerical libraries.</para> - <para>Ada 2005 introduced an annex G.3 which formally defines vector and matrix support to Ada, along with some common mathematical operations on those types. (This feature is a specific to vectors and matrices and @@ -341,16 +289,13 @@ depending on the Cmake configuration to expose a 2005 compiler in the later case. (Note that at some points in the documentation, Ada 2005 is referred to as Ada 2007, including some Cmake flags.)</para> - <para>This policy was changed in SVN version 11153. Before this, the type of compiler (Ada 95 or Ada 2005) had to be specified at the time that PLplot was built, and in the case of Ada 2005, the BLAS and LAPACK libraries had to be present and were subsequently linked.</para> </sect2> - <sect2 id="ada_gnat_nongnat"> <title>GNAT versus non-GNAT</title> - <para>The bindings were made using the GNAT compiler and there is a slight dependence on that compiler. Specifically, the <literal>Unrestricted_Access</literal> attribute of GNAT was used in @@ -360,44 +305,35 @@ (2D array) is passed to a PLplot subroutine. For more about <literal>Unrestricted_Access attribute</literal>, see Implementation Defined Attributes in the GNAT Reference Manual. This dependency - shouldn't be difficult to remove by either incorporating the GNAT code + shouldn't be difficult to remove by either incorporating the GNAT code which implements it, by following the TO-DO comment near the function definition in <literal>plplotthin.adb</literal>, or by providing the proper aliasing.</para> - <para>Another GNAT dependency is used to parse command line arguments in a C-like way.</para> - - <para>Pragma Warnings (Off, "some text") and Pragma Warnings (On, "some - text") are used in the bindings to suppress warnings about a particular + <para>Pragma Warnings (Off, "some text") and Pragma Warnings (On, "some + text") are used in the bindings to suppress warnings about a particular method used to interface with C code. These pragmas are also used in Ada Examples 21 to suppress a particular warning. Pragma Warnings is a GNAT extension. Non-GNAT usage could simply remove these pragmas with the resulting warnings ignored as they are benign.</para> - <para>Most of the GNAT dependencies can be found by searching the source - code for "<literal>GNAT</literal>", - "<literal>Unrestricted_Access</literal> and <literal>Pragma - Warnings</literal>."</para> - + code for "<literal>GNAT</literal>", + "<literal>Unrestricted_Access</literal> and <literal>Pragma Warnings</literal>."</para> <para>The GNAT dependence, though slight, will no doubt frustrate users of other Ada compilers. We welcome comments from those users, especially comments with specific suggestions on how to remove any GNAT-specific usages.</para> </sect2> - <sect2 id="ada_sample_project"> <title>Sample command line project</title> - <para>It is instructive to present a simple example that can be compiled and run from the command line. Although this example is specific to one installation, it should be fairly straightforward to adapt it to another installation. Toward that end, it is helpful to understand the PLplot - lingo of "build directory" and "installation directory."</para> - + lingo of "build directory" and "installation directory."</para> <para>Here is a simple program that will generate a plot of part of a parabola.</para> - <programlisting> with PLplot_Auxiliary, @@ -408,7 +344,7 @@ procedure Simple_Example is x, y : Real_Vector(-10 .. 10); begin - for i in x'range loop + for i in x'range loop x(i) := Long_Float(i); y(i) := x(i)**2; end loop; @@ -417,7 +353,6 @@ End_PLplot; -- Call this only once. end Simple_Example; </programlisting> - <para>Next is a bash script that will compile, bind, and link it. It is installation-specific in that paths to the GNAT compiler, PLplot libraries, and BLAS (Basic Linear Algebra System) and LAPACK (Linear @@ -425,13 +360,11 @@ fit your installation. Some Linux installations which have GNAT 4.3 or later (Ada 2005) pre-installed might have already set the paths to the BLAS and LAPACK libraries.</para> - <para>(Note that the G.3 Annex of Ada 2005, in the GNAT version, depends heavily on BLAS and LAPACK. These packages are tried-and-true packages that are available from several places in either C or Fortran versions. The present example is specific to OS X which has both C and Fortran versions pre-installed.)</para> - <programlisting> #!/bin/bash /usr/local/ada-4.3/bin/gnatmake simple_example.adb \ @@ -442,32 +375,25 @@ /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libblas.dylib \ /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/liblapack.dylib </programlisting> - <para>The resulting binary program can be run by typing <command>./simple_example</command></para> </sect2> </sect1> - <sect1 id="ada_unique"> <title>Unique Features of the Ada bindings</title> - <para>The Ada bindings have been augmented with a number of features which are intended to simplify the use of PLplot. They include high-level features for simplified plotting (such as easy foreground-background - control, a collection of "simple plotters," and easy color map + control, a collection of "simple plotters," and easy color map manipulations), integer options which have been given meaningful names, and a few other focused additions. Many users will find that they can do - most of their work using the "simple plotters".</para> - + most of their work using the "simple plotters".</para> <sect2 id="ada_high_level"> <title>High-level features for simplified plotting</title> - <sect3 id="ada_foreground_background"> <title>Foreground-background control</title> - <sect4 id="ada_draw_bw"> <title>Draw_On_Black, Draw_On_White</title> - <para>The default for PLplot is to draw its graphics on a black background. A white background can be used instead with <literal>Draw_On_White</literal> or reset to the original mode with @@ -478,92 +404,68 @@ background.</para> </sect4> </sect3> - <sect3 id="ada_simple_plotters"> <title>Simple Plotters</title> - <para>Several high-level but flexible plotters are available and more might be added in the future. It is expected that many users will find that these high-level routines are adequate for most of their day-to-day plotting.</para> - <sect4 id="ada_multiple_pairs"> <title>Multiplot_Pairs</title> - <para>Plot up to five <emphasis>x-y</emphasis> pairs with easy labelling, coloring, line width and styles, justification, and zooming.</para> </sect4> - <sect4 id="ada_simple_plot"> <title>Simple_Plot</title> - - <para>Plot up to five <emphasis>y</emphasis>'s against a single + <para>Plot up to five <emphasis>y</emphasis>'s against a single <emphasis>x</emphasis> with easy labelling and automatic line colors and styles.</para> </sect4> - <sect4 id="ada_simple_plot_logx"> <title>Simple_Plot_Log_X</title> - <para>Same as <literal>Simple_Plot</literal> but with logarithmic <emphasis>x</emphasis>-axis.</para> </sect4> - <sect4 id="ada_simple_plot_logy"> <title>Simple_Plot_Log_Y</title> - <para>Same as <literal>Simple_Plot</literal> but with logarithmic <emphasis>y</emphasis>-axis.</para> </sect4> - <sect4 id="ada_simple_plot_logxy"> <title>Simple_Plot_Log_XY</title> - <para>Same as <literal>Simple_Plot</literal> but with logarithmic <emphasis>x</emphasis>- and <emphasis>y</emphasis>-axes.</para> </sect4> - <sect4 id="ada_simple_plot_pairs"> <title>Simple_Plot_Pairs</title> - <para>Plot up to five <emphasis>x</emphasis>-<emphasis>y</emphasis> pairs with easy labelling and automatic line colors and styles.</para> </sect4> - <sect4 id="ada_single_plot"> <title>Single_Plot</title> - <para>Plot a single <emphasis>x</emphasis>-<emphasis>y</emphasis> pair with flexible labels, axis styles, colors, line width and style, justification, and zooming.</para> </sect4> - <sect4 id="ada_simple_contour"> <title>Simple_Contour</title> - <para>Make a contour plot with labels</para> </sect4> - <sect4 id="ada_simple_mesh"> <title>Simple_Mesh_3D</title> - <para>Easy 3D mesh plot with labels, zooming, and perspective controls</para> </sect4> - <sect4 id="ada_simple_surface_3d"> <title>Simple_Surface_3D</title> - <para>Easy 3D surface plot with labels, zooming, and perspective controls</para> </sect4> </sect3> - <sect3 id="ada_simple_color"> <title>Simple color map manipulations</title> - <para>PLplot provides extensive manipulation and control of two separate color maps, color map 0 and color map 1. The Ada binding makes basic manipulations easier and also adds facilities for making @@ -571,7 +473,6 @@ restored later. An initial snapshot is taken when the package is initialized so that the default color settings can always be restored after having been changed.</para> - <para>Another set of features lets the user reset the 16 individual colors in color map 0 after a color definition has been changed. It is important to note that while <literal>Set_Pen_Color(Red)</literal> @@ -582,203 +483,143 @@ <literal>Set_Pen_Color(Red)</literal> will draw in that color instead of red. To always assure that red is drawn even if the color map has been changed for integer <literal>1</literal>, use - <literal>Set_Pen_Color(Reset_Red)</literal> instead. These 16 "reset" + <literal>Set_Pen_Color(Reset_Red)</literal> instead. These 16 "reset" functions return the appropriate default integer for the specified color but also reset that slot in the color table so that a subsequent call such as <literal>Set_Pen_Color(Red)</literal> will also cause drawing in red.</para> - <para>Color map 1 also gets a easy-to-use makeover for Ada users. There are several pre-built color themes that are useful for quickly making surface and mesh plots, <literal>Color_Themes_For_Map_1_Type</literal>. These color themes can be quickly applied with <literal>Quick_Set_Color_Map_1</literal>.</para> - <para>Miscellaneous other Ada features include a pre-built mask function for <literal>Shade_Regions</literal> that does no masking; perhaps the most useful purpose is to provide a template for writing mask functions that do mask. And there is a handy function for calculating the contour levels for making contour plots.</para> - <itemizedlist> <listitem> <para>Color table snapshots</para> - <para><literal>Make_Snapshot_Of_Color_Map_0</literal></para> - <para><literal>Restore_Snapshot_Of_Color_Map_0</literal></para> - <para><literal>Restore_Default_Snapshot_Of_Color_Map_0</literal></para> </listitem> - <listitem> <para>Color resetting functions for the 16 colors of color map 0</para> - <para><literal>Reset_Black, Reset_Red, ..., Reset_White</literal></para> </listitem> - <listitem> <para>Easy manipulation of color map 1</para> - <para>Pre-built color themes for color map 1: <literal>Color_Themes_For_Map_1_Type</literal></para> - <para>Quick application of pre-built color themes: <literal>Quick_Set_Color_Map_1</literal></para> </listitem> - <listitem> <para>Other features</para> - <para>A pre-built mask function for <literal>Shade_Regions</literal> that does no masking: <literal>Mask_Function_No_Mask</literal></para> - <para>An easy way to calculate an array of contour levels for contour plots: <literal>Calculate_Contour_Levels</literal></para> </listitem> </itemizedlist> </sect3> </sect2> - <sect2 id="ada_integer_options"> <title>Integer Options Given Ada Names</title> - <para>The C version of PLplot uses a number of integers to mean specific things. Unfortunately, the meaning is lost when it it consigned to being a mere integer with no name. The Ada binding partially rectifies this situation by giving names to these integer constants. The integer can still be used if desired. (A more complete and safer rectification would use enumerated types.)</para> - <para>Below is a listing of at least the contexts in which these - "re-namings" have been applied. In some cases the entire range of values + "re-namings" have been applied. In some cases the entire range of values is listed, but if there are more than about four such values for each context, only a sampling is given.</para> - <para><emphasis role="bold"> Instances</emphasis></para> - <para><itemizedlist> <listitem> <para>Colors: Plot_Color_Type</para> - <para><literal> 0</literal> is Black, <literal>1</literal> is Red, etc</para> </listitem> - <listitem> <para>Justification for plots: <literal>Justification_Type</literal></para> - <para><literal>User_Justified</literal></para> - <para><literal>Not_Justified</literal></para> - <para><literal>Justified</literal></para> - <para><literal>Justified_Square_Box</literal></para> </listitem> - <listitem> <para>Axis styles: <literal>Axis_Style_Type</literal></para> - <para><literal>Linear_Major_Grid</literal></para> - <para><literal>Linear_Minor_Grid</literal></para> - <para>etc.</para> </listitem> - <listitem> <para>Font styles: <literal>Font_Style_Type</literal></para> - <para><literal>Normal_Font</literal></para> - <para><literal>Roman_Font</literal></para> - <para><literal>Italic_Font</literal></para> - <para><literal>Script_Font</literal></para> </listitem> - <listitem> <para>Character sets: <literal>Character_Set_Type</literal></para> - <para><literal>Standard_Character_Set</literal></para> - <para><literal>Extended_Character_Set</literal></para> </listitem> - <listitem> <para>Plot orientation: <literal>Orientation_Type</literal></para> - <para><literal>Landscape</literal></para> - <para><literal>Portrait</literal></para> </listitem> - <listitem> <para>Modes for parsing command line arguments: <literal>Parse_Mode_Type</literal></para> - <para>E.g. <literal>PL_PARSE_PARTIAL</literal></para> </listitem> - <listitem> <para>Descriptions of map outlines (continents, states, etc.): <literal>Map_Type</literal></para> - <para><literal>Continents</literal></para> - <para><literal>USA_and_States</literal></para> - <para><literal>Continents_and_Countries</literal></para> - <para><literal>USA_States_and_Continents</literal></para> </listitem> - <listitem> <para>Various style and view options for 3D and surface plots</para> - <para>E.g. <literal>Lines_Parallel_To_X</literal></para> </listitem> - <listitem> <para>Kind of gridding algorithm for interpolating 2D data to a grid: <literal>Gridding_Algorithm_Type</literal></para> - <para>E.g. <literal>Grid_Bivariate_Cubic_Spline_Approximation</literal></para> </listitem> - <listitem> <para>Flags for histogram style</para> - <para>E.g. <literal>Histogram_Default</literal></para> </listitem> - <listitem> <para>Flags for histogram binning</para> - <para>E.g. <literal>Bin_Default</literal></para> </listitem> - <listitem> <para>Names for color space models</para> - <para>Hue, Lightness, Saturation: <literal>HLS</literal></para> - <para>Red, Green, Blue: <literal>RGB</literal></para> </listitem> </itemizedlist></para> </sect2> - <sect2 id="ada_one_offs"> <title>One-offs</title> - <para>To provide convenient string handling in a fashion that is familiar to Ada programmers, function versions which return a <literal>String</literal> type are provided of @@ -788,7 +629,6 @@ <literal>plgver</literal>, and <literal>plgfnam</literal> in the traditional binding). These functions replace the procedure-style subprograms that are described in the C API documentation.</para> - <para>Overloaded <literal>Set_Line_Style</literal> (<literal>plstyl</literal> in the traditional binding) with a version that takes a single argument, @@ -796,12 +636,10 @@ situation of calling the normal versions of these procedures with unused arguments simply to set the line style to the default, continuous, line.</para> - <para>The contour plotter <literal>Contour_Plot_Irregular_Data</literal> (<literal>plfcont</literal> in the traditional binding) is provided for making contour plots from irregularly spaced data. This feature is not documented in the PLplot API documentation.</para> - <para>The custom label function <literal>Set_Custom_Label</literal> (<literal>plslabelfunc</literal> in the traditional binding) can be called with null arguments to revert to using the default labelling @@ -809,7 +647,6 @@ <literal>Use_Default_Labels</literal>, is provided. See Ada example 19 (<literal>x19a.adb</literal> or <literal>xthick19a.adb</literal>) for a usage example.</para> - <para>The custom coordinate transform setter, <literal>Set_Custom_Coordinate_Transform</literal>, (<literal>plstransform</literal> in the traditional binding) can be @@ -819,54 +656,55 @@ arguments, <literal>Clear_Custom_Coordinate_Transform</literal>, is provided. See Ada example 19 (<literal>x19a.adb</literal> or <literal>xthick19a.adb</literal>) for a usage example.</para> + <para>The procedure <literal>Set_Arrow_Style_For_Vector_Plots</literal> + (<literal>plsvect</literal> in the traditional binding) normally is called + to define the shape of an arrow in vector plots. However, calling it with + null pointer arguments (<literal>System.Null_Address</literal>) in place + of the <literal>Real_Vector</literal> arrays and <literal>False</literal> + for the <literal>Fill_Arrow</literal> argument causes the arrow shape to + be reset to the default shape; this is implemented in Ada as an overloaded + procedure in order to be consistent with the C API but is rather awkward. + So there are two additional procedures that are added for the convenience + of Ada programmers: Reset_Vector_Arrow_Style and plsvect, both without + arguments, both available in both bindings, and the latter an overload of + the normal arrow-setting procedure.</para> </sect2> </sect1> - <sect1 id="ada_c_flavor"> <title>Parts That Retain a C Flavor</title> - <para>There remains at least one area in the Ada bindings which is still affected by the C underpinnings. This might be cleaned up in future versions. There might be other residual C influence as well.</para> - <sect2> <title>Map-drawing</title> - <para><literal>plmapform</literal> as called by <literal>Draw_Latitude_Longitude</literal> (<literal>plmap</literal>) and <literal>Draw_Latitude_Longitude</literal> (<literal>plmeridians</literal>)</para> - <para>This is the only place in the PLplot bindings where a C subprogram calls an Ada subprogram while passing an array. If the array is unconstrained, there is no guarantee that it will work because C has no way of telling Ada what offset to use for the beginning of the array. But passing a constrained array is acceptable with the downside that the array size must be fixed within the bindings as being large enough to - handle any situation; currently, it is sized as <literal>0 .. - 2000</literal>. See Example 19 for how this is handled in by the user + handle any situation; currently, it is sized as <literal>0 .. 2000</literal>. See Example 19 for how this is handled in by the user program. The constrained array is called <literal>Map_Form_Constrained_Array</literal>.</para> </sect2> </sect1> - <sect1 id="ada_known_variances"> <title>Known Variances</title> - <sect2> <title>Documentation</title> - <para>In numerous places in the documentation, a feature is listed or - described as "C only." Many of these features are actually available in + described as "C only." Many of these features are actually available in Ada. For example, in <literal>Contour_Plot</literal> (<literal>plcont</literal> in the traditional binding), the transformation from array indices to world coordinates is mentioned as - "C only" but is actually available in Ada.</para> + "C only" but is actually available in Ada.</para> </sect2> - <sect2> <title>API</title> - <para>The C documentation for <literal>plscmap1l</literal>, (<literal>Set_Color_Map_1_Piecewise</literal> in the thick binding) and <literal>plscmap1la</literal> @@ -875,40 +713,32 @@ behavior is as though a proper-length array of all <literal>False</literal> values was passed. In Ada, these procedures are overloaded to allow a last argument that can be either an array of - Boolean or a value of the enumerated type <literal>type Alt_Hue_Path_Type is (Alt_Hue_Path_None, - Alt_Hue_Path_All)</literal>.</para> + Boolean or a value of the enumerated type <literal>type Alt_Hue_Path_Type is (Alt_Hue_Path_None, Alt_Hue_Path_All)</literal>.</para> </sect2> </sect1> - <sect1 id="ada_compilation_notes"> <title>Compilation notes</title> - <sect2> <title>Ada 95 Versus Ada 2005</title> - <para>As discussed in Section 6.1, the bindings are made to work with Ada 95 and Ada 2005, but special steps need to be taken in order to access the numerical capabilities of Ada 2005 to the extent that vectors and arrays of the type defined in the Ada Reference Manual Annex G.3 are required to be passed to PLplot routines.</para> </sect2> - <sect2> <title>GNAT Dependence</title> - <para>There is a slight but significant dependence on the GNAT version of Ada. This is discussed more fully in Section 6.2</para> </sect2> - <sect2> <title>PLplot_Auxiliary</title> - <para>The bindings include files <literal>PLplot_Auxiliary.ads</literal> and <literal>PLplot_Auxiliary.adb</literal>. These files are currently used to provide a few convenience subprograms that are used in the examples. However, they are also associated with the above-mentioned facility to easily accommodate accessing the G.3 Annex vector-matrix - manipulation facilities. If not for the desire for this easy "switching" + manipulation facilities. If not for the desire for this easy "switching" ability, the <literal>PLplot_Auxiliary</literal> package could be removed from the <literal>with</literal> parts of the other binding files. Even so, it could be still removed with minor modifications to @@ -917,74 +747,56 @@ referenced by most of the Ada examples.</para> </sect2> </sect1> - <sect1 id="ada_apple_notes"> <title>Notes for Apple Macintosh OS X users</title> - <para>The following comments apply to users of Apple Macintosh computers - which run OS X. OS X users may use Apple's free integrated development + which run OS X. OS X users may use Apple's free integrated development environment (IDE) or may prefer other methods such as using a favorite editor and building from the command line.</para> - <para>OS X users should be aware that an excellent graphical terminal program is available and is highly recommended. It is called AquaTerm and is a full Cocoa program with window control. Performing a cut operation places a PDF of the front window on the clipboard, a convenience when working with other graphics or word processing programs.</para> - <sect2> - <title>Using Apple's Xcode IDE</title> - - <para>The Macintosh Ada community has made a plug-in for Apple's free + <title>Using Apple's Xcode IDE</title> + <para>The Macintosh Ada community has made a plug-in for Apple's free Xcode integrated development environment (IDE) that makes programming Ada in Xcode possible. The plug-in is included with the compiler that is available at <ulink url="http://www.macada.org/">www.macada.org</ulink>. Since Xcode is based on gcc, it is possible to work in the various gcc languages as well as to incorporate binaries such as the PLplot library.</para> - <para>In order to make an Xcode project, drag-and-drop source files and the PLplot library file to the Groups & Files pane of an Ada project. There are a few idiosyncrasies that you may encounter so make - sure to contact the very friendly Macintosh Ada mailing list at <ulink - url="http://www.macada.org/">www.macada.org</ulink> or study the FAQ at + sure to contact the very friendly Macintosh Ada mailing list at <ulink url="http://www.macada.org/">www.macada.org</ulink> or study the FAQ at that same site if you have any difficulties.</para> - <para>[This plug-in still works for some older versions of Xcode but not - for newer versions, as of 2013.]</para> + for newer versions, as of 2013.]</para> </sect2> - <sect2> <title>AquaTerm</title> - <para>AquaTerm is a display option available on Macintosh computers using OS X and is supported by PLplot. It is a native Cocoa graphics - "terminal" that is highly recommended. All output is antialiased and is - easily cut-and-pasted in OS X's native PDF format. Get it <ulink - url="http://sourceforge.net/projects/aquaterm/files">here</ulink>. - It can also be installed from either the <ulink - url="http://fink.thetis.ig42.org/">Fink</ulink> or <ulink - url="http://www.macports.org/">MacPorts</ulink> + "terminal" that is highly recommended. All output is antialiased and is + easily cut-and-pasted in OS X's native PDF format. Get it <ulink url="http://sourceforge.net/projects/aquaterm/files">here</ulink>. + It can also be installed from either the <ulink url="http://fink.thetis.ig42.org/">Fink</ulink> or <ulink url="http://www.macports.org/">MacPorts</ulink> projects.</para> </sect2> - <sect2> <title>X11</title> - <para>Apple supplies the X11 windowing system that is popular on some other Unix and Linux operations systems. Formerly it was available as part of the Developer Tools but as of OS X 10.8 it is a separate installation. All PLplot programs made with the Ada bindings will run on X11. In fact, some types of interactivity such as Example 17 will not run on - Apple's Terminal.app and should be run on X11 (or + Apple's Terminal.app and should be run on X11 (or some other output device such as TCL/TK).</para> </sect2> - <sect2> <title>GNAT for OS X</title> - - <para>A web site for OS X users is at <ulink - url="http://www.macada.org/macada/Welcome.html">www.macada.org</ulink>. + <para>A web site for OS X users is at <ulink url="http://www.macada.org/macada/Welcome.html">www.macada.org</ulink>. Although rather dated, the mailing list is still active. Assistance can be found at other places on the web including the usenet comp.lang.ada.</para> </sect2> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-12-11 07:26:40
|
Revision: 12845 http://sourceforge.net/p/plplot/code/12845 Author: andrewross Date: 2013-12-11 07:26:37 +0000 (Wed, 11 Dec 2013) Log Message: ----------- Fix typo in variable name. Modified Paths: -------------- trunk/examples/c/x04c.c Modified: trunk/examples/c/x04c.c =================================================================== --- trunk/examples/c/x04c.c 2013-12-11 02:56:40 UTC (rev 12844) +++ trunk/examples/c/x04c.c 2013-12-11 07:26:37 UTC (rev 12845) @@ -128,7 +128,7 @@ // do not have to be specified, at least in C. For Fortran we need // to set the symbols to be something, since the string is always // copied as part of the bindings. - symobols[0] = ""; + symbols[0] = ""; // Second legend entry. opt_array[1] = PL_LEGEND_LINE | PL_LEGEND_SYMBOL; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2013-12-11 02:56:44
|
Revision: 12844 http://sourceforge.net/p/plplot/code/12844 Author: jbauck Date: 2013-12-11 02:56:40 +0000 (Wed, 11 Dec 2013) Log Message: ----------- Add the ability to reset arrow style for vector plots to the Ada bindings. Update Ada examples 22 accordingly. Modified Paths: -------------- trunk/bindings/ada/plplot.adb trunk/bindings/ada/plplot.ads trunk/bindings/ada/plplot_auxiliary.ads trunk/bindings/ada/plplot_thin.ads trunk/bindings/ada/plplot_traditional.adb trunk/bindings/ada/plplot_traditional.ads trunk/examples/ada/x22a.adb trunk/examples/ada/xthick22a.adb trunk/include/plplot.h Modified: trunk/bindings/ada/plplot.adb =================================================================== --- trunk/bindings/ada/plplot.adb 2013-12-11 01:50:02 UTC (rev 12843) +++ trunk/bindings/ada/plplot.adb 2013-12-11 02:56:40 UTC (rev 12844) @@ -1177,8 +1177,44 @@ end if; plsvect(X_Vertices, Y_Vertices, X_Vertices'length, fill); end Set_Arrow_Style_For_Vector_Plots; + + + -- Set the default style for the arrow used by plvect to plot vectors. + -- plsvect (for setting default) + procedure Set_Arrow_Style_For_Vector_Plots + (X_Vertices, Y_Vertices : PLPointer; + Fill_Arrow : Boolean) is + fill : PLBOOL; + begin + if Fill_Arrow then + fill := PLtrue; + else + fill := PLfalse; + end if; + PLplot_Thin.plsvectdefault(X_Vertices, Y_Vertices, 0, fill); + end Set_Arrow_Style_For_Vector_Plots; + + + -- Simple method to set the default style for the arrow used by plvect to plot vectors. + -- This is not part of the C API and is Ada-specific. + -- plsvect (alternate for setting default) + procedure plsvect is -- We'll keep the "traditional" named version here. + begin + plsvectdefault(System.Null_Address, System.Null_Address, 0, PLfalse); + end plsvect; + + + -- Another simple method to set the default style for the arrow used by plvect to plot vectors. + -- This is not part of the C API and is Ada-specific. + -- plsvect (alternate for setting default) + procedure Reset_Vector_Arrow_Style is + begin + plsvectdefault(System.Null_Address, System.Null_Address, 0, PLfalse); + end Reset_Vector_Arrow_Style; + + -- This functions similarly to plbox() except that the origin of the axes -- is placed at the user-specified point (x0, y0). -- plaxes Modified: trunk/bindings/ada/plplot.ads =================================================================== --- trunk/bindings/ada/plplot.ads 2013-12-11 01:50:02 UTC (rev 12843) +++ trunk/bindings/ada/plplot.ads 2013-12-11 02:56:40 UTC (rev 12844) @@ -831,8 +831,25 @@ procedure Set_Arrow_Style_For_Vector_Plots (X_Vertices, Y_Vertices : Real_Vector; Fill_Arrow : Boolean); - + + -- Set the default style for the arrow used by plvect to plot vectors. + -- plsvect (for setting default) + procedure Set_Arrow_Style_For_Vector_Plots + (X_Vertices, Y_Vertices : PLPointer; + Fill_Arrow : Boolean); + + + -- Simple method to set the default style for the arrow used by plvect to plot vectors. + -- plsvect (alternate for setting default) + procedure plsvect; + + + -- Another simple method to set the default style for the arrow used by plvect to plot vectors. + -- plsvect (alternate for setting default) + procedure Reset_Vector_Arrow_Style; + + -- This functions similarly to plbox() except that the origin of the axes -- is placed at the user-specified point (x0, y0). -- plaxes Modified: trunk/bindings/ada/plplot_auxiliary.ads =================================================================== --- trunk/bindings/ada/plplot_auxiliary.ads 2013-12-11 01:50:02 UTC (rev 12843) +++ trunk/bindings/ada/plplot_auxiliary.ads 2013-12-11 02:56:40 UTC (rev 12844) @@ -29,7 +29,7 @@ Ada.Strings.Bounded, Ada.Strings.Unbounded; --- with Ada.Numerics.Long_Real_Arrays; + with Ada.Numerics.Long_Real_Arrays; package PLplot_Auxiliary is @@ -39,8 +39,8 @@ -- Declarations for Ada 95 and Ada 2005 when it is desired to _not_ invoke -- the numerical capability of Annex G.3. - type Real_Vector is array (Integer range <>) of Long_Float; - type Real_Matrix is array (Integer range <>, Integer range <>) of Long_Float; +-- type Real_Vector is array (Integer range <>) of Long_Float; +-- type Real_Matrix is array (Integer range <>, Integer range <>) of Long_Float; -- Declarations when using Ada 2005 and it is desired to invoke the numerics @@ -50,8 +50,8 @@ -- Using Annex G.3 requires linking to BLAS and LAPACK libraries or the -- PLplot build process will fail when attempting to link the Ada examples -- e.g. x01a.adb. --- subtype Real_Vector is Ada.Numerics.Long_Real_Arrays.Real_Vector; --- subtype Real_Matrix is Ada.Numerics.Long_Real_Arrays.Real_Matrix; + subtype Real_Vector is Ada.Numerics.Long_Real_Arrays.Real_Vector; + subtype Real_Matrix is Ada.Numerics.Long_Real_Arrays.Real_Matrix; ---------------------------------------------------------------------------- -- Implementation note: The easy ability to switch to Ada 2005 Annex G.3 Modified: trunk/bindings/ada/plplot_thin.ads =================================================================== --- trunk/bindings/ada/plplot_thin.ads 2013-12-11 01:50:02 UTC (rev 12843) +++ trunk/bindings/ada/plplot_thin.ads 2013-12-11 02:56:40 UTC (rev 12844) @@ -532,11 +532,23 @@ pragma Import(C, plvect, "c_plvect"); + -- Set arrow style for vector plots. + procedure plsvect(arrowx : PL_Float_Array; arrowy : PL_Float_Array; npts : PLINT; fill : PLINT); pragma Import(C, plsvect, "c_plsvect"); + + +-- Ada hack to accomodate the C API that allows this call in C +-- plsvect( NULL, NULL, 0, 0 ); +-- to reset the arrow style to a default value. + +procedure +plsvectdefault(arrowx : PLPointer; arrowy : PLPointer; npts : PLINT; fill : PLINT); +pragma Import(C, plsvectdefault, "c_plsvect"); + -- This functions similarly to plbox() except that the origin of the axes -- is placed at the user-specified point (x0, y0). Modified: trunk/bindings/ada/plplot_traditional.adb =================================================================== --- trunk/bindings/ada/plplot_traditional.adb 2013-12-11 01:50:02 UTC (rev 12843) +++ trunk/bindings/ada/plplot_traditional.adb 2013-12-11 02:56:40 UTC (rev 12844) @@ -1153,7 +1153,8 @@ Transformation_Procedure_Pointer : Transformation_Procedure_Pointer_Type; Transformation_Data_Pointer : PLpointer) is begin - PLplot_Thin.plvect(Matrix_To_Pointers(u), Matrix_To_Pointers(v), u'Length(1), u'Length(2), Scale, Transformation_Procedure_Pointer, Transformation_Data_Pointer); + PLplot_Thin.plvect(Matrix_To_Pointers(u), Matrix_To_Pointers(v), u'Length(1), u'Length(2), + Scale, Transformation_Procedure_Pointer, Transformation_Data_Pointer); end plvect; @@ -1172,8 +1173,41 @@ end if; PLplot_Thin.plsvect(X_Vertices, Y_Vertices, X_Vertices'length, fill); end plsvect; + + + -- Set the default style for the arrow used by plvect to plot vectors. + procedure plsvect + (X_Vertices, Y_Vertices : PLPointer; + Fill_Arrow : Boolean) is + fill : PLBOOL; + begin + if Fill_Arrow then + fill := PLtrue; + else + fill := PLfalse; + end if; + PLplot_Thin.plsvectdefault(X_Vertices, Y_Vertices, 0, fill); + end plsvect; + + + -- Simple method to set the default style for the arrow used by plvect to plot vectors. + -- This is not part of the C API and is Ada-specific. + procedure plsvect is + begin + PLplot_Thin.plsvectdefault(System.Null_Address, System.Null_Address, 0, PLfalse); + end plsvect; + + + -- Another simple method to set the default style for the arrow used by plvect to plot vectors. + -- This is not part of the C API and is Ada-specific. + procedure Reset_Vector_Arrow_Style is + begin + PLplot_Thin.plsvectdefault(System.Null_Address, System.Null_Address, 0, PLfalse); + end Reset_Vector_Arrow_Style; + + -- This functions similarly to plbox() except that the origin of the axes -- is placed at the user-specified point (x0, y0). procedure plaxes Modified: trunk/bindings/ada/plplot_traditional.ads =================================================================== --- trunk/bindings/ada/plplot_traditional.ads 2013-12-11 01:50:02 UTC (rev 12843) +++ trunk/bindings/ada/plplot_traditional.ads 2013-12-11 02:56:40 UTC (rev 12844) @@ -823,8 +823,24 @@ procedure plsvect (X_Vertices, Y_Vertices : Real_Vector; Fill_Arrow : Boolean); - + + -- Set the default style for the arrow used by plvect to plot vectors. + procedure plsvect + (X_Vertices, Y_Vertices : PLPointer; + Fill_Arrow : Boolean); + + + -- Simple method to set the default style for the arrow used by plvect to plot vectors. + -- This is not part of the C API and is Ada-specific. + procedure plsvect; + + + -- Another simple method to set the default style for the arrow used by plvect to plot vectors. + -- This is not part of the C API and is Ada-specific. + procedure Reset_Vector_Arrow_Style; + + -- This functions similarly to plbox() except that the origin of the axes -- is placed at the user-specified point (x0, y0). procedure plaxes Modified: trunk/examples/ada/x22a.adb =================================================================== --- trunk/examples/ada/x22a.adb 2013-12-11 01:50:02 UTC (rev 12843) +++ trunk/examples/ada/x22a.adb 2013-12-11 02:56:40 UTC (rev 12844) @@ -255,6 +255,16 @@ plsvect(arrow2_x, arrow2_y, True); constriction(2); + -- Reset arrow style to the default by passing two NULL arrays. + -- This line uses the awkward method of the C API to reset the default arrow style. + plsvect(System.Null_Address, System.Null_Address, False); + + -- This method of resetting the default arrow style is a little more Ada-friendly... + -- plsvect; + + -- ... as is this one which is identical but for name. + -- Reset_Vector_Arrow_Style; + potential; plend; Modified: trunk/examples/ada/xthick22a.adb =================================================================== --- trunk/examples/ada/xthick22a.adb 2013-12-11 01:50:02 UTC (rev 12843) +++ trunk/examples/ada/xthick22a.adb 2013-12-11 02:56:40 UTC (rev 12844) @@ -255,6 +255,16 @@ Set_Arrow_Style_For_Vector_Plots(arrow2_x, arrow2_y, True); constriction(2); + -- Reset arrow style to the default by passing two NULL arrays. + -- This line uses the awkward method of the C API to reset the default arrow style. + Set_Arrow_Style_For_Vector_Plots(System.Null_Address, System.Null_Address, False); + + -- This method of resetting the default arrow style is a little more Ada-friendly... + -- plsvect; + + -- ... as is this one which is identical but for name. + -- Reset_Vector_Arrow_Style; + potential; End_PLplot; Modified: trunk/include/plplot.h =================================================================== --- trunk/include/plplot.h 2013-12-11 01:50:02 UTC (rev 12843) +++ trunk/include/plplot.h 2013-12-11 02:56:40 UTC (rev 12844) @@ -1886,6 +1886,7 @@ PLINT opt, const PLFLT *clevel, PLINT nlevel, PLINT ixstart, PLINT ixn, const PLINT *indexymin, const PLINT * indexymax ); +// Set arrow style for vector plots. PLDLLIMPEXP void c_plsvect( const PLFLT *arrowx, const PLFLT *arrowy, PLINT npts, PLBOOL fill ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-12-11 01:50:07
|
Revision: 12843 http://sourceforge.net/p/plplot/code/12843 Author: andrewross Date: 2013-12-11 01:50:02 +0000 (Wed, 11 Dec 2013) Log Message: ----------- Another valgrind fix. Modified Paths: -------------- trunk/examples/f95/x09f.f90 Modified: trunk/examples/f95/x09f.f90 =================================================================== --- trunk/examples/f95/x09f.f90 2013-12-11 01:27:07 UTC (rev 12842) +++ trunk/examples/f95/x09f.f90 2013-12-11 01:50:02 UTC (rev 12843) @@ -85,10 +85,10 @@ call pl_setcontlabelparam(0.006_plflt, 0.3_plflt, 0.1_plflt, 1) call plenv(-1.0_plflt, 1.0_plflt, -1.0_plflt, 1.0_plflt, 0, 0) call plcol0(2) - call plcont(z, 1, nptsx, 1, nptsy, clevel, tr) + call plcont(z(1:nptsx,1:nptsy), 1, nptsx, 1, nptsy, clevel, tr) call plstyl(1, 1500, 1500) call plcol0(3) - call plcont(w, 1, nptsx, 1, nptsy, clevel, tr) + call plcont(w(1:nptsx,1:nptsy), 1, nptsx, 1, nptsy, clevel, tr) call plstyl(0, 1500, 1500) call plcol0(1) call pllab('X Coordinate', 'Y Coordinate', 'Streamlines of flow') @@ -97,10 +97,10 @@ ! Plot using 1d coordinate transform call plenv(-1.0_plflt, 1.0_plflt, -1.0_plflt, 1.0_plflt, 0, 0) call plcol0(2) - call plcont(z, 1, nptsx, 1, nptsy, clevel, xg1, yg1) + call plcont(z(1:nptsx,1:nptsy), 1, nptsx, 1, nptsy, clevel, xg1(1:nptsx), yg1(1:nptsy)) call plstyl(1, 1500, 1500) call plcol0(3) - call plcont(w, 1, nptsx, 1, nptsy, clevel, xg1, yg1) + call plcont(w(1:nptsx,1:nptsy), 1, nptsx, 1, nptsy, clevel, xg1(1:nptsx), yg1(1:nptsy)) call plstyl(0, 1500, 1500) call plcol0(1) call pllab('X Coordinate', 'Y Coordinate', 'Streamlines of flow') @@ -108,10 +108,10 @@ ! Plot using 2d coordinate transform call plenv(-1.0_plflt, 1.0_plflt, -1.0_plflt, 1.0_plflt, 0, 0) call plcol0(2) - call plcont(z, 1, nptsx, 1, nptsy, clevel, xg2, yg2) + call plcont(z(1:nptsx,1:nptsy), 1, nptsx, 1, nptsy, clevel, xg2(1:nptsx,1:nptsy), yg2(1:nptsx,1:nptsy)) call plstyl(1, 1500, 1500) call plcol0(3) - call plcont(w, 1, nptsx, 1, nptsy, clevel, xg2, yg2) + call plcont(w(1:nptsx,1:nptsy), 1, nptsx, 1, nptsy, clevel, xg2(1:nptsx,1:nptsy), yg2(1:nptsx,1:nptsy)) call plstyl(0, 1500, 1500) call plcol0(1) call pllab('X Coordinate', 'Y Coordinate', 'Streamlines of flow') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-12-11 01:27:10
|
Revision: 12842 http://sourceforge.net/p/plplot/code/12842 Author: andrewross Date: 2013-12-11 01:27:07 +0000 (Wed, 11 Dec 2013) Log Message: ----------- Add missing delete statement to silence valgrind warning. Modified Paths: -------------- trunk/examples/c++/x33.cc Modified: trunk/examples/c++/x33.cc =================================================================== --- trunk/examples/c++/x33.cc 2013-12-11 00:45:33 UTC (rev 12841) +++ trunk/examples/c++/x33.cc 2013-12-11 01:27:07 UTC (rev 12842) @@ -279,6 +279,8 @@ pls->vpor( 0.0, 1.0, 0.0, 1.0 ); pls->wind( 0.0, 1.0, 0.0, 1.0 ); pls->ptex( 0.5, 0.5, 0.0, 0.0, 0.5, title ); + + delete label; } void This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-12-11 00:45:36
|
Revision: 12841 http://sourceforge.net/p/plplot/code/12841 Author: andrewross Date: 2013-12-11 00:45:33 +0000 (Wed, 11 Dec 2013) Log Message: ----------- Fix plscmap1l(a) and plspal so they assume the rev array is one element shorter than the coordinate arrays, consistent with the documentation and actual usage of this array. Modified Paths: -------------- trunk/src/plctrl.c Modified: trunk/src/plctrl.c =================================================================== --- trunk/src/plctrl.c 2013-12-10 23:52:18 UTC (rev 12840) +++ trunk/src/plctrl.c 2013-12-11 00:45:33 UTC (rev 12841) @@ -698,7 +698,11 @@ if ( alt_hue_path == NULL ) plsc->cmap1cp[n].alt_hue_path = 0; else - plsc->cmap1cp[n].alt_hue_path = alt_hue_path[n]; + if ( n != npts-1 ) + plsc->cmap1cp[n].alt_hue_path = alt_hue_path[n]; + else + // Note final element is unused, so we set to zero for completeness. + plsc->cmap1cp[n].alt_hue_path = 0; } // Calculate and set color map @@ -780,7 +784,11 @@ if ( alt_hue_path == NULL ) plsc->cmap1cp[n].alt_hue_path = 0; else - plsc->cmap1cp[n].alt_hue_path = alt_hue_path[n]; + if ( n != npts-1 ) + plsc->cmap1cp[n].alt_hue_path = alt_hue_path[n]; + else + // Note final element is unused, so we set to zero for completeness. + plsc->cmap1cp[n].alt_hue_path = 0; } // Calculate and set color map @@ -1681,7 +1689,7 @@ bi = (PLINT *) malloc( (size_t) number_colors * sizeof ( PLINT ) ); a = (PLFLT *) malloc( (size_t) number_colors * sizeof ( PLFLT ) ); pos = (PLFLT *) malloc( (size_t) number_colors * sizeof ( PLFLT ) ); - alt_hue_path = (PLBOOL *) malloc( (size_t) number_colors * sizeof ( PLBOOL ) ); + alt_hue_path = (PLBOOL *) malloc( (size_t) ( number_colors - 1 ) * sizeof ( PLBOOL ) ); if ( format_version == 0 ) { @@ -1718,7 +1726,7 @@ fuzzy_range_check( g[i], 0., 1., FUZZ_EPSILON, 2 ); fuzzy_range_check( b[i], 0., 1., FUZZ_EPSILON, 3 ); fuzzy_range_check( pos[i], 0., 1., FUZZ_EPSILON, 4 ); - if ( return_sscanf == 5 ) + if ( ( return_sscanf == 5 ) && ( i != number_colors - 1 ) ) { // Next to oldest tk format with alt_hue_path specified. alt_hue_path[i] = (PLBOOL) alt_hue_path_i; @@ -1772,7 +1780,8 @@ fuzzy_range_check( a[i], 0., 1., FUZZ_EPSILON, 9 ); fuzzy_range_check( pos[i], 0., 1., FUZZ_EPSILON, 10 ); - alt_hue_path[i] = (PLBOOL) alt_hue_path_i; + if ( i != number_colors - 1 ) + alt_hue_path[i] = (PLBOOL) alt_hue_path_i; } } fclose( fp ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-12-10 23:52:22
|
Revision: 12840 http://sourceforge.net/p/plplot/code/12840 Author: andrewross Date: 2013-12-10 23:52:18 +0000 (Tue, 10 Dec 2013) Log Message: ----------- Fix up a number of valgrind warnings in some of the examples. Modified Paths: -------------- trunk/examples/c/x04c.c trunk/examples/c++/x14.cc trunk/examples/c++/x22.cc trunk/examples/c++/x31.cc trunk/examples/f95/x04f.f90 Modified: trunk/examples/c/x04c.c =================================================================== --- trunk/examples/c/x04c.c 2013-12-10 23:49:29 UTC (rev 12839) +++ trunk/examples/c/x04c.c 2013-12-10 23:52:18 UTC (rev 12840) @@ -125,7 +125,10 @@ line_styles[0] = 1; line_widths[0] = 1.; // note from the above opt_array the first symbol (and box) indices - // do not have to be specified + // do not have to be specified, at least in C. For Fortran we need + // to set the symbols to be something, since the string is always + // copied as part of the bindings. + symobols[0] = ""; // Second legend entry. opt_array[1] = PL_LEGEND_LINE | PL_LEGEND_SYMBOL; Modified: trunk/examples/c++/x14.cc =================================================================== --- trunk/examples/c++/x14.cc 2013-12-10 23:49:29 UTC (rev 12839) +++ trunk/examples/c++/x14.cc 2013-12-10 23:52:18 UTC (rev 12840) @@ -435,6 +435,10 @@ pls->col0( 1 ); pls->lab( "X Coordinate", "Y Coordinate", "Streamlines of flow" ); pls->flush(); + +// Clean up + pls->Free2dGrid( z, xpts, ypts ); + pls->Free2dGrid( w, xpts, ypts ); } Modified: trunk/examples/c++/x22.cc =================================================================== --- trunk/examples/c++/x22.cc 2013-12-10 23:49:29 UTC (rev 12839) +++ trunk/examples/c++/x22.cc 2013-12-10 23:52:18 UTC (rev 12840) @@ -405,7 +405,6 @@ pls->Free2dGrid( v, nx, ny ); delete pls; - exit( 0 ); } int main( int argc, const char ** argv ) Modified: trunk/examples/c++/x31.cc =================================================================== --- trunk/examples/c++/x31.cc 2013-12-10 23:49:29 UTC (rev 12839) +++ trunk/examples/c++/x31.cc 2013-12-10 23:52:18 UTC (rev 12840) @@ -31,6 +31,7 @@ class x31 { public: x31( int, const char** ); + int status; private: plstream *pls; @@ -63,7 +64,6 @@ PLINT g1[] = { 255, 0 }; PLINT b1[] = { 0, 0 }; PLFLT a1[] = { 1.0, 1.0 }; - int status; char fnam[256]; pls = new plstream(); @@ -289,12 +289,15 @@ delete pls; - exit( status ); } int main( int argc, const char **argv ) { + int status; + x31 *x = new x31( argc, argv ); + status = x->status; delete x; + return status; } Modified: trunk/examples/f95/x04f.f90 =================================================================== --- trunk/examples/f95/x04f.f90 2013-12-10 23:49:29 UTC (rev 12839) +++ trunk/examples/f95/x04f.f90 2013-12-10 23:52:18 UTC (rev 12840) @@ -102,7 +102,10 @@ line_styles(1) = 1 line_widths(1) = 1 ! note from the above opt_array the first symbol (and box) indices -! do not have to be specified +! do not have to be specified, at least in C. For Fortran we need +! to set the symbols to be something, since the string is always +! copied as part of the bindings. + symbols(1) = '' ! Second legend entry. opt_array(2) = PL_LEGEND_LINE + PL_LEGEND_SYMBOL This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |