From: <ai...@us...> - 2009-09-16 06:40:26
|
Revision: 10415 http://plplot.svn.sourceforge.net/plplot/?rev=10415&view=rev Author: airwin Date: 2009-09-16 06:40:20 +0000 (Wed, 16 Sep 2009) Log Message: ----------- For OCAML_NEW_BUILD case, use correct (null) build subdirectory, and improve linking of some of the build steps for the components of the ocaml bindings. However, there are still build errors for the ocaml examples. This time, the error message involves undefined reference to camlidl_find_enum and other OCaml library symbols. So OCAML_NEW_BUILD defaults to OFF for now. Modified Paths: -------------- trunk/bindings/ocaml/CMakeLists.txt trunk/cmake/modules/ocaml.cmake Modified: trunk/bindings/ocaml/CMakeLists.txt =================================================================== --- trunk/bindings/ocaml/CMakeLists.txt 2009-09-16 04:06:46 UTC (rev 10414) +++ trunk/bindings/ocaml/CMakeLists.txt 2009-09-16 06:40:20 UTC (rev 10415) @@ -22,7 +22,6 @@ if(ENABLE_ocaml) - option(OCAML_NEW_BUILD "Try new detailed OCaml build method?" OFF) if(OCAML_NEW_BUILD) #Detailed CMake logic to build ocaml bindings for PLplot. @@ -115,9 +114,8 @@ ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa ${CMAKE_CURRENT_BINARY_DIR}/plplot.a - COMMAND ocamlc -verbose -a -custom -ccopt -L${CMAKE_CURRENT_BINARY_DIR} -cclib -lplplot_stubs -ccopt -L${CMAKE_BINARY_DIR}/src -cclib -lplplot${LIB_TAG} -o ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmo -# COMMAND ocamlc -verbose -a -custom -o ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmo - COMMAND ocamlopt -verbose -a -ccopt -L${CMAKE_CURRENT_BINARY_DIR} -cclib -lplplot_stubs -ccopt -L${CMAKE_BINARY_DIR}/src -cclib -lplplot${LIB_TAG} -o ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmx ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmx + COMMAND ocamlc -verbose -a -custom -ccopt -L${CAMLIDL_LIB_DIR} -cclib -lcamlidl -ccopt -L${CMAKE_CURRENT_BINARY_DIR} -cclib -lplplot_stubs -ccopt -L${CMAKE_BINARY_DIR}/src -cclib -lplplot${LIB_TAG} -dllpath ${CMAKE_BINARY_DIR}/src -o ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmo + COMMAND ocamlopt -verbose -a -ccopt -L${CAMLIDL_LIB_DIR} -cclib -lcamlidl -ccopt -L${CMAKE_CURRENT_BINARY_DIR} -cclib -lplplot_stubs -ccopt -L${CMAKE_BINARY_DIR}/src -cclib -lplplot${LIB_TAG} -o ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmx ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmx DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmo Modified: trunk/cmake/modules/ocaml.cmake =================================================================== --- trunk/cmake/modules/ocaml.cmake 2009-09-16 04:06:46 UTC (rev 10414) +++ trunk/cmake/modules/ocaml.cmake 2009-09-16 06:40:20 UTC (rev 10415) @@ -95,7 +95,12 @@ endif(CAMLIDL_LIB_DIR) # Subdirectory for ocamlbuild to use for build - set(OCAML_BUILD_DIR _build CACHE PATH "Subdirectory to use for ocamlbuild") + option(OCAML_NEW_BUILD "Try new detailed OCaml build method?" OFF) + if(OCAML_NEW_BUILD) + set(OCAML_BUILD_DIR "" CACHE PATH "Subdirectory to use for ocamlbuild") + else(OCAML_NEW_BUILD) + set(OCAML_BUILD_DIR _build CACHE PATH "Subdirectory to use for ocamlbuild") + endif(OCAML_NEW_BUILD) # Installation follows the Debian ocaml policy for want of a better # standard. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2009-09-17 20:59:44
|
Revision: 10419 http://plplot.svn.sourceforge.net/plplot/?rev=10419&view=rev Author: andrewross Date: 2009-09-17 20:59:30 +0000 (Thu, 17 Sep 2009) Log Message: ----------- Implement plslabelfunc in tcl bindings and update example 19 to use it. Thanks to Arjen for the original framework of how do this. Results for example 19 now consistent with C version. Modified Paths: -------------- trunk/bindings/tcl/tclAPI.c trunk/examples/tcl/x19.tcl Modified: trunk/bindings/tcl/tclAPI.c =================================================================== --- trunk/bindings/tcl/tclAPI.c 2009-09-17 01:56:26 UTC (rev 10418) +++ trunk/bindings/tcl/tclAPI.c 2009-09-17 20:59:30 UTC (rev 10419) @@ -66,6 +66,7 @@ static int plimageCmd (ClientData, Tcl_Interp *, int, const char **); static int plimagefrCmd(ClientData, Tcl_Interp *, int, const char **); static int plstripcCmd (ClientData, Tcl_Interp *, int, const char **); +static int plslabelfuncCmd (ClientData, Tcl_Interp *, int, const char **); /* * The following structure defines all of the commands in the PLplot/Tcl @@ -109,6 +110,7 @@ {"plimage", plimageCmd}, {"plimagefr", plimagefrCmd}, {"plstripc", plstripcCmd}, + {"plslabelfunc", plslabelfuncCmd}, {NULL, NULL} }; @@ -3370,3 +3372,92 @@ return TCL_OK; } + +/*--------------------------------------------------------------------------*\ + * labelform + * + * Call the Tcl custom label function. +\*--------------------------------------------------------------------------*/ + +static Tcl_Obj *label_objs[4] = {NULL,NULL,NULL,NULL}; /* Arguments for the Tcl procedure + that handles the custom labels */ + +void +labelform(PLINT axis, PLFLT value, char *string, PLINT string_length, PLPointer data) +{ + int objc; + + label_objs[1] = Tcl_NewIntObj(axis); + label_objs[2] = Tcl_NewDoubleObj((double) value); + + Tcl_IncrRefCount( label_objs[1] ); + Tcl_IncrRefCount( label_objs[2] ); + + /* Call the Tcl procedure and store the result */ + objc = 3; + if (label_objs[3] != NULL) { + objc = 4; + } + + return_code = Tcl_EvalObjv(tcl_interp, objc, label_objs, 0); + + if (return_code != TCL_OK) { + strncpy(string, "ERROR", string_length); + } else { + strncpy(string, Tcl_GetStringResult(tcl_interp), string_length); + } + + Tcl_DecrRefCount( label_objs[1] ); + Tcl_DecrRefCount( label_objs[2] ); +} + +/*--------------------------------------------------------------------------*\ + * plslabelfuncCmd + * + * Processes plslabelfunc Tcl command. + * C version takes: + * function, data + * (data argument is optional) +\*--------------------------------------------------------------------------*/ + +static int +plslabelfuncCmd( ClientData clientData, Tcl_Interp *interp, + int argc, const char *argv[] ) +{ + if (argc < 2 || argc > 3) { + Tcl_AppendResult(interp, "bogus syntax for plslabelfunc, see doc.", + (char *) NULL ); + return TCL_ERROR; + } + + tcl_interp = interp; + + if (label_objs[0] != NULL) { + Tcl_DecrRefCount(label_objs[0]); + } + if (label_objs[3] != NULL) { + Tcl_DecrRefCount(label_objs[3]); + label_objs[3] = NULL; + } + + if (strlen(argv[1]) == 0) { + plslabelfunc(NULL,NULL); + return TCL_OK; + } + else { + plslabelfunc(labelform,NULL); + label_objs[0] = Tcl_NewStringObj(argv[1],strlen(argv[1])); + Tcl_IncrRefCount(label_objs[0]); + } + + if (argc == 3) { + label_objs[3] = Tcl_NewStringObj(argv[2],strlen(argv[2])); /* Should change with Tcl_Obj interface */ + Tcl_IncrRefCount(label_objs[3]); + } + else { + label_objs[3] = NULL; + } + + return TCL_OK; + +} Modified: trunk/examples/tcl/x19.tcl =================================================================== --- trunk/examples/tcl/x19.tcl 2009-09-17 01:56:26 UTC (rev 10418) +++ trunk/examples/tcl/x19.tcl 2009-09-17 20:59:30 UTC (rev 10419) @@ -46,6 +46,54 @@ } } +# "Normalize" longitude values so that they always fall between -180.0 and +# 180.0 +proc normalize_longitude {lon} { + if {$lon >= -180.0 && $lon <= 180.0} { + return $lon + } else { + set times [expr {floor ((abs($lon) + 180.0) / 360.0)}] + if {$lon < 0.0} { + return [expr {($lon + 360.0 * $times)}] + } else { + return [expr {($lon - 360.0 * $times)}] + } + } + +} + +# A custom axis labeling function for longitudes and latitudes. +proc geolocation_labeler {axis value} { + + if {$axis == 2} { + set label_val $value + if {$label_val > 0.0} { + set direction_label " N" + } elseif {$label_val < 0.0} { + set direction_label " S" + } else { + set direction_label "Eq" + } + } elseif {$axis == 1} { + set label_val [normalize_longitude $value] + if {$label_val > 0.0} { + set direction_label " E" + } elseif {$label_val < 0.0} { + set direction_label " W" + } else { + set direction_label "" + } + } + if {$axis == 2 && $value == 0.0} { + # A special case for the equator + set label $direction_label + } else { + set label [ format "%.0f%s" [expr {abs($label_val)}] $direction_label] + } + + return $label +} + proc x19 {{w loopback}} { set miny -70 set maxy 80 @@ -56,8 +104,11 @@ set minx 190 set maxx 550 + # Setup a custom latitude and longitude-based scaling function. + $w cmd plslabelfunc "geolocation_labeler" + $w cmd plcol0 1 - $w cmd plenv $minx $maxx $miny $maxy 1 -1 + $w cmd plenv $minx $maxx $miny $maxy 1 70 $w cmd plmap usaglobe $minx $maxx $miny $maxy # The Americas @@ -66,9 +117,12 @@ set maxx 340 $w cmd plcol0 1 - $w cmd plenv $minx $maxx $miny $maxy 1 -1 + $w cmd plenv $minx $maxx $miny $maxy 1 70 $w cmd plmap usaglobe $minx $maxx $miny $maxy + # Clear the labeling function + plslabelfunc "" + # Polar, Northern hemisphere # Note: the first argument now is the name of the procedure # that transforms the coordinates (plmap and plmeridians) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2009-09-18 08:39:54
|
Revision: 10420 http://plplot.svn.sourceforge.net/plplot/?rev=10420&view=rev Author: jbauck Date: 2009-09-18 08:39:46 +0000 (Fri, 18 Sep 2009) Log Message: ----------- Add custom label capability to Ada bindings to match C. Update Examples 19 accordingly. Modified Paths: -------------- trunk/bindings/ada/plplot.adb.cmake trunk/bindings/ada/plplot.ads.cmake trunk/bindings/ada/plplot_thin.ads.cmake trunk/bindings/ada/plplot_traditional.adb.cmake trunk/bindings/ada/plplot_traditional.ads.cmake trunk/examples/ada/x19a.adb.cmake trunk/examples/ada/xthick19a.adb.cmake Modified: trunk/bindings/ada/plplot.adb.cmake =================================================================== --- trunk/bindings/ada/plplot.adb.cmake 2009-09-17 20:59:30 UTC (rev 10419) +++ trunk/bindings/ada/plplot.adb.cmake 2009-09-18 08:39:46 UTC (rev 10420) @@ -2685,6 +2685,23 @@ -- PLPointer pltr_data); + -- Setup a user-provided custom labeling function. + -- plslabelfunc + procedure Set_Custom_Label + (Custom_Label_Procedure_Pointer : Custom_Label_Procedure_Pointer_Type; + label_data : PLPointer) is + begin + plslabelfunc(Custom_Label_Procedure_Pointer, label_data); + end Set_Custom_Label; + + + -- Reset to default labeling. Not part of the C API. + procedure Use_Default_Labels is + begin + plslabelfunc(null, System.Null_Address); + end Use_Default_Labels; + + -- Set up lengths of major tick marks. -- plsmaj procedure Set_Major_Tick_Length(Default_Length, Scale_Factor : Long_Float) is Modified: trunk/bindings/ada/plplot.ads.cmake =================================================================== --- trunk/bindings/ada/plplot.ads.cmake 2009-09-17 20:59:30 UTC (rev 10419) +++ trunk/bindings/ada/plplot.ads.cmake 2009-09-18 08:39:46 UTC (rev 10420) @@ -83,7 +83,18 @@ -- "Rename" the necessarily constrained array for mapping longitudes and latitudes. subtype Map_Form_Constrained_Array is PLplot_Thin.Map_Form_Constrained_Array; + + -- This is a fixed-length string for use with custom label procedures + -- in Custom_Label_Procedure_Pointer_Type, and plslabelfunc (Set_Custom_Label). + -- This length, 0 .. 40, is hardwired in the PLplot C code; this type will + -- fail if that length is ever changed. + Label_String_Length : Integer renames PLplot_Thin.Label_String_Length; + subtype Label_String_Type is PLplot_Thin.Label_String_Type; + -- "Rename" callback for custom label functions. + subtype Custom_Label_Procedure_Pointer_Type is + PLplot_Thin.Custom_Label_Procedure_Pointer_Type; + -------------------------------------------------------------------------------- -- Types and constants for thick binding -- -------------------------------------------------------------------------------- @@ -146,7 +157,7 @@ Justified_Square_Box : constant Justification_Type := 2; -- Axis styles - subtype Axis_Style_Type is Integer range -2..63; -- Not all values are used. + subtype Axis_Style_Type is Integer range -2..73; -- Not all values are used. fix this in docs No_Box : constant Axis_Style_Type := -2; Box : constant Axis_Style_Type := -1; @@ -185,6 +196,11 @@ Date_Time_XY_Linear_Zero_Axes : constant Axis_Style_Type := 61; Date_Time_XY_Linear_Major_Grid : constant Axis_Style_Type := 62; Date_Time_XY_Linear_Minor_Grid : constant Axis_Style_Type := 63; + + Custom_Labels_Linear_Box_Plus : constant Axis_Style_Type := 70; + Custom_Labels_Linear_Zero_Axes : constant Axis_Style_Type := 71; + Custom_Labels_Linear_Major_Grid : constant Axis_Style_Type := 72; + Custom_Labels_Linear_Minor_Grid : constant Axis_Style_Type := 73; -- Integer constrained to 0..255 subtype Integer_0_255_Type is Integer range 0 .. 255; @@ -258,6 +274,10 @@ Grid_Nearest_Neighbors_Linear_Interpolation : constant Gridding_Algorithm_Type := 5; -- GRID_NNLI Grid_Nearest_Neighbors_Around_Inverse_Distance_Weighted : constant Gridding_Algorithm_Type := 6; -- GRID_NNAIDW + -- Axis label tags + x_axis : constant Integer := 1; -- The x-axis + y_axis : constant Integer := 2; -- The y-axis + z_axis : constant Integer := 3; -- The z-axis -------------------------------------------------------------------------------- -- Constants copied from PLplot_Thin.ads so that it doesn't have to be seen. -- @@ -295,6 +315,18 @@ GRID_NNIDW : constant Gridding_Algorithm_Type := 4; GRID_NNLI : constant Gridding_Algorithm_Type := 5; GRID_NNAIDW : constant Gridding_Algorithm_Type := 6; + + -- Axis label tags + -- "PLplot style" names + -- This version for custom labels in plslabelfunc. Compare with e.g. "x_axis" above. + PL_X_AXIS : constant Integer := 1; -- The x-axis + PL_Y_AXIS : constant Integer := 2; -- The y-axis + PL_Z_AXIS : constant Integer := 3; -- The z-axis + -- "Ada style" names + Label_X_Axis : constant Integer := 1; -- The x-axis + Label_Y_Axis : constant Integer := 2; -- The y-axis + Label_Z_Axis : constant Integer := 3; -- The z-axis + -------------------------------------------------------------------------------- @@ -1598,6 +1630,18 @@ -- PLPointer pltr_data); -- + + -- Setup a user-provided custom labeling function. + -- plslabelfunc + procedure Set_Custom_Label + (Custom_Label_Procedure_Pointer : Custom_Label_Procedure_Pointer_Type; + label_data : PLPointer); + + + -- Reset to default labeling. Not part of the C API. + procedure Use_Default_Labels; + + -- Set up lengths of major tick marks. -- plsmaj procedure Set_Major_Tick_Length(Default_Length, Scale_Factor : Long_Float); Modified: trunk/bindings/ada/plplot_thin.ads.cmake =================================================================== --- trunk/bindings/ada/plplot_thin.ads.cmake 2009-09-17 20:59:30 UTC (rev 10419) +++ trunk/bindings/ada/plplot_thin.ads.cmake 2009-09-18 08:39:46 UTC (rev 10420) @@ -34,6 +34,7 @@ with Interfaces.C, + Interfaces.C.Strings, Interfaces.C.Pointers, PLplot_Auxiliary, System, @@ -42,6 +43,7 @@ Ada.Strings.Unbounded; use Interfaces.C, + Interfaces.C.Strings, PLplot_Auxiliary, Ada.Text_IO, Ada.Strings.Bounded, @@ -154,8 +156,26 @@ type Function_Evaluator_Pointer_Type is access function (ix, iy : PLINT; Irregular_Data : PLpointer) return PLFLT; pragma Convention(Convention => C, Entity => Function_Evaluator_Pointer_Type); + + + -- Fixed-length string for use with custom label procedures + -- in Custom_Label_Procedure_Pointer_Type, and plslabelfunc (Set_Custom_Label). + -- This length, 0 .. 40, is hardwired in the PLplot C code; this type will + -- fail if that length is ever changed. + Label_String_Length : constant Integer := 40; + subtype Label_String_Type is Interfaces.C.char_array (0 .. size_t(Label_String_Length)); + -- Access-to-function type for making custom labels such as with plslabelfunc. + type Custom_Label_Procedure_Pointer_Type is access + procedure + (axis : Integer; + a_value : Long_Float; + label : out Label_String_Type; + length : size_t; + data : PLPointer); + pragma Convention(Convention => C, Entity => Custom_Label_Procedure_Pointer_Type); + -------------------------------------------------------------------------------- -- Argument parsing things -- -------------------------------------------------------------------------------- @@ -213,6 +233,11 @@ PLSWIN_DEVICE : constant Integer := 1; -- device coordinates PLSWIN_WORLD : constant Integer := 2; -- world coordinates + -- Axis label tags + PL_X_AXIS : constant Integer := 1; -- The x-axis + PL_Y_AXIS : constant Integer := 2; -- The y-axis + PL_Z_AXIS : constant Integer := 3; -- The z-axis + -- PLplot Option table & support constants -- Option-specific settings @@ -1418,6 +1443,14 @@ -- PLPointer pltr_data); -- pragma Import(C, plfshade, "plfshade"); + + -- Setup a user-provided custom labeling function. + + procedure + plslabelfunc(label_func : Custom_Label_Procedure_Pointer_Type; label_data : PLPointer); + pragma Import(C, plslabelfunc, "c_plslabelfunc"); + + -- Set up lengths of major tick marks. procedure Modified: trunk/bindings/ada/plplot_traditional.adb.cmake =================================================================== --- trunk/bindings/ada/plplot_traditional.adb.cmake 2009-09-17 20:59:30 UTC (rev 10419) +++ trunk/bindings/ada/plplot_traditional.adb.cmake 2009-09-18 08:39:46 UTC (rev 10420) @@ -2561,6 +2561,22 @@ -- PLPointer pltr_data); + -- Setup a user-provided custom labeling function. + procedure plslabelfunc + (Custom_Label_Procedure_Pointer : Custom_Label_Procedure_Pointer_Type; + label_data : PLPointer) is + begin + PLplot_Thin.plslabelfunc(Custom_Label_Procedure_Pointer, label_data); + end plslabelfunc; + + + -- Reset to default labeling. Not part of the C API. + procedure Use_Default_Labels is + begin + plslabelfunc(null, System.Null_Address); + end Use_Default_Labels; + + -- Set up lengths of major tick marks. procedure plsmaj(Default_Length, Scale_Factor : Long_Float) is begin Modified: trunk/bindings/ada/plplot_traditional.ads.cmake =================================================================== --- trunk/bindings/ada/plplot_traditional.ads.cmake 2009-09-17 20:59:30 UTC (rev 10419) +++ trunk/bindings/ada/plplot_traditional.ads.cmake 2009-09-18 08:39:46 UTC (rev 10420) @@ -84,6 +84,17 @@ -- "Rename" the necessarily constrained array for mapping longitudes and latitudes. subtype Map_Form_Constrained_Array is PLplot_Thin.Map_Form_Constrained_Array; + -- This is a fixed-length string for use with custom label procedures + -- in Custom_Label_Procedure_Pointer_Type, and plslabelfunc (Set_Custom_Label). + -- This length, 0 .. 40, is hardwired in the PLplot C code; this type will + -- fail if that length is ever changed. + Label_String_Length : Integer renames PLplot_Thin.Label_String_Length; + subtype Label_String_Type is PLplot_Thin.Label_String_Type; + + -- "Rename" callback for custom label functions. + subtype Custom_Label_Procedure_Pointer_Type is + PLplot_Thin.Custom_Label_Procedure_Pointer_Type; + -------------------------------------------------------------------------------- -- Types and constants for thick binding -- -------------------------------------------------------------------------------- @@ -145,7 +156,7 @@ Justified_Square_Box : constant Justification_Type := 2; -- Axis styles - subtype Axis_Style_Type is Integer range -2..63; -- Not all values are used. + subtype Axis_Style_Type is Integer range -2..73; -- Not all values are used. fix this in docs No_Box : constant Axis_Style_Type := -2; Box : constant Axis_Style_Type := -1; @@ -184,6 +195,11 @@ Date_Time_XY_Linear_Zero_Axes : constant Axis_Style_Type := 61; Date_Time_XY_Linear_Major_Grid : constant Axis_Style_Type := 62; Date_Time_XY_Linear_Minor_Grid : constant Axis_Style_Type := 63; + + Custom_Labels_Linear_Box_Plus : constant Axis_Style_Type := 70; + Custom_Labels_Linear_Zero_Axes : constant Axis_Style_Type := 71; + Custom_Labels_Linear_Major_Grid : constant Axis_Style_Type := 72; + Custom_Labels_Linear_Minor_Grid : constant Axis_Style_Type := 73; -- Integer constrained to 0..255 subtype Integer_0_255_Type is Integer range 0 .. 255; @@ -257,6 +273,10 @@ Grid_Nearest_Neighbors_Linear_Interpolation : constant Gridding_Algorithm_Type := 5; -- GRID_NNLI Grid_Nearest_Neighbors_Around_Inverse_Distance_Weighted : constant Gridding_Algorithm_Type := 6; -- GRID_NNAIDW + -- Axis label tags + x_axis : constant Integer := 1; -- The x-axis + y_axis : constant Integer := 2; -- The y-axis + z_axis : constant Integer := 3; -- The z-axis -------------------------------------------------------------------------------- -- Constants copied from PLplot_Thin.ads so that it doesn't have to be seen. -- @@ -294,6 +314,18 @@ GRID_NNIDW : constant Gridding_Algorithm_Type := 4; GRID_NNLI : constant Gridding_Algorithm_Type := 5; GRID_NNAIDW : constant Gridding_Algorithm_Type := 6; + + -- Axis label tags + -- "PLplot style" names + -- This version for custom labels in plslabelfunc. Compare with e.g. "x_axis" above. + PL_X_AXIS : constant Integer := 1; -- The x-axis + PL_Y_AXIS : constant Integer := 2; -- The y-axis + PL_Z_AXIS : constant Integer := 3; -- The z-axis + -- "Ada style" names + Label_X_Axis : constant Integer := 1; -- The x-axis + Label_Y_Axis : constant Integer := 2; -- The y-axis + Label_Z_Axis : constant Integer := 3; -- The z-axis + -------------------------------------------------------------------------------- @@ -1473,6 +1505,17 @@ -- PLPointer pltr_data); -- + + -- Setup a user-provided custom labeling function. + procedure plslabelfunc + (Custom_Label_Procedure_Pointer : Custom_Label_Procedure_Pointer_Type; + label_data : PLPointer); + + + -- Reset to default labeling. Not part of the C API. + procedure Use_Default_Labels; + + -- Set up lengths of major tick marks. procedure plsmaj(Default_Length, Scale_Factor : Long_Float); Modified: trunk/examples/ada/x19a.adb.cmake =================================================================== --- trunk/examples/ada/x19a.adb.cmake 2009-09-17 20:59:30 UTC (rev 10419) +++ trunk/examples/ada/x19a.adb.cmake 2009-09-18 08:39:46 UTC (rev 10420) @@ -22,13 +22,23 @@ -- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA with + Text_IO, + Interfaces.C, + System.Storage_Elements, + Ada.Strings, Ada.Numerics, Ada.Numerics.Long_Elementary_Functions, + Ada.Strings.Unbounded, PLplot_Auxiliary, PLplot_Traditional; use + Text_IO, + Interfaces.C, + System.Storage_Elements, + Ada.Strings, Ada.Numerics, Ada.Numerics.Long_Elementary_Functions, + Ada.Strings.Unbounded, PLplot_Auxiliary, PLplot_Traditional; @@ -69,6 +79,101 @@ end loop; end mapform19; + + -- This spec is necessary in order to enforce C calling conventions, used + -- in the callback by intervening C code. + -- See Ada note above, for mapform19. + -- a_length is used only for bounds checking against the C-allocated memory + -- for label. + procedure geolocation_labeler + (axis : Integer; + a_value : Long_Float; + label : out Label_String_Type; + a_length : size_t; + data : PLpointer); + pragma Convention(C, geolocation_labeler); + + -- A custom axis labeling function for longitudes and latitudes. + procedure geolocation_labeler + (axis : Integer; + a_value : Long_Float; + label : out Label_String_Type; + a_length : size_t; + data : PLpointer) + is + direction_label : Unbounded_String; + label_val : Long_Float; + + + -- "Normalize" longitude values so that they always fall between -180.0 and 180.0. + function normalize_longitude(lon : Long_Float) return Long_Float is + times : Long_Float; + begin -- normalize_longitude + if lon >= -180.0 and lon <= 180.0 then + return lon; + else + times := Long_Float'Floor((abs(lon) + 180.0) / 360.0); + if lon < 0.0 then + return lon + 360.0 * times; + else + return lon - 360.0 * times; + end if; + end if; + end normalize_longitude; + + + -- Function to convert an unbounded string to a fixed-length C string with the + -- null terminator somewhere in the middle and spaces after. The result, of type + -- Label_String_Type, is fixed to a length by C, currently at 41, and is + -- indexed in Ada as 0 .. PLplot_Traditional.Label_String_Length. + function Unbounded_To_Weird_C + (Item : Unbounded_String; + C_Length : size_t) return Label_String_Type + is + Temp : Unbounded_String; + begin + -- Check length and adjust if necessary. Put_Line doesn't work here. + if Length(Item) >= Integer(C_Length) then + Put_Line("*** Warning: Custom label was truncated to" + & Integer'Image(Integer(C_Length)) & " characters. ***"); + Temp := Head(Item, Integer(C_Length)); + return To_C(To_String(Temp), True); + else + return To_C(To_String(Item & ASCII.nul & + (Label_String_Length - Length(Item)) * " "), False); + end if; + end Unbounded_To_Weird_C; + + begin -- geolocation_labeler + if axis = PL_Y_AXIS then + label_val := a_value; + if label_val > 0.0 then + direction_label := To_Unbounded_String(" N"); + elsif label_val < 0.0 then + direction_label := To_Unbounded_String(" S"); + else + direction_label := To_Unbounded_String("Eq"); + end if; + elsif axis = PL_X_AXIS then + label_val := normalize_longitude(a_value); + if label_val > 0.0 then + direction_label := To_Unbounded_String(" E"); + elsif label_val < 0.0 then + direction_label := To_Unbounded_String(" W"); + else + direction_label := To_Unbounded_String(""); + end if; + end if; + + if axis = PL_Y_AXIS and a_value = 0.0 then + -- A special case for the equator + null; + else + direction_label := Trim(Integer'Image(Integer(abs(label_val))) & direction_label, Left); + end if; + label := Unbounded_To_Weird_C(direction_label, a_length); + end geolocation_labeler; + begin -- Parse and process command line arguments @@ -85,8 +190,11 @@ minx := 190.0; maxx := 190.0 + 360.0; + -- Setup a custom latitude and longitude-based scaling function. + plslabelfunc(geolocation_labeler'Unrestricted_Access, System.Null_Address); + plcol0(1); - plenv(minx, maxx, miny, maxy, 1, -1); + plenv(minx, maxx, miny, maxy, Justified, Custom_Labels_Linear_Box_Plus); plmap(null, USA_States_and_Continents, minx, maxx, miny, maxy); -- The Americas @@ -94,14 +202,19 @@ maxx := 340.0; plcol0(1); - plenv(minx, maxx, miny, maxy, 1, -1); + plenv(minx, maxx, miny, maxy, Justified, Custom_Labels_Linear_Box_Plus); plmap(null, USA_States_and_Continents, minx, maxx, miny, maxy); + -- Clear the labeling function. + Use_Default_Labels; + -- or... + -- plslabelfunc(Null, System.Null_Address); + -- Polar, Northern hemisphere minx := 0.0; maxx := 360.0; - plenv(-75.0, 75.0, -75.0, 75.0, 1, -1); + plenv(-75.0, 75.0, -75.0, 75.0, Justified, Box); plmap(mapform19'Unrestricted_Access, Continents, minx, maxx, miny, maxy); pllsty(2); Modified: trunk/examples/ada/xthick19a.adb.cmake =================================================================== --- trunk/examples/ada/xthick19a.adb.cmake 2009-09-17 20:59:30 UTC (rev 10419) +++ trunk/examples/ada/xthick19a.adb.cmake 2009-09-18 08:39:46 UTC (rev 10420) @@ -22,13 +22,23 @@ -- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA with + Text_IO, + Interfaces.C, + System.Storage_Elements, + Ada.Strings, Ada.Numerics, Ada.Numerics.Long_Elementary_Functions, + Ada.Strings.Unbounded, PLplot_Auxiliary, PLplot; use + Text_IO, + Interfaces.C, + System.Storage_Elements, + Ada.Strings, Ada.Numerics, Ada.Numerics.Long_Elementary_Functions, + Ada.Strings.Unbounded, PLplot_Auxiliary, PLplot; @@ -69,6 +79,101 @@ end loop; end mapform19; + + -- This spec is necessary in order to enforce C calling conventions, used + -- in the callback by intervening C code. + -- See Ada note above, for mapform19. + -- a_length is used only for bounds checking against the C-allocated memory + -- for label. + procedure geolocation_labeler + (axis : Integer; + a_value : Long_Float; + label : out Label_String_Type; + a_length : size_t; + data : PLpointer); + pragma Convention(C, geolocation_labeler); + + -- A custom axis labeling function for longitudes and latitudes. + procedure geolocation_labeler + (axis : Integer; + a_value : Long_Float; + label : out Label_String_Type; + a_length : size_t; + data : PLpointer) + is + direction_label : Unbounded_String; + label_val : Long_Float; + + + -- "Normalize" longitude values so that they always fall between -180.0 and 180.0. + function normalize_longitude(lon : Long_Float) return Long_Float is + times : Long_Float; + begin -- normalize_longitude + if lon >= -180.0 and lon <= 180.0 then + return lon; + else + times := Long_Float'Floor((abs(lon) + 180.0) / 360.0); + if lon < 0.0 then + return lon + 360.0 * times; + else + return lon - 360.0 * times; + end if; + end if; + end normalize_longitude; + + + -- Function to convert an unbounded string to a fixed-length C string with the + -- null terminator somewhere in the middle and spaces after. The result, of type + -- Label_String_Type, is fixed to a length by C, currently at 41, and is + -- indexed in Ada as 0 .. PLplot_Traditional.Label_String_Length. + function Unbounded_To_Weird_C + (Item : Unbounded_String; + C_Length : size_t) return Label_String_Type + is + Temp : Unbounded_String; + begin + -- Check length and adjust if necessary. Put_Line doesn't work here. + if Length(Item) >= Integer(C_Length) then + Put_Line("*** Warning: Custom label was truncated to" + & Integer'Image(Integer(C_Length)) & " characters. ***"); + Temp := Head(Item, Integer(C_Length)); + return To_C(To_String(Temp), True); + else + return To_C(To_String(Item & ASCII.nul & + (Label_String_Length - Length(Item)) * " "), False); + end if; + end Unbounded_To_Weird_C; + + begin -- geolocation_labeler + if axis = Label_Y_Axis then + label_val := a_value; + if label_val > 0.0 then + direction_label := To_Unbounded_String(" N"); + elsif label_val < 0.0 then + direction_label := To_Unbounded_String(" S"); + else + direction_label := To_Unbounded_String("Eq"); + end if; + elsif axis = Label_X_Axis then + label_val := normalize_longitude(a_value); + if label_val > 0.0 then + direction_label := To_Unbounded_String(" E"); + elsif label_val < 0.0 then + direction_label := To_Unbounded_String(" W"); + else + direction_label := To_Unbounded_String(""); + end if; + end if; + + if axis = Label_Y_Axis and a_value = 0.0 then + -- A special case for the equator + null; + else + direction_label := Trim(Integer'Image(Integer(abs(label_val))) & direction_label, Left); + end if; + label := Unbounded_To_Weird_C(direction_label, a_length); + end geolocation_labeler; + begin -- Parse and process command line arguments @@ -85,8 +190,11 @@ minx := 190.0; maxx := 190.0 + 360.0; + -- Setup a custom latitude and longitude-based scaling function. + Set_Custom_Label(geolocation_labeler'Unrestricted_Access, System.Null_Address); + Set_Pen_Color(Red); - Set_Environment(minx, maxx, miny, maxy, Justified, Box); + Set_Environment(minx, maxx, miny, maxy, Justified, Custom_Labels_Linear_Box_Plus); Draw_Map(null, USA_States_and_Continents, minx, maxx, miny, maxy); -- The Americas @@ -94,9 +202,14 @@ maxx := 340.0; Set_Pen_Color(Red); - Set_Environment(minx, maxx, miny, maxy, Justified, Box); + Set_Environment(minx, maxx, miny, maxy, Justified, Custom_Labels_Linear_Box_Plus); Draw_Map(null, USA_States_and_Continents, minx, maxx, miny, maxy); + -- Clear the labeling function. + Use_Default_Labels; + -- or... + -- plslabelfunc(Null, System.Null_Address); + -- Polar, Northern hemisphere minx := 0.0; maxx := 360.0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2009-09-18 23:17:27
|
Revision: 10429 http://plplot.svn.sourceforge.net/plplot/?rev=10429&view=rev Author: airwin Date: 2009-09-18 23:17:20 +0000 (Fri, 18 Sep 2009) Log Message: ----------- Make OCAML_NEW_BUILD default to ON. Minor cleanups. Modified Paths: -------------- trunk/bindings/ocaml/CMakeLists.txt trunk/cmake/modules/ocaml.cmake trunk/examples/ocaml/CMakeLists.txt Modified: trunk/bindings/ocaml/CMakeLists.txt =================================================================== --- trunk/bindings/ocaml/CMakeLists.txt 2009-09-18 23:16:02 UTC (rev 10428) +++ trunk/bindings/ocaml/CMakeLists.txt 2009-09-18 23:17:20 UTC (rev 10429) @@ -195,12 +195,12 @@ ) set(OCAML_FULL_INSTALL_FILES - ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/plplot.cma - ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/plplot.cmxa - ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/plplot.a - ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/plplot.cmi - ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/libplplot_stubs.a - ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/plplot.mli + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa + ${CMAKE_CURRENT_BINARY_DIR}/plplot.a + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmi + ${CMAKE_CURRENT_BINARY_DIR}/libplplot_stubs.a + ${CMAKE_CURRENT_BINARY_DIR}/plplot.mli ) # Most files go in the plplot subdirectory Modified: trunk/cmake/modules/ocaml.cmake =================================================================== --- trunk/cmake/modules/ocaml.cmake 2009-09-18 23:16:02 UTC (rev 10428) +++ trunk/cmake/modules/ocaml.cmake 2009-09-18 23:17:20 UTC (rev 10429) @@ -94,13 +94,13 @@ set(ENABLE_ocaml OFF CACHE BOOL "Enable OCaml bindings" FORCE) endif(CAMLIDL_LIB_DIR) - # Subdirectory for ocamlbuild to use for build - option(OCAML_NEW_BUILD "Try new detailed OCaml build method?" OFF) - if(OCAML_NEW_BUILD) - set(OCAML_BUILD_DIR "" CACHE PATH "Subdirectory to use for ocamlbuild") - else(OCAML_NEW_BUILD) + option(OCAML_NEW_BUILD "Try new detailed OCaml build method?" ON) + + if(NOT OCAML_NEW_BUILD) + # For the old-style build, a subdirectory is required for ocamlbuild + # to use for the build. set(OCAML_BUILD_DIR _build CACHE PATH "Subdirectory to use for ocamlbuild") - endif(OCAML_NEW_BUILD) + endif(NOT OCAML_NEW_BUILD) # Installation follows the Debian ocaml policy for want of a better # standard. Modified: trunk/examples/ocaml/CMakeLists.txt =================================================================== --- trunk/examples/ocaml/CMakeLists.txt 2009-09-18 23:16:02 UTC (rev 10428) +++ trunk/examples/ocaml/CMakeLists.txt 2009-09-18 23:17:20 UTC (rev 10429) @@ -91,7 +91,11 @@ if(BUILD_TEST) set(ocaml_EXTRA_CLEAN_FILES) if(CORE_BUILD) - set(I_OPTION ${CMAKE_BINARY_DIR}/bindings/ocaml/${OCAML_BUILD_DIR}) + if(OCAML_NEW_BUILD) + set(I_OPTION ${CMAKE_BINARY_DIR}/bindings/ocaml) + else(OCAML_NEW_BUILD) + set(I_OPTION ${CMAKE_BINARY_DIR}/bindings/ocaml/${OCAML_BUILD_DIR}) + endif(OCAML_NEW_BUILD) set(ccopt_OPTION "-L ${CMAKE_BINARY_DIR}/src -Wl,-rpath -Wl,${CMAKE_BINARY_DIR}/src ") else(CORE_BUILD) set(I_OPTION ${OCAML_INSTALL_DIR}/plplot) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2009-09-19 20:46:51
|
Revision: 10433 http://plplot.svn.sourceforge.net/plplot/?rev=10433&view=rev Author: airwin Date: 2009-09-19 20:46:45 +0000 (Sat, 19 Sep 2009) Log Message: ----------- Remove old build system for ocaml bindings since new build system appears to be working. Modified Paths: -------------- trunk/bindings/ocaml/CMakeLists.txt trunk/cmake/modules/ocaml.cmake trunk/examples/ocaml/CMakeLists.txt Removed Paths: ------------- trunk/bindings/ocaml/libplplot_stubs.clib trunk/bindings/ocaml/myocamlbuild.ml.cmake Modified: trunk/bindings/ocaml/CMakeLists.txt =================================================================== --- trunk/bindings/ocaml/CMakeLists.txt 2009-09-19 18:49:02 UTC (rev 10432) +++ trunk/bindings/ocaml/CMakeLists.txt 2009-09-19 20:46:45 UTC (rev 10433) @@ -22,362 +22,193 @@ if(ENABLE_ocaml) - if(OCAML_NEW_BUILD) + #Detailed CMake logic to build ocaml bindings for PLplot. + set(camlidl_GENERATED_SOURCE + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.h + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.ml + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.mli + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.c + ) - #Detailed CMake logic to build ocaml bindings for PLplot. - set(camlidl_GENERATED_SOURCE - ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.h - ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.ml - ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.mli - ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.c - ) + add_custom_command( + OUTPUT + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.idl + ${camlidl_GENERATED_SOURCE} + # camlidl source file must be in ${CMAKE_CURRENT_BINARY_DIR}. + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/plplot_core.idl ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.idl + COMMAND camlidl -header -I ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.idl + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/plplot_core.idl + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) - add_custom_command( - OUTPUT - ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.idl - ${camlidl_GENERATED_SOURCE} - # camlidl source file must be in ${CMAKE_CURRENT_BINARY_DIR}. - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/plplot_core.idl ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.idl - COMMAND camlidl -header -I ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.idl - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/plplot_core.idl - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.o - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plplot_impl.o - ${CMAKE_CURRENT_BINARY_DIR}/dllplplot_stubs.so - ${CMAKE_CURRENT_BINARY_DIR}/libplplot_stubs.a - COMMAND ocamlc -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.c - COMMAND ocamlc -ccopt -I${CMAKE_SOURCE_DIR}/include -ccopt -I${CMAKE_BINARY_DIR}/include -ccopt -I${CMAKE_SOURCE_DIR}/lib/qsastime -c ${CMAKE_CURRENT_SOURCE_DIR}/plplot_impl.c - COMMAND ocamlmklib -o plplot_stubs -L${CAMLIDL_LIB_DIR} -lcamlidl -L${CMAKE_BINARY_DIR}/src -lplplot${LIB_TAG} ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.o ${CMAKE_CURRENT_BINARY_DIR}/plplot_impl.o - DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.c - ${CMAKE_CURRENT_SOURCE_DIR}/plplot_impl.c - plplot${LIB_TAG} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - add_custom_target(target_lib_plplot_stubs - DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/dllplplot_stubs.so - ${CMAKE_CURRENT_BINARY_DIR}/libplplot_stubs.a - ) - - add_custom_command( - OUTPUT - ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmi - ${CMAKE_CURRENT_BINARY_DIR}/plplot.mli - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmi - COMMAND ocamlc -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.mli - # ocamlc *.mli source file must be in ${CMAKE_CURRENT_BINARY_DIR}. - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/plplot.mli ${CMAKE_CURRENT_BINARY_DIR}/plplot.mli - COMMAND ocamlc -c ${CMAKE_CURRENT_BINARY_DIR}/plplot.mli - DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.mli - ${CMAKE_CURRENT_SOURCE_DIR}/plplot.mli - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - add_custom_target(target_plplot_core_cmi - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmi - ) - - add_custom_command( - OUTPUT - ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo - ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmx - ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.o - ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmo - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmx - ${CMAKE_CURRENT_BINARY_DIR}/plplot.o - COMMAND ocamlc -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.ml - COMMAND ocamlopt -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.ml - # ocamlc and ocamlopt *.ml source file must be in - # ${CMAKE_CURRENT_BINARY_DIR}. - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/plplot.ml ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml - COMMAND ocamlc -c ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml - COMMAND ocamlopt -c ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml - DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.ml - ${CMAKE_CURRENT_SOURCE_DIR}/plplot.ml - ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmi - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmi - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - add_custom_target(target_plplot_core_cmo - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo - ) - - add_custom_command( - OUTPUT - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa - ${CMAKE_CURRENT_BINARY_DIR}/plplot.a - COMMAND ocamlc -a -custom -o ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmo -dllib -lplplot_stubs -ccopt -L${CMAKE_CURRENT_BINARY_DIR} -cclib -lplplot_stubs -ccopt -L${CAMLIDL_LIB_DIR} -cclib -lcamlidl -ccopt -L${CMAKE_BINARY_DIR}/src -cclib -lplplot${LIB_TAG} -dllpath ${CMAKE_BINARY_DIR}/src - COMMAND ocamlopt -a -o ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmx ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmx -ccopt -L${CMAKE_CURRENT_BINARY_DIR} -cclib -lplplot_stubs -ccopt -L${CAMLIDL_LIB_DIR} -cclib -lcamlidl -ccopt -L${CMAKE_BINARY_DIR}/src -cclib -lplplot${LIB_TAG} - DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmo - ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmx - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmx - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) - add_custom_target(target_plplot_cma - DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa - ) - - # These targets depend on common files in their respective - # file-dependency chains. Therefore, to avoid screwing up parallel - # builds must serialize with target depends. - add_dependencies(target_plplot_core_cmi target_lib_plplot_stubs) - add_dependencies(target_plplot_core_cmo target_plplot_core_cmi) - add_dependencies(target_plplot_cma target_plplot_core_cmo) - - # Basic build done, now trying to finish up by adapting bits - # and pieces of old build procedure below. - - # Configure the META file - # Configure pkg-config *.pc file corresponding to plplot.cma - if(PKG_CONFIG_EXECUTABLE) - if(LIB_TAG) - set(PC_PRECISION "double") - else(LIB_TAG) - set(PC_PRECISION "single") - endif(LIB_TAG) - # Each list element must consist of a colon-separated string with the - # following fields which are parsed out in the foreach loop below and - # used to configure the corresponding pkg-config *.pc file. - # BINDING - ENABLE_${BINDING} keeps track of whether a - # binding has been enabled (ON) or not (OFF). - # Also, ${BINDING} used to determine PC_FILE_SUFFIX - # which helps to determine name of configured - # *.pc file. - # PC_SHORT_NAME - Used in *.pc NAME: field - # PC_LONG_NAME - Used in *.pc Description: field - # PC_LIBRARY_NAME - Used in *.pc Libs: field - # Also used to determine PC_LINK_FLAGS and - # PC_COMPILE_FLAGS used in *.pc Libs: and Cflags: - # fields. - set(PC_DATA "ocaml:::plplot${LIB_TAG}") - - string(REGEX REPLACE "^(.*):.*:.*:.*$" "\\1" BINDING ${PC_DATA}) - set(PC_FILE_SUFFIX "-${BINDING}") - set(PC_REQUIRES "plplot${LIB_TAG}") - string(REGEX REPLACE "^.*:(.*):.*:.*$" "\\1" PC_SHORT_NAME ${PC_DATA}) - string(REGEX REPLACE "^.*:.*:(.*):.*$" "\\1" PC_LONG_NAME ${PC_DATA}) - string(REGEX REPLACE "^.*:.*:.*:(.*)$" "\\1" PC_LIBRARY_NAME ${PC_DATA}) - set(PC_LINK_FLAGS "${lib${PC_LIBRARY_NAME}_LINK_FLAGS}") - set(PC_COMPILE_FLAGS "${lib${PC_LIBRARY_NAME}_COMPILE_FLAGS}") - set(PC_LINK_FLAGS "-l${PC_LIBRARY_NAME} ${PC_LINK_FLAGS}") - set(PC_CONFIGURED_FILE - ${CMAKE_BINARY_DIR}/pkgcfg/plplot${LIB_TAG}${PC_FILE_SUFFIX}.pc - ) - configure_file( - ${CMAKE_SOURCE_DIR}/pkgcfg/plplot-template.pc.cmake - ${PC_CONFIGURED_FILE} - @ONLY - ) - install(FILES ${PC_CONFIGURED_FILE} DESTINATION ${PKG_CONFIG_DIR}) - configure_file(META.cmake ${CMAKE_CURRENT_BINARY_DIR}/META) - endif(PKG_CONFIG_EXECUTABLE) - - add_custom_target(plplot_ocaml ALL) - add_dependencies(plplot_ocaml target_plplot_cma) - - # Need to keep track of file dependencies since this is a custom target. - set_property(GLOBAL PROPERTY FILES_plplot_ocaml - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa - ${CMAKE_CURRENT_BINARY_DIR}/plplot.a - ) - - set(OCAML_FULL_INSTALL_FILES - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa - ${CMAKE_CURRENT_BINARY_DIR}/plplot.a - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmi - ${CMAKE_CURRENT_BINARY_DIR}/libplplot_stubs.a - ${CMAKE_CURRENT_BINARY_DIR}/plplot.mli - ) - - # Most files go in the plplot subdirectory - install(FILES ${OCAML_FULL_INSTALL_FILES} ${CMAKE_CURRENT_BINARY_DIR}/META - DESTINATION ${OCAML_INSTALL_DIR}/plplot - ) - - # Shared library stubs go in stublibs - install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/dllplplot_stubs.so - DESTINATION ${OCAML_INSTALL_DIR}/stublibs - ) - - else(OCAML_NEW_BUILD) - - set(SOURCE_LIST - libplplot_stubs.clib - plplot_h - plplot_h.inc - plplot_core.idl - plplot_impl.c - plplot.ml - plplot.mli - touchup.ml + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.o + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plplot_impl.o + ${CMAKE_CURRENT_BINARY_DIR}/dllplplot_stubs.so + ${CMAKE_CURRENT_BINARY_DIR}/libplplot_stubs.a + COMMAND ocamlc -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.c + COMMAND ocamlc -ccopt -I${CMAKE_SOURCE_DIR}/include -ccopt -I${CMAKE_BINARY_DIR}/include -ccopt -I${CMAKE_SOURCE_DIR}/lib/qsastime -c ${CMAKE_CURRENT_SOURCE_DIR}/plplot_impl.c + COMMAND ocamlmklib -o plplot_stubs -L${CAMLIDL_LIB_DIR} -lcamlidl -L${CMAKE_BINARY_DIR}/src -lplplot${LIB_TAG} ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.o ${CMAKE_CURRENT_BINARY_DIR}/plplot_impl.o + DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.c + ${CMAKE_CURRENT_SOURCE_DIR}/plplot_impl.c + plplot${LIB_TAG} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) - - set(OCAML_INSTALL_FILES - plplot.cma - plplot.cmxa - plplot.a - plplot.cmi - libplplot_stubs.a - plplot.mli + add_custom_target(target_lib_plplot_stubs + DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/dllplplot_stubs.so + ${CMAKE_CURRENT_BINARY_DIR}/libplplot_stubs.a ) - - set(OCAML_FULL_INSTALL_FILES) - foreach(OCAML_FILE ${OCAML_INSTALL_FILES}) - set(OCAML_FULL_INSTALL_FILES ${OCAML_FULL_INSTALL_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/${OCAML_FILE}) - endforeach(OCAML_FILE ${OCAML_INSTALL_FILES}) - -# Configure the META file -# Configure pkg-config *.pc file corresponding to plplot.cma -if(PKG_CONFIG_EXECUTABLE) - if(LIB_TAG) - set(PC_PRECISION "double") - else(LIB_TAG) - set(PC_PRECISION "single") - endif(LIB_TAG) - # Each list element must consist of a colon-separated string with the - # following fields which are parsed out in the foreach loop below and - # used to configure the corresponding pkg-config *.pc file. - # BINDING - ENABLE_${BINDING} keeps track of whether a - # binding has been enabled (ON) or not (OFF). - # Also, ${BINDING} used to determine PC_FILE_SUFFIX - # which helps to determine name of configured - # *.pc file. - # PC_SHORT_NAME - Used in *.pc NAME: field - # PC_LONG_NAME - Used in *.pc Description: field - # PC_LIBRARY_NAME - Used in *.pc Libs: field - # Also used to determine PC_LINK_FLAGS and - # PC_COMPILE_FLAGS used in *.pc Libs: and Cflags: - # fields. - set(PC_DATA "ocaml:::plplot${LIB_TAG}") - string(REGEX REPLACE "^(.*):.*:.*:.*$" "\\1" BINDING ${PC_DATA}) - set(PC_FILE_SUFFIX "-${BINDING}") - set(PC_REQUIRES "plplot${LIB_TAG}") - string(REGEX REPLACE "^.*:(.*):.*:.*$" "\\1" PC_SHORT_NAME ${PC_DATA}) - string(REGEX REPLACE "^.*:.*:(.*):.*$" "\\1" PC_LONG_NAME ${PC_DATA}) - string(REGEX REPLACE "^.*:.*:.*:(.*)$" "\\1" PC_LIBRARY_NAME ${PC_DATA}) - set(PC_LINK_FLAGS "${lib${PC_LIBRARY_NAME}_LINK_FLAGS}") - set(PC_COMPILE_FLAGS "${lib${PC_LIBRARY_NAME}_COMPILE_FLAGS}") - set(PC_LINK_FLAGS "-l${PC_LIBRARY_NAME} ${PC_LINK_FLAGS}") - set(PC_CONFIGURED_FILE - ${CMAKE_BINARY_DIR}/pkgcfg/plplot${LIB_TAG}${PC_FILE_SUFFIX}.pc - ) - configure_file( - ${CMAKE_SOURCE_DIR}/pkgcfg/plplot-template.pc.cmake - ${PC_CONFIGURED_FILE} - @ONLY - ) - install(FILES ${PC_CONFIGURED_FILE} DESTINATION ${PKG_CONFIG_DIR}) - configure_file(META.cmake ${CMAKE_CURRENT_BINARY_DIR}/META) -endif(PKG_CONFIG_EXECUTABLE) - - # Configure the file controlling the ocamlbuild process - configure_file(myocamlbuild.ml.cmake ${CMAKE_CURRENT_BINARY_DIR}/myocamlbuild.ml) - # Don't bother with dependency on configured myocamlbuild.ml since - # that file is created at initial cmake time. - set(DEPENDS_LIST) - - # Copy all source into the build tree since the whole project must be in - # the same directory - foreach(SRC_FILE ${SOURCE_LIST}) - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${SRC_FILE} - COMMAND ${CMAKE_COMMAND} - -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${SRC_FILE} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FILE} - ) - list(APPEND DEPENDS_LIST ${CMAKE_CURRENT_BINARY_DIR}/${SRC_FILE}) - endforeach(SRC_FILE ${SOURCE_LIST}) - - # Note: ocamlbuild requires build-dir to be a relative path - # Also the build-dir must not be the project root - hence the - # new subdirectory - - # N.B. "touch_nocreate" commands below are used to always update the - # date on the OUTPUT files since under certain circumstances (a - # rebuild with new plplot${LIB_TAG}) ${OCAMLBUILD} does not update - # the date itself which screws up file dependencies. - - # Build bytecode version. add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/plplot.cma - COMMAND ${OCAMLBUILD} -tag debug -classic-display - -build-dir ${OCAML_BUILD_DIR} plplot.cma - COMMAND ${CMAKE_COMMAND} -E touch_nocreate - ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/plplot.cma - DEPENDS ${DEPENDS_LIST} plplot${LIB_TAG} + OUTPUT + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmi + ${CMAKE_CURRENT_BINARY_DIR}/plplot.mli + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmi + COMMAND ocamlc -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.mli + # ocamlc *.mli source file must be in ${CMAKE_CURRENT_BINARY_DIR}. + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/plplot.mli ${CMAKE_CURRENT_BINARY_DIR}/plplot.mli + COMMAND ocamlc -c ${CMAKE_CURRENT_BINARY_DIR}/plplot.mli + DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.mli + ${CMAKE_CURRENT_SOURCE_DIR}/plplot.mli WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) - add_custom_target( - plplot_ocaml_bytecode - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/plplot.cma + add_custom_target(target_plplot_core_cmi + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmi ) - - # Build native version. + add_custom_command( OUTPUT - ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/plplot.cmxa - ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/plplot.a - COMMAND ${OCAMLBUILD} -tag debug -classic-display - -build-dir ${OCAML_BUILD_DIR} plplot.cmxa - COMMAND ${CMAKE_COMMAND} -E touch_nocreate - ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/plplot.cmxa - COMMAND ${CMAKE_COMMAND} -E touch_nocreate - ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/plplot.a - DEPENDS ${DEPENDS_LIST} plplot${LIB_TAG} + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmx + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.o + ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmo + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmx + ${CMAKE_CURRENT_BINARY_DIR}/plplot.o + COMMAND ocamlc -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.ml + COMMAND ocamlopt -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.ml + # ocamlc and ocamlopt *.ml source file must be in + # ${CMAKE_CURRENT_BINARY_DIR}. + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/plplot.ml ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml + COMMAND ocamlc -c ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml + COMMAND ocamlopt -c ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml + DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.ml + ${CMAKE_CURRENT_SOURCE_DIR}/plplot.ml + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmi + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmi WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) - add_custom_target( - plplot_ocaml_native + add_custom_target(target_plplot_core_cmo + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo + ) + + add_custom_command( + OUTPUT + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa + ${CMAKE_CURRENT_BINARY_DIR}/plplot.a + COMMAND ocamlc -a -custom -o ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmo -dllib -lplplot_stubs -ccopt -L${CMAKE_CURRENT_BINARY_DIR} -cclib -lplplot_stubs -ccopt -L${CAMLIDL_LIB_DIR} -cclib -lcamlidl -ccopt -L${CMAKE_BINARY_DIR}/src -cclib -lplplot${LIB_TAG} -dllpath ${CMAKE_BINARY_DIR}/src + COMMAND ocamlopt -a -o ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmx ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmx -ccopt -L${CMAKE_CURRENT_BINARY_DIR} -cclib -lplplot_stubs -ccopt -L${CAMLIDL_LIB_DIR} -cclib -lcamlidl -ccopt -L${CMAKE_BINARY_DIR}/src -cclib -lplplot${LIB_TAG} DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/plplot.cmxa - ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/plplot.a + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmo + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmx + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmx + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) - # Serialize these two with a target dependency since the two builds - # interfere with each other if done in parallel. - add_dependencies(plplot_ocaml_native plplot_ocaml_bytecode) + add_custom_target(target_plplot_cma + DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa + ) + # These targets depend on common files in their respective + # file-dependency chains. Therefore, to avoid screwing up parallel + # builds must serialize with target depends. + add_dependencies(target_plplot_core_cmi target_lib_plplot_stubs) + add_dependencies(target_plplot_core_cmo target_plplot_core_cmi) + add_dependencies(target_plplot_cma target_plplot_core_cmo) + + # Basic build done, now trying to finish up by adapting bits + # and pieces of old build procedure below. + + # Configure the META file + # Configure pkg-config *.pc file corresponding to plplot.cma + if(PKG_CONFIG_EXECUTABLE) + if(LIB_TAG) + set(PC_PRECISION "double") + else(LIB_TAG) + set(PC_PRECISION "single") + endif(LIB_TAG) + # Each list element must consist of a colon-separated string with the + # following fields which are parsed out in the foreach loop below and + # used to configure the corresponding pkg-config *.pc file. + # BINDING - ENABLE_${BINDING} keeps track of whether a + # binding has been enabled (ON) or not (OFF). + # Also, ${BINDING} used to determine PC_FILE_SUFFIX + # which helps to determine name of configured + # *.pc file. + # PC_SHORT_NAME - Used in *.pc NAME: field + # PC_LONG_NAME - Used in *.pc Description: field + # PC_LIBRARY_NAME - Used in *.pc Libs: field + # Also used to determine PC_LINK_FLAGS and + # PC_COMPILE_FLAGS used in *.pc Libs: and Cflags: + # fields. + set(PC_DATA "ocaml:::plplot${LIB_TAG}") + + string(REGEX REPLACE "^(.*):.*:.*:.*$" "\\1" BINDING ${PC_DATA}) + set(PC_FILE_SUFFIX "-${BINDING}") + set(PC_REQUIRES "plplot${LIB_TAG}") + string(REGEX REPLACE "^.*:(.*):.*:.*$" "\\1" PC_SHORT_NAME ${PC_DATA}) + string(REGEX REPLACE "^.*:.*:(.*):.*$" "\\1" PC_LONG_NAME ${PC_DATA}) + string(REGEX REPLACE "^.*:.*:.*:(.*)$" "\\1" PC_LIBRARY_NAME ${PC_DATA}) + set(PC_LINK_FLAGS "${lib${PC_LIBRARY_NAME}_LINK_FLAGS}") + set(PC_COMPILE_FLAGS "${lib${PC_LIBRARY_NAME}_COMPILE_FLAGS}") + set(PC_LINK_FLAGS "-l${PC_LIBRARY_NAME} ${PC_LINK_FLAGS}") + set(PC_CONFIGURED_FILE + ${CMAKE_BINARY_DIR}/pkgcfg/plplot${LIB_TAG}${PC_FILE_SUFFIX}.pc + ) + configure_file( + ${CMAKE_SOURCE_DIR}/pkgcfg/plplot-template.pc.cmake + ${PC_CONFIGURED_FILE} + @ONLY + ) + install(FILES ${PC_CONFIGURED_FILE} DESTINATION ${PKG_CONFIG_DIR}) + configure_file(META.cmake ${CMAKE_CURRENT_BINARY_DIR}/META) + endif(PKG_CONFIG_EXECUTABLE) + add_custom_target(plplot_ocaml ALL) - add_dependencies(plplot_ocaml plplot_ocaml_native) + add_dependencies(plplot_ocaml target_plplot_cma) # Need to keep track of file dependencies since this is a custom target. set_property(GLOBAL PROPERTY FILES_plplot_ocaml - ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/plplot.cma - ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/plplot.cmxa - ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/plplot.a + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa + ${CMAKE_CURRENT_BINARY_DIR}/plplot.a ) + set(OCAML_FULL_INSTALL_FILES + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa + ${CMAKE_CURRENT_BINARY_DIR}/plplot.a + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmi + ${CMAKE_CURRENT_BINARY_DIR}/libplplot_stubs.a + ${CMAKE_CURRENT_BINARY_DIR}/plplot.mli + ) + # Most files go in the plplot subdirectory install(FILES ${OCAML_FULL_INSTALL_FILES} ${CMAKE_CURRENT_BINARY_DIR}/META DESTINATION ${OCAML_INSTALL_DIR}/plplot ) # Shared library stubs go in stublibs - install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${OCAML_BUILD_DIR}/dllplplot_stubs.so + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/dllplplot_stubs.so DESTINATION ${OCAML_INSTALL_DIR}/stublibs ) - # Remove entire contents of ${OCAML_BUILD_DIR} when the clean target - # is run. This proved to work fine on cmake-2.6.4, but may not for - # earlier versions according to a remark made here before. - set_directory_properties(PROPERTIES - ADDITIONAL_MAKE_CLEAN_FILES - ${OCAML_BUILD_DIR} - ) - endif(OCAML_NEW_BUILD) - endif(ENABLE_ocaml) Deleted: trunk/bindings/ocaml/libplplot_stubs.clib =================================================================== --- trunk/bindings/ocaml/libplplot_stubs.clib 2009-09-19 18:49:02 UTC (rev 10432) +++ trunk/bindings/ocaml/libplplot_stubs.clib 2009-09-19 20:46:45 UTC (rev 10433) @@ -1 +0,0 @@ -plplot_impl.o plplot_core_stubs.o Deleted: trunk/bindings/ocaml/myocamlbuild.ml.cmake =================================================================== --- trunk/bindings/ocaml/myocamlbuild.ml.cmake 2009-09-19 18:49:02 UTC (rev 10432) +++ trunk/bindings/ocaml/myocamlbuild.ml.cmake 2009-09-19 20:46:45 UTC (rev 10433) @@ -1,56 +0,0 @@ -open Ocamlbuild_plugin -open Command - -(* The camlidl command to use (default: first one found in $PATH) *) -let camlidl = S([A"camlidl"; A"-header"]) - -(* Files included in the main idl descriptor *) -let idl_includes = ["plplot_h.inc"] -;; - -dispatch begin function - | After_rules -> - (* Handle *.idl files properly... I think *) - rule "camlidl processing" - ~prods:["%.mli"; "%.ml"; "%_stubs.c"] - ~deps:["%.idl"] - begin fun env _build -> - let idl = env "%.idl" in - let tags = tags_of_pathname idl++"compile"++"camlidl" in - let cmd = Cmd(S[camlidl; T tags; P idl]) in - Seq [cmd] - end; - - (* Include the plplot and camlidl compiler options for ocamlmklib *) - flag ["ocamlmklib"; "c"] - (S[A"-L@BUILD_DIR@/src"; A"-lplplot@LIB_TAG@"; - A"-L@CAMLIDL_LIB_DIR@"; A"-lcamlidl"]); - - (* gcc needs to know where to find the needed #includes *) - flag ["c"; "compile"] - (S[A"-ccopt"; A"-I@SOURCE_DIR@/include"; - A"-ccopt"; A"-I@SOURCE_DIR@/lib/qsastime"; - A"-ccopt"; A"-I@BUILD_DIR@/include"] ); - - (* Custom tag for OCaml bytecode *) - flag ["ocaml"; "link"; "byte"] - (A"-custom"); - - (* Use the proper extras when compiling the OCaml library *) - flag ["ocaml"; "link"; "library"; "byte"] - (S[A"-dllib"; A"-lplplot_stubs"; A"-cclib"; A"-lplplot_stubs"; - A"-cclib"; A"-lplplot@LIB_TAG@"; A"-cclib"; A"-lcamlidl"]); - - flag ["ocaml"; "link"; "library"; "native"] - (S[A"-cclib"; A"-lplplot_stubs"; - A"-cclib"; A"-lplplot@LIB_TAG@"; - A"-cclib"; A"-lcamlidl"]); - - (* Make sure the C pieces and built... *) - dep ["ocaml"; "compile"] ["libplplot_stubs.a"]; - - (* Any camlidl work must be updated if the camlidl inputs are changed *) - dep ["compile"; "camlidl"] idl_includes; - - | _ -> () -end Modified: trunk/cmake/modules/ocaml.cmake =================================================================== --- trunk/cmake/modules/ocaml.cmake 2009-09-19 18:49:02 UTC (rev 10432) +++ trunk/cmake/modules/ocaml.cmake 2009-09-19 20:46:45 UTC (rev 10433) @@ -94,14 +94,6 @@ set(ENABLE_ocaml OFF CACHE BOOL "Enable OCaml bindings" FORCE) endif(CAMLIDL_LIB_DIR) - option(OCAML_NEW_BUILD "Try new detailed OCaml build method?" ON) - - if(NOT OCAML_NEW_BUILD) - # For the old-style build, a subdirectory is required for ocamlbuild - # to use for the build. - set(OCAML_BUILD_DIR _build CACHE PATH "Subdirectory to use for ocamlbuild") - endif(NOT OCAML_NEW_BUILD) - # Installation follows the Debian ocaml policy for want of a better # standard. set(OCAML_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib/ocaml/${OCAML_VERSION} Modified: trunk/examples/ocaml/CMakeLists.txt =================================================================== --- trunk/examples/ocaml/CMakeLists.txt 2009-09-19 18:49:02 UTC (rev 10432) +++ trunk/examples/ocaml/CMakeLists.txt 2009-09-19 20:46:45 UTC (rev 10433) @@ -91,11 +91,7 @@ if(BUILD_TEST) set(ocaml_EXTRA_CLEAN_FILES) if(CORE_BUILD) - if(OCAML_NEW_BUILD) - set(I_OPTION ${CMAKE_BINARY_DIR}/bindings/ocaml) - else(OCAML_NEW_BUILD) - set(I_OPTION ${CMAKE_BINARY_DIR}/bindings/ocaml/${OCAML_BUILD_DIR}) - endif(OCAML_NEW_BUILD) + set(I_OPTION ${CMAKE_BINARY_DIR}/bindings/ocaml) set(ccopt_OPTION "-L ${CMAKE_BINARY_DIR}/src -Wl,-rpath -Wl,${CMAKE_BINARY_DIR}/src ") else(CORE_BUILD) set(I_OPTION ${OCAML_INSTALL_DIR}/plplot) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2009-09-20 20:26:51
|
Revision: 10441 http://plplot.svn.sourceforge.net/plplot/?rev=10441&view=rev Author: airwin Date: 2009-09-20 20:26:41 +0000 (Sun, 20 Sep 2009) Log Message: ----------- Use symbolic names for all ocaml commands. Modified Paths: -------------- trunk/bindings/ocaml/CMakeLists.txt trunk/cmake/modules/ocaml.cmake Modified: trunk/bindings/ocaml/CMakeLists.txt =================================================================== --- trunk/bindings/ocaml/CMakeLists.txt 2009-09-20 19:23:02 UTC (rev 10440) +++ trunk/bindings/ocaml/CMakeLists.txt 2009-09-20 20:26:41 UTC (rev 10441) @@ -36,7 +36,7 @@ ${camlidl_GENERATED_SOURCE} # camlidl source file must be in ${CMAKE_CURRENT_BINARY_DIR}. COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/plplot_core.idl ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.idl - COMMAND camlidl -header -I ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.idl + COMMAND ${CAMLIDL} -header -I ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.idl DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/plplot_core.idl WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} @@ -47,9 +47,9 @@ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plplot_impl.o ${CMAKE_CURRENT_BINARY_DIR}/dllplplot_stubs.so ${CMAKE_CURRENT_BINARY_DIR}/libplplot_stubs.a - COMMAND ocamlc -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.c - COMMAND ocamlc -ccopt -I${CMAKE_SOURCE_DIR}/include -ccopt -I${CMAKE_BINARY_DIR}/include -ccopt -I${CMAKE_SOURCE_DIR}/lib/qsastime -c ${CMAKE_CURRENT_SOURCE_DIR}/plplot_impl.c - COMMAND ocamlmklib -o plplot_stubs -L${CAMLIDL_LIB_DIR} -lcamlidl -L${CMAKE_BINARY_DIR}/src -lplplot${LIB_TAG} ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.o ${CMAKE_CURRENT_BINARY_DIR}/plplot_impl.o + COMMAND ${OCAMLC} -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.c + COMMAND ${OCAMLC} -ccopt -I${CMAKE_SOURCE_DIR}/include -ccopt -I${CMAKE_BINARY_DIR}/include -ccopt -I${CMAKE_SOURCE_DIR}/lib/qsastime -c ${CMAKE_CURRENT_SOURCE_DIR}/plplot_impl.c + COMMAND ${OCAMLMKLIB} -o plplot_stubs -L${CAMLIDL_LIB_DIR} -lcamlidl -L${CMAKE_BINARY_DIR}/src -lplplot${LIB_TAG} ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.o ${CMAKE_CURRENT_BINARY_DIR}/plplot_impl.o DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.c ${CMAKE_CURRENT_SOURCE_DIR}/plplot_impl.c @@ -67,10 +67,10 @@ ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmi ${CMAKE_CURRENT_BINARY_DIR}/plplot.mli ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmi - COMMAND ocamlc -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.mli + COMMAND ${OCAMLC} -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.mli # ocamlc *.mli source file must be in ${CMAKE_CURRENT_BINARY_DIR}. COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/plplot.mli ${CMAKE_CURRENT_BINARY_DIR}/plplot.mli - COMMAND ocamlc -c ${CMAKE_CURRENT_BINARY_DIR}/plplot.mli + COMMAND ${OCAMLC} -c ${CMAKE_CURRENT_BINARY_DIR}/plplot.mli DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.mli ${CMAKE_CURRENT_SOURCE_DIR}/plplot.mli @@ -89,13 +89,13 @@ ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmo ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmx ${CMAKE_CURRENT_BINARY_DIR}/plplot.o - COMMAND ocamlc -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.ml - COMMAND ocamlopt -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.ml + COMMAND ${OCAMLC} -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.ml + COMMAND ${OCAMLOPT} -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.ml # ocamlc and ocamlopt *.ml source file must be in # ${CMAKE_CURRENT_BINARY_DIR}. COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/plplot.ml ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml - COMMAND ocamlc -c ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml - COMMAND ocamlopt -c ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml + COMMAND ${OCAMLC} -c ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml + COMMAND ${OCAMLOPT} -c ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.ml ${CMAKE_CURRENT_SOURCE_DIR}/plplot.ml @@ -112,8 +112,8 @@ ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa ${CMAKE_CURRENT_BINARY_DIR}/plplot.a - COMMAND ocamlc -a -custom -o ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmo -dllib -lplplot_stubs -ccopt -L${CMAKE_CURRENT_BINARY_DIR} -cclib -lplplot_stubs -ccopt -L${CAMLIDL_LIB_DIR} -cclib -lcamlidl -ccopt -L${CMAKE_BINARY_DIR}/src -cclib -lplplot${LIB_TAG} -dllpath ${CMAKE_BINARY_DIR}/src - COMMAND ocamlopt -a -o ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmx ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmx -ccopt -L${CMAKE_CURRENT_BINARY_DIR} -cclib -lplplot_stubs -ccopt -L${CAMLIDL_LIB_DIR} -cclib -lcamlidl -ccopt -L${CMAKE_BINARY_DIR}/src -cclib -lplplot${LIB_TAG} + COMMAND ${OCAMLC} -a -custom -o ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmo -dllib -lplplot_stubs -ccopt -L${CMAKE_CURRENT_BINARY_DIR} -cclib -lplplot_stubs -ccopt -L${CAMLIDL_LIB_DIR} -cclib -lcamlidl -ccopt -L${CMAKE_BINARY_DIR}/src -cclib -lplplot${LIB_TAG} -dllpath ${CMAKE_BINARY_DIR}/src + COMMAND ${OCAMLOPT} -a -o ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmx ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmx -ccopt -L${CMAKE_CURRENT_BINARY_DIR} -cclib -lplplot_stubs -ccopt -L${CAMLIDL_LIB_DIR} -cclib -lcamlidl -ccopt -L${CMAKE_BINARY_DIR}/src -cclib -lplplot${LIB_TAG} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmo Modified: trunk/cmake/modules/ocaml.cmake =================================================================== --- trunk/cmake/modules/ocaml.cmake 2009-09-20 19:23:02 UTC (rev 10440) +++ trunk/cmake/modules/ocaml.cmake 2009-09-20 20:26:41 UTC (rev 10441) @@ -32,28 +32,6 @@ endif(ENABLE_ocaml AND NOT BUILD_SHARED_LIBS) if(ENABLE_ocaml) - find_program(OCAMLBUILD ocamlbuild) - if (OCAMLBUILD) - message(STATUS "OCAMLBUILD = ${OCAMLBUILD}") - else (OCAMLBUILD) - message(STATUS "WARNING: " - "ocamlbuild not found. Disabling ocaml bindings") - set(ENABLE_ocaml OFF CACHE BOOL "Enable OCaml bindings" FORCE) - endif (OCAMLBUILD) -endif(ENABLE_ocaml) - -if(ENABLE_ocaml) - find_program(OCAMLFIND ocamlfind) - if (OCAMLFIND) - message(STATUS "OCAMLFIND = ${OCAMLFIND}") - else (OCAMLFIND) - message(STATUS "WARNING:" - "ocamlfind not found. Disabling ocaml bindings") - set(ENABLE_ocaml OFF CACHE BOOL "Enable OCaml bindings" FORCE) - endif (OCAMLFIND) -endif(ENABLE_ocaml) - -if(ENABLE_ocaml) find_program(OCAMLC ocamlc) if (OCAMLC) message(STATUS "OCAMLC = ${OCAMLC}") @@ -76,6 +54,28 @@ endif(ENABLE_ocaml) if(ENABLE_ocaml) + find_program(OCAMLMKLIB ocamlmklib) + if (OCAMLMKLIB) + message(STATUS "OCAMLMKLIB = ${OCAMLMKLIB}") + else (OCAMLMKLIB) + message(STATUS "WARNING:" + "ocamlmklib not found. Disabling ocaml bindings") + set(ENABLE_ocaml OFF CACHE BOOL "Enable OCaml bindings" FORCE) + endif (OCAMLMKLIB) +endif(ENABLE_ocaml) + +if(ENABLE_ocaml) + find_program(OCAMLOPT ocamlopt) + if (OCAMLOPT) + message(STATUS "OCAMLOPT = ${OCAMLOPT}") + else (OCAMLOPT) + message(STATUS "WARNING:" + "ocamlopt not found. Disabling ocaml bindings") + set(ENABLE_ocaml OFF CACHE BOOL "Enable OCaml bindings" FORCE) + endif (OCAMLOPT) +endif(ENABLE_ocaml) + +if(ENABLE_ocaml) execute_process(COMMAND ${OCAMLC} -version OUTPUT_VARIABLE OCAML_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2009-09-20 22:08:32
|
Revision: 10442 http://plplot.svn.sourceforge.net/plplot/?rev=10442&view=rev Author: airwin Date: 2009-09-20 22:08:21 +0000 (Sun, 20 Sep 2009) Log Message: ----------- As a convenience to help build the ocaml bindings, implement the GENERATE_PLPLOT_H_INC option (which defaults to OFF). If this option is set ON by the ocaml developer, then checks are made that all the proper extra required ocaml components are installed, and a custom target is made which generates generated_plplot_h.inc. That file should be the same as plplot_h.inc that occurs in the source tree. However, if it is not, a knowledgable ocaml developer should be able to adjust plplot_h or touchup.ml in the source tree to achieve consistency between the generated and source tree versions of plplot_h.inc. Of course, if those two files are fine, then there is always the option of overwriting the source code version of plplot_h.inc with the generated version to achieve the desired consistency. Modified Paths: -------------- trunk/bindings/ocaml/CMakeLists.txt trunk/cmake/modules/ocaml.cmake Modified: trunk/bindings/ocaml/CMakeLists.txt =================================================================== --- trunk/bindings/ocaml/CMakeLists.txt 2009-09-20 20:26:41 UTC (rev 10441) +++ trunk/bindings/ocaml/CMakeLists.txt 2009-09-20 22:08:21 UTC (rev 10442) @@ -22,6 +22,31 @@ if(ENABLE_ocaml) + # optional command to generate generated_plplot_h.inc. This generated + # version of the file should be identical to plplot_h.inc. + if(GENERATE_PLPLOT_H_INC) + # N.B. remove the first OUTPUT file and all the copy_if_different and + # remove commands once touchup.ml is changed to have multi-directory + # capability. + add_custom_command( + OUTPUT + ${CMAKE_CURRENT_BINARY_DIR}/plplot_h + ${CMAKE_CURRENT_BINARY_DIR}/generated_plplot_h.inc + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/plplot_h ${CMAKE_CURRENT_BINARY_DIR}/plplot_h + COMMAND ${OCAML} ${CMAKE_CURRENT_SOURCE_DIR}/touchup.ml + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/plplot_h.inc ${CMAKE_CURRENT_BINARY_DIR}/generated_plplot_h.inc + COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_BINARY_DIR}/plplot_h.inc + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/plplot_h + ${CMAKE_CURRENT_SOURCE_DIR}/touchup.ml + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + add_custom_target(generate_plplot_h.inc + DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/generated_plplot_h.inc + ) + endif(GENERATE_PLPLOT_H_INC) + #Detailed CMake logic to build ocaml bindings for PLplot. set(camlidl_GENERATED_SOURCE ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.h Modified: trunk/cmake/modules/ocaml.cmake =================================================================== --- trunk/cmake/modules/ocaml.cmake 2009-09-20 20:26:41 UTC (rev 10441) +++ trunk/cmake/modules/ocaml.cmake 2009-09-20 22:08:21 UTC (rev 10442) @@ -101,3 +101,46 @@ ) endif(ENABLE_ocaml) + +if(ENABLE_ocaml) + option(GENERATE_PLPLOT_H_INC "Generate generated_plplot_h.inc" OFF) + + if(GENERATE_PLPLOT_H_INC) + find_program(OCAML ocaml) + if (OCAML) + message(STATUS "OCAML = ${OCAML}") + else (OCAML) + message(STATUS "WARNING:" + "ocaml not found. Disabling generation of generated_plplot_h.inc") + set(GENERATE_PLPLOT_H_INC OFF CACHE BOOL "Generate generated_plplot_h.inc" FORCE) + endif (OCAML) + endif(GENERATE_PLPLOT_H_INC) + + # Test for availability of topfind and pcre (and unix). + if(GENERATE_PLPLOT_H_INC) + set(text +"#use \"topfind\";; +#require \"unix\";; +#require \"pcre\";; +" + ) + file(WRITE ${CMAKE_BINARY_DIR}/test_ocaml.ml ${text}) + # For some reason the return code is not set if an error occurs + # with test_ocaml.ml so look for any stdout or stderr output as a sign + # of an error condition. + execute_process( + COMMAND ${OCAML} test_ocaml.ml + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + OUTPUT_VARIABLE output + ERROR_VARIABLE error + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + if(output OR error) + message(STATUS "WARNING:" + "One or all of topfind, unix, or pcre components of ocaml are not installed. Disabling generation of generated_plplot_h.inc") + set(GENERATE_PLPLOT_H_INC OFF CACHE BOOL "Generate generated_plplot_h.inc" FORCE) + endif(output OR error) + + endif(GENERATE_PLPLOT_H_INC) +endif(ENABLE_ocaml) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2009-09-21 07:43:17
|
Revision: 10447 http://plplot.svn.sourceforge.net/plplot/?rev=10447&view=rev Author: smekal Date: 2009-09-21 07:42:59 +0000 (Mon, 21 Sep 2009) Log Message: ----------- Added configuration file for Doxygen. Changed plpage.c so that the source can be parsed by Doxygen (as an example what changes would be needed). Modified Paths: -------------- trunk/src/plpage.c Added Paths: ----------- trunk/Doxyfile Added: trunk/Doxyfile =================================================================== --- trunk/Doxyfile (rev 0) +++ trunk/Doxyfile 2009-09-21 07:42:59 UTC (rev 10447) @@ -0,0 +1,1557 @@ +# Doxyfile 1.6.1 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = PLplot + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = 5.9.6 + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = ./doc/code + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. Note that for custom extensions you also need to set +# FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command <command> <input-file>, where <command> is the value of +# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = ./src + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.d \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.cs \ + *.php \ + *.php3 \ + *.inc \ + *.m \ + *.mm \ + *.dox \ + *.py \ + *.f90 \ + *.f \ + *.vhd \ + *.vhdl + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command <filter> <input-file>, where <filter> +# is the value of the INPUT_FILTER tag, and <input-file> is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = YES + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# When the SEARCHENGINE tag is enable doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) +# there is already a search function so this one should typically +# be disabled. + +SEARCHENGINE = YES + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that... [truncated message content] |
From: <hez...@us...> - 2009-09-21 18:30:20
|
Revision: 10448 http://plplot.svn.sourceforge.net/plplot/?rev=10448&view=rev Author: hezekiahcarty Date: 2009-09-21 18:30:09 +0000 (Mon, 21 Sep 2009) Log Message: ----------- Support systems without ocamlopt; Build examples with ocamlopt when available PLplot's OCaml support will now build if ocamlopt is not present. The ocamlopt compiler is not available for as many OS and architecture combinations as ocamlc. The build-tree examples are now built with ocamlopt when it is available. This produces slightly faster executables, though there isn't much of a difference for most of the examples since most of the execution time for the examples is spent in the C plotting functions. Finally, the native code versions of the OCaml compilers, ocamlc.opt and ocamlopt.opt, are used if they are available. This provides a significant speedup in compilation of the OCaml bindings and examples. Modified Paths: -------------- trunk/bindings/ocaml/CMakeLists.txt trunk/cmake/modules/ocaml.cmake trunk/examples/ocaml/CMakeLists.txt Modified: trunk/bindings/ocaml/CMakeLists.txt =================================================================== --- trunk/bindings/ocaml/CMakeLists.txt 2009-09-21 07:42:59 UTC (rev 10447) +++ trunk/bindings/ocaml/CMakeLists.txt 2009-09-21 18:30:09 UTC (rev 10448) @@ -4,6 +4,7 @@ # # # Copyright (C) 2008 Andrew Ross +# Copyright (C) 2009 Hezekiah M. Carty # # This file is part of PLplot. # @@ -26,7 +27,7 @@ # version of the file should be identical to plplot_h.inc. if(GENERATE_PLPLOT_H_INC) add_custom_command( - OUTPUT + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated_plplot_h.inc COMMAND ${OCAML} ${CMAKE_CURRENT_SOURCE_DIR}/touchup.ml ${CMAKE_CURRENT_SOURCE_DIR}/plplot_h ${CMAKE_CURRENT_BINARY_DIR}/generated_plplot_h.inc DEPENDS @@ -49,10 +50,10 @@ ) add_custom_command( - OUTPUT + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.idl ${camlidl_GENERATED_SOURCE} - # camlidl source file must be in ${CMAKE_CURRENT_BINARY_DIR}. + # camlidl source file must be in ${CMAKE_CURRENT_BINARY_DIR}. COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/plplot_core.idl ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.idl COMMAND ${CAMLIDL} -header -I ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.idl DEPENDS @@ -81,7 +82,7 @@ ) add_custom_command( - OUTPUT + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmi ${CMAKE_CURRENT_BINARY_DIR}/plplot.mli ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmi @@ -98,21 +99,40 @@ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmi ) + # ocamlc add_custom_command( - OUTPUT + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo + ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmo + COMMAND ${OCAMLC} -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.ml + # ocamlc and ocamlopt *.ml source file must be in + # ${CMAKE_CURRENT_BINARY_DIR}. + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/plplot.ml ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml + COMMAND ${OCAMLC} -c ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml + DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.ml + ${CMAKE_CURRENT_SOURCE_DIR}/plplot.ml + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmi + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmi + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + add_custom_target(target_plplot_core_cmo + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo + ) + + # ocamlopt + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmx ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.o ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmo ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmx ${CMAKE_CURRENT_BINARY_DIR}/plplot.o - COMMAND ${OCAMLC} -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.ml COMMAND ${OCAMLOPT} -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.ml - # ocamlc and ocamlopt *.ml source file must be in + # ocamlc and ocamlopt *.ml source file must be in # ${CMAKE_CURRENT_BINARY_DIR}. COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/plplot.ml ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml - COMMAND ${OCAMLC} -c ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml COMMAND ${OCAMLOPT} -c ${CMAKE_CURRENT_BINARY_DIR}/plplot.ml DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.ml @@ -121,41 +141,56 @@ ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmi WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) - add_custom_target(target_plplot_core_cmo - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo + add_custom_target(target_plplot_core_cmx + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmx ) + # ocamlc add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa - ${CMAKE_CURRENT_BINARY_DIR}/plplot.a COMMAND ${OCAMLC} -a -custom -o ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmo -dllib -lplplot_stubs -ccopt -L${CMAKE_CURRENT_BINARY_DIR} -cclib -lplplot_stubs -ccopt -L${CAMLIDL_LIB_DIR} -cclib -lcamlidl -ccopt -L${CMAKE_BINARY_DIR}/src -cclib -lplplot${LIB_TAG} -dllpath ${CMAKE_BINARY_DIR}/src - COMMAND ${OCAMLOPT} -a -o ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmx ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmx -ccopt -L${CMAKE_CURRENT_BINARY_DIR} -cclib -lplplot_stubs -ccopt -L${CAMLIDL_LIB_DIR} -cclib -lcamlidl -ccopt -L${CMAKE_BINARY_DIR}/src -cclib -lplplot${LIB_TAG} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmo ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmo - ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmx - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmx WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) add_custom_target(target_plplot_cma DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma + ) + + # ocamlopt + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa + ${CMAKE_CURRENT_BINARY_DIR}/plplot.a + COMMAND ${OCAMLOPT} -a -o ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmx ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmx -ccopt -L${CMAKE_CURRENT_BINARY_DIR} -cclib -lplplot_stubs -ccopt -L${CAMLIDL_LIB_DIR} -cclib -lcamlidl -ccopt -L${CMAKE_BINARY_DIR}/src -cclib -lplplot${LIB_TAG} + DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/plplot_core.cmx + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmx + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) + add_custom_target(target_plplot_cmxa + DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa + ) # These targets depend on common files in their respective # file-dependency chains. Therefore, to avoid screwing up parallel - # builds must serialize with target depends. + # builds must serialize with target depends. add_dependencies(target_plplot_core_cmi target_lib_plplot_stubs) + # ocamlc add_dependencies(target_plplot_core_cmo target_plplot_core_cmi) add_dependencies(target_plplot_cma target_plplot_core_cmo) + # ocamlopt + add_dependencies(target_plplot_core_cmx target_plplot_core_cmi) + add_dependencies(target_plplot_cmxa target_plplot_core_cmx) # Basic build done, now trying to finish up by adapting bits # and pieces of old build procedure below. - - # Configure the META file + + # Configure the META file # Configure pkg-config *.pc file corresponding to plplot.cma if(PKG_CONFIG_EXECUTABLE) if(LIB_TAG) @@ -169,7 +204,7 @@ # BINDING - ENABLE_${BINDING} keeps track of whether a # binding has been enabled (ON) or not (OFF). # Also, ${BINDING} used to determine PC_FILE_SUFFIX - # which helps to determine name of configured + # which helps to determine name of configured # *.pc file. # PC_SHORT_NAME - Used in *.pc NAME: field # PC_LONG_NAME - Used in *.pc Description: field @@ -201,29 +236,42 @@ endif(PKG_CONFIG_EXECUTABLE) add_custom_target(plplot_ocaml ALL) - add_dependencies(plplot_ocaml target_plplot_cma) + if (OCAMLOPT) + add_dependencies(plplot_ocaml target_plplot_cma target_plplot_cmxa) + else (OCAMLOPT) + add_dependencies(plplot_ocaml target_plplot_cma) + endif (OCAMLOPT) # Need to keep track of file dependencies since this is a custom target. set_property(GLOBAL PROPERTY FILES_plplot_ocaml ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa - ${CMAKE_CURRENT_BINARY_DIR}/plplot.a ) - + if (OCAMLOPT) + set_property(GLOBAL APPEND PROPERTY FILES_plplot_ocaml + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa + ${CMAKE_CURRENT_BINARY_DIR}/plplot.a + ) + endif (OCAMLOPT) + set(OCAML_FULL_INSTALL_FILES ${CMAKE_CURRENT_BINARY_DIR}/plplot.cma - ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa - ${CMAKE_CURRENT_BINARY_DIR}/plplot.a ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmi ${CMAKE_CURRENT_BINARY_DIR}/libplplot_stubs.a ${CMAKE_CURRENT_BINARY_DIR}/plplot.mli ) - + if (OCAMLOPT) + set(OCAML_FULL_INSTALL_FILES + ${OCAML_FULL_INSTALL_FILES} + ${CMAKE_CURRENT_BINARY_DIR}/plplot.cmxa + ${CMAKE_CURRENT_BINARY_DIR}/plplot.a + ) + endif (OCAMLOPT) + # Most files go in the plplot subdirectory install(FILES ${OCAML_FULL_INSTALL_FILES} ${CMAKE_CURRENT_BINARY_DIR}/META DESTINATION ${OCAML_INSTALL_DIR}/plplot ) - + # Shared library stubs go in stublibs install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/dllplplot_stubs.so DESTINATION ${OCAML_INSTALL_DIR}/stublibs Modified: trunk/cmake/modules/ocaml.cmake =================================================================== --- trunk/cmake/modules/ocaml.cmake 2009-09-21 07:42:59 UTC (rev 10447) +++ trunk/cmake/modules/ocaml.cmake 2009-09-21 18:30:09 UTC (rev 10448) @@ -1,6 +1,7 @@ # cmake/modules/ocaml.cmake # # Copyright (C) 2008 Andrew Ross +# Copyright (C) 2009 Hezekiah M. Carty # # This file is part of PLplot. # @@ -32,7 +33,7 @@ endif(ENABLE_ocaml AND NOT BUILD_SHARED_LIBS) if(ENABLE_ocaml) - find_program(OCAMLC ocamlc) + find_program(OCAMLC NAMES ocamlc.opt ocamlc) if (OCAMLC) message(STATUS "OCAMLC = ${OCAMLC}") else (OCAMLC) @@ -65,13 +66,12 @@ endif(ENABLE_ocaml) if(ENABLE_ocaml) - find_program(OCAMLOPT ocamlopt) + find_program(OCAMLOPT NAMES ocamlopt.opt ocamlopt) if (OCAMLOPT) message(STATUS "OCAMLOPT = ${OCAMLOPT}") else (OCAMLOPT) message(STATUS "WARNING:" - "ocamlopt not found. Disabling ocaml bindings") - set(ENABLE_ocaml OFF CACHE BOOL "Enable OCaml bindings" FORCE) + "ocamlopt not found. Disabling native code OCaml bindings") endif (OCAMLOPT) endif(ENABLE_ocaml) @@ -93,7 +93,7 @@ "camlidl library not found. Disabling ocaml bindings") set(ENABLE_ocaml OFF CACHE BOOL "Enable OCaml bindings" FORCE) endif(CAMLIDL_LIB_DIR) - + # Installation follows the Debian ocaml policy for want of a better # standard. set(OCAML_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib/ocaml/${OCAML_VERSION} @@ -141,6 +141,6 @@ "One or all of topfind, unix, or pcre components of ocaml are not installed. Disabling generation of generated_plplot_h.inc") set(GENERATE_PLPLOT_H_INC OFF CACHE BOOL "Generate generated_plplot_h.inc" FORCE) endif(output OR error) - + endif(GENERATE_PLPLOT_H_INC) endif(ENABLE_ocaml) Modified: trunk/examples/ocaml/CMakeLists.txt =================================================================== --- trunk/examples/ocaml/CMakeLists.txt 2009-09-21 07:42:59 UTC (rev 10447) +++ trunk/examples/ocaml/CMakeLists.txt 2009-09-21 18:30:09 UTC (rev 10448) @@ -5,6 +5,7 @@ # # Copyright (C) 2008 Andrew Ross # Copyright (C) 2009 Alan W. Irwin +# Copyright (C) 2009 Hezekiah M. Carty # # This file is part of PLplot. # @@ -89,6 +90,17 @@ endif(CORE_BUILD) if(BUILD_TEST) + # Default to using ocaml if ocamlopt is not available. Make sure the proper + # files are cleaned up after a build, depending on the compiler used. + set(ocaml_lib_extension cma) + set(ocaml_cleanup_extensions cmo cmi) + set(ocaml_compiler ${OCAMLC}) + if (OCAMLOPT) + set(ocaml_lib_extension cmxa) + set(ocaml_cleanup_extensions cmx cmi o) + set(ocaml_compiler ${OCAMLOPT}) + endif (OCAMLOPT) + set(ocaml_EXTRA_CLEAN_FILES) if(CORE_BUILD) set(I_OPTION ${CMAKE_BINARY_DIR}/bindings/ocaml) @@ -104,11 +116,13 @@ foreach(STRING_INDEX ${ocaml_STRING_INDICES}) set(EXECUTABLE_NAME x${STRING_INDEX}ocaml) set(SOURCE_FILE x${STRING_INDEX}.ml) - set(ocaml_EXTRA_CLEAN_FILES ${ocaml_EXTRA_CLEAN_FILES} x${STRING_INDEX}.cmo x${STRING_INDEX}.cmi) - # Copy source code to build tree since ocamlc is a bit broken and will + foreach(EXTENSION ${ocaml_cleanup_extensions}) + set(ocaml_EXTRA_CLEAN_FILES ${ocaml_EXTRA_CLEAN_FILES} x${STRING_INDEX}.${EXTENSION}) + endforeach(EXTENSION ocaml_cleanup_extensions) + # Copy source code to build tree since ocamlc is a bit broken and will # otherwise litter the source tree with intermediate files if(STRING_INDEX STREQUAL "17") - set(unix_bytecode_lib unix.cma) + set(unix_bytecode_lib unix.${ocaml_lib_extension}) else(STRING_INDEX STREQUAL "17") set(unix_bytecode_lib) endif(STRING_INDEX STREQUAL "17") @@ -121,13 +135,13 @@ ) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE_NAME} - COMMAND ${OCAMLC} + COMMAND ${ocaml_compiler} -g -I ${I_OPTION} -ccopt ${ccopt_OPTION} - plplot.cma + plplot.${ocaml_lib_extension} ${unix_bytecode_lib} - -o ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE_NAME} + -o ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_FILE} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_FILE} @@ -136,7 +150,7 @@ VERBATIM ) add_custom_target( - target_${EXECUTABLE_NAME} ALL + target_${EXECUTABLE_NAME} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE_NAME} ) if(CORE_BUILD) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2009-09-22 00:36:27
|
Revision: 10451 http://plplot.svn.sourceforge.net/plplot/?rev=10451&view=rev Author: airwin Date: 2009-09-22 00:36:17 +0000 (Tue, 22 Sep 2009) Log Message: ----------- Change name of Doxyfile in preparation for it to be the configuration template for Doxyfile. Added Paths: ----------- trunk/Doxyfile.in Removed Paths: ------------- trunk/Doxyfile Deleted: trunk/Doxyfile =================================================================== --- trunk/Doxyfile 2009-09-21 21:02:38 UTC (rev 10450) +++ trunk/Doxyfile 2009-09-22 00:36:17 UTC (rev 10451) @@ -1,1557 +0,0 @@ -# Doxyfile 1.6.1 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = PLplot - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = 5.9.6 - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = ./doc/code - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, -# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it parses. -# With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this tag. -# The format is ext=language, where ext is a file extension, and language is one of -# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, -# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat -# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), -# use: inc=Fortran f=C. Note that for custom extensions you also need to set -# FILE_PATTERNS otherwise the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. - -TYPEDEF_HIDES_STRUCT = NO - -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penality. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will rougly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols - -SYMBOL_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespace are hidden. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen -# will sort the (brief and detailed) documentation of class members so that -# constructors and destructors are listed first. If set to NO (the default) -# the constructors will appear in the respective orders defined by -# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. -# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO -# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command <command> <input-file>, where <command> is the value of -# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by -# doxygen. The layout file controls the global structure of the generated output files -# in an output format independent way. The create the layout file that represents -# doxygen's defaults, run doxygen with the -l option. You can optionally specify a -# file name after the option, if omitted DoxygenLayout.xml will be used as the name -# of the layout file. - -LAYOUT_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = ./src - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 - -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.py \ - *.f90 \ - *.f \ - *.vhd \ - *.vhdl - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command <filter> <input-file>, where <filter> -# is the value of the INPUT_FILTER tag, and <input-file> is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentation. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). - -HTML_DYNAMIC_SECTIONS = NO - -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER -# are set, an additional index file will be generated that can be used as input for -# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated -# HTML documentation. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace - -QHP_NAMESPACE = - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders - -QHP_VIRTUAL_FOLDER = doc - -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. -# For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see -# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's -# filter section matches. -# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>. - -QHP_SECT_FILTER_ATTRS = - -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. - -QHG_LOCATION = - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to YES, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). -# Windows users are probably better off using the HTML help feature. - -GENERATE_TREEVIEW = YES - -# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, -# and Class Hierarchy pages using a tree view instead of an ordered list. - -USE_INLINE_TREES = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. - -FORMULA_FONTSIZE = 10 - -# When the SEARCHENGINE tag is enable doxygen will generate a search box -# for the HTML output. The underlying search engine uses javascript -# and DHTML and should work on any modern browser. Note that when using -# HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) -# there is already a search function so this one should typically -# be disabled. - -SEARCHENGINE = YES - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = YES - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = YES - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -# If LATEX_SOURCE_CODE is set to YES then doxygen will include -# source code with syntax highlighting in the LaTeX output. -# Note that which sources are shown also depends on other settings -# such as SOURCE_BROWSER. - -LATEX_SOURCE_CODE = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# By default doxygen will write a font called FreeSans.ttf to the output -# directory and reference it in all dot files that doxygen generates. This -# font does not includ... [truncated message content] |
From: <ai...@us...> - 2009-09-22 00:41:00
|
Revision: 10452 http://plplot.svn.sourceforge.net/plplot/?rev=10452&view=rev Author: airwin Date: 2009-09-22 00:40:50 +0000 (Tue, 22 Sep 2009) Log Message: ----------- Move this configuration template file to the appropriate directory. Added Paths: ----------- trunk/doc/Doxyfile.in Removed Paths: ------------- trunk/Doxyfile.in Deleted: trunk/Doxyfile.in =================================================================== --- trunk/Doxyfile.in 2009-09-22 00:36:17 UTC (rev 10451) +++ trunk/Doxyfile.in 2009-09-22 00:40:50 UTC (rev 10452) @@ -1,1557 +0,0 @@ -# Doxyfile 1.6.1 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = PLplot - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = 5.9.6 - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = ./doc/code - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, -# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it parses. -# With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this tag. -# The format is ext=language, where ext is a file extension, and language is one of -# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, -# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat -# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), -# use: inc=Fortran f=C. Note that for custom extensions you also need to set -# FILE_PATTERNS otherwise the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. - -TYPEDEF_HIDES_STRUCT = NO - -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penality. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will rougly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols - -SYMBOL_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespace are hidden. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen -# will sort the (brief and detailed) documentation of class members so that -# constructors and destructors are listed first. If set to NO (the default) -# the constructors will appear in the respective orders defined by -# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. -# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO -# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command <command> <input-file>, where <command> is the value of -# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by -# doxygen. The layout file controls the global structure of the generated output files -# in an output format independent way. The create the layout file that represents -# doxygen's defaults, run doxygen with the -l option. You can optionally specify a -# file name after the option, if omitted DoxygenLayout.xml will be used as the name -# of the layout file. - -LAYOUT_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = ./src - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 - -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.py \ - *.f90 \ - *.f \ - *.vhd \ - *.vhdl - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command <filter> <input-file>, where <filter> -# is the value of the INPUT_FILTER tag, and <input-file> is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentation. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). - -HTML_DYNAMIC_SECTIONS = NO - -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER -# are set, an additional index file will be generated that can be used as input for -# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated -# HTML documentation. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace - -QHP_NAMESPACE = - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders - -QHP_VIRTUAL_FOLDER = doc - -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. -# For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see -# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's -# filter section matches. -# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>. - -QHP_SECT_FILTER_ATTRS = - -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. - -QHG_LOCATION = - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to YES, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). -# Windows users are probably better off using the HTML help feature. - -GENERATE_TREEVIEW = YES - -# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, -# and Class Hierarchy pages using a tree view instead of an ordered list. - -USE_INLINE_TREES = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. - -FORMULA_FONTSIZE = 10 - -# When the SEARCHENGINE tag is enable doxygen will generate a search box -# for the HTML output. The underlying search engine uses javascript -# and DHTML and should work on any modern browser. Note that when using -# HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) -# there is already a search function so this one should typically -# be disabled. - -SEARCHENGINE = YES - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = YES - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = YES - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -# If LATEX_SOURCE_CODE is set to YES then doxygen will include -# source code with syntax highlighting in the LaTeX output. -# Note that which sources are shown also depends on other settings -# such as SOURCE_BROWSER. - -LATEX_SOURCE_CODE = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# By default doxygen will write a font called FreeSans.ttf to the output -# directory and reference it in all dot files that doxygen generates. This -# font does not include all pos... [truncated message content] |
From: <ai...@us...> - 2009-09-22 01:38:41
|
Revision: 10454 http://plplot.svn.sourceforge.net/plplot/?rev=10454&view=rev Author: airwin Date: 2009-09-22 01:38:35 +0000 (Tue, 22 Sep 2009) Log Message: ----------- Implement a doxygen_built target (which builds all our doxygen documentation in doc/doxygen in the build tree) if the cmake command-line option -DBUILD_DOX_DOC=ON is set (this options defaults to OFF). I have set up the build system so that "make clean" removes the doc/doxygen directory in the build tree and "make all" (or "make" or "make doxygen_built") builds that documentation. Modified Paths: -------------- trunk/cmake/modules/plplot.cmake trunk/doc/CMakeLists.txt trunk/doc/Doxyfile.in Added Paths: ----------- trunk/cmake/modules/doxygen.cmake Added: trunk/cmake/modules/doxygen.cmake =================================================================== --- trunk/cmake/modules/doxygen.cmake (rev 0) +++ trunk/cmake/modules/doxygen.cmake 2009-09-22 01:38:35 UTC (rev 10454) @@ -0,0 +1,32 @@ +# cmake/modules/plplot.cmake +# +# Copyright (C) 2006, 2007, 2008, 2009 Alan W. Irwin +# +# This file is part of PLplot. +# +# PLplot is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published +# by the Free Software Foundation; version 2 of the License. +# +# PLplot is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public License +# along with the file PLplot; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +# Module file to decide whether to build doxygen documentation and +# and, if so, find the necessary doxygen command. + +option(BUILD_DOX_DOC "Build doxygen documentation" OFF) + +if(BUILD_DOX_DOC) + find_package(Doxygen) + if(NOT DOXYGEN_FOUND) + message(STATUS "WARNING: " + "Cannot find doxygen so disabling doxygen documentation build.") + set(BUILD_DOX_DOC OFF CACHE BOOL "Build doxygen documentation" FORCE) + endif(NOT DOXYGEN_FOUND) +endif(BUILD_DOX_DOC) Property changes on: trunk/cmake/modules/doxygen.cmake ___________________________________________________________________ Added: svn:eol-style + native Modified: trunk/cmake/modules/plplot.cmake =================================================================== --- trunk/cmake/modules/plplot.cmake 2009-09-22 01:29:46 UTC (rev 10453) +++ trunk/cmake/modules/plplot.cmake 2009-09-22 01:38:35 UTC (rev 10454) @@ -461,6 +461,7 @@ # Miscellaneous other features - including docbook documentation # ======================================================================= include(docbook) +include(doxygen) include(summary) Modified: trunk/doc/CMakeLists.txt =================================================================== --- trunk/doc/CMakeLists.txt 2009-09-22 01:29:46 UTC (rev 10453) +++ trunk/doc/CMakeLists.txt 2009-09-22 01:38:35 UTC (rev 10454) @@ -1,7 +1,11 @@ +# Process documentation for the PLplot project. + +# Process man pages in this subdirectory. + set(core_manpages plm2gif.1 plpr.1 pltek.1) if(PLD_pstex) - set(core_manpages ${core_manpages} pstex2eps.1) + set(core_manpages ${core_manpages} pstex2eps.1) endif(PLD_pstex) if(PLD_plmeta) @@ -15,6 +19,33 @@ set(manpages ${manpages} ${tcl_manpages}) endif (ENABLE_tcl) -add_subdirectory( docbook ) +install(FILES ${manpages} DESTINATION ${MAN_DIR}/man1) -install(FILES ${manpages} DESTINATION ${MAN_DIR}/man1) +# Process the docbook documentation. +add_subdirectory(docbook) + +# Process the doxygen documentation. + +if(BUILD_DOX_DOC) + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in + ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + @ONLY + ) + + # Notes: OUTPUT file is a directory so this insures "make clean" + # removes that directory. This command depends on all sourcefiles, + # but do not keep track of those dependencies. Instead, use a + # dependency on the Doxyfile configured above simply to make sure + # this command is only run once (initially or after "make clean"). + add_custom_command( + OUTPUT + ${CMAKE_CURRENT_BINARY_DIR}/doxygen + COMMAND ${DOXYGEN_EXECUTABLE} + DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + ) + add_custom_target(doxygen_built ALL + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/doxygen + ) +endif(BUILD_DOX_DOC) Modified: trunk/doc/Doxyfile.in =================================================================== --- trunk/doc/Doxyfile.in 2009-09-22 01:29:46 UTC (rev 10453) +++ trunk/doc/Doxyfile.in 2009-09-22 01:38:35 UTC (rev 10454) @@ -38,7 +38,7 @@ # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = ./doc/code +OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/doc/doxygen # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output @@ -584,7 +584,7 @@ # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = ./src +INPUT = @CMAKE_SOURCE_DIR@/src # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2009-09-23 14:14:03
|
Revision: 10461 http://plplot.svn.sourceforge.net/plplot/?rev=10461&view=rev Author: airwin Date: 2009-09-23 14:13:53 +0000 (Wed, 23 Sep 2009) Log Message: ----------- Massive commit to delete old, unused code from svn trunk as discussed on list. All these legacy files are preserved in tags/v_5_9_5 and many previous releases. Removed Paths: ------------- trunk/drivers/gnome.c trunk/drivers/next.c trunk/drivers/xwinttf.c trunk/old/ trunk/sys/dos/bcc/ trunk/sys/dos/emx/ trunk/sys/dos/msc/ trunk/sys/mac/ trunk/sys/os2/ trunk/sys/unix/ trunk/sys/win32/ Deleted: trunk/drivers/gnome.c =================================================================== --- trunk/drivers/gnome.c 2009-09-23 13:16:55 UTC (rev 10460) +++ trunk/drivers/gnome.c 2009-09-23 14:13:53 UTC (rev 10461) @@ -1,1441 +0,0 @@ -/* $Id$ - - PLplot GnomeCanvas device driver. - - Copyright (C) 2004 Rafael Laboissiere - - This file is part of PLplot. - - PLplot is free software; you can redistribute it and/or modify - it under the terms of the GNU General Library Public License as published - by the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - PLplot is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with PLplot; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -*/ - -#include "plDevs.h" - -#ifdef PLD_gnome - -#include "plplotP.h" -#include "drivers.h" - -#include <gtk/gtk.h> -#include <glib.h> -#include <pthread.h> -#include <math.h> - -#include <gnome.h> - -#include <unistd.h> - -/* Device info */ -PLDLLIMPEXP_DRIVER const char* plD_DEVICE_INFO_gnome = "gnome:Gnome Canvas:1:gnome:6:gnome\n"; - -/*#undef DEBUG*/ -#define DEBUG - -#undef ANTIALISED_CANVAS - -/* Physical dimensions */ - -/* Unit of drawing (1/360 in). Corresponds to the pen widht = 1 */ -#define DRAWING_UNIT (0.0027777778) - -/* How many pixels in a drawing unit (defualt value) */ -#define PIXELS_PER_DU (0.2) - -/* mm per inch */ -#define MM_PER_IN (25.4) - -/* pixels per mm */ -#define PIXELS_PER_MM (PIXELS_PER_DU / DRAWING_UNIT / MM_PER_IN) - -/* Default dimensions of the canvas (in inches) */ -#define WIDTH (9) -#define HEIGHT (6.5) - -/* Magnification factor for the PLplot physical dimensions */ -#define MAG_FACTOR 10 - -#define BUFFER_LEN 128 - -#ifndef ABS -#define ABS(x) ((x < 0) ? (-(x)) : (x)) -#endif - -void -debug (char* msg) -{ -#ifdef DEBUG - printf (msg); - fflush (stdout); -#endif -} - -G_LOCK_DEFINE_STATIC (canvas); - -static pthread_t tid; - -static guint gnome_is_initialized = FALSE; - -/*// FIXME : Terrible global variable hack*/ -static GtkStatusbar* sb; - -typedef enum { - GNOME_PLDEV_LOCATE_MODE, - GNOME_PLDEV_ZOOM_MODE, - GNOME_PLDEV_NONE_MODE -} GnomePLdevCanvasMode; - -typedef struct { - guint cmap; - gdouble color; -} ItemColor; - -typedef struct { - GtkScrolledWindow* sw; - GnomeCanvas* canvas; - GnomePLdevCanvasMode mode; - GnomeCanvasItem* hlocline; - double hpos; - GnomeCanvasItem* vlocline; - double vpos; - GnomeCanvasItem* zoomrect; - PLGraphicsIn gin; - guint context; - GtkAdjustment* hadj; - GtkAdjustment* vadj; - double width; - double height; - double ppu; - short bufx[1024]; - short bufy[1024]; - guint bufc; - PLINT curcolor; - PLINT curwidth; -} GnomePLdevPage; - -typedef struct { - GtkWidget* parent; - GtkWidget* root; - GtkNotebook* notebook; - GtkStatusbar* statusbar; - guint npages; - GnomePLdevPage** page; - guint parent_is_from_driver; - PLINT pattern; - GdkBitmap* pattern_stipple[2]; -} GnomePLdev; - -void -gnome_pldev_adopt (PLStream* pls, GtkContainer* parent) -{ - GnomePLdev* dev = pls->dev; - GtkWidget* root; - - if (dev->parent_is_from_driver) { - root = dev->root; - gtk_object_ref (GTK_OBJECT (root)); - gtk_container_remove (GTK_CONTAINER (dev->parent), root); - gtk_widget_destroy (dev->parent); - dev->parent_is_from_driver = FALSE; - } - gtk_container_add (parent, root); - dev->parent = GTK_WIDGET (parent); - gtk_object_unref (GTK_OBJECT (root)); -} - -static guint timeout_id; - -static gint -canvas_timeout (gpointer dev) -{ - guint i; - - for (i = 0; i < ((GnomePLdev*) dev)->npages ; i++) - ((GnomePLdev*) dev)->page[i]->canvas->need_update = TRUE; - - return FALSE; -} - -static void -timeout_register (GnomeCanvas* canvas, GnomePLdev* dev) -{ - /*// gtk_timeout_remove (timeout_id);*/ - /*// canvas->need_update = FALSE;*/ - /*// timeout_id = gtk_timeout_add (100, canvas_timeout, dev);*/ -} - -static -void change_mode (GnomePLdevPage* page, GnomePLdevCanvasMode mode) -{ - guint context = page->context; - - page->mode = mode; - - switch (mode) { - case GNOME_PLDEV_LOCATE_MODE: - /*// FIXME : Terrible global variable hack*/ - gtk_statusbar_pop (sb, context); - /*// FIXME : Terrible global variable hack*/ - gtk_statusbar_push (sb, context, "Locate Mode"); - break; - case GNOME_PLDEV_ZOOM_MODE: - /*// FIXME : Terrible global variable hack*/ - gtk_statusbar_pop (sb, context); - /*// FIXME : Terrible global variable hack*/ - gtk_statusbar_push (sb, context, "Zoom Mode"); - break; - default: - break; - } -} - -static -void *init(void *args) -{ - gdk_threads_enter(); - gtk_main(); - gdk_threads_leave (); - pthread_exit(NULL); -} - -static gboolean -quit_dialog (void) -{ - GtkWidget* dialog; - gint answer; - - fflush (stderr); - - dialog = gnome_dialog_new ("PLplot Gnome driver", - GNOME_STOCK_BUTTON_OK, - GNOME_STOCK_BUTTON_CANCEL, - NULL); - - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), - gtk_label_new ("Quit PLplot?"), - TRUE, - TRUE, - 0); - - gtk_widget_show_all (GTK_WIDGET (GNOME_DIALOG (dialog)->vbox)); - - gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); - gnome_dialog_set_default (GNOME_DIALOG (dialog), 0); - - answer = gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); - - if (answer == 0) { - return TRUE; - } - else - return FALSE; -} - -static gint -canvas_pressed_cb(GnomeCanvasItem *item, GdkEvent *event, - GnomePLdevPage* page) -{ - static guint dragging; - guint move; - GdkCursor *cursor; - char buffer[BUFFER_LEN]; - PLGraphicsIn* gin = &(page->gin); - ItemColor* color; - GnomeCanvasItem* item_at_cursor; - - move = FALSE; - - switch (event->type) { - - case GDK_2BUTTON_PRESS: - - case GDK_3BUTTON_PRESS: - - case GDK_BUTTON_PRESS: - - if (event->button.button == 1) { - - gnome_canvas_item_raise_to_top (page->hlocline); - gnome_canvas_item_raise_to_top (page->vlocline); - - move = TRUE; - - cursor = gdk_cursor_new (GDK_CROSSHAIR); - gnome_canvas_item_grab(item, - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_RELEASE_MASK, - cursor, - event->button.time); - gdk_cursor_destroy(cursor); - - /*// FIXME : Terrible global variable hack*/ - gtk_statusbar_push (sb, page->context, ""); - - dragging = TRUE; - } - break; - - case GDK_MOTION_NOTIFY: - if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) - move = TRUE; - break; - - case GDK_BUTTON_RELEASE: - if (dragging && (event->motion.state & GDK_BUTTON1_MASK)) { - gnome_canvas_item_ungrab(item, event->button.time); - dragging = FALSE; - gnome_canvas_item_hide (page->hlocline); - gnome_canvas_item_hide (page->vlocline); - /*// FIXME : Terrible global variable hack*/ - gtk_statusbar_pop (sb, page->context); - /*// printf ("Button release\n");*/ - /*// fflush (stdout);*/ - } - break; - - default: - /*// printf ("Other event\n");*/ - /*// fflush (stdout);*/ - break; - - } - - if (move) { - - gnome_canvas_item_hide (page->hlocline); - gnome_canvas_item_hide (page->vlocline); - - item_at_cursor = gnome_canvas_get_item_at (page->canvas, - event->button.x, - event->button.y); - - if (item_at_cursor != NULL) - color = (ItemColor *) gtk_object_get_data (GTK_OBJECT (item_at_cursor), - "color"); - else - color = NULL; - - gnome_canvas_item_show (page->hlocline); - gnome_canvas_item_show (page->vlocline); - - gnome_canvas_item_move (page->hlocline, - 0.0, event->button.y - page->vpos); - page->vpos = event->button.y; - - gnome_canvas_item_move (page->vlocline, - event->button.x - page->hpos, 0.0); - page->hpos = event->button.x; - - gin->dX = page->hpos / page->width; - gin->dY = page->vpos / (- page->height); - - plTranslateCursor (gin); - - if (color == NULL) - buffer[0] = '\0'; - else - if (color->cmap == 0) - snprintf (buffer, BUFFER_LEN, " x = %f y = %f color = %d (cmap0)", - gin->wX, gin->wY, (int) color->color); - else - snprintf (buffer, BUFFER_LEN, " x = %f y = %f color = %f (cmap1)", - gin->wX, gin->wY, color->color); - - /*// FIXME : Terrible global variable hack*/ - gtk_statusbar_pop (sb, page->context); - /*// FIXME : Terrible global variable hack*/ - gtk_statusbar_push (sb, page->context, buffer); - - } - - return TRUE; -} - - -static gint -delete_event_cb (GtkWidget* widget, GdkEventAny* e, gpointer data) -{ - if (quit_dialog () == TRUE) { - gtk_widget_destroy (widget); - gtk_main_quit (); - } - return TRUE; -} - - -static gint -item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data) -{ - switch (event->type) { - case GDK_BUTTON_PRESS: - break; - } - - return TRUE; -} - -static void -setup_item(GnomeCanvasItem *item) -{ - gtk_signal_connect (GTK_OBJECT (item), "event", - (GtkSignalFunc) canvas_pressed_cb, - NULL); -} - -static void -add_to_adj (GtkAdjustment* adj, gfloat add) -{ - gfloat value; - - value = adj->value + add; - gtk_adjustment_set_value (adj, value); -} - -static gint -key_cb (GtkWidget* widget, GdkEventKey* event, PLStream* pls) -{ - GnomePLdev* dev = pls->dev; - GnomePLdevPage* page; - GtkNotebook* notebook = dev->notebook; - GtkStatusbar* statusbar = dev->statusbar; - guint curpage; - - if (notebook != NULL) - curpage = gtk_notebook_get_current_page (notebook); - else - curpage = 0; - - page = dev->page[curpage]; - - switch (event->keyval) { - case GDK_minus: - case GDK_plus: - case GDK_equal: - switch (event->keyval) { - case GDK_minus: - page->ppu /= 1.4142; - break; - case GDK_plus: - case GDK_equal: - page->ppu *= 1.4142; - break; - } - gnome_canvas_set_pixels_per_unit (GNOME_CANVAS (widget), page->ppu); - break; - case GDK_Q: - case GDK_Return: - if (quit_dialog () == TRUE) - gtk_main_quit (); - break; - case GDK_l: - /*//gdk_threads_enter ();*/ - change_mode (page, GNOME_PLDEV_LOCATE_MODE); - /*//gdk_threads_leave ();*/ - break; - case GDK_z: - /*//gdk_threads_enter ();*/ - change_mode (page, GNOME_PLDEV_ZOOM_MODE); - /*//gdk_threads_leave ();*/ - break; - case GDK_Page_Up: - if (curpage != 0) - gtk_notebook_set_page (notebook, curpage - 1); - break; - case GDK_Page_Down: - gtk_notebook_set_page (notebook, curpage + 1); - break; - case GDK_Right: - case GDK_Left: - case GDK_Up: - case GDK_Down: - switch (event->keyval) { - case GDK_Right: - add_to_adj (page->hadj, page->ppu); - break; - case GDK_Left: - add_to_adj (page->hadj, -page->ppu); - break; - case GDK_Up: - add_to_adj (page->vadj, page->ppu); - break; - case GDK_Down: - add_to_adj (page->vadj, -page->ppu); - break; - } - page->hadj->step_increment = page->ppu; - page->hadj->step_increment = page->ppu; - gtk_adjustment_changed (page->hadj); - gtk_adjustment_changed (page->vadj); - break; - default: - break; - } - - return TRUE; -} - -static void -page_switch (GtkNotebook *notebook, GtkNotebookPage *page, gint page_num, - gpointer dev) -{ - guint curpage; - GnomeCanvas* canvas; - - canvas = ((GnomePLdev*)(dev))->page[page_num]->canvas; - if (canvas != NULL) - gtk_widget_grab_focus (GTK_WIDGET (canvas)); -} - -static guint32 -plcolor_to_rgba (PLColor color, guchar alpha) -{ - return - ((int)(color.r) << 24) - + ((int)(color.g) << 16) - + ((int)(color.b) << 8) - + alpha; -} - -static guint32 -plcolor_to_rgba_inv (PLColor color, guchar alpha) -{ - return - ((int)(255 - color.r) << 24) - + ((int)(255 - color.g) << 16) - + ((int)(255 - color.b) << 8) - + alpha; -} - -static void -set_color (GnomeCanvasItem* item, guint cmap, gdouble color) -{ - ItemColor* colorp; - - colorp = g_malloc (sizeof (ItemColor)); - colorp->cmap = cmap; - colorp->color = color; - - gtk_object_set_data (GTK_OBJECT (item), "color", colorp); -} - -static void -new_page (PLStream* pls) -{ - GtkAdjustment* adj; - GnomeCanvasGroup* group; - GnomeCanvasItem* background; - GnomeCanvas* canvas; - GnomePLdev* dev; - GnomePLdevPage* page; - GnomeCanvasPoints* points; - guint np; - guint32 loclinecolor; - char buffer[BUFFER_LEN]; - - dev = pls->dev; - page = g_malloc (sizeof (GnomePLdevPage)); - page->mode = GNOME_PLDEV_LOCATE_MODE; - page->ppu = 1.0; - - page->bufc = 0; - - np = dev->npages; - - /*// gdk_threads_enter ();*/ - -#ifdef ANTIALISED_CANVAS - - gtk_widget_push_visual(gdk_rgb_get_visual()); - gtk_widget_push_colormap(gdk_rgb_get_cmap()); - canvas = GNOME_CANVAS (gnome_canvas_new_aa ()); - -#else - - gtk_widget_push_visual(gdk_imlib_get_visual()); - gtk_widget_push_colormap(gdk_imlib_get_colormap()); - canvas = GNOME_CANVAS (gnome_canvas_new ()); - -#endif - - timeout_id = gtk_timeout_add (1000, canvas_timeout, dev); - - page->canvas = canvas; - - page->width = PIXELS_PER_DU * WIDTH / DRAWING_UNIT; - page->height = PIXELS_PER_DU * HEIGHT / DRAWING_UNIT; - - gnome_canvas_set_scroll_region(GNOME_CANVAS(canvas), - 0, -page->height, page->width, 0); - - gtk_widget_pop_visual(); - gtk_widget_pop_colormap(); - - group = gnome_canvas_root (GNOME_CANVAS (canvas)); - - background = gnome_canvas_item_new (group, - gnome_canvas_rect_get_type(), - "x1", 0.0, - "y1", -page->height, - "x2", page->width, - "y2", 0.0, - "fill_color", (pls->cmap0[0]).name, - "width_units", 0.0, - NULL); - - timeout_register (canvas, dev); - - set_color (background, 0, 0.0); - - points = gnome_canvas_points_new (2); - - points->coords[0] = 0.0; - points->coords[1] = 0.0; - points->coords[2] = page->width; - points->coords[3] = 0.0; - - loclinecolor = plcolor_to_rgba_inv (pls->cmap0[0], 0xF0), - page->hlocline = - gnome_canvas_item_new (group, - gnome_canvas_line_get_type(), - "points", points, - "fill_color_rgba", loclinecolor, - "width_pixels", 1, - NULL); - gnome_canvas_item_hide (page->hlocline); - - timeout_register (canvas, dev); - - page->hpos = 0.0; - - points->coords[0] = 0.0; - points->coords[1] = -page->height; - points->coords[2] = 0.0; - points->coords[3] = 0.0; - - page->vlocline = - gnome_canvas_item_new (group, - gnome_canvas_line_get_type(), - "points", points, - "fill_color_rgba", loclinecolor, - "width_pixels", 1, - NULL); - gnome_canvas_item_hide (page->vlocline); - - timeout_register (canvas, dev); - - page->vpos = 0.0; - - gnome_canvas_points_unref (points); - points = gnome_canvas_points_new (5); - - points->coords[0] = 0.0; - points->coords[1] = 0.0; - points->coords[2] = 0.0; - points->coords[3] = 0.0; - points->coords[4] = 0.0; - points->coords[5] = 0.0; - points->coords[6] = 0.0; - points->coords[7] = 0.0; - points->coords[8] = 0.0; - points->coords[9] = 0.0; - - page->zoomrect = - gnome_canvas_item_new (group, - gnome_canvas_line_get_type(), - "points", points, - "fill_color_rgba", - plcolor_to_rgba_inv (pls->cmap0[0], 0xF0), - "width_units", 1.0, - NULL); - - gnome_canvas_item_hide (page->zoomrect); - - timeout_register (canvas, dev); - - page->hpos = 0.0; - - gnome_canvas_points_unref (points); - - page->context = np+1; - - change_mode (page, GNOME_PLDEV_LOCATE_MODE); - - gtk_signal_connect (GTK_OBJECT (background), "event", - (GtkSignalFunc) canvas_pressed_cb, - page); - - gtk_signal_connect (GTK_OBJECT (canvas), "key_press_event", - GTK_SIGNAL_FUNC (key_cb), pls); - - page->hadj = GTK_ADJUSTMENT (GTK_LAYOUT (canvas)->hadjustment); - page->vadj = GTK_ADJUSTMENT (GTK_LAYOUT (canvas)->vadjustment); - - page->sw = GTK_SCROLLED_WINDOW (gtk_scrolled_window_new (page->hadj, - page->vadj)); - - gtk_scrolled_window_set_policy (page->sw, - GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); - - gtk_container_add (GTK_CONTAINER (page->sw), GTK_WIDGET (canvas)); - - if (np == 0) - dev->page = g_malloc (sizeof (GnomePLdevPage*)); - else - dev->page = g_realloc (dev->page, - (np+1) * sizeof (GnomePLdevPage*)); - - - dev->page[np] = page; - - gtk_notebook_set_show_tabs (dev->notebook, (np > 0)); - - snprintf (buffer, BUFFER_LEN, "Page %d", np+1); - gtk_notebook_append_page (dev->notebook, GTK_WIDGET (page->sw), - gtk_label_new (buffer)); - - /*// adj = gtk_scrolled_window_get_vadjustment (page->hadj);*/ - /*// page->hadj->value = 0.0;*/ - /*//page->hadj->step_increment = 1.0;*/ - /*// page->vadj = adj;*/ - /*//gtk_scrolled_window_set_vadjustment (page->sw, adj);*/ - - /*//adj = gtk_scrolled_window_get_hadjustment (page->sw);*/ - /*//page->vadj->value = 0.0;*/ - /*//page->vadj->step_increment = 1.0;*/ - /*// page->hadj = adj;*/ - /*//gtk_scrolled_window_set_hadjustment (page->sw, adj);*/ - - gtk_widget_show_all (dev->parent); - - gtk_notebook_set_page (dev->notebook, -1); - - /*// gdk_threads_leave ();*/ - - dev->npages++; - -} - -void -gnome_pldev_create (PLStream* pls) -{ - GnomePLdev* dev; - GtkWidget* vbox; - - dev = g_malloc (sizeof (GnomePLdev)); - pls->dev = dev; - dev->npages = 0; - dev->pattern = 0; - dev->pattern_stipple[0] = NULL; - dev->pattern_stipple[1] = NULL; - vbox = gtk_vbox_new (FALSE, 0); - dev->root = vbox; - - dev->statusbar = GTK_STATUSBAR (gtk_statusbar_new ()); - sb = dev->statusbar; - - gtk_box_pack_end (GTK_BOX (dev->root), GTK_WIDGET (dev->statusbar), - FALSE, FALSE, 0); - - dev->notebook = GTK_NOTEBOOK (gtk_notebook_new ()); - - gtk_signal_connect (GTK_OBJECT (dev->notebook), "switch_page", - GTK_SIGNAL_FUNC (page_switch), dev); - - gtk_notebook_set_scrollable (dev->notebook, TRUE); - - gtk_box_pack_start (GTK_BOX (dev->root), GTK_WIDGET (dev->notebook), - TRUE, TRUE, 0); - - gtk_widget_show_all (GTK_WIDGET (dev->notebook)); - - dev->parent_is_from_driver = FALSE; -} - -void plD_open_gnome(PLStream *pls); - -void plD_init_gnome (PLStream *); -void plD_line_gnome (PLStream *, short, short, short, short); -void plD_polyline_gnome (PLStream *, short *, short *, PLINT); -void plD_eop_gnome (PLStream *); -void plD_bop_gnome (PLStream *); -void plD_tidy_gnome (PLStream *); -void plD_state_gnome (PLStream *, PLINT); -void plD_esc_gnome (PLStream *, PLINT, void *); - -void plD_dispatch_init_gnome( PLDispatchTable *pdt ) -{ -#ifndef ENABLE_DYNDRIVERS - pdt->pl_MenuStr = "Gnome Canvas"; - pdt->pl_DevName = "gnome"; -#endif - pdt->pl_type = plDevType_Interactive; - pdt->pl_seq = 1; - pdt->pl_init = (plD_init_fp) plD_init_gnome; - pdt->pl_line = (plD_line_fp) plD_line_gnome; - pdt->pl_polyline = (plD_polyline_fp) plD_polyline_gnome; - pdt->pl_eop = (plD_eop_fp) plD_eop_gnome; - pdt->pl_bop = (plD_bop_fp) plD_bop_gnome; - pdt->pl_tidy = (plD_tidy_fp) plD_tidy_gnome; - pdt->pl_state = (plD_state_fp) plD_state_gnome; - pdt->pl_esc = (plD_esc_fp) plD_esc_gnome; -} - -/*--------------------------------------------------------------------------*\ - * plD_init_gnome() - * - * Initialize device. - * X-dependent stuff done in plD_open_gnome() and Init(). -\*--------------------------------------------------------------------------*/ - -void -plD_init_gnome (PLStream *pls) -{ - char* argv[] = { "" }; - GnomePLdev* dev; - GtkWidget* window; - double phys2canvas = MAG_FACTOR * PIXELS_PER_MM; - - pls->termin = 1; /* Is an interactive terminal */ - pls->dev_flush = 1; /* Handle our own flushes */ - pls->dev_fill0 = 1; /* Handle solid fills */ - pls->dev_fill1 = 1; /* Driver handles pattern fills */ - pls->dev_dash = 1; /* Handle dashed lines */ - pls->plbuf_write = 1; /* Use plot buffer to replot to another device */ - pls->width = 1; - pls->dev_clear = 1; /* Handle plclear() */ - - - /* The real meat of the initialization done here */ - - /*// atexit (do_quit);*/ - - /* init threads */ - g_thread_init (NULL); - - if (pls->dev == NULL) { - - if (! gnome_is_initialized ) { - - gnome_init ("GnomePLplotDriver", "0.0.1", 1, argv); - gnome_sound_shutdown (); - - } - - gdk_rgb_init (); - - gnome_pldev_create (pls); - - dev = pls->dev; - - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - dev->parent = window; - - gtk_signal_connect (GTK_OBJECT (window), - "delete_event", - GTK_SIGNAL_FUNC (delete_event_cb), - NULL); - - gtk_window_set_title (GTK_WINDOW (window), "Gnome PLplot Driver"); - - gtk_window_set_policy (GTK_WINDOW (window), TRUE, TRUE, TRUE); - - gtk_window_set_default_size (GTK_WINDOW (window), 700, 565); - - gtk_container_add (GTK_CONTAINER (window), dev->root); - - gtk_widget_show_all (window); - - } - - plP_setpxl ((PLFLT) phys2canvas, (PLFLT) phys2canvas); - plP_setphy ((PLINT) 0, (PLINT) MAG_FACTOR * WIDTH/DRAWING_UNIT, - (PLINT) 0, (PLINT) MAG_FACTOR * HEIGHT/DRAWING_UNIT); - - gnome_is_initialized = TRUE; - -#ifdef HAVE_PTHREADS - - pthread_create (&tid, NULL, init, NULL); - -#endif - -} - - -/*--------------------------------------------------------------------------*\ - * plD_polyline_gnome() - * - * Draw a polyline in the current color from (x1,y1) to (x2,y2). -\*--------------------------------------------------------------------------*/ -static -int count[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; - -void -plD_polyline_gnome(PLStream *pls, short *x, short *y, PLINT npts) -{ - GnomePLdev* dev; - GnomePLdevPage* page; - GnomeCanvasPoints* points; - GnomeCanvasGroup* group; - GnomeCanvasItem* item; - GnomeCanvas* canvas; - guint i; - short* xp; - short* yp; - - /*// gdk_threads_enter ();*/ - - dev = pls->dev; - - page = dev->page[dev->npages-1]; - - /*// debug ("Before if\n");*/ - - if ( page->bufc > 0 - && ((npts == 0) - || (page->curcolor != pls->icol0) - || (page->curwidth != pls->width) - || (*x != page->bufx[page->bufc - 1]) - || (*y != page->bufy[page->bufc - 1])) ) { - - /*// printf("bufc = %d\tnpts = %d\n", page->bufc, npts);*/ - /*//q fflush(stdout);*/ - - canvas = page->canvas; - - group = gnome_canvas_root (canvas); - - points = gnome_canvas_points_new (page->bufc); - - for ( i = 0; i < page->bufc; i++ ) { - points->coords[2*i] = ((double) page->bufx[i]/MAG_FACTOR) * PIXELS_PER_DU; - points->coords[2*i + 1] = ((double) -page->bufy[i]/MAG_FACTOR) * PIXELS_PER_DU;; - } - - item = gnome_canvas_item_new (group, - gnome_canvas_line_get_type (), - "cap_style", GDK_CAP_ROUND, - "join_style", GDK_JOIN_ROUND, - "points", points, - "fill_color_rgba", - plcolor_to_rgba (pls->cmap0[page->curcolor], 0xFF), - "width_units", - MAX ((double) page->curwidth, 3.0) * PIXELS_PER_DU, - NULL); - - timeout_register (canvas, dev); - - set_color (item, 0, page->curcolor); - - gtk_signal_connect (GTK_OBJECT (item), "event", - (GtkSignalFunc) canvas_pressed_cb, - page); - - gnome_canvas_points_unref (points); - - count[pls->icol0]++; - - page->bufc = 0; - - } - - /*// debug ("Got here\n");*/ - - xp = &(page->bufx[page->bufc]); - yp = &(page->bufy[page->bufc]); - - page->bufc += npts; - - while (npts--) { - *(xp++) = *(x++); - *(yp++) = *(y++); - } - - page->curcolor = pls->icol0; - page->curwidth = pls->width; - - /*// gdk_threads_leave ();*/ - -} - -/*--------------------------------------------------------------------------*\ - * plD_line_gnome() - * - * Draw a line in the current color from (x1,y1) to (x2,y2). -\*--------------------------------------------------------------------------*/ - -void -plD_line_gnome(PLStream *pls, short x1, short y1, short x2, short y2) -{ - short x[2]; - short y[2]; - - x[0] = x1; - x[1] = x2; - y[0] = y1; - y[1] = y2; - - plD_polyline_gnome(pls, x, y, (PLINT) 2); - -} - -/*--------------------------------------------------------------------------*\ - * plD_eop_gnome() - * - * End of page. User must hit return (or third mouse button) to continue. -\*--------------------------------------------------------------------------*/ - -void -plD_eop_gnome(PLStream *pls) -{ - GnomePLdev* dev; - GnomePLdevPage* page; - GnomeCanvas* canvas; - int i; - short x, y; - - /*// static int i;*/ - - dev = pls->dev; - - plD_polyline_gnome(pls, NULL, NULL, 0); - - /*// gdk_threads_enter ();*/ - - page = dev->page[dev->npages-1]; - canvas = page->canvas; - - canvas->need_update = 1; - gnome_canvas_update_now (canvas); - - gdk_threads_leave (); - - /*// for (i=0;i<16;i++)*/ - /*// printf("count[%d] = %d\n", i, count[i]);*/ - /*// fflush (stdout);*/ - - /*// printf("eop #%d\n", i++);*/ - /*// fflush (stdout);*/ - - /*// getchar();*/ -} - -/*--------------------------------------------------------------------------*\ - * plD_bop_gnome() - * - * Set up for the next page. -\*--------------------------------------------------------------------------*/ - -void -plD_bop_gnome(PLStream *pls) -{ - GnomePLdev* dev; - GnomePLdevPage* page; - GnomeCanvas* canvas; - - gdk_threads_enter (); - - new_page (pls); - - dev = pls->dev; - - /*// printf("npages = %d\n", dev->npages);*/ - /*// fflush (stdout);*/ - - page = dev->page[dev->npages-1]; - canvas = page->canvas; - - canvas->need_update = 1; - gnome_canvas_update_now (canvas); - - /*// gdk_threads_leave ();*/ - - pls->page++; -} - -/*--------------------------------------------------------------------------*\ - * plD_tidy_gnome() - * - * Close graphics file -\*--------------------------------------------------------------------------*/ - -void -plD_tidy_gnome(PLStream *pls) -{ - -#ifdef HAVE_PTHREADS - - pthread_join (tid, NULL); - -#else - - if (pls->nopause) { - gtk_main_quit(); - } else - gtk_main(); - -#endif - -} - -/*--------------------------------------------------------------------------*\ - * plD_state_gnome() - * - * Handle change in PLStream state (color, pen width, fill attribute, etc). -\*--------------------------------------------------------------------------*/ - -void -plD_state_gnome(PLStream *pls, PLINT op) -{ - switch (op) { - - case PLSTATE_WIDTH: - break; - - case PLSTATE_COLOR0: - break; - - case PLSTATE_COLOR1: - break; - - case PLSTATE_CMAP0: - break; - - case PLSTATE_CMAP1: - break; - } -} - -static void -generate_pattern_fill (PLStream* pls) -{ - GnomePLdev* dev = pls->dev; - int i; - - if (dev->pattern == pls->patt) - return; - - dev->pattern = pls->patt; - - for (i = 0; i < pls->nps; i++) { - int j; - PLINT incl; - double tani; - double dist; /* in pixels */ - int width; - int height; - int cols; - double inclr; - double sini; - double cosi; - GdkGC* gc; - GdkColor black; - GdkColor white; - GdkColormap* colormap; - - dist = (pls->delta[i]/1e3) * PIXELS_PER_MM; - - incl = pls->inclin[i] % 3600; - if (incl > 900) - incl = incl - 900; - else if (incl < -900) - incl = incl + 900; - - inclr = PI * incl / 1800.0; - sini = sin (inclr); - cosi = cos (inclr); - - if (ABS (sini) < cosi) { - if (sini == 0.0) { - width = 1; - height = (int) dist;; - } - else { - width = MIN (ABS (dist / sini), 64); - height = MAX (dist / cosi, 2); - } - } - else { - if (ABS(incl) == 900) { - width = (int) dist; - height = 1; - } - else { - width = MAX (ABS (dist / sini), 2); - height = MIN (dist / cosi, 64); - } - } - - colormap = gtk_widget_get_colormap (GTK_WIDGET (dev->page[0]->canvas)); - - gdk_color_parse ("white", &white); - gdk_color_alloc (colormap, &white); - gdk_color_parse ("black", &black); - gdk_color_alloc (colormap, &black); - - if (dev->pattern_stipple[i] != NULL) - gdk_pixmap_unref (dev->pattern_stipple[i]); - - dev->pattern_stipple[i] = gdk_pixmap_new (NULL, width, height, 1); - - gc = gdk_gc_new (dev->pattern_stipple[i]); - - gdk_gc_set_foreground (gc, &black); - - gdk_draw_rectangle (dev->pattern_stipple[i], gc, TRUE, - 0, 0, width, height); - - gdk_gc_set_foreground (gc, &white); - gdk_gc_set_line_attributes (gc, 1, GDK_LINE_SOLID, 0, 0); - - if (incl == 0 || ABS (incl) == 900) - gdk_draw_point (dev->pattern_stipple[i], gc, 0, 0); - else if (sini < 0.0) { - gdk_draw_line (dev->pattern_stipple[i], gc, 0, 0, width, height); - gdk_draw_line (dev->pattern_stipple[i], gc, 0, -height, - 2*width, height); - gdk_draw_line (dev->pattern_stipple[i], gc, -width, 0, - width, 2*height); - } - else { - gdk_draw_line (dev->pattern_stipple[i], gc, width, 0, 0, height); - gdk_draw_line (dev->pattern_stipple[i], gc, 2*width, 0, 0, 2*height); - gdk_draw_line (dev->pattern_stipple[i], gc, - width, -height, -width, height); - } - - gdk_gc_unref (gc); - - } -} - - -static void -fill_polygon (PLStream* pls) -{ - GnomePLdev* dev; - GnomePLdevPage* page; - GnomeCanvasPoints* points; - GnomeCanvasGroup* group; - GnomeCanvasItem* item; - GnomeCanvas* canvas; - guint i; - - dev = pls->dev; - - /*// gdk_threads_enter ();*/ - - page = dev->page[dev->npages-1]; - - canvas = page->canvas; - - group = gnome_canvas_root (canvas); - - points = gnome_canvas_points_new (pls->dev_npts); - - for ( i = 0; i < pls->dev_npts; i++ ) { - points->coords[2*i] = - ((double) pls->dev_x[i]/MAG_FACTOR) * PIXELS_PER_DU; - points->coords[2*i + 1] = - ((double) -pls->dev_y[i]/MAG_FACTOR) * PIXELS_PER_DU; - } - - /* Experimental stuff for pattern fill */ - if (pls->patt < 0) { - int i; - - generate_pattern_fill (pls); - - for (i = 0; i < pls->nps; i++) - item = gnome_canvas_item_new (group, - gnome_canvas_polygon_get_type (), - "points", points, - "fill_stipple", dev->pattern_stipple[i], - "fill_color_rgba", - plcolor_to_rgba (pls->curcolor, 0xFF), - "width_units", 0.0, - NULL); - } - else - item = gnome_canvas_item_new (group, - gnome_canvas_polygon_get_type (), - "points", points, - "fill_color_rgba", - plcolor_to_rgba (pls->curcolor, 0xFF), - "width_units", 0.0, - NULL); - - timeout_register (canvas, dev); - - set_color (item, 1, (double) pls->icol1); - - gtk_signal_connect (GTK_OBJECT (item), "event", - (GtkSignalFunc) canvas_pressed_cb, - page); - - gnome_canvas_points_unref (points); - - /*// gdk_threads_leave ();*/ - -} - -static void -dashed_line (PLStream* pls) -{ - GnomePLdev* dev; - GnomePLdevPage* page; - GnomeCanvasPoints* points; - GnomeCanvasGroup* group; - GnomeCanvasItem* item; - GnomeCanvas* canvas; - guint i; - gchar* dash_list; - - dev = pls->dev; - - /*// gdk_threads_enter ();*/ - - page = dev->page[dev->npages-1]; - - canvas = page->canvas; - - group = gnome_canvas_root (canvas); - - points = gnome_canvas_points_new (pls->dev_npts); - - for (i = 0; i < pls->dev_npts; i++) { - points->coords[2*i] = - ((double) pls->dev_x[i]/MAG_FACTOR) * PIXELS_PER_DU; - points->coords[2*i + 1] = - ((double) -pls->dev_y[i]/MAG_FACTOR) * PIXELS_PER_DU; - } - - dash_list = g_malloc (sizeof (gchar) * 2 * pls->nms); - for (i = 0; i < pls->nms; i++) { - dash_list[2*i] = (gchar) ceil ((pls->mark[i]/1e3) * PIXELS_PER_MM); - dash_list[2*i+1] = (gchar) floor ((pls->space[i]/1e3) * PIXELS_PER_MM); - fflush(stdout); - } - - gdk_gc_set_dashes (canvas->pixmap_gc, 0, dash_list, 2*pls->nms); - - g_free (dash_list); - - item = gnome_canvas_item_new (group, - gnome_canvas_line_get_type (), - "cap_style", GDK_CAP_BUTT, - "join_style", GDK_JOIN_ROUND, - "line_style", GDK_LINE_ON_OFF_DASH, - "points", points, - "fill_color_rgba", - plcolor_to_rgba (pls->curcolor, 0xFF), - "width_units", - MAX ((double) pls->width, 3.0) * PIXELS_PER_DU, - NULL); - - timeout_register (canvas, dev); - - set_color (item, 0, (double) pls->icol0); - - gtk_signal_connect (GTK_OBJECT (item), "event", - (GtkSignalFunc) canvas_pressed_cb, - page); - - gnome_canvas_points_unref (points); - - /*// gdk_threads_leave ();*/ - -} - -/*--------------------------------------------------------------------------*\ - * plD_esc_gnome() - * - * Escape function. - * - * Functions: - * - * PLESC_EH Handle pending events - * PLESC_EXPOSE Force an expose - * PLESC_FILL Fill polygon - * PLESC_FLUSH Flush X event buffer - * PLESC_GETC Get coordinates upon mouse click - * PLESC_REDRAW Force a redraw - * PLESC_RESIZE Force a resize - * PLESC_XORMOD set/reset xor mode -\*--------------------------------------------------------------------------*/ - -static void -clear (PLStream* pls) -{ - GnomePLdev* dev = pls->dev; - GnomePLdevPage* page; - GnomeCanvas* canvas; - GnomeCanvasGroup* group; - GnomeCanvasItem* rect; - - fflush(stdout); - - page = dev->page[pls->page-1]; - canvas = page->canvas; - group = gnome_canvas_root (canvas); - - rect = gnome_canvas_item_new (group, - gnome_canvas_rect_get_type(), - "x1", (double) (pls->sppxmi) * PIXELS_PER_DU, - "y1", (double) -(pls->sppyma) * PIXELS_PER_DU, - "x2", (double) (pls->sppxma) * PIXELS_PER_DU, - "y2", (double) -(pls->sppymi) * PIXELS_PER_DU, - "fill_color", (pls->cmap0[0]).name, - "width_units", 0.0, - NULL); - gnome_canvas_item_raise_to_top (rect); - - gtk_signal_connect (GTK_OBJECT (rect), "event", - (GtkSignalFunc) canvas_pressed_cb, - page); - -} - -void -plD_esc_gnome(PLStream *pls, PLINT op, void *ptr) -{ - dbug_enter("plD_esc_gnome"); - - switch (op) { - - case PLESC_CLEAR: - clear (pls); - break; - - case PLESC_DASH: - dashed_line (pls); - break; - - case PLESC_FILL: - fill_polygon(pls); - break; - - } -} - -#else -int -pldummy_gnome() -{ - return 0; -} - -#endif /* PLD_gnome */ Deleted: trunk/drivers/next.c =================================================================== --- trunk/drivers/next.c 2009-09-23 13:16:55 UTC (rev 10460) +++ trunk/drivers/next.c 2009-09-23 14:13:53 UTC (rev 10461) @@ -1,309 +0,0 @@ -/* $Id$ - - PLplot NeXT display driver. - - Attention: this driver needs a supporter. It may not even work - any more. Also, there have been many improvements to ps.c that - were not incorporated here. If you use this please consider - becoming the official maintainer. Email mj...@di... - for more info. -*/ -#include "plDevs.h" - -#ifdef PLD_next - -#include "plplotP.h" -#include "drivers.h" - -/* top level declarations */ - -#define LINELENGTH 70 -#define COPIES 1 -#define XSIZE 540 /* 7.5" x 7.5" (72 points equal 1 inch) */ -#define YSIZE 540 -#define ENLARGE 5 -#define XPSSIZE ENLARGE*XSIZE -#define YPSSIZE ENLARGE*YSIZE -#define XOFFSET 18 -#define YOFFSET 18 -#define XSCALE 100 -#define YSCALE 100 -#define LINESCALE 100 -#define ANGLE 90 -#define PSX XPSSIZE-1 -#define PSY YPSSIZE-1 -#define OF pls->OutFile -#define MIN_WIDTH 1 /* Minimum pen width */ -#define MAX_WIDTH 10 /* Maximum pen width */ -#define DEF_WIDTH 3 /* Default pen width */ - -static char outbuf[128]; -static int llx = XPSSIZE, lly = YPSSIZE, urx = 0, ury = 0, ptcnt; - -/*------------------------------------------------------------------------*\ - * plD_init_nx() - * - * Initialize device. -\*------------------------------------------------------------------------*/ - -void -plD_init_nx(PLStream *pls) -{ - PLDev *dev; - -/* Allocate and initialize device-specific data */ - - dev = plAllocDev(pls); - - dev->xold = PL_UNDEFINED; - dev->yold = PL_UNDEFINED; - dev->xmin = 0; - dev->xmax = PSX; - dev->ymin = 0; - dev->ymax = PSY; - - plP_setpxl((PLFLT) 11.81, (PLFLT) 11.81); /* 300 dpi */ - - plP_setphy(0, PSX, 0, PSY); -} - -/*------------------------------------------------------------------------*\ - * plD_line_nx() - * - * Draw a line in the current color from (x1,y1) to (x2,y2). -\*------------------------------------------------------------------------*/ - -void -plD_line_nx(PLStream *pls, short x1a, short y1a, short x2a, short y2a) -{ - PLDev *dev = (PLDev *) pls->dev; - int x1 = x1a, y1 = y1a, x2 = x2a, y2 = y2a; - int ori; - - if (pls->linepos + 21 > LINELENGTH) { - putc('\n', OF); - pls->linepos = 0; - } - else - putc(' ', OF); - - pls->bytecnt++; - - if (x1 == dev->xold && y1 == dev->yold && ptcnt < 40) { - sprintf(outbuf, "%d %d D", x2, y2); - ptcnt++; - } - else { - sprintf(outbuf, "Z %d %d M %d %d D", x1, y1, x2, y2); - llx = MIN(llx, x1); - lly = MIN(lly, y1); - urx = MAX(urx, x1); - ury = MAX(ury, y1); - ptcnt = 1; - } - llx = MIN(llx, x2); - lly = MIN(lly, y2); - urx = MAX(urx, x2); - ury = MAX(ury, y2); - - fprintf(OF, "%s", outbuf); - pls->bytecnt += strlen(outbuf); - dev->xold = x2; - dev->yold = y2; - pls->linepos += 21; -} - -/*------------------------------------------------------------------------*\ - * plD_polyline_nx() - * - * Draw a polyline in the current color. -\*------------------------------------------------------------------------*/ - -void -plD_polyline_nx(PLStream *pls, short *xa, short *ya, PLINT npts) -{ - PLINT i; - - for (i = 0; i < npts - 1; i++) - plD_line_nx(pls, xa[i], ya[i], xa[i + 1], ya[i + 1]); -} - -/*------------------------------------------------------------------------*\ - * plD_eop_nx() - * - * End of page. -\*------------------------------------------------------------------------*/ - -void -plD_eop_nx(PLStream *pls) -{ - fprintf(OF, " S\neop\n"); - - pclose(OF); -} - -/*------------------------------------------------------------------------*\ - * plD_bop_nx() - * - * Set up for the next page. -\*------------------------------------------------------------------------*/ - -void -plD_bop_nx(PLStream *pls) -{ - PLDev *dev = (PLDev *) pls->dev; - - dev->xold = PL_UNDEFINED; - dev->yold = PL_UNDEFINED; - -/* Pipe output to Preview */ - - OF = popen("open", "w"); - -/* Header comments */ - - fprintf(OF, "%%!PS-Adobe-2.0 EPSF-2.0\n"); - fprintf(OF, "%%%%Title: PLplot Graph\n"); - fprintf(OF, "%%%%Creator: PLplot Version %s\n", PLPLOT_VERSION); - fprintf(OF, "%%%%BoundingBox: 0 0 576 576\n"); - fprintf(OF, "%%%%EndComments\n\n"); - -/* Definitions */ - -/* - eop - -- end a page */ - - fprintf(OF, "/eop\n"); - fprintf(OF, " {\n"); - fprintf(OF, " showpage\n"); - fprintf(OF, " } def\n"); - -/* Set line parameters */ - - fprintf(OF, "/@line\n"); - fprintf(OF, " {0 setlinecap\n"); - fprintf(OF, " 0 setlinejoin\n"); - fprintf(OF, " 1 setmiterlimit\n"); - fprintf(OF, " } def\n"); - -/* d @hsize - horizontal clipping dimension */ - - fprintf(OF, "/@hsize {/hs exch def} def\n"); - fprintf(OF, "/@vsize {/vs exch def} def\n"); - -/* d @hoffset - shift for the plots */ - - fprintf(OF, "/@hoffset {/ho exch def} def\n"); - fprintf(OF, "/@voffset {/vo exch def} def\n"); - -/* s @hscale - scale factors */ - - fprintf(OF, "/@hscale {100 div /hsc exch def} def\n"); - fprintf(OF, "/@vscale {100 div /vsc exch def} def\n"); - -/* Set line width */ - - fprintf(OF, "/lw %d def\n", (int) ( - (pls->width < MIN_WIDTH) ? DEF_WIDTH : - (pls->width > MAX_WIDTH) ? MAX_WIDTH : pls->width)); - -/* Setup user specified offsets, scales, sizes for clipping */ - - fprintf(OF, "/@SetPlot\n"); - fprintf(OF, " {\n"); - fprintf(OF, " ho vo translate\n"); - fprintf(OF, " XScale YScale scale\n"); - fprintf(OF, " lw setlinewidth\n"); - fprintf(OF, " } def\n"); - -/* Setup x & y scales */ - - fprintf(OF, "/XScale\n"); - fprintf(OF, " {hsc hs mul %d div} def\n", YPSSIZE); - fprintf(OF, "/YScale\n"); - fprintf(OF, " {vsc vs mul %d div} def\n", XPSSIZE); - -/* Macro definitions of common instructions, to keep output small */ - - fprintf(OF, "/M {moveto} def\n"); - fprintf(OF, "/D {lineto} def\n"); - fprintf(OF, "/S {stroke} def\n"); - fprintf(OF, "/Z {stroke newpath} def\n"); - fprintf(OF, "/F {fill} def\n"); - fprintf(OF, "/C {setrgbcolor} def\n"); - fprintf(OF, "/G {setgray} def\n"); - fprintf(OF, "/W {setlinewidth} def\n"); - -/* Set up the plots */ - - fprintf(OF, "@line\n"); - fprintf(OF, "%d @hsize\n", YSIZE); - fprintf(OF, "%d @vsize\n", XSIZE); - fprintf(OF, "%d @hoffset\n", YOFFSET); - fprintf(OF, "%d @voffset\n", XOFFSET); - fprintf(OF, "%d @hscale\n", YSCALE); - fprintf(OF, "%d @vscale\n", XSCALE); - fprintf(OF, "@SetPlot\n\n"); - pls->page++; - pls->linepos = 0; -} - -/*------------------------------------------------------------------------*\ - * plD_tidy_nx() - * - * Close graphics file or otherwise clean up. -\*------------------------------------------------------------------------*/ - -void -plD_tidy_nx(PLStream *pls) -{ -} - -/*------------------------------------------------------------------------*\ - * plD_state_nx() - * - * Handle change in PLStream state (color, pen width, fill attribute, etc). -\*------------------------------------------------------------------------*/ - -void -plD_state_nx(PLStream *pls, PLINT op) -{ - switch (op) { - - case PLSTATE_WIDTH:{ - int width = - (pls->width < MIN_WIDTH) ? DEF_WIDTH : - (pls->width > MAX_WIDTH) ? MAX_WIDTH : pls->width; - - fprintf(OF, " S\n%d W", width); - - dev->xold = PL_UNDEFINED; - dev->yold = PL_UNDEFINED; - break; - } - case PLSTATE_COLOR0: - break; - - case PLSTATE_COLOR1: - break; - } -} - -/*------------------------------------------------------------------------*\ - * plD_esc_nx() - * - * Escape function. -\*------------------------------------------------------------------------*/ - -void -plD_esc_nx(PLStream *pls, PLINT op, void *ptr) -{ -} - -#else -int -pldummy_next() -{ - return 0; -} - -#endif /* PLD_next */ Deleted: trunk/drivers/xwinttf.c =================================================================== --- trunk/drivers/xwinttf.c 2009-09-23 13:16:55 UTC (rev 10460) +++ trunk/drivers/xwinttf.c 2009-09-23 14:13:53 UTC (rev 10461) @@ -1,701 +0,0 @@ -/* March 13, 2007 - - PLplot driver for X Windows that uses the Cairo graphics library for - rendering graphics and Pango for rendering text. - - Copyright (C) 2007 Hazen Babcock - - This file is part of PLplot. - - PLplot is free software; you can redistribute it and/or modify - it under the terms of the GNU General Library Public License as published - by the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - PLplot is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with PLplot; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -*/ - -//--------------------------------------------- -// Header files, defines and local variables -//--------------------------------------------- - -#include <stdio.h> -#include <string.h> -#include <math.h> - -#include <X11/X.h> -#include <X11/Xlib.h> -#include <X11/Xutil.h> -#include <X11/cursorfont.h> - -#include <cairo.h> -#include <cairo-xlib.h> - -#include <pango/pangocairo.h> - -/* PLplot header files */ - -#include "plplotP.h" -#include "drivers.h" - -/* constants */ - -#define MAXPAGES 50 -#define DPI 72 -#define XWINTTF_DEFAULT_X 720 -#define XWINTTF_DEFAULT_Y 540 -#define MAX_STRING_LEN 500 -#define MAX_MARKUP_LEN MAX_STRING_LEN * 10 - -/* local variables */ - -PLDLLIMPEXP_DRIVER const char* plD_DEVICE_INFO_xwinttf = "xwinttf:TrueType X Windows Driver:1:xwinttf:59:xwinttf\n"; - -static int currentPage = -1; -static int XScreen; -static Display *XDisplay = NULL; -static Window rootWindow ; -static Window XWindow[MAXPAGES]; - -static int windowXSize = XWINTTF_DEFAULT_X; -static int windowYSize = XWINTTF_DEFAULT_Y; - -static cairo_surface_t *cairoSurface[MAXPAGES]; -static cairo_t *cairoContext[MAXPAGES]; - -//----------------------------------------------- -// Font style and weight lookup tables (copied -// from the psttf driver). -//----------------------------------------------- - -#define NPANGOLOOKUP 5 - -const char *defaultFamilyLookup[NPANGOLOOKUP] = { - "Sans", - "Serif", - "Monospace", - "Sans", - "Sans" -}; - -const char *envFamilyLookup[NPANGOLOOKUP] = { - "PLPLOT_FREETYPE_SANS_FAMILY", - "PLPLOT_FREETYPE_SERIF_FAMILY", - "PLPLOT_FREETYPE_MONO_FAMILY", - "PLPLOT_FREETYPE_SCRIPT_FAMILY", - "PLPLOT_FREETYPE_SYMBOL_FAMILY" -}; - -char familyLookup[NPANGOLOOKUP][1024]; - -const char *weightLookup[2] = { - "normal", - "bold" -}; - -const char *styleLookup[3] = { - "normal", - "italic", - "oblique" -}; - -//----------------------------------------------- -// function declarations -//----------------------------------------------- - -/* String processing */ - -static void proc_str(PLStream *, EscText *); -static char *ucs4_to_pango_markup_format(PLUNICODE *, int, float); -static void open_span_tag(char *, PLUNICODE, float, int); -static void close_span_tag(char *, int); - -/* Graphics */ - -static void get_cursor(PLStream *, PLGraphicsIn *); -static void set_current_context(PLStream *); -static void poly_line(PLStream *, short *, short *, PLINT); - -/* PLplot interface functions */ - -void plD_dispatch_init_xwinttf (PLDispatchTable *pdt); -void plD_init_xwinttf (PLStream *); -void plD_line_xwinttf (PLStream *, short, short, short, short); -void plD_polyline_xwinttf (PLStream *, short *, short *, PLINT); -void plD_eop_xwinttf (PLStream *); -void plD_bop_xwinttf (PLStream *); -void plD_tidy_xwinttf (PLStream *); -void plD_state_xwinttf (PLStream *, PLINT); -void plD_esc_xwinttf (PLStream *, PLINT, void *); - -//--------------------------------------------------------------------- -// dispatch_init_init() -// -// Initialize device dispatch table -//---------------------------------------------------------------------- - -void plD_dispatch_init_xwinttf(PLDispatchTable *pdt) -{ -#ifndef ENABLE_DYNDRIVERS - pdt->pl_MenuStr = "TrueType X Windows Driver"; - pdt->pl_DevName = "xwinttf"; -#endif - pdt->pl_type = plDevType_Interactive; - pdt->pl_seq = 59; - pdt->pl_init = (plD_init_fp) plD_init_xwinttf; - pdt->pl_line = (plD_line_fp) plD_line_xwinttf; - pdt->pl_polyline = (plD_polyline_fp) plD_polyline_xwinttf; - pdt->pl_eop = (plD_eop_fp) plD_eop_xwinttf; - pdt->pl_bop = (plD_bop_fp) plD_bop_xwinttf; - pdt->pl_tidy = (plD_tidy_fp) plD_tidy_xwinttf; - pdt->pl_state = (plD_state_fp) plD_state_xwinttf; - pdt->pl_esc = (plD_esc_fp) plD_esc_xwinttf; -} - -//--------------------------------------------------------------------- -// xwinttf_init() -// -// Initialize device -//---------------------------------------------------------------------- - -void plD_init_xwinttf(PLStream *pls) -{ - int i; - char *a; - - pls->termin = 1; /* Interactive device */ - pls->dev_flush = 1; /* Handles flushes */ - pls->color = 1; /* Supports color */ - pls->dev_text = 1; /* Handles text */ - pls->dev_unicode = 1; /* Wants unicode text */ - pls->page = 0; - pls->dev_fill0 = 1; /* Supports hardware solid fills */ - - plP_setpxl(DPI/25.4, DPI/25.4); - - if (pls->xlength <= 0 || pls->ylength <= 0){ - plP_setphy((PLINT) 0, (PLINT) XWINTTF_DEFAULT_X, (PLINT) 0, XWINTTF_DEFAULT_Y); - } else { - windowXSize = pls->xlength; - windowYSize = pls->ylength; - plP_setphy((PLINT) 0, (PLINT) pls->xlength, (PLINT) 0, (PLINT) pls->ylength); - } - - XDisplay = XOpenDisplay(NULL); - if(XDisplay == NULL){ - printf("Failed to open X Windows display\n"); - // some sort of error here - } - XScreen = DefaultScreen(XDisplay); - rootWindow = RootWindow(XDisplay, XScreen); - - // Initialize font table with either enviroment variables or defaults. - // This was copied from the psttf driver. - for(i=0;i<NPANGOLOOKUP;i++){ - if((a = getenv(envFamilyLookup[i])) != NULL){ - strcpy(familyLookup[i],a); - } - else { - strcpy(familyLookup[i],defaultFamilyLookup[i]); - } - } - - // Set all cairo pointers to NULL - for(i=0;i<MAXPAGES;i++){ - cairoSurface[i] = NULL; - cairoContext[i] = NULL; - } -} - -//---------------------------------------------------------------------- -// xwinttf_bop() -// -// Set up for the next page. -//---------------------------------------------------------------------- - -void plD_bop_xwinttf(PLStream *pls) -{ - char plotTitle[40]; - cairo_matrix_t *flipVertical; - Visual *defaultVisual; - XGCValues values; - - // Increment the page number. - currentPage++; - if(currentPage > MAXPAGES){ - currentPage = 0; - } - pls->page++; - - // Initialize plot title - sprintf(plotTitle, "PLplot (%d)", currentPage); - - // Create a X Window. - XWindow[currentPage] = XCreateSimpleWindow(XDisplay, rootWindow, 0, 0, windowXSize, windowYSize, - 1, BlackPixel(XDisplay, XScreen), BlackPixel(XDisplay, XScreen)); - XStoreName(XDisplay, XWindow[currentPage], plotTitle); - XSelectInput(XDisplay, XWindow[currentPage], NoEventMask); - XMapWindow(XDisplay, XWindow[currentPage]); - - // Create an cairo surface & context that are associated with the window. - defaultVisual = DefaultVisual(XDisplay, 0); - cairoSurface[currentPage] = cairo_xlib_surface_create(XDisplay, XWindow[currentPage], defaultVisual, windowXSize, windowYSize); - cairoContext[currentPage] = cairo_create(cairoSurface[currentPage]); - - // Fill in the window with the background color. - cairo_rectangle(cairoContext[currentPage], 0.0, 0.0, windowXSize, windowYSize); - cairo_set_source_rgb(cairoContext[currentPage], - (double)pls->cmap0[0].r/255.0, - (double)pls->cmap0[0].g/255.0, - (double)pls->cmap0[0].b/255.0); - cairo_fill(cairoContext[currentPage]); - - // Invert the coordinate system so the graphs are drawn right side up. - flipVertical = (cairo_matrix_t *) malloc (sizeof(cairo_matrix_t)); - cairo_matrix_init(flipVertical, 1.0, 0.0, 0.0, -1.0, 0.0, windowYSize); - cairo_set_matrix(cairoContext[currentPage], flipVertical); - free(flipVertical); -} - -//--------------------------------------------------------------------- -// xwinttf_line() -// -// Draw a line in the current color from (x1,y1) to (x2,y2). -//---------------------------------------------------------------------- - -void plD_line_xwinttf(PLStream *pls, short x1a, short y1a, short x2a, short y2a) -{ - set_current_context(pls); - - cairo_move_to(cairoContext[currentPage], (double) x1a, (double) y1a); - cairo_line_to(cairoContext[currentPage], (double) x2a, (double) y2a); - cairo_stroke(cairoContext[currentPage]); -} - -//--------------------------------------------------------------------- -// xwinttf_polyline() -// -// Draw a polyline in the current color. -//--------------------------------------------------------------------- - -void plD_polyline_xwinttf(PLStream *pls, short *xa, short *ya, PLINT npts) -{ - poly_line(pls, xa, ya, npts); - cairo_stroke(cairoContext[currentPage]); -} - -//--------------------------------------------------------------------- -// xwinttf_eop() -// -// End of page -//--------------------------------------------------------------------- - -void plD_eop_xwinttf(PLStream *pls) -{ - XFlush(XDisplay); -} - -//--------------------------------------------------------------------- -// xwinttf_tidy() -// -// Close graphics file or otherwise clean up. -//--------------------------------------------------------------------- - -void plD_tidy_xwinttf(PLStream *pls) -{ - int i; - - printf("Key <Return> to finish\n"); - getc(stdin); - - for(i=0;i<MAXPAGES;i++){ - if(cairoContext[i] != NULL){ - cairo_destroy(cairoContext[i]); - cairo_surface_destroy(cairoSurface[i]); - } - } - - XCloseDisplay(XDisplay); - free(XDisplay); -} - -//--------------------------------------------------------------------- -// plD_state_xwinttf() -// -// Handle change in PLStream state (color, pen width, fill attribute, etc). -// -// Nothing is done here because these attributes are acquired from -// PLStream for each element that is drawn. -//--------------------------------------------------------------------- - -void plD_state_xwinttf(PLStream *pls, PLINT op) -{ -} - -//--------------------------------------------------------------------- -// xwinttf_esc() -// -// Escape function. -//--------------------------------------------------------------------- - -void plD_esc_xwinttf(PLStream *pls, PLINT op, void *ptr) -{ - switch(op) - { - case PLESC_FILL: // filled polygon - poly_line(pls, pls->dev_x, pls->dev_y, pls->dev_npts); - cairo_fill(cairoContext[currentPage]); - break; - case PLESC_HAS_TEXT: // render rext - proc_str(pls, (EscText *) ptr); - break; - case PLESC_FLUSH: // forced update of the window - XFlush(XDisplay); - break; - case PLESC_GETC: // get cursor position - XFlush(XDisplay); - get_cursor(pls, (PLGraphicsIn*)ptr); - break; - } -} - -//--------------------------------------------------------------------- -// proc_str() -// -// Processes strings for display. -//--------------------------------------------------------------------- - -void proc_str(PLStream *pls, EscText *args) -{ - int i; - float fontSize; - int textXExtent, textYExtent; - char *textWithPangoMarkup; - PLFLT rotation, shear, cos_rot, sin_rot, sin_shear; - cairo_matrix_t *cairoTransformMatrix; - PangoLayout *layout; - PangoFontDescription *fontDescription; - - set_current_context(pls); - - // Check that we got unicode, warning message and return if not - if(args->unicode_array_len == 0){ - printf("Non unicode string passed to xwinttf driver, ignoring\n"); - return; - } - - // Check that unicode string isn't longer then the max we allow - if(args->unicode_array_len >= MAX_STRING_LEN){ - printf("Sorry, the xwinttf driver only handles strings of length < %d\n", MAX_STRING_LEN); - return; - } - - // Calculate the font size (in pixels) - fontSize = pls->chrht * DPI/25.4; - - // Convert the escape characters into the appropriate Pango markup - textWithPangoMarkup = ucs4_to_pango_markup_format(args->unicode_array, args->unicode_array_len, fontSize); - - // Create the Pango text layout so we can figure out how big it is - layout = pango_cairo_create_layout(cairoContext[currentPage]); - pango_layout_set_markup(layout, textWithPangoMarkup, -1); - // fontDescription = pango_font_description_from_string(fontString); - // pango_layout_set_font_description(layout, fontDescription); - pango_layout_get_pixel_size(layout, &textXExtent, &textYExtent); - - // Move to the string reference point - cairo_move_to(cairoContext[currentPage], (double) args->x, (double) args->y); - - // Save current transform matrix - cairo_save(cairoContext[currentPage]); - - // Invert the coordinate system so that the text is drawn right side up - cairoTransformMatrix = (cairo_matrix_t *) malloc (sizeof(cairo_matrix_t)); - cairo_matrix_init(cairoTransformMatrix, 1.0, 0.0, 0.0, -1.0, 0.0, 0.0); - cairo_transform(cairoContext[currentPage], cairoTransformMatrix); - - // Extract rotation angle and shear from the PLplot tranformation matrix. - // Compute sines and cosines of the angles as an optimization. - plRotationShear(args->xform, &rotation, &shear); - cos_rot = cos(rotation); - sin_rot = sin(rotation); - sin_shear = sin(shear); - - // Apply the transform matrix - cairo_matrix_init(cairoTransformMatrix, - cos_rot, - -sin_rot, - cos_rot * sin_shear + sin_rot, - -sin_rot * sin_shear + cos_rot, - 0,0); - cairo_transform(cairoContext[currentPage], cairoTransformMatrix); - free(cairoTransformMatrix); - - // Move to the text starting point - cairo_rel_move_to(cairoContext[currentPage], - (double)(-1.0 * args->just * (double)textXExtent), - (double)(-0.5 * textYExtent)); - - // Render the text - pango_cairo_show_layout(cairoContext[currentPage], layout); - - // Restore the transform matrix to its state prior to the text transform. - cairo_restore(cairoContext[currentPage]); - - // Free the layout object and the markup string. - g_object_unref(layout); - free(textWithPangoMarkup); -} - -//--------------------------------------------------------------------- -// ucs4_to_pango_markup_format() -// -// Converts the plplot string (in ucs4) to a utf8 string that includes -// pango markup. -// -// http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html -//--------------------------------------------------------------------- - -char *ucs4_to_pango_markup_format(PLUNICODE *ucs4, int ucs4Len, float fontSize) -{ - char plplotEsc; - int i; - int upDown = 0; - PLUNICODE fci; - char utf8[5]; - char *pangoMarkupString; - - // Will this be big enough? We might have lots of markup. - pangoMarkupString = (char *) malloc (sizeof(char) * MAX_MARKUP_LEN); - for(i = 0; i < MAX_MARKUP_LEN; i++){ - pangoMarkupString[i] = 0; - } - - // Get PLplot escape character - plgesc(&plplotEsc); - - // Get the curent font and open the first span tag - plgfci(&fci); - open_span_tag(pangoMarkupString, fci, fontSize, 0); - - // Parse the string to generate the tags - i = 0; - while (i < ucs4Len){ - // Try to avoid going off the end of the string - if(strlen(pangoMarkupString) > (MAX_MARKUP_LEN - 50)){ - continue; - } - if (ucs4[i] < PL_FCI_MARK){ // not a font change - if (ucs4[i] != (PLUNICODE)plplotEsc) { // a character to display - // we have to handle "<", ">" and "&" separately since they throw off the XML - switch(ucs4[i]) - { - case 38: - strcat(pangoMarkupString, "&"); - break; - case 60: - strcat(pangoMarkupString, "<"); - break; - case 62: - strcat(pangoMarkupString, ">"); - break; - default: - ucs4_to_utf8(ucs4[i],utf8); - strcat(pangoMarkupString, utf8); - break; - } - i++; - continue; - } - i++; - if (ucs4[i] == (PLUNICODE)plplotEsc){ // a escape character to display - strcat(pangoMarkupString, utf8); - i++; - continue; - } - else { - if(ucs4[i] == (PLUNICODE)'u'){ // Superscript - if(upDown < 0){ - strcat(pangoMarkupString, "</sub>"); - } else { - strcat(pangoMarkupString, "<sup>"); - } - upDown++; - } - if(ucs4[i] == (PLUNICODE)'d'){ // Subscript - if(upDown > 0){ - strcat(pangoMarkupString, "</sup>"); - } else {... [truncated message content] |
From: <hez...@us...> - 2009-09-23 16:11:26
|
Revision: 10462 http://plplot.svn.sourceforge.net/plplot/?rev=10462&view=rev Author: hezekiahcarty Date: 2009-09-23 16:11:18 +0000 (Wed, 23 Sep 2009) Log Message: ----------- A big update to the OCaml Plot and Quick_plot modules This adds: - Lots of comment/ocamldoc updates and clarifications - Plot.stream_t and color_palette_t are now opaque - stream_t was needed when changing plot box options. That is now handled by the end-of-page routines. - color_palette_t values can be made by using the new color palette definition functions. - Line style support (change width, non-continuous lines) - Added a variant type for specifying the symbol to use for points - Add Plot.make to start a new plot stream without initializing the plot window - Clean up the parameters passed to plottable element functions to make them more consistent in both order and meaning (ex. color comes first, then location, then content) - Change the Quick_plot.points and lines arguments around on the suggestion of flux from #ocaml. I think the result is cleaner and it helps avoid the potential for exceptions raised in the Quick_plot code. Modified Paths: -------------- trunk/bindings/ocaml/plplot.ml trunk/bindings/ocaml/plplot.mli trunk/examples/ocaml/xplot01.ml Modified: trunk/bindings/ocaml/plplot.ml =================================================================== --- trunk/bindings/ocaml/plplot.ml 2009-09-23 14:13:53 UTC (rev 10461) +++ trunk/bindings/ocaml/plplot.ml 2009-09-23 16:11:18 UTC (rev 10462) @@ -129,8 +129,6 @@ type stream_t = { stream : int; - x_axis : axis_options_t list; - y_axis : axis_options_t list; } type color_t = @@ -155,20 +153,45 @@ type pltr_t = float -> float -> float * float + (** Line plotting styles/patterns. *) + type line_style_t = + | Solid_line + | Line1 | Line2 | Line3 | Line4 + | Line5 | Line6 | Line7 | Line8 + | Custom_line of ((int * int) list) + + (** Point/symbol styles *) + type symbol_t = + | Point_symbol + | Box_symbol + | Dot_symbol + | Plus_symbol + | Circle_symbol + | X_symbol + | Solar_symbol + | Diamond_symbol + | Open_star_symbol + | Big_dot_symbol + | Star_symbol + | Open_dot_symbol + | Index_symbol of int + type plot_t = (* Standard plot elements *) | Arc of (color_t * float * float * float * float * float * float * bool) | Contours of (color_t * pltr_t * float array * float array array) | Image of image_t | Image_fr of (image_t * (float * float)) - | Join of (color_t * float * float * float * float) - | Lines of (string option * color_t * float array * float array) + | Join of (color_t * float * float * float * float * int * line_style_t) + | Lines of + (string option * color_t * float array * float array * int * line_style_t) | Map of (color_t * map_t * float * float * float * float) | Points of - (string option * color_t * float array * float array * int * float) + (string option * color_t * float array * float array * symbol_t * float) | Polygon of (color_t * float array * float array * bool) | Text of (color_t * string * float * float * float * float * float) - | Text_outside of (color_t * string * float plot_side_t * float * float * bool) + | Text_outside of + (color_t * string * float plot_side_t * float * float * bool) (* Set/clear coordinate transforms *) | Set_transform of pltr_t | Clear_transform @@ -189,14 +212,19 @@ | Ps of plot_device_family_t | Svg of plot_device_family_t | Window of plot_device_family_t + | Prompt_user | External of int | Other_device of string type plot_scaling_t = Preset | Greedy | Equal | Equal_square type color_palette_t = - | Indexed of string - | Continuous of (string * bool) + | Indexed_palette of string + | Continuous_palette of (string * bool) + let indexed_palette filename = Indexed_palette filename + let continuous_palette ?(interpolate = true) filename = + Continuous_palette (filename, interpolate) + let default_axis_options = [Frame0; Frame1; Major_ticks; Minor_ticks; Invert_ticks; Label] @@ -240,7 +268,8 @@ (** Returns the string to pass to plsdev and a boolean value indicating if the device is interactive or not. *) let devstring_of_plot_device = function - | External _ -> "N/A", false + | Prompt_user -> "", false + | External _ -> invalid_arg "External device" | Other_device s -> s, false | Pdf family -> "pdf" ^ string_of_device_family family, false | Png family -> "png" ^ string_of_device_family family , false @@ -259,9 +288,10 @@ | Ps _ -> ".ps" | Pdf _ -> ".pdf" | Svg _ -> ".svg" - | Window _ -> invalid_arg "interactive plot device" - | External _ -> invalid_arg "external plot device" + | Window _ -> invalid_arg "interactive plot device, no extension" + | External _ -> invalid_arg "external plot device, unknown extension" | Other_device _ -> invalid_arg "other device, unknown extension" + | Prompt_user -> invalid_arg "user prompted for device, unknown extension" (** Make a new stream, without disturbing the current plot state. *) let make_stream ?stream () = @@ -274,8 +304,7 @@ new_stream | Some s -> s in - { stream = this_stream; - x_axis = default_axis_options; y_axis = default_axis_options; } + { stream = this_stream } (** [with_stream ?stream f] calls [f ()] with [stream] as the active plotting stream if [stream] is present. Otherwise it just calls @@ -290,6 +319,48 @@ plsstrm old_stream; result + (** Get the integer representation of the line style for use with pllsty *) + let int_of_line_style = function + | Solid_line -> 1 + | Line1 -> 1 + | Line2 -> 2 + | Line3 -> 3 + | Line4 -> 4 + | Line5 -> 5 + | Line6 -> 6 + | Line7 -> 7 + | Line8 -> 8 + | Custom_line _ -> assert false + + (** Set the line drawing style *) + let set_line_style ?stream style = + with_stream ?stream ( + fun () -> + match style with + | Custom_line l -> + let marks, spaces = List.split l in + let marks = Array.of_list marks in + let spaces = Array.of_list spaces in + plstyl marks spaces + | s -> pllsty (int_of_line_style s) + ) + + (** Get the integer representation of the line style for use with plssym *) + let int_of_symbol = function + | Point_symbol -> ~-1 + | Box_symbol -> 0 + | Dot_symbol -> 1 + | Plus_symbol -> 2 + | Circle_symbol -> 4 + | X_symbol -> 5 + | Solar_symbol -> 9 + | Diamond_symbol -> 11 + | Open_star_symbol -> 12 + | Big_dot_symbol -> 17 + | Star_symbol -> 18 + | Open_dot_symbol -> 20 + | Index_symbol i -> i + (** Set the plotting color (color scale 0). NOTE that these are for the ALTERNATE color palette, not the DEFAULT color palette. *) let set_color ?stream c = @@ -328,7 +399,7 @@ () (** Start a new page *) - let start_page ?stream x0 x1 y0 y1 axis_scaling = + let start_page ?stream (x0, y0) (x1, y1) axis_scaling = with_stream ?stream ( fun () -> (* Start with a black plotting color. *) @@ -341,16 +412,12 @@ with_stream ?stream ( fun () -> match which with - | Indexed file -> plspal0 file - | Continuous (file, segmented) -> plspal1 file segmented + | Indexed_palette file -> plspal0 file + | Continuous_palette (file, segmented) -> plspal1 file segmented ) - (** [init ?filename ?size ?pages x0 x1 y0 y1 axis_scaling device] creates a - new plot instance. [size] is the size of the plot device. If a [filename] - is provided then an appropriate file extension will be added, based on the - given [device]. [pages] determines how many plots will be on a single - device page. *) - let init ?filename ?size ?pages ?pre x0 x1 y0 y1 axis_scaling device = + (** Create a new plot instance *) + let make ?stream ?filename ?size ?pre device = (* Make a new plot stream. *) let stream, init = match device with @@ -392,14 +459,20 @@ Option.may (fun f -> f ()) pre; plinit (); ); + stream + + (** Create a new plot instance and initialize it. *) + let init ?filename ?size ?pages ?pre (x0, y0) (x1, y1) axis_scaling device = + (* Creat a new plot stream and set it up. *) + let stream = make ?filename ?size ?pre device in (* If requested, set up multiple sub-pages. *) Option.may (fun (x, y) -> with_stream ~stream (fun () -> plssub x y)) pages; - start_page ~stream x0 x1 y0 y1 axis_scaling; + start_page ~stream (x0, y0) (x1, y1) axis_scaling; stream (** [make_stream_active stream] makes [stream] the active plot stream. If there is another active plot stream its identity is not saved. *) - let make_stream_active stream = plsstrm stream.stream + let make_stream_active ~stream = plsstrm stream.stream (** {3 Simplified plotting interface} *) @@ -422,10 +495,12 @@ Image_fr ((range, x0, y0, x1, y1, data), scale) (** [join color x0 y0 x1 y1] *) - let join color x0 y0 x1 y1 = Join (color, x0, y0, x1, y1) + let join ?style ?width color x0 y0 x1 y1 = + Join (color, x0, y0, x1, y1, width |? 1, style |? Solid_line) (** [lines ?label color xs ys] *) - let lines ?label color xs ys = Lines (label, color, xs, ys) + let lines ?label ?style ?width color xs ys = + Lines (label, color, xs, ys, width |? 1, style |? Solid_line) (** [map ?sw ?ne color outline] *) let map ?sw ?ne color outline = @@ -433,9 +508,9 @@ let x1, y1 = ne |? (180.0, 90.0) in Map (color, outline, x0, y0, x1, y1) - (** [points ?label ?scale color xs ys symbol] *) - let points ?label ?scale color xs ys symbol = - Points (label, color, xs, ys, symbol, scale |? 1.0) + (** [points ?label ?scale color xs ys] *) + let points ?label ?symbol ?scale color xs ys = + Points (label, color, xs, ys, symbol |? Open_dot_symbol, scale |? 1.0) (** [polygon ?fill color xs ys fill] *) let polygon ?(fill = false) color xs ys = Polygon (color, xs, ys, fill) @@ -445,17 +520,17 @@ polygon ~fill color [|x0; x1; x1; x0; x0|] [|y0; y0; y1; y1; y0|] (** [text ?dx ?dy ?just ?color s x y] *) - let text ?(dx = 0.0) ?(dy = 0.0) ?(just = 0.5) ?(color = Black) s x y = + let text ?(dx = 0.0) ?(dy = 0.0) ?(just = 0.5) color x y s = Text (color, s, x, y, dx, dy, just) (** [text_outside ?just side displacement s] *) - let text_outside ?(just = 0.5) ?(perp = false) ?(color = Black) side displacement s = + let text_outside ?(just = 0.5) ?(perp = false) color side displacement s = Text_outside (color, s, side, displacement, just, perp) (** [func ?point ?step color f (min, max)] plots the function [f] from [x = min] to [x = max]. [step] can be used to tighten or coarsen the sampling of plot points. *) - let func ?point ?step color f (min, max) = + let func ?symbol ?step color f (min, max) = let step = match step with | None -> (max -. min) /. 100.0 @@ -465,8 +540,8 @@ Array_ext.range ~n:(int_of_float ((max -. min) /. step) + 1) min max in let ys = Array.map f xs in - match point with - | Some p -> points color xs ys p + match symbol with + | Some s -> points ~symbol:s color xs ys | None -> lines color xs ys (** [transform f] *) @@ -544,6 +619,18 @@ () ) + (** Set the drawing color in [f], and restore the previous drawing color + when [f] is complete. *) + let set_color_in ?stream c f = + with_stream ?stream ( + fun () -> + let old_color = plg_current_col0 () in + set_color c; + f (); + plcol0 old_color; + () + ) + (** [plot stream l] plots the data in [l] to the plot [stream]. *) let rec plot ?stream plottable_list = (* TODO: Add legend support. *) @@ -573,13 +660,6 @@ (xmin, ymin), (xmax, ymax) in *) - let set_color_in c f = - let old_color = plg_current_col0 () in - set_color c; - f (); - plcol0 old_color; - () - in let plot_arc (color, x, y, a, b, angle1, angle2, fill) = set_color_in color ( fun () -> plarc x y a b angle1 angle2 fill; @@ -607,11 +687,27 @@ x0 x1 y0 y1 range_min range_max scale_min scale_max; () in - let plot_join (color, x0, y0, x1, y1) = - set_color_in color (fun () -> pljoin x0 y0 x1 y1) + let plot_join (color, x0, y0, x1, y1, width, style) = + set_color_in color ( + fun () -> + let old_width = plgwid () in + plwid width; + set_line_style style; + pljoin x0 y0 x1 y1; + set_line_style Solid_line; + plwid old_width; + ) in - let plot_lines (label, color, xs, ys) = - set_color_in color (fun () -> plline xs ys) + let plot_lines (label, color, xs, ys, width, style) = + set_color_in color ( + fun () -> + let old_width = plgwid () in + plwid width; + set_line_style style; + plline xs ys; + set_line_style Solid_line; + plwid old_width; + ) in let plot_map (color, outline, x0, y0, x1, y1) = set_color_in color ( @@ -623,7 +719,7 @@ set_color_in color ( fun () -> plssym 0.0 scale; - plpoin xs ys symbol; + plpoin xs ys (int_of_symbol symbol); plssym 0.0 1.0; ) in @@ -823,7 +919,7 @@ with_stream ?stream (fun () -> colorbar ?label ?log ?pos ?width values) (** An easier to deduce alternative to {Plplot.plbox} *) - let plot_axes ~xtick ~xsub ~ytick ~ysub ~xoptions ~yoptions = + let plot_axes ?stream ~xtick ~xsub ~ytick ~ysub ~xoptions ~yoptions = let map_axis_options ol = List.map ( function @@ -846,47 +942,51 @@ in let xopt = String.concat "" (map_axis_options xoptions) in let yopt = String.concat "" (map_axis_options yoptions) ^ "v" in - plbox xopt xtick xsub yopt ytick ysub + with_stream ?stream (fun () -> plbox xopt xtick xsub yopt ytick ysub) - (** Default page ending steps *) - let default_finish ?stream xstep ystep () = + (** Default page ending steps. Just draw the plot axes. *) + let default_finish ?stream ?axis xstep ystep = let xopt, yopt = - match stream with + match axis with | None -> default_axis_options, default_axis_options - | Some s -> s.x_axis, s.y_axis + | Some s -> s in - with_stream ?stream ( + set_color_in ?stream Black ( fun () -> - set_color Black; - plot_axes + plot_axes ?stream ~xtick:xstep ~xsub:0 ~xoptions:xopt ~ytick:ystep ~ysub:0 ~yoptions:yopt; ) (** Plot axes, but don't advance the page or end the session. This is used internally by [finish]. *) - let finish_page ?stream ?f ?post xstep ystep = + let finish_page ?stream ?f ?post ?axis xstep ystep = with_stream ?stream ( fun () -> let actual_finish = match f with | Some custom_finish -> custom_finish - | None -> default_finish ?stream xstep ystep + | None -> (fun () -> default_finish ?stream ?axis xstep ystep) in actual_finish (); Option.may (fun f -> f ()) post; ) (** Finish the current page, start a new one. *) - let next_page ?stream ?f ?post x0 x1 y0 y1 axis_scaling = - finish_page ?stream ?f ?post 0.0 0.0; - start_page ?stream x0 x1 y0 y1 axis_scaling; + let next_page ?stream ?f ?post ?axis ?(xstep = 0.0) ?(ystep = 0.0) + (x0, y0) (x1, y1) axis_scaling = + finish_page ?stream ?f ?post ?axis xstep ystep; + start_page ?stream (x0, y0) (x1, y1) axis_scaling; () + (** End the current plot stream *) + let end_stream ~stream = + with_stream ~stream plend1 + (** Finish up the plot by plotting axes and ending the session. This must be called after plotting is complete. *) - let finish ?stream ?f ?post xstep ystep = - finish_page ?stream ?f ?post xstep ystep; + let finish ?stream ?f ?post ?axis xstep ystep = + finish_page ?stream ?f ?post ?axis xstep ystep; with_stream ?stream plend1 end @@ -924,42 +1024,43 @@ List.fold_left min infinity (List.map (safe_array_reduce min) ys_list), List.fold_left max neg_infinity (List.map (safe_array_reduce max) ys_list) - let maybe_log log p = + let maybe_log log = + let x_axis = default_axis_options in + let y_axis = default_axis_options in Option.map_default ( fun (x_log, y_log) -> - { - p with - x_axis = if x_log then Log :: p.x_axis else p.x_axis; - y_axis = if y_log then Log :: p.y_axis else p.y_axis; - } - ) p log + (if x_log then Log :: x_axis else x_axis), + (if y_log then Log :: y_axis else y_axis) + ) (x_axis, y_axis) log - (** [points xs ys] plots the points described by the coordinates [xs] + (** [points [xs, ys; ...] plots the points described by the coordinates [xs] and [ys]. *) - let points ?filename ?(device = Window Cairo) ?labels ?log xs_list ys_list = + let points ?filename ?(device = Window Cairo) ?labels ?log xs_ys_list = + let xs_list, ys_list = List.split xs_ys_list in let xmin, xmax, ymin, ymax = extents xs_list ys_list in let ys_array = Array.of_list ys_list in - let p = init ?filename xmin xmax ymin ymax Greedy device in + let p = init ?filename (xmin, ymin) (xmax, ymax) Greedy device in let plottable_points = Array.to_list ( Array.mapi ( - fun i xs -> points (Index_color (i + 1)) xs ys_array.(i) i + fun i xs -> + points ~symbol:(Index_symbol i) (Index_color (i + 1)) + xs ys_array.(i) ) (Array.of_list xs_list) ) in plot ~stream:p plottable_points; Option.may (fun (x, y, t) -> label ~stream:p x y t) labels; - finish ~stream:(maybe_log log p) 0.0 0.0; + finish ~stream:p ~axis:(maybe_log log) 0.0 0.0; () - (** [lines xs ys] plots the line segments described by the coordinates + (** [lines [xs, ys; ...] plots the line segments described by the coordinates [xs] and [ys]. *) - let lines - ?filename ?(device = Window Cairo) ?labels ?names ?log - xs_list ys_list = + let lines ?filename ?(device = Window Cairo) ?labels ?names ?log xs_ys_list = + let xs_list, ys_list = List.split xs_ys_list in let xmin, xmax, ymin, ymax = extents xs_list ys_list in let ys_array = Array.of_list ys_list in - let p = init ?filename xmin xmax ymin ymax Greedy device in + let p = init ?filename (xmin, ymin) (xmax, ymax) Greedy device in let colors = Array.mapi (fun i _ -> Index_color (i + 1)) ys_array in let plottable_lines = Array.to_list ( @@ -971,7 +1072,7 @@ plot ~stream:p plottable_lines; Option.may (fun (x, y, t) -> label ~stream:p x y t) labels; Option.may (fun n -> draw_legend ~stream:p n (Array.to_list colors)) names; - finish ~stream:(maybe_log log p) 0.0 0.0; + finish ~stream:p ~axis:(maybe_log log) 0.0 0.0; () (** [image ?log m] plots the image [m] with a matching colorbar. If [log] is @@ -981,7 +1082,7 @@ let xmin, ymin = 0.0, 0.0 in let xmax, ymax = Array_ext.matrix_dims m in let xmax, ymax = float_of_int xmax, float_of_int ymax in - let p = init ?filename xmin xmax ymin ymax Equal_square device in + let p = init ?filename (xmin, ymin) (xmax, ymax) Equal_square device in Option.may (load_palette ~stream:p) palette; plot ~stream:p [image (xmin, ymin) (xmax, ymax) m]; Option.may (fun (x, y, t) -> label ~stream:p x y t) labels; @@ -994,7 +1095,7 @@ to [x = max]. [step] can be used to tighten or coarsen the sampling of plot points. *) let func - ?filename ?(device = Window Cairo) ?labels ?names ?point ?step + ?filename ?(device = Window Cairo) ?labels ?names ?symbol ?step fs (xmin, xmax) = let fs_array = Array.of_list fs in let colors = Array.mapi (fun i _ -> Index_color (i + 1)) fs_array in @@ -1002,7 +1103,7 @@ Array.to_list ( Array.mapi ( fun i f -> - func ?point ?step colors.(i) f (xmin, xmax) + func ?symbol ?step colors.(i) f (xmin, xmax) ) fs_array ) in @@ -1010,14 +1111,14 @@ Array.of_list ( List.map ( function - | Lines (_, _, _, y) + | Lines (_, _, _, y, _, _) | Points (_, _, _, y, _, _) -> y | _ -> invalid_arg "Invalid function output" ) plot_content ) in let ymax, ymin = plMinMax2dGrid ys in - let stream = init ?filename xmin xmax ymin ymax Greedy device in + let stream = init ?filename (xmin, ymin) (xmax, ymax) Greedy device in plot ~stream plot_content; Option.may (fun n -> draw_legend ~stream n (Array.to_list colors)) names; Option.may (fun (x, y, t) -> label ~stream x y t) labels; Modified: trunk/bindings/ocaml/plplot.mli =================================================================== --- trunk/bindings/ocaml/plplot.mli 2009-09-23 14:13:53 UTC (rev 10461) +++ trunk/bindings/ocaml/plplot.mli 2009-09-23 16:11:18 UTC (rev 10462) @@ -20,7 +20,7 @@ (** {1 PLplot - A library for creating scientific plots} *) (** {e Note:} The API for the {!Plot} and {!Quick_plot} modules is not yet - fixed and may change. + fixed and may change between now and the 5.10.0 PLplot release. {!core} is {b not} expected to change. *) @@ -28,7 +28,7 @@ module Plot : sig - (** {b THIS API IS NOT FIXED AND MAY CHANGE} *) + (** {b THIS API IS NOT FIXED AND MAY CHANGE BEFORE THE 5.10.0 RELEASE} *) (** The different sides of a (2D) plot. These values are used to represent, e.g., offsets along axes and text placement. *) @@ -59,11 +59,7 @@ | Vertical_label (** A plot stream. *) - type stream_t = { - stream : int; (** The plot stream index as used by PLplot *) - x_axis : axis_options_t list; (** Axis drawing options for the X-axis *) - y_axis : axis_options_t list; (** Axis drawing options for the Y-axis *) - } + type stream_t (** Colors from the indexed color map (color map 0), from the [cmapo_alternate.pal] file! Note that these will NOT match up with @@ -111,6 +107,7 @@ | Ps of plot_device_family_t | Svg of plot_device_family_t | Window of plot_device_family_t + | Prompt_user (** Ask for the correct device to use at run-time *) | External of int (** Pre-defined plot streams *) | Other_device of string (** PLplot plotting devices otherwise not available from this list *) @@ -118,12 +115,38 @@ (** Type of scaling to use for plot axes, as in {!Plplot.plenv}. *) type plot_scaling_t = Preset | Greedy | Equal | Equal_square - (** PLplot has two color palettes - indexed (color map 0) and - continuous (color map 1). *) - type color_palette_t = - | Indexed of string - | Continuous of (string * bool) + (** A color palette, usually loaded from disk *) + type color_palette_t + (** Line plotting styles/patterns. *) + type line_style_t = + | Solid_line + | Line1 | Line2 | Line3 | Line4 + | Line5 | Line6 | Line7 | Line8 (** These correspond to PLplot's + pre-defined line styles as set by + {!pllsty}. *) + | Custom_line of ((int * int) list) (** A custom line style, with each + (mark, space) pair defining the + length of one segment and gap + in the line drawing pattern. *) + + (** Point/symbol styles *) + type symbol_t = + | Point_symbol + | Box_symbol + | Dot_symbol + | Plus_symbol + | Circle_symbol + | X_symbol + | Solar_symbol + | Diamond_symbol + | Open_star_symbol + | Big_dot_symbol + | Star_symbol + | Open_dot_symbol + | Index_symbol of int (** The index value here is the same value used in + {!plssym}. *) + (** The default list of axis rendering options, used for all plots generated with {!init} if no custom options are provided. *) val default_axis_options : axis_options_t list @@ -136,37 +159,32 @@ device. *) val recommended_extension : plot_device_t -> string - (** Make a new {!stream_t}, possibly using an existing plot stream index. *) + (** {4 Plot streams}*) + + (** Make a new {!stream_t}, possibly using an existing plot stream index. + If no [stream] argument is provided then a new plot stream is + created. *) val make_stream : ?stream:int -> unit -> stream_t - (** [with_stream ?stream f] performs [f] with [stream] as the active plot - stream. If [stream] is not provided then the currently active plot - stream is left active. Once [f] is complete, the previously active plot - stream is restored. *) - val with_stream : ?stream:stream_t -> (unit -> 'a) -> 'a - - (** [set_color ?stream color] sets the current active plot color to - [color]. *) - val set_color : ?stream:stream_t -> color_t -> unit - - (** [set_color_scale ?stream reverse colors] sets the continuous color map - (color map 1) to a scale determined by interpolating between [colors]. - {!Plplot.plscmap1l} is used internally to set the color scale. *) - val set_color_scale : ?stream:stream_t -> bool -> color_t array -> unit - - (** [start_page ?stream x0 x1 y0 y1 scaling] starts a new plot page with the - given dimensions and scaling. *) + (** [start_page ?stream (x0, y0) (x1, y1) scaling] starts a new plot page + with the given dimensions and scaling. *) val start_page : ?stream:stream_t -> - float -> float -> float -> float -> plot_scaling_t -> unit + float * float -> float * float -> plot_scaling_t -> unit - (** [load_palette ?stream palette] loads either indexed or continuous - color palette information from a file on disk. *) - val load_palette : ?stream:stream_t -> color_palette_t -> unit + (** Create a new plot instance. See {!init} for a description of the + parameters. *) + val make : + ?stream:stream_t -> + ?filename:string -> + ?size:int * int -> + ?pre:(unit -> unit) -> + plot_device_t -> stream_t - (** [init ?filename ?size ?pages x0 x1 y0 y1 scale device] - Start a new - plot stream for a 2D plot with plot axis extents given by [(x0, y0)] to - [(x1, y1)]. + (** [init ?filename ?size ?pages (x0, y0) (x1, y1) scale device] - Start a + new plot stream for a 2D plot with plot axis extents given by [(x0, y0)] + to [(x1, y1)]. A call to [init] is roughly equivalent to calling + {!make} and then {!start_page}. @param filename Plot output filename. A suitable file extension will be added if it does not already exist. @param size Dimension of the plot in physical units (e.g., pixels @@ -181,13 +199,46 @@ ?size:int * int -> ?pages:int * int -> ?pre:(unit -> unit) -> - float -> - float -> float -> float -> plot_scaling_t -> plot_device_t -> stream_t + float * float -> float * float -> + plot_scaling_t -> plot_device_t -> stream_t + (** [with_stream ?stream f] performs [f] with [stream] as the active plot + stream. If [stream] is not provided then the currently active plot + stream is left active. Once [f] is complete, the previously active plot + stream is restored. *) + val with_stream : ?stream:stream_t -> (unit -> 'a) -> 'a + (** [make_stream_active stream] makes [stream] in to the currently active - plot stream. *) - val make_stream_active : stream_t -> unit + plot stream for {!core} calls or any function which is not + provided with an explicit [stream] argument. *) + val make_stream_active : stream:stream_t -> unit + (** {4 Colors} *) + + (** [set_color ?stream color] sets the current active plot color to + [color]. *) + val set_color : ?stream:stream_t -> color_t -> unit + + (** [set_color_scale ?stream reverse colors] sets the continuous color map + (color map 1) to a scale determined by interpolating between [colors]. + {!Plplot.plscmap1l} is used internally to set the color scale. *) + val set_color_scale : ?stream:stream_t -> bool -> color_t array -> unit + + (** PLplot has two color palettes - indexed (color map 0) and + continuous (color map 1). These functions can be used with + {!load_palette} to set custom indexed and continuous color palettes. *) + val indexed_palette : string -> color_palette_t + + (** [continuous_palette ?interpolate filename] - If [interpolate] is true + (the default) then a smooth palette is generated using the color + definitions in the palette file [filename]. Otherwise, the colors + are considered to be discrete, giving a segmented palette. *) + val continuous_palette : ?interpolate:bool -> string -> color_palette_t + + (** [load_palette ?stream palette] loads either indexed or continuous + color palette information from a file on disk. *) + val load_palette : ?stream:stream_t -> color_palette_t -> unit + (** {4 Plot elements} *) (** [arc ?fill color x y a b angle0 angle1] *) @@ -213,21 +264,29 @@ scale:float * float -> float * float -> float * float -> float array array -> plot_t - (** [join color x0 y0 x1 y1] *) - val join : color_t -> float -> float -> float -> float -> plot_t + (** [join ?style color x0 y0 x1 y1] *) + val join : + ?style:line_style_t -> + ?width:int -> + color_t -> float -> float -> float -> float -> plot_t - (** [lines ?label color xs ys] *) + (** [lines ?label ?style color xs ys] *) val lines : - ?label:string -> color_t -> float array -> float array -> plot_t + ?label:string -> + ?style:line_style_t -> + ?width:int -> + color_t -> float array -> float array -> plot_t (** [map ?sw ?ne color outline_type] *) val map : ?sw:float * float -> ?ne:float * float -> color_t -> map_t -> plot_t - (** [points ?label ?scale color xs ys symbol] *) + (** [points ?label ?symbol ?scale color xs ys] *) val points : ?label:string -> - ?scale:float -> color_t -> float array -> float array -> int -> plot_t + ?symbol:symbol_t -> + ?scale:float -> + color_t -> float array -> float array -> plot_t (** [polygon ?fill color xs ys] *) val polygon : @@ -237,28 +296,30 @@ val rectangle : ?fill:bool -> color_t -> float * float -> float * float -> plot_t - (** [text ?dx ?dy ?just ?color string x y] writes the text [string] inside + (** [text ?dx ?dy ?just color x y string ] writes the text [string] inside the plot window, at an optional angle defined by the offsets [dx] and [dy]. *) val text : ?dx:float -> ?dy:float -> - ?just:float -> ?color:color_t -> string -> float -> float -> plot_t + ?just:float -> + color_t -> float -> float -> string -> plot_t - (** [text_outside ?just ?perp ?color side offset string] writes text + (** [text_outside ?just ?perp color side offset string] writes text outside of the plot window, along [side], displaced from the axis by [offset] * character height. *) val text_outside : ?just:float -> ?perp:bool -> - ?color:color_t -> float plot_side_t -> float -> string -> plot_t + color_t -> float plot_side_t -> float -> string -> plot_t - (** [func ?point ?step color f (min, max)] plots the function [f] from + (** [func ?symbol ?step color f (min, max)] plots the function [f] from [x = min] to [x = max]. [step] can be used to tighten or coarsen the sampling of plot points. *) val func : - ?point:int -> - ?step:float -> color_t -> (float -> float) -> float * float -> plot_t + ?symbol:symbol_t -> + ?step:float -> + color_t -> (float -> float) -> float * float -> plot_t (** [transform f] Set the coordinate transformation function used by {!imagefr} and other functions affected by {!Plplot.plset_pltr}. *) @@ -307,6 +368,7 @@ (** Draw the plot axes on the current plot page *) val plot_axes : + ?stream:stream_t -> xtick:float -> xsub:int -> ytick:float -> @@ -315,28 +377,40 @@ (** {4 Finishing up a plot page} *) - val default_finish : ?stream:stream_t -> float -> float -> unit -> unit + (** Plot axes, but don't advance the page or end the session. This is used + internally by [finish]. *) val finish_page : ?stream:stream_t -> - ?f:(unit -> unit) -> ?post:(unit -> unit) -> float -> float -> unit + ?f:(unit -> unit) -> + ?post:(unit -> unit) -> + ?axis:axis_options_t list * axis_options_t list -> + float -> float -> unit + + (** Finish the current page, start a new one. *) val next_page : ?stream:stream_t -> ?f:(unit -> unit) -> ?post:(unit -> unit) -> - float -> float -> float -> float -> plot_scaling_t -> unit + ?axis:axis_options_t list * axis_options_t list -> + ?xstep:float -> + ?ystep:float -> + float * float -> float * float -> plot_scaling_t -> unit (** [finish ?stream xstep ystep] finishes up the plot [stream], using [xstep] and [ystep] for the axis tick. *) val finish : ?stream:stream_t -> - ?f:(unit -> unit) -> ?post:(unit -> unit) -> float -> float -> unit + ?f:(unit -> unit) -> + ?post:(unit -> unit) -> + ?axis:axis_options_t list * axis_options_t list -> + float -> float -> unit end (** {3 A module for quick, "throw-away" plots} *) module Quick_plot : sig - (** {b THIS API IS NOT FIXED AND MAY CHANGE} *) + (** {b THIS API IS NOT FIXED AND MAY CHANGE BEFORE THE 5.10.0 RELEASE} *) (** [points xs ys] plots the points described by the coordinates [xs] and [ys]. *) @@ -344,7 +418,7 @@ ?filename:string -> ?device:Plot.plot_device_t -> ?labels:string * string * string -> - ?log:bool * bool -> float array list -> float array list -> unit + ?log:bool * bool -> (float array * float array) list -> unit (** [lines xs ys] plots the line segments described by the coordinates [xs] and [ys]. *) @@ -353,7 +427,7 @@ ?device:Plot.plot_device_t -> ?labels:string * string * string -> ?names:string list -> - ?log:bool * bool -> float array list -> float array list -> unit + ?log:bool * bool -> (float array * float array) list -> unit (** [image ?log m] plots the image [m] with a matching colorbar. If [log] is true then the data in [m] are assumed to be [log10(x)] values. *) @@ -371,7 +445,7 @@ ?device:Plot.plot_device_t -> ?labels:string * string * string -> ?names:string list -> - ?point:int -> + ?symbol:Plot.symbol_t -> ?step:float -> (float -> float) list -> float * float -> unit end Modified: trunk/examples/ocaml/xplot01.ml =================================================================== --- trunk/examples/ocaml/xplot01.ml 2009-09-23 14:13:53 UTC (rev 10461) +++ trunk/examples/ocaml/xplot01.ml 2009-09-23 16:11:18 UTC (rev 10462) @@ -37,7 +37,7 @@ (* This function will be called just before PLplot is initialized. *) let pre () = - P.load_palette (P.Indexed "cmap0_alternate.pal"); + P.load_palette (P.indexed_palette "cmap0_alternate.pal"); ignore (plparseopts Sys.argv [PL_PARSE_FULL]); () @@ -68,8 +68,8 @@ (* Divide page into 2x2 plots *) (* plplot initialization *) let stream = - P.init ~pre ~pages:(2, 2) xmin xmax ymin ymax - P.Greedy (P.Window P.Cairo) + P.init ~pre ~pages:(2, 2) (xmin, ymin) (xmax, ymax) + P.Greedy P.Prompt_user in (* Select font set as per input flag *) @@ -81,7 +81,7 @@ 0.0 to 6.0, and the range in Y is 0.0 to 30.0. The axes are scaled separately, and we just draw a labelled box. *) P.set_color ~stream:s P.Black; - P.start_page ~stream:s xmin xmax ymin ymax P.Greedy; + P.start_page ~stream:s (xmin, ymin) (xmax, ymax) P.Greedy; s ) | _ -> invalid_arg "Provide a stream or font option, not both" @@ -95,7 +95,7 @@ P.plot ~stream [ (* Plot the data points *) - P.points P.Green xs ys 9; + P.points ~symbol:P.Solar_symbol P.Green xs ys; (* Draw the line through the data *) P.lines P.Red x y; ]; @@ -111,7 +111,7 @@ 10.0, and the range in Y is -0.4 to 2.0. The axes are scaled separately, and we draw a box with axes. *) P.set_color ~stream P.Black; - P.start_page ~stream (-2.0) 10.0 (-0.4) 1.2 P.Greedy; + P.start_page ~stream (-2.0, -0.4) (10.0, 1.2) P.Greedy; P.set_color ~stream P.Blue; P.label ~stream "(x)" "sin(x)/x" "#frPLplot Example 1 - Sinc Function"; @@ -129,11 +129,14 @@ in (* Draw the line *) - (* TODO: Add width support to Plot.lines *) - P.plot ~stream [P.lines P.Brown x y]; + P.plot ~stream [P.lines ~width:2 P.Red x y]; (* Show the axes *) - P.finish_page ~stream 0.0 0.0; + let axis = + P.Axis :: P.default_axis_options, + P.Axis :: P.default_axis_options + in + P.finish_page ~stream ~axis 0.0 0.0; (* All done. *) () @@ -144,7 +147,7 @@ (* Use standard viewport, and define X range from 0 to 360 degrees, Y range from -1.2 to 1.2.*) - P.start_page ~stream 0.0 360.0 (-1.2) 1.2 P.Greedy; + P.start_page ~stream (0.0, -1.2) (360.0, 1.2) P.Greedy; (* Superimpose a dashed line grid, with 1.5 mm marks and spaces. *) P.with_stream ~stream ( @@ -162,23 +165,22 @@ let x = Array.init 101 (fun i -> 3.6 *. float_of_int i) in let y = Array.init 101 (fun i -> sin (x.(i) *. pi /. 180.0)) in - P.plot ~stream [P.lines P.Red x y]; + P.plot ~stream [P.lines P.Brown x y]; (* For the final graph we wish to override the default axis attributes, including tick intervals. Draw a box with ticks spaced 60 degrees apart in X, and 0.2 in Y. *) - let stream = - { - stream with - P.x_axis = [P.Frame0; P.Frame1; P.Label; P.Minor_ticks; P.Major_ticks]; - P.y_axis = [ - P.Frame0; P.Frame1; P.Label; P.Minor_ticks; P.Major_ticks; - P.Vertical_label - ]; - } + let axis = + (* x-axis *) + [P.Frame0; P.Frame1; P.Label; P.Minor_ticks; P.Major_ticks], + (* y-axis *) + [ + P.Frame0; P.Frame1; P.Label; P.Minor_ticks; P.Major_ticks; + P.Vertical_label + ] in - P.finish_page ~stream 60.0 0.2; + P.finish_page ~stream ~axis 60.0 0.2; (* All done. *) () This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hez...@us...> - 2009-09-23 20:57:07
|
Revision: 10463 http://plplot.svn.sourceforge.net/plplot/?rev=10463&view=rev Author: hezekiahcarty Date: 2009-09-23 20:56:58 +0000 (Wed, 23 Sep 2009) Log Message: ----------- Change plparseopts and plsetopt to raise Invalid_argument on bad input These functions previously returned an integer value. If that value is non-zero then there was an error. This update changes these functions to use OCaml exceptions instead. All of the examples are updated as well to illustrate the (slight) simplification this change provides. Modified Paths: -------------- trunk/bindings/ocaml/plplot.mli trunk/bindings/ocaml/plplot_core.idl trunk/bindings/ocaml/plplot_h trunk/bindings/ocaml/plplot_h.inc trunk/bindings/ocaml/plplot_impl.c trunk/examples/ocaml/x01.ml trunk/examples/ocaml/x02.ml trunk/examples/ocaml/x03.ml trunk/examples/ocaml/x04.ml trunk/examples/ocaml/x05.ml trunk/examples/ocaml/x06.ml trunk/examples/ocaml/x07.ml trunk/examples/ocaml/x08.ml trunk/examples/ocaml/x09.ml trunk/examples/ocaml/x10.ml trunk/examples/ocaml/x11.ml trunk/examples/ocaml/x12.ml trunk/examples/ocaml/x13.ml trunk/examples/ocaml/x14.ml trunk/examples/ocaml/x15.ml trunk/examples/ocaml/x16.ml trunk/examples/ocaml/x17.ml trunk/examples/ocaml/x18.ml trunk/examples/ocaml/x19.ml trunk/examples/ocaml/x20.ml trunk/examples/ocaml/x21.ml trunk/examples/ocaml/x22.ml trunk/examples/ocaml/x23.ml trunk/examples/ocaml/x24.ml trunk/examples/ocaml/x25.ml trunk/examples/ocaml/x26.ml trunk/examples/ocaml/x27.ml trunk/examples/ocaml/x28.ml trunk/examples/ocaml/x29.ml trunk/examples/ocaml/x30.ml trunk/examples/ocaml/x31.ml trunk/examples/ocaml/xplot01.ml Modified: trunk/bindings/ocaml/plplot.mli =================================================================== --- trunk/bindings/ocaml/plplot.mli 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/bindings/ocaml/plplot.mli 2009-09-23 20:56:58 UTC (rev 10463) @@ -746,7 +746,7 @@ external plwind : float -> float -> float -> float -> unit = "camlidl_plplot_core_c_plwind" external plxormod : bool -> bool = "camlidl_plplot_core_c_plxormod" -external plsetopt : string -> string -> int +external plsetopt : string -> string -> unit = "camlidl_plplot_core_c_plsetopt" external plMinMax2dGrid : float array array -> float * float = "camlidl_plplot_core_plMinMax2dGrid" @@ -851,7 +851,7 @@ float array -> float array -> plplot_grid_method_type -> float -> float array array = "ml_plgriddata_bytecode" "ml_plgriddata" -external plparseopts : string array -> plplot_parse_method_type list -> int +external plparseopts : string array -> plplot_parse_method_type list -> unit = "ml_plparseopts" (** {3 Non-standard convenience functions (not part of the standard PLplot Modified: trunk/bindings/ocaml/plplot_core.idl =================================================================== --- trunk/bindings/ocaml/plplot_core.idl 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/bindings/ocaml/plplot_core.idl 2009-09-23 20:56:58 UTC (rev 10463) @@ -50,6 +50,10 @@ }; typedef [set] enum plplot_hist_enum plplot_hist_style; +// Any function which has a nonzero_error_int return type will raise +// an Invalid_argument error if the return value is <> 0. +typedef [errorcheck(plplot_check_nonzero_result), errorcode] int nonzero_error_int; + // This is a simplified and modified version of the plplot.h file. #include "plplot_h.inc" @@ -198,5 +202,5 @@ quote(mli, "val plunset_labelfunc : unit -> unit"); RAW_ML(external plgriddata : float array -> float array -> float array -> float array -> float array -> plplot_grid_method_type -> float -> float array array = "ml_plgriddata_bytecode" "ml_plgriddata") -RAW_ML(external plparseopts : string array -> plplot_parse_method_type list -> int = "ml_plparseopts") +RAW_ML(external plparseopts : string array -> plplot_parse_method_type list -> unit = "ml_plparseopts") Modified: trunk/bindings/ocaml/plplot_h =================================================================== --- trunk/bindings/ocaml/plplot_h 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/bindings/ocaml/plplot_h 2009-09-23 20:56:58 UTC (rev 10463) @@ -675,7 +675,9 @@ plSetUsage(const char *program_string, const char *usage_string); */ - int +/* NOTE WARNING XXX: The return type is changed MANUALLY to indicate that any + non-zero return value is an error. */ + nonzero_error_int c_plsetopt(const char *opt, const char *optarg); /* Modified: trunk/bindings/ocaml/plplot_h.inc =================================================================== --- trunk/bindings/ocaml/plplot_h.inc 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/bindings/ocaml/plplot_h.inc 2009-09-23 20:56:58 UTC (rev 10463) @@ -140,5 +140,5 @@ [mlname(plwid)] void c_plwid ( int width ); [mlname(plwind)] void c_plwind ( double xmin, double xmax, double ymin, double ymax ); [mlname(plxormod)] void c_plxormod ( boolean mode, [out] boolean * status ); -[mlname(plsetopt)] int c_plsetopt ( [string] const char * opt, [string] const char * optarg ); +[mlname(plsetopt)] nonzero_error_int c_plsetopt ( [string] const char * opt, [string] const char * optarg ); void plMinMax2dGrid ( [size_is(nx, ny)] double ** f, int nx, int ny, [out] double * fmax, [out] double * fmin ); Modified: trunk/bindings/ocaml/plplot_impl.c =================================================================== --- trunk/bindings/ocaml/plplot_impl.c 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/bindings/ocaml/plplot_impl.c 2009-09-23 20:56:58 UTC (rev 10463) @@ -448,6 +448,16 @@ plpoly3(n, x, y, z, draw, ifcc); } +/* Raise Invalid_argument if the given value is <> 0 */ +void plplot_check_nonzero_result(int result) { + if (result != 0) { + char exception_message[MAX_EXCEPTION_MESSAGE_LENGTH]; + sprintf(exception_message, "Error, return code %d", result); + caml_invalid_argument(exception_message); + } + return; +} + /* Translate the integer version of the OCaml variant to the appropriate PLplot constant. */ int translate_parse_option(int parse_option) { @@ -489,7 +499,12 @@ parse_method = Field(parse_method, 1); } result = plparseopts(&argv_length, argv_copy, combined_parse_method); - CAMLreturn( Val_int(result) ); + if (result != 0) { + char exception_message[MAX_EXCEPTION_MESSAGE_LENGTH]; + sprintf(exception_message, "Invalid arguments in plparseopts, error %d", result); + caml_invalid_argument(exception_message); + } + CAMLreturn( Val_unit ); } value ml_plstripc(value xspec, value yspec, value xmin, value xmax, value xjump, Modified: trunk/examples/ocaml/x01.ml =================================================================== --- trunk/examples/ocaml/x01.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x01.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -243,7 +243,7 @@ (* Parse and process command line arguments *) plMergeOpts(options, "x01c options", notes); *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Get version number, just for kicks *) let plplot_version = plgver () in Modified: trunk/examples/ocaml/x02.ml =================================================================== --- trunk/examples/ocaml/x02.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x02.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -129,7 +129,7 @@ let main () = (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Initialize plplot *) plinit (); Modified: trunk/examples/ocaml/x03.ml =================================================================== --- trunk/examples/ocaml/x03.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x03.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -36,7 +36,7 @@ let y0 = Array.init 361 (fun i -> sin (dtr *. float_of_int i)) in (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Set orientation to landscape - note not all device drivers * support this, in particular most interactive drivers do not *) Modified: trunk/examples/ocaml/x04.ml =================================================================== --- trunk/examples/ocaml/x04.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x04.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -81,7 +81,7 @@ let () = (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Initialize plplot *) plinit(); Modified: trunk/examples/ocaml/x05.ml =================================================================== --- trunk/examples/ocaml/x05.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x05.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -15,7 +15,7 @@ let () = (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Initialize plplot *) plinit (); Modified: trunk/examples/ocaml/x06.ml =================================================================== --- trunk/examples/ocaml/x06.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x06.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -11,7 +11,7 @@ \*--------------------------------------------------------------------------*) let () = (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Initialize plplot *) plinit (); Modified: trunk/examples/ocaml/x07.ml =================================================================== --- trunk/examples/ocaml/x07.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x07.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -15,7 +15,7 @@ let () = (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Initialize plplot *) plinit (); Modified: trunk/examples/ocaml/x08.ml =================================================================== --- trunk/examples/ocaml/x08.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x08.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -85,7 +85,7 @@ let rosen = true in (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Initialize plplot *) plinit (); Modified: trunk/examples/ocaml/x09.ml =================================================================== --- trunk/examples/ocaml/x09.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x09.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -249,7 +249,7 @@ let space = [|1500|] in (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Initialize plplot *) plinit (); Modified: trunk/examples/ocaml/x10.ml =================================================================== --- trunk/examples/ocaml/x10.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x10.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -10,7 +10,7 @@ \*--------------------------------------------------------------------------*) let () = (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Initialize plplot *) plinit (); Modified: trunk/examples/ocaml/x11.ml =================================================================== --- trunk/examples/ocaml/x11.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x11.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -54,7 +54,7 @@ let () = (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Initialize plplot *) plinit (); Modified: trunk/examples/ocaml/x12.ml =================================================================== --- trunk/examples/ocaml/x12.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x12.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -25,7 +25,7 @@ let () = (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Initialize plplot *) plinit (); Modified: trunk/examples/ocaml/x13.ml =================================================================== --- trunk/examples/ocaml/x13.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x13.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -24,7 +24,7 @@ let per = [|10.0; 32.0; 12.0; 30.0; 16.0|] in (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Initialize plplot *) plinit (); Modified: trunk/examples/ocaml/x14.ml =================================================================== --- trunk/examples/ocaml/x14.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x14.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -225,7 +225,7 @@ (* plplot initialization *) (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; let driver = plgdev () in let fam, num, bmax = plgfam () in @@ -242,7 +242,7 @@ if valid_geometry then plspage xp0 yp0 xleng0 yleng0 xoff0 yoff0 else - ignore (plsetopt "geometry" geometry_master); + plsetopt "geometry" geometry_master; plsdev driver; plssub 2 2; @@ -254,13 +254,13 @@ if valid_geometry then plspage xp0 yp0 xleng0 yleng0 xoff0 yoff0 else - ignore (plsetopt "geometry" geometry_slave); + plsetopt "geometry" geometry_slave; (* Turn off pause to make this a slave (must follow master) *) plspause false; plsdev driver; plsfam fam num bmax; - ignore (plsetopt "fflen" "2"); + plsetopt "fflen" "2"; plinit (); (* Set up the data & plot *) Modified: trunk/examples/ocaml/x15.ml =================================================================== --- trunk/examples/ocaml/x15.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x15.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -184,7 +184,7 @@ \*--------------------------------------------------------------------------*) let () = (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Set up color map 1 *) cmap1_init2 (); Modified: trunk/examples/ocaml/x16.ml =================================================================== --- trunk/examples/ocaml/x16.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x16.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -56,7 +56,7 @@ let cont_width = 0 in (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Load color palettes *) plspal0 "cmap0_black_on_white.pal"; Modified: trunk/examples/ocaml/x17.ml =================================================================== --- trunk/examples/ocaml/x17.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x17.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -36,13 +36,13 @@ (* plplot initialization *) (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* If db is used the plot is much more smooth. However, because of the async X behaviour, one does not have a real-time scripcharter. *) (* - ignore (plsetopt "db" ""); - ignore (plsetopt "np" ""); + plsetopt "db" ""; + plsetopt "np" ""; *) (* User sets up plot completely except for window and data Modified: trunk/examples/ocaml/x18.ml =================================================================== --- trunk/examples/ocaml/x18.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x18.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -76,7 +76,7 @@ \*--------------------------------------------------------------------------*) let () = (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Initialize plplot *) plinit (); Modified: trunk/examples/ocaml/x19.ml =================================================================== --- trunk/examples/ocaml/x19.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x19.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -98,7 +98,7 @@ let maxy = 80.0 in (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; plinit(); Modified: trunk/examples/ocaml/x20.ml =================================================================== --- trunk/examples/ocaml/x20.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x20.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -105,7 +105,7 @@ let () = (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Initialize plplot *) plinit (); Modified: trunk/examples/ocaml/x21.ml =================================================================== --- trunk/examples/ocaml/x21.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x21.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -102,7 +102,7 @@ let opt = [|0.0; 0.0; wmin; float_of_int knn_order; threshold; 0.0|] in - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Initialize plplot *) plinit (); Modified: trunk/examples/ocaml/x22.ml =================================================================== --- trunk/examples/ocaml/x22.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x22.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -234,7 +234,7 @@ let () = (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Initialize plplot *) plinit (); Modified: trunk/examples/ocaml/x23.ml =================================================================== --- trunk/examples/ocaml/x23.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x23.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -216,7 +216,7 @@ |] let () = - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; plinit (); Modified: trunk/examples/ocaml/x24.ml =================================================================== --- trunk/examples/ocaml/x24.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x24.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -116,7 +116,7 @@ |] let () = - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; plinit (); Modified: trunk/examples/ocaml/x25.ml =================================================================== --- trunk/examples/ocaml/x25.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x25.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -10,7 +10,7 @@ let () = (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Initialize plplot *) plssub 3 3; Modified: trunk/examples/ocaml/x26.ml =================================================================== --- trunk/examples/ocaml/x26.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x26.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -170,7 +170,7 @@ \*--------------------------------------------------------------------------*) let () = (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Initialize plplot *) plinit (); Modified: trunk/examples/ocaml/x27.ml =================================================================== --- trunk/examples/ocaml/x27.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x27.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -93,7 +93,7 @@ (* plplot initialization *) (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Initialize plplot *) plinit (); Modified: trunk/examples/ocaml/x28.ml =================================================================== --- trunk/examples/ocaml/x28.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x28.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -69,7 +69,7 @@ let z = Array.make_matrix xpts ypts 0.0 in (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; plinit (); Modified: trunk/examples/ocaml/x29.ml =================================================================== --- trunk/examples/ocaml/x29.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x29.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -339,7 +339,7 @@ \*--------------------------------------------------------------------------*) let () = (* Parse command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Initialize plplot *) plinit (); Modified: trunk/examples/ocaml/x30.ml =================================================================== --- trunk/examples/ocaml/x30.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x30.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -43,7 +43,7 @@ let rev = [|false; false|] let () = - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; plinit (); plscmap0n 4; Modified: trunk/examples/ocaml/x31.ml =================================================================== --- trunk/examples/ocaml/x31.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/x31.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -42,7 +42,7 @@ in (* Parse and process command line arguments *) - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; (* Test setting / getting familying parameters before plinit *) (* Save values set by plparseopts to be restored later. *) Modified: trunk/examples/ocaml/xplot01.ml =================================================================== --- trunk/examples/ocaml/xplot01.ml 2009-09-23 16:11:18 UTC (rev 10462) +++ trunk/examples/ocaml/xplot01.ml 2009-09-23 20:56:58 UTC (rev 10463) @@ -38,7 +38,7 @@ (* This function will be called just before PLplot is initialized. *) let pre () = P.load_palette (P.indexed_palette "cmap0_alternate.pal"); - ignore (plparseopts Sys.argv [PL_PARSE_FULL]); + plparseopts Sys.argv [PL_PARSE_FULL]; () let plot1 ?stream ?fontset (do_test, test_xor) params = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hez...@us...> - 2009-09-23 20:57:55
|
Revision: 10464 http://plplot.svn.sourceforge.net/plplot/?rev=10464&view=rev Author: hezekiahcarty Date: 2009-09-23 20:57:49 +0000 (Wed, 23 Sep 2009) Log Message: ----------- Change plglevel to return a variant type in the OCaml bindings This also fixes the use of ( != ) when ( <> ) should have been used in example 31. Modified Paths: -------------- trunk/bindings/ocaml/plplot.mli trunk/bindings/ocaml/plplot_core.idl trunk/bindings/ocaml/plplot_h trunk/bindings/ocaml/plplot_h.inc trunk/examples/ocaml/x31.ml Modified: trunk/bindings/ocaml/plplot.mli =================================================================== --- trunk/bindings/ocaml/plplot.mli 2009-09-23 20:56:58 UTC (rev 10463) +++ trunk/bindings/ocaml/plplot.mli 2009-09-23 20:57:49 UTC (rev 10464) @@ -480,6 +480,12 @@ | PL_HIST_NOEXPAND | PL_HIST_NOEMPTY and plplot_hist_style = plplot_hist_enum list +and plplot_run_level_enum = + | PL_UNINITIALIZED + | PL_INITIALIZED + | PL_VIEWPORT_DEFINED + | PL_WORLD_COORDINATES_DEFINED +and plplot_run_level = plplot_run_level_enum external pl_setcontlabelformat : int -> int -> unit = "camlidl_plplot_core_c_pl_setcontlabelformat" external pl_setcontlabelparam : float -> float -> float -> int -> unit @@ -559,7 +565,7 @@ external plgfam : unit -> int * int * int = "camlidl_plplot_core_c_plgfam" external plgfnam : unit -> string = "camlidl_plplot_core_c_plgfnam" external plgfont : unit -> int * int * int = "camlidl_plplot_core_c_plgfont" -external plglevel : unit -> int = "camlidl_plplot_core_c_plglevel" +external plglevel : unit -> plplot_run_level = "camlidl_plplot_core_c_plglevel" external plgpage : unit -> float * float * int * int * int * int = "camlidl_plplot_core_c_plgpage" external plgra : unit -> unit = "camlidl_plplot_core_c_plgra" Modified: trunk/bindings/ocaml/plplot_core.idl =================================================================== --- trunk/bindings/ocaml/plplot_core.idl 2009-09-23 20:56:58 UTC (rev 10463) +++ trunk/bindings/ocaml/plplot_core.idl 2009-09-23 20:57:49 UTC (rev 10464) @@ -50,6 +50,14 @@ }; typedef [set] enum plplot_hist_enum plplot_hist_style; +enum plplot_run_level_enum { + PL_UNINITIALIZED = 0, + PL_INITIALIZED = 1, + PL_VIEWPORT_DEFINED = 2, + PL_WORLD_COORDINATES_DEFINED = 3, +}; +typedef enum plplot_run_level_enum plplot_run_level; + // Any function which has a nonzero_error_int return type will raise // an Invalid_argument error if the return value is <> 0. typedef [errorcheck(plplot_check_nonzero_result), errorcode] int nonzero_error_int; Modified: trunk/bindings/ocaml/plplot_h =================================================================== --- trunk/bindings/ocaml/plplot_h 2009-09-23 20:56:58 UTC (rev 10463) +++ trunk/bindings/ocaml/plplot_h 2009-09-23 20:57:49 UTC (rev 10464) @@ -173,7 +173,7 @@ c_plgfont(PLINT *p_family, PLINT *p_style, PLINT *p_weight); void -c_plglevel(PLINT *p_level); +c_plglevel(plplot_run_level *p_level); void c_plgpage(PLFLT *p_xp, PLFLT *p_yp, Modified: trunk/bindings/ocaml/plplot_h.inc =================================================================== --- trunk/bindings/ocaml/plplot_h.inc 2009-09-23 20:56:58 UTC (rev 10463) +++ trunk/bindings/ocaml/plplot_h.inc 2009-09-23 20:57:49 UTC (rev 10464) @@ -42,7 +42,7 @@ [mlname(plgfam)] void c_plgfam ( [out] int * p_fam, [out] int * p_num, [out] int * p_bmax ); [mlname(plgfnam)] void c_plgfnam ( [string, out, length_is(1024)] char * fnam ); [mlname(plgfont)] void c_plgfont ( [out] int * p_family, [out] int * p_style, [out] int * p_weight ); -[mlname(plglevel)] void c_plglevel ( [out] int * p_level ); +[mlname(plglevel)] void c_plglevel ( [out] plplot_run_level * p_level ); [mlname(plgpage)] void c_plgpage ( [out] double * p_xp, [out] double * p_yp, [out] int * p_xleng, [out] int * p_yleng, [out] int * p_xoff, [out] int * p_yoff ); [mlname(plgra)] void c_plgra ( void ); [mlname(plgspa)] void c_plgspa ( [out] double * xmin, [out] double * xmax, [out] double * ymin, [out] double * ymax ); Modified: trunk/examples/ocaml/x31.ml =================================================================== --- trunk/examples/ocaml/x31.ml 2009-09-23 20:56:58 UTC (rev 10463) +++ trunk/examples/ocaml/x31.ml 2009-09-23 20:57:49 UTC (rev 10464) @@ -107,10 +107,14 @@ plscol0 1 255 0 0; plscmap1 r1 g1 b1; plscmap1a r1 g1 b1 a1; - + let level2 = plglevel () in - printf "level parameter = %d\n" level2; - failed_if (level2 != 1) "plglevel test failed.\n"; + (* WARNING: The use of Obj.magic here is a cheat. This really should be + replaced by a proper int_of_plplot_run_level function. This example is + the only place it would be needed though, so it is not worth it at + this time. *) + printf "level parameter = %d\n" (Obj.magic level2); + failed_if (level2 <> PL_INITIALIZED) "plglevel test failed.\n"; pladv 0; plvpor 0.01 0.99 0.02 0.49; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2009-09-23 23:34:19
|
Revision: 10467 http://plplot.svn.sourceforge.net/plplot/?rev=10467&view=rev Author: airwin Date: 2009-09-23 23:34:11 +0000 (Wed, 23 Sep 2009) Log Message: ----------- Reduce indentation of wrapped argument lists for functions. I have only spot checked this change in style, but it really makes a positive improvement for those cases where the function call is way to the right in the line. Furthermore, "svn diff -x -w" shows there are no changes other than white space ones. Modified Paths: -------------- trunk/src/pdfutils.c trunk/src/plarc.c trunk/src/plargs.c trunk/src/plbox.c trunk/src/plbuf.c trunk/src/plcont.c trunk/src/plcore.c trunk/src/plctrl.c trunk/src/pldeprecated.c trunk/src/pldtik.c trunk/src/plfill.c trunk/src/plfreetype.c trunk/src/plgridd.c trunk/src/plhist.c trunk/src/plimage.c trunk/src/plline.c trunk/src/plmap.c trunk/src/plot3d.c trunk/src/plpage.c trunk/src/plsdef.c trunk/src/plshade.c trunk/src/plstripc.c trunk/src/plsym.c trunk/src/pltime.c trunk/src/plvect.c trunk/src/plvpor.c trunk/src/plwind.c trunk/uncrustify.cfg Modified: trunk/src/pdfutils.c =================================================================== --- trunk/src/pdfutils.c 2009-09-23 22:33:33 UTC (rev 10466) +++ trunk/src/pdfutils.c 2009-09-23 23:34:11 UTC (rev 10467) @@ -108,7 +108,7 @@ if ( binary ) { Tcl_SetChannelOption( NULL, pdfs->tclChan, "-translation", - "binary" ); + "binary" ); } } } @@ -263,11 +263,11 @@ if ( pdfs->bp >= pdfs->bufmax ) { pldebug( "pdf_putc", - "Increasing buffer to %d bytes\n", pdfs->bufmax ); + "Increasing buffer to %d bytes\n", pdfs->bufmax ); pdfs->bufmax += 512; if (( pdfs->buffer = (U_CHAR *) realloc((void *) pdfs->buffer, - pdfs->bufmax )) == NULL ) + pdfs->bufmax )) == NULL ) { plexit( "pdf_putc: Insufficient memory" ); } @@ -384,11 +384,11 @@ if ( pdfs->bp >= pdfs->bufmax ) { pldebug( "pdf_wrx", - "Increasing buffer to %d bytes\n", pdfs->bufmax ); + "Increasing buffer to %d bytes\n", pdfs->bufmax ); pdfs->bufmax += 512; if (( pdfs->buffer = (U_CHAR *) realloc((void *) ( pdfs->buffer ), - pdfs->bufmax )) == NULL ) + pdfs->bufmax )) == NULL ) { plexit( "pdf_wrx: Insufficient memory" ); } Modified: trunk/src/plarc.c =================================================================== --- trunk/src/plarc.c 2009-09-23 22:33:33 UTC (rev 10466) +++ trunk/src/plarc.c 2009-09-23 23:34:11 UTC (rev 10467) @@ -35,12 +35,12 @@ *-------------------------------------------------------------------------*/ void plarc_approx( PLFLT x, - PLFLT y, - PLFLT a, - PLFLT b, - PLFLT angle1, - PLFLT angle2, - PLBOOL fill ) + PLFLT y, + PLFLT a, + PLFLT b, + PLFLT angle1, + PLFLT angle2, + PLBOOL fill ) { PLINT i; PLFLT theta0, theta_step, theta, d_angle; @@ -112,12 +112,12 @@ *-------------------------------------------------------------------------*/ void c_plarc( PLFLT x, - PLFLT y, - PLFLT a, - PLFLT b, - PLFLT angle1, - PLFLT angle2, - PLBOOL fill ) + PLFLT y, + PLFLT a, + PLFLT b, + PLFLT angle1, + PLFLT angle2, + PLBOOL fill ) { PLINT xscl[2], yscl[2]; PLINT clpxmi, clpxma, clpymi, clpyma; Modified: trunk/src/plargs.c =================================================================== --- trunk/src/plargs.c 2009-09-23 22:33:33 UTC (rev 10466) +++ trunk/src/plargs.c 2009-09-23 23:34:11 UTC (rev 10467) @@ -101,15 +101,15 @@ /* Support functions */ static int ParseOpt( int *, - const char ***, - int *, - const char ***, - PLOptionTable * ); + const char ***, + int *, + const char ***, + PLOptionTable * ); static int ProcessOpt( const char *, - PLOptionTable *, - int *, - const char ***, - int * ); + PLOptionTable *, + int *, + const char ***, + int * ); static int GetOptarg( const char **, int *, const char ***, int * ); static void Help( void ); static void Syntax( void ); @@ -877,7 +877,7 @@ /* Check option table for option */ status = ParseOpt( &myargc, &argv, p_argc, &argsave, - ploption_info[i].options ); + ploption_info[i].options ); if ( !status ) break; } @@ -948,10 +948,10 @@ static int ParseOpt( int *p_myargc, - const char ***p_argv, - int *p_argc, - const char ***p_argsave, - PLOptionTable *option_table ) + const char ***p_argv, + int *p_argc, + const char ***p_argsave, + PLOptionTable *option_table ) { PLOptionTable *tab; const char *opt; @@ -1003,10 +1003,10 @@ static int ProcessOpt( const char *opt, - PLOptionTable *tab, - int *p_myargc, - const char ***p_argv, - int *p_argc ) + PLOptionTable *tab, + int *p_myargc, + const char ***p_argv, + int *p_argc ) { int need_arg, res; const char *optarg = NULL; @@ -1032,8 +1032,8 @@ if ( tab->handler == NULL ) { fprintf( stderr, - "ProcessOpt: no handler specified for option %s\n", - tab->opt ); + "ProcessOpt: no handler specified for option %s\n", + tab->opt ); return 1; } @@ -1065,8 +1065,8 @@ if ( tab->var == NULL ) { fprintf( stderr, - "ProcessOpt: no variable specified for option %s\n", - tab->opt ); + "ProcessOpt: no variable specified for option %s\n", + tab->opt ); return 1; } *(int *) tab->var = 1; @@ -1079,8 +1079,8 @@ if ( tab->var == NULL ) { fprintf( stderr, - "ProcessOpt: no variable specified for option %s\n", - tab->opt ); + "ProcessOpt: no variable specified for option %s\n", + tab->opt ); return 1; } *(int *) tab->var = atoi( optarg ); @@ -1093,8 +1093,8 @@ if ( tab->var == NULL ) { fprintf( stderr, - "ProcessOpt: no variable specified for option %s\n", - tab->opt ); + "ProcessOpt: no variable specified for option %s\n", + tab->opt ); return 1; } *(PLFLT *) tab->var = atof( optarg ); @@ -1112,8 +1112,8 @@ /* Somebody messed up.. */ fprintf( stderr, - "ProcessOpt: invalid processing mode for option %s\n", - tab->opt ); + "ProcessOpt: invalid processing mode for option %s\n", + tab->opt ); return 1; } return 0; @@ -1128,9 +1128,9 @@ static int GetOptarg( const char **poptarg, - int *p_myargc, - const char ***p_argv, - int *p_argc ) + int *p_myargc, + const char ***p_argv, + int *p_argc ) { int result = 0; @@ -1159,8 +1159,8 @@ if ( !mode_quiet ) { fprintf( stderr, - "Argument missing for %s option.\n", - ( *p_argv )[0] ); + "Argument missing for %s option.\n", + ( *p_argv )[0] ); plOptUsage(); } } @@ -1200,7 +1200,7 @@ Syntax(); fprintf( stderr, "\n\nType %s -h for a full description.\n\n", - program ); + program ); } /*--------------------------------------------------------------------------*\ @@ -1366,7 +1366,7 @@ *(char **) ( t->var_ptr ) = ( drvp->value ); #ifdef DEBUG fprintf( stderr, "plParseDrvOpts: %s %s\n", t->opt, - *(char**) t->var_ptr ); + *(char**) t->var_ptr ); #endif break; @@ -1374,16 +1374,16 @@ if ( sscanf( drvp->value, "%d", (int *) t->var_ptr ) != 1 ) { snprintf( msg, - sizeof ( msg ) - 1, - "Incorrect argument to '%s' option", - drvp->option ); + sizeof ( msg ) - 1, + "Incorrect argument to '%s' option", + drvp->option ); plexit( msg ); } #ifdef DEBUG fprintf( stderr, - "plParseDrvOpts: %s %d\n", - t->opt, - *(int *) t->var_ptr ); + "plParseDrvOpts: %s %d\n", + t->opt, + *(int *) t->var_ptr ); #endif break; @@ -1391,14 +1391,14 @@ if ( sscanf( drvp->value, "%f", (float *) t->var_ptr ) != 1 ) { snprintf( msg, - sizeof ( msg ) - 1, - "Incorrect argument to '%s' option", - drvp->option ); + sizeof ( msg ) - 1, + "Incorrect argument to '%s' option", + drvp->option ); plexit( msg ); } #ifdef DEBUG fprintf( stderr, "plParseDrvOpts: %s %f\n", t->opt, - *(float *) t->var_ptr ); + *(float *) t->var_ptr ); #endif break; } @@ -1786,8 +1786,8 @@ default: fprintf( stderr, - "Unrecognized background color value %s\n", - color_field ); + "Unrecognized background color value %s\n", + color_field ); return 1; } @@ -2018,8 +2018,8 @@ if ( bytemax <= 0 ) { fprintf( stderr, - "?invalid file size %d. 2.14G is the maximum.\n", - bytemax ); + "?invalid file size %d. 2.14G is the maximum.\n", + bytemax ); return 1; } plsfam( 1, -1, bytemax ); @@ -2170,7 +2170,7 @@ if (( plsc->plwindow = (char *) malloc((size_t) ( 1 + strlen( optarg )) * - sizeof ( char ))) == NULL ) + sizeof ( char ))) == NULL ) { plexit( "opt_plwindow: Insufficient memory" ); } @@ -2276,7 +2276,7 @@ if (( plsc->geometry = (char *) malloc((size_t) ( 1 + strlen( optarg )) * - sizeof ( char ))) == NULL ) + sizeof ( char ))) == NULL ) { plexit( "opt_geo: Insufficient memory" ); } @@ -2335,7 +2335,7 @@ if (( plsc->tk_file = (char *) malloc((size_t) ( 1 + strlen( optarg )) * - sizeof ( char ))) == NULL ) + sizeof ( char ))) == NULL ) { plexit( "opt_tk_file: Insufficient memory" ); } Modified: trunk/src/plbox.c =================================================================== --- trunk/src/plbox.c 2009-09-23 22:33:33 UTC (rev 10466) +++ trunk/src/plbox.c 2009-09-23 23:34:11 UTC (rev 10467) @@ -38,36 +38,36 @@ static void plxybx( const char *opt, const char *label, PLINT axis, PLFLT wx1, PLFLT wy1, - PLFLT wx2, PLFLT wy2, PLFLT vmin, PLFLT vmax, - PLFLT tick, PLINT nsub, PLINT nolast, PLINT *digits ); + PLFLT wx2, PLFLT wy2, PLFLT vmin, PLFLT vmax, + PLFLT tick, PLINT nsub, PLINT nolast, PLINT *digits ); static void plzbx( const char *opt, const char *label, PLINT right, PLFLT dx, PLFLT dy, - PLFLT wx, PLFLT wy1, PLFLT wy2, PLFLT vmin, PLFLT vmax, - PLFLT tick, PLINT nsub, PLINT *digits ); + PLFLT wx, PLFLT wy1, PLFLT wy2, PLFLT vmin, PLFLT vmax, + PLFLT tick, PLINT nsub, PLINT *digits ); static void plxytx( PLFLT wx1, PLFLT wy1, PLFLT wx2, PLFLT wy2, - PLFLT disp, PLFLT pos, PLFLT just, const char *text ); + PLFLT disp, PLFLT pos, PLFLT just, const char *text ); static void plztx( const char *opt, PLFLT dx, PLFLT dy, PLFLT wx, PLFLT wy1, - PLFLT wy2, PLFLT disp, PLFLT pos, PLFLT just, const char *text ); + PLFLT wy2, PLFLT disp, PLFLT pos, PLFLT just, const char *text ); static void plform( PLINT axis, - PLFLT value, - PLINT scale, - PLINT prec, - char *result, - PLINT len, - PLBOOL ll, - PLBOOL lf, - PLBOOL lo ); + PLFLT value, + PLINT scale, + PLINT prec, + char *result, + PLINT len, + PLBOOL ll, + PLBOOL lf, + PLBOOL lo ); static void grid_box( const char *xopt, PLFLT xtick1, PLINT nxsub1, - const char *yopt, PLFLT ytick1, PLINT nysub1 ); + const char *yopt, PLFLT ytick1, PLINT nysub1 ); static void label_box( const char *xopt, PLFLT xtick1, const char *yopt, PLFLT ytick1 ); @@ -84,7 +84,7 @@ void c_plbox( const char *xopt, PLFLT xtick, PLINT nxsub, - const char *yopt, PLFLT ytick, PLINT nysub ) + const char *yopt, PLFLT ytick, PLINT nysub ) { c_plaxes( 0.0, 0.0, xopt, xtick, nxsub, yopt, ytick, nysub ); } @@ -124,8 +124,8 @@ void c_plaxes( PLFLT x0, PLFLT y0, - const char *xopt, PLFLT xtick, PLINT nxsub, - const char *yopt, PLFLT ytick, PLINT nysub ) + const char *xopt, PLFLT xtick, PLINT nxsub, + const char *yopt, PLFLT ytick, PLINT nysub ) { PLBOOL lax, lbx, lcx, ldx, lgx, lix, llx, lsx, ltx; PLBOOL lay, lby, lcy, ldy, lgy, liy, lly, lsy, lty; @@ -459,7 +459,7 @@ temp = tp + xlog[i]; if ( BETW( temp, vpwxmi, vpwxma )) plxtik( plP_wcpcx( - temp ), (PLINT) yp0, xminor, xminor ); + temp ), (PLINT) yp0, xminor, xminor ); } } else @@ -469,7 +469,7 @@ temp = tp + i * xtick1 / nxsub1; if ( BETW( temp, vpwxmi, vpwxma )) plxtik( plP_wcpcx( - temp ), (PLINT) yp0, xminor, xminor ); + temp ), (PLINT) yp0, xminor, xminor ); } } } @@ -502,7 +502,7 @@ temp = tp + xlog[i]; if ( BETW( temp, vpwymi, vpwyma )) plytik((PLINT) xp0, plP_wcpcy( - temp ), yminor, yminor ); + temp ), yminor, yminor ); } } else @@ -512,7 +512,7 @@ temp = tp + i * ytick1 / nysub1; if ( BETW( temp, vpwymi, vpwyma )) plytik((PLINT) xp0, plP_wcpcy( - temp ), yminor, yminor ); + temp ), yminor, yminor ); } } } @@ -545,8 +545,8 @@ void c_plbox3( const char *xopt, const char *xlabel, PLFLT xtick, PLINT nsubx, - const char *yopt, const char *ylabel, PLFLT ytick, PLINT nsuby, - const char *zopt, const char *zlabel, PLFLT ztick, PLINT nsubz ) + const char *yopt, const char *ylabel, PLFLT ytick, PLINT nsuby, + const char *zopt, const char *zlabel, PLFLT ztick, PLINT nsubz ) { PLFLT dx, dy, tx, ty, ux, uy; PLFLT xmin, xmax, ymin, ymax, zmin, zmax, zscale; @@ -596,30 +596,30 @@ ux = plP_w3wcx( xmax, ymin, zmin ); uy = plP_w3wcy( xmax, ymin, zmin ); plxybx( xopt, xlabel, PL_X_AXIS, tx, ty, ux, uy, - xmin, xmax, xtick, nsubx, 0, &xdigits ); + xmin, xmax, xtick, nsubx, 0, &xdigits ); dx = ux - tx; dy = uy - ty; plzbx( zopt, zlabel, 1, dx, dy, ux, uy, - plP_w3wcy( xmax, - ymin, - zmax ), zmin, zmax, ztick, nsubz, &zdigits ); + plP_w3wcy( xmax, + ymin, + zmax ), zmin, zmax, ztick, nsubz, &zdigits ); tx = plP_w3wcx( xmin, ymax, zmin ); ty = plP_w3wcy( xmin, ymax, zmin ); ux = plP_w3wcx( xmin, ymin, zmin ); uy = plP_w3wcy( xmin, ymin, zmin ); plxybx( yopt, ylabel, PL_Y_AXIS, tx, ty, ux, uy, - ymax, ymin, ytick, nsuby, ln, &ydigits ); + ymax, ymin, ytick, nsuby, ln, &ydigits ); dx = ux - tx; dy = uy - ty; /* restore zdigits to initial value for second call */ zdigits = zdigmax; plzbx( zopt, zlabel, 0, dx, dy, tx, ty, - plP_w3wcy( xmin, - ymax, - zmax ), zmin, zmax, ztick, nsubz, &zdigits ); + plP_w3wcy( xmin, + ymax, + zmax ), zmin, zmax, ztick, nsubz, &zdigits ); } else if ( cxx <= 0.0 && cxy <= 0.0 ) { @@ -629,30 +629,30 @@ ux = plP_w3wcx( xmin, ymin, zmin ); uy = plP_w3wcy( xmin, ymin, zmin ); plxybx( yopt, ylabel, PL_Y_AXIS, tx, ty, ux, uy, - ymax, ymin, ytick, nsuby, 0, &ydigits ); + ymax, ymin, ytick, nsuby, 0, &ydigits ); dx = ux - tx; dy = uy - ty; plzbx( zopt, zlabel, 1, dx, dy, ux, uy, - plP_w3wcy( xmin, - ymin, - zmax ), zmin, zmax, ztick, nsubz, &zdigits ); + plP_w3wcy( xmin, + ymin, + zmax ), zmin, zmax, ztick, nsubz, &zdigits ); tx = plP_w3wcx( xmax, ymax, zmin ); ty = plP_w3wcy( xmax, ymax, zmin ); ux = plP_w3wcx( xmin, ymax, zmin ); uy = plP_w3wcy( xmin, ymax, zmin ); plxybx( xopt, xlabel, PL_X_AXIS, tx, ty, ux, uy, - xmax, xmin, xtick, nsubx, ln, &xdigits ); + xmax, xmin, xtick, nsubx, ln, &xdigits ); dx = ux - tx; dy = uy - ty; /* restore zdigits to initial value for second call */ zdigits = zdigmax; plzbx( zopt, zlabel, 0, dx, dy, tx, ty, - plP_w3wcy( xmax, - ymax, - zmax ), zmin, zmax, ztick, nsubz, &zdigits ); + plP_w3wcy( xmax, + ymax, + zmax ), zmin, zmax, ztick, nsubz, &zdigits ); } else if ( cxx <= 0.0 && cxy >= 0.0 ) { @@ -662,30 +662,30 @@ ux = plP_w3wcx( xmin, ymax, zmin ); uy = plP_w3wcy( xmin, ymax, zmin ); plxybx( xopt, xlabel, PL_X_AXIS, tx, ty, ux, uy, - xmax, xmin, xtick, nsubx, 0, &xdigits ); + xmax, xmin, xtick, nsubx, 0, &xdigits ); dx = ux - tx; dy = uy - ty; plzbx( zopt, zlabel, 1, dx, dy, ux, uy, - plP_w3wcy( xmin, - ymax, - zmax ), zmin, zmax, ztick, nsubz, &zdigits ); + plP_w3wcy( xmin, + ymax, + zmax ), zmin, zmax, ztick, nsubz, &zdigits ); tx = plP_w3wcx( xmax, ymin, zmin ); ty = plP_w3wcy( xmax, ymin, zmin ); ux = plP_w3wcx( xmax, ymax, zmin ); uy = plP_w3wcy( xmax, ymax, zmin ); plxybx( yopt, ylabel, PL_Y_AXIS, tx, ty, ux, uy, - ymin, ymax, ytick, nsuby, ln, &ydigits ); + ymin, ymax, ytick, nsuby, ln, &ydigits ); dx = ux - tx; dy = uy - ty; /* restore zdigits to initial value for second call */ zdigits = zdigmax; plzbx( zopt, zlabel, 0, dx, dy, tx, ty, - plP_w3wcy( xmax, - ymin, - zmax ), zmin, zmax, ztick, nsubz, &zdigits ); + plP_w3wcy( xmax, + ymin, + zmax ), zmin, zmax, ztick, nsubz, &zdigits ); } else if ( cxx >= 0.0 && cxy >= 0.0 ) { @@ -695,30 +695,30 @@ ux = plP_w3wcx( xmax, ymax, zmin ); uy = plP_w3wcy( xmax, ymax, zmin ); plxybx( yopt, ylabel, PL_X_AXIS, tx, ty, ux, uy, - ymin, ymax, ytick, nsuby, 0, &ydigits ); + ymin, ymax, ytick, nsuby, 0, &ydigits ); dx = ux - tx; dy = uy - ty; plzbx( zopt, zlabel, 1, dx, dy, ux, uy, - plP_w3wcy( xmax, - ymax, - zmax ), zmin, zmax, ztick, nsubz, &zdigits ); + plP_w3wcy( xmax, + ymax, + zmax ), zmin, zmax, ztick, nsubz, &zdigits ); tx = plP_w3wcx( xmin, ymin, zmin ); ty = plP_w3wcy( xmin, ymin, zmin ); ux = plP_w3wcx( xmax, ymin, zmin ); uy = plP_w3wcy( xmax, ymin, zmin ); plxybx( xopt, xlabel, PL_X_AXIS, tx, ty, ux, uy, - xmin, xmax, xtick, nsubx, ln, &xdigits ); + xmin, xmax, xtick, nsubx, ln, &xdigits ); dx = ux - tx; dy = uy - ty; /* restore zdigits to initial value for second call */ zdigits = zdigmax; plzbx( zopt, zlabel, 0, dx, dy, tx, ty, - plP_w3wcy( xmin, - ymin, - zmax ), zmin, zmax, ztick, nsubz, &zdigits ); + plP_w3wcy( xmin, + ymin, + zmax ), zmin, zmax, ztick, nsubz, &zdigits ); } plsxax( xdigmax, xdigits ); plsyax( ydigmax, ydigits ); @@ -751,8 +751,8 @@ static void plxybx( const char *opt, const char *label, PLINT axis, PLFLT wx1, PLFLT wy1, - PLFLT wx2, PLFLT wy2, PLFLT vmin_in, PLFLT vmax_in, - PLFLT tick, PLINT nsub, PLINT nolast, PLINT *digits ) + PLFLT wx2, PLFLT wy2, PLFLT vmin_in, PLFLT vmax_in, + PLFLT tick, PLINT nsub, PLINT nolast, PLINT *digits ) { static char string[STRING_LEN]; PLINT lb, ld, lf, li, ll, ln, ls, lt, lu, lo; @@ -837,8 +837,8 @@ ( temp - vmin ) / ( vmax - vmin ) : ( vmax - temp ) / ( vmax - vmin ); plxtik( plP_wcpcx((PLFLT) ( wx1 + lambda * dwx )), - plP_wcpcy((PLFLT) ( wy1 + lambda * dwy )), - i1, i2 ); + plP_wcpcy((PLFLT) ( wy1 + lambda * dwy )), + i1, i2 ); } } } @@ -853,8 +853,8 @@ ( temp - vmin ) / ( vmax - vmin ) : ( vmax - temp ) / ( vmax - vmin ); plxtik( plP_wcpcx((PLFLT) ( wx1 + lambda * dwx )), - plP_wcpcy((PLFLT) ( wy1 + lambda * dwy )), - i1, i2 ); + plP_wcpcy((PLFLT) ( wy1 + lambda * dwy )), + i1, i2 ); } } } @@ -867,7 +867,7 @@ ( temp - vmin ) / ( vmax - vmin ) : ( vmax - temp ) / ( vmax - vmin ); plxtik( plP_wcpcx((PLFLT) ( wx1 + lambda * dwx )), - plP_wcpcy((PLFLT) ( wy1 + lambda * dwy )), i3, i4 ); + plP_wcpcy((PLFLT) ( wy1 + lambda * dwy )), i3, i4 ); tp = tn; } } @@ -911,7 +911,7 @@ static void plxytx( PLFLT wx1, PLFLT wy1, PLFLT wx2, PLFLT wy2, - PLFLT disp, PLFLT pos, PLFLT just, const char *text ) + PLFLT disp, PLFLT pos, PLFLT just, const char *text ) { PLINT x, y, refx, refy; PLFLT shift, cc, ss, wx, wy; @@ -979,8 +979,8 @@ static void plzbx( const char *opt, const char *label, PLINT right, PLFLT dx, PLFLT dy, - PLFLT wx, PLFLT wy1, PLFLT wy2, PLFLT vmin_in, PLFLT vmax_in, - PLFLT tick, PLINT nsub, PLINT *digits ) + PLFLT wx, PLFLT wy1, PLFLT wy2, PLFLT vmin_in, PLFLT vmax_in, + PLFLT tick, PLINT nsub, PLINT *digits ) { static char string[STRING_LEN]; PLINT lb, lc, ld, lf, li, ll, lm, ln, ls, lt, lu, lv, lo; @@ -1073,8 +1073,8 @@ ( temp - vmin ) / ( vmax - vmin ) : ( vmax - temp ) / ( vmax - vmin ); plstik( plP_wcmmx( wx ), - plP_wcmmy((PLFLT) ( wy1 + lambda * dwy )), - xminor, yminor ); + plP_wcmmy((PLFLT) ( wy1 + lambda * dwy )), + xminor, yminor ); } } } @@ -1089,8 +1089,8 @@ ( temp - vmin ) / ( vmax - vmin ) : ( vmax - temp ) / ( vmax - vmin ); plstik( plP_wcmmx( wx ), - plP_wcmmy((PLFLT) ( wy1 + lambda * dwy )), - xminor, yminor ); + plP_wcmmy((PLFLT) ( wy1 + lambda * dwy )), + xminor, yminor ); } } } @@ -1102,7 +1102,7 @@ ( temp - vmin ) / ( vmax - vmin ) : ( vmax - temp ) / ( vmax - vmin ); plstik( plP_wcmmx( wx ), plP_wcmmy((PLFLT) ( wy1 + lambda * dwy )), - xmajor, ymajor ); + xmajor, ymajor ); tp = tn; } } @@ -1142,7 +1142,7 @@ if ( lm && right ) { plztx( "v", dx, dy, wx, wy1, wy2, - (PLFLT) -height, pos, 0.5, string ); + (PLFLT) -height, pos, 0.5, string ); } } } @@ -1157,7 +1157,7 @@ static void plztx( const char *opt, PLFLT dx, PLFLT dy, PLFLT wx, PLFLT wy1, - PLFLT wy2, PLFLT disp, PLFLT pos, PLFLT just, const char *text ) + PLFLT wy2, PLFLT disp, PLFLT pos, PLFLT just, const char *text ) { PLINT refx = 0, refy = 0, x = 0, y = 0, vert = 0; PLFLT shift, cc, ss, wy; @@ -1226,7 +1226,7 @@ static void grid_box( const char *xopt, PLFLT xtick1, PLINT nxsub1, - const char *yopt, PLFLT ytick1, PLINT nysub1 ) + const char *yopt, PLFLT ytick1, PLINT nysub1 ) { PLINT lgx, lhx, llx; PLINT lgy, lhy, lly; @@ -1400,22 +1400,22 @@ if ( ldx ) { strfqsas( string, - STRING_LEN, - timefmt, - (double) tn, - plsc->qsasconfig ); + STRING_LEN, + timefmt, + (double) tn, + plsc->qsasconfig ); } else { plform( PL_X_AXIS, - tn, - xscale, - xprec, - string, - STRING_LEN, - llx, - lfx, - lox ); + tn, + xscale, + xprec, + string, + STRING_LEN, + llx, + lfx, + lox ); } height = lix ? 1.75 : 1.5; pos = ( vpwxmax > vpwxmin ) ? @@ -1479,22 +1479,22 @@ if ( ldy ) { strfqsas( string, - STRING_LEN, - timefmt, - (double) tn, - plsc->qsasconfig ); + STRING_LEN, + timefmt, + (double) tn, + plsc->qsasconfig ); } else { plform( PL_Y_AXIS, - tn, - yscale, - yprec, - string, - STRING_LEN, - lly, - lfy, - loy ); + tn, + yscale, + yprec, + string, + STRING_LEN, + lly, + lfy, + loy ); } pos = ( vpwymax > vpwymin ) ? ( tn - vpwymi ) / ( vpwyma - vpwymi ) : @@ -1593,14 +1593,14 @@ static void plform( PLINT axis, - PLFLT value, - PLINT scale, - PLINT prec, - char *string, - PLINT len, - PLBOOL ll, - PLBOOL lf, - PLBOOL lo ) + PLFLT value, + PLINT scale, + PLINT prec, + char *string, + PLINT len, + PLBOOL ll, + PLBOOL lf, + PLBOOL lo ) { /* Check to see if a custom labeling function is defined. If not, */ if ( lo && plsc->label_func ) @@ -1697,10 +1697,10 @@ \*--------------------------------------------------------------------------*/ void c_plslabelfunc( void ( *label_func )( PLINT, - PLFLT, - char *, - PLINT, - PLPointer ), PLPointer label_data ) + PLFLT, + char *, + PLINT, + PLPointer ), PLPointer label_data ) { plsc->label_func = label_func; plsc->label_data = label_data; Modified: trunk/src/plbuf.c =================================================================== --- trunk/src/plbuf.c 2009-09-23 22:33:33 UTC (rev 10466) +++ trunk/src/plbuf.c 2009-09-23 23:34:11 UTC (rev 10467) @@ -268,9 +268,9 @@ wr_data( pls, pls->dev_ix, sizeof ( short ) * npts ); wr_data( pls, pls->dev_iy, sizeof ( short ) * npts ); wr_data( pls, - pls->dev_z, - sizeof ( unsigned short ) * - ( pls->dev_nptsX - 1 ) * ( pls->dev_nptsY - 1 )); + pls->dev_z, + sizeof ( unsigned short ) * + ( pls->dev_nptsX - 1 ) * ( pls->dev_nptsY - 1 )); } /*--------------------------------------------------------------------------*\ @@ -311,8 +311,8 @@ wr_data( pls, &text->unicode_array_len, sizeof ( PLINT )); if ( text->unicode_array_len ) wr_data( pls, - text->unicode_array, - sizeof ( PLUNICODE ) * text->unicode_array_len ); + text->unicode_array, + sizeof ( PLUNICODE ) * text->unicode_array_len ); } /*--------------------------------------------------------------------------*\ @@ -579,9 +579,9 @@ { char buffer[256]; snprintf( buffer, - 256, - "rdbuf_state: Invalid color map entry: %d", - (int) icol0 ); + 256, + "rdbuf_state: Invalid color map entry: %d", + (int) icol0 ); plabort( buffer ); return; } @@ -758,15 +758,15 @@ (( dev_z = (unsigned short *) malloc(( nptsX - 1 ) * - ( nptsY - - 1 ) * sizeof ( unsigned short ))) == + ( nptsY - + 1 ) * sizeof ( unsigned short ))) == NULL )) plexit( "rdbuf_image: Insufficient memory" ); rd_data( pls, dev_ix, sizeof ( short ) * npts ); rd_data( pls, dev_iy, sizeof ( short ) * npts ); rd_data( pls, dev_z, sizeof ( unsigned short ) * - ( nptsX - 1 ) * ( nptsY - 1 )); + ( nptsX - 1 ) * ( nptsY - 1 )); /* * COMMENTED OUT by Hezekiah Carty @@ -847,7 +847,7 @@ { if (( unicode = (PLUNICODE *) malloc( text.unicode_array_len * - sizeof ( PLUNICODE ))) + sizeof ( PLUNICODE ))) == NULL ) plexit( "rdbuf_text: Insufficient memory" ); @@ -1011,9 +1011,9 @@ default: pldebug( "plbuf_control", - "Unrecognized command %d, previous %d\n", - c, - c_old ); + "Unrecognized command %d, previous %d\n", + c, + c_old ); } c_old = c; } @@ -1087,7 +1087,7 @@ if ( pls->verbose ) printf( "Growing buffer to %d KB\n", - (int) ( pls->plbuf_buffer_size / 1024 )); + (int) ( pls->plbuf_buffer_size / 1024 )); if (( pls->plbuf_buffer = realloc( pls->plbuf_buffer, pls->plbuf_buffer_size )) == NULL ) plexit( "plbuf wr_data: Plot buffer grow failed" ); @@ -1208,7 +1208,7 @@ /* Yes, reallocate a larger one */ if (( plot_state = (struct _state *) realloc( state, - save_size )) == NULL ) + save_size )) == NULL ) { /* NOTE: If realloc fails, then plot_state ill be NULL. * This will leave the original buffer untouched, thus we @@ -1276,7 +1276,7 @@ while ( count = fread( &tmp, sizeof ( U_CHAR ), 1, pls->plbufFile )) { if ( fwrite( &tmp, sizeof ( U_CHAR ), 1, - plot_state->plbufFile ) != count ) + plot_state->plbufFile ) != count ) { /* Throw a warning since this might be a permissions problem * and we may not want to force an exit @@ -1302,7 +1302,7 @@ * are copying the portion of the plot buffer that is being used */ if ( memcpy( plot_state->plbuf_buffer, pls->plbuf_buffer, - pls->plbuf_top ) == NULL ) + pls->plbuf_top ) == NULL ) { /* This should never be NULL */ plwarn( "plbuf: Got a NULL in memcpy!" ); Modified: trunk/src/plcont.c =================================================================== --- trunk/src/plcont.c 2009-09-23 22:33:33 UTC (rev 10466) +++ trunk/src/plcont.c 2009-09-23 23:34:11 UTC (rev 10467) @@ -34,21 +34,21 @@ static void plcntr( PLFLT ( *plf2eval )( PLINT, PLINT, PLPointer ), - PLPointer plf2eval_data, - PLINT nx, PLINT ny, PLINT kx, PLINT lx, - PLINT ky, PLINT ly, PLFLT flev, PLINT **ipts, - void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), - PLPointer pltr_data ); + PLPointer plf2eval_data, + PLINT nx, PLINT ny, PLINT kx, PLINT lx, + PLINT ky, PLINT ly, PLFLT flev, PLINT **ipts, + void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), + PLPointer pltr_data ); static void pldrawcn( PLFLT ( *plf2eval )( PLINT, PLINT, PLPointer ), - PLPointer plf2eval_data, - PLINT nx, PLINT ny, PLINT kx, PLINT lx, - PLINT ky, PLINT ly, PLFLT flev, char *flabel, PLINT kcol, PLINT krow, - PLFLT lastx, PLFLT lasty, PLINT startedge, - PLINT **ipts, PLFLT *distance, PLINT *lastindex, - void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), - PLPointer pltr_data ); + PLPointer plf2eval_data, + PLINT nx, PLINT ny, PLINT kx, PLINT lx, + PLINT ky, PLINT ly, PLFLT flev, char *flabel, PLINT kcol, PLINT krow, + PLFLT lastx, PLFLT lasty, PLINT startedge, + PLINT **ipts, PLFLT *distance, PLINT *lastindex, + void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), + PLPointer pltr_data ); static void plfloatlabel( PLFLT value, char *string, PLINT len ); @@ -61,10 +61,10 @@ static void pl_drawcontlabel( PLFLT tpx, - PLFLT tpy, - char *flabel, - PLFLT *distance, - PLINT *lastindex ); + PLFLT tpy, + char *flabel, + PLFLT *distance, + PLINT *lastindex ); /* Error flag for aborts */ @@ -152,12 +152,12 @@ realloc_line( CONT_LINE *line ) { if ((( line->x = (PLFLT *) realloc( line->x, - ( line->npts + - LINE_ITEMS ) * sizeof ( PLFLT ))) == + ( line->npts + + LINE_ITEMS ) * sizeof ( PLFLT ))) == NULL ) || (( line->y = (PLFLT *) realloc( line->y, - ( line->npts + - LINE_ITEMS ) * sizeof ( PLFLT ))) == + ( line->npts + + LINE_ITEMS ) * sizeof ( PLFLT ))) == NULL )) plexit( "realloc_line: Insufficient memory" ); } @@ -259,9 +259,9 @@ /* small routine to set offset and spacing of contour labels, see desciption above */ void c_pl_setcontlabelparam( PLFLT offset, - PLFLT size, - PLFLT spacing, - PLINT active ) + PLFLT size, + PLFLT spacing, + PLINT active ) { contlabel_offset = offset; contlabel_size = size; @@ -277,10 +277,10 @@ } static void pl_drawcontlabel( PLFLT tpx, - PLFLT tpy, - char *flabel, - PLFLT *distance, - PLINT *lastindex ) + PLFLT tpy, + char *flabel, + PLFLT *distance, + PLINT *lastindex ) { PLFLT delta_x, delta_y; PLINT currx_old, curry_old; @@ -316,7 +316,7 @@ dev_y = mx * vec_x / my; scale = sqrt(( mx * mx * dev_x * dev_x + my * my * dev_y * dev_y ) / - ( contlabel_offset * contlabel_offset )); + ( contlabel_offset * contlabel_offset )); off_x = dev_x / scale; off_y = dev_y / scale; @@ -493,15 +493,15 @@ void cont_store( PLFLT **f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, - PLINT ky, PLINT ly, PLFLT *clevel, PLINT nlevel, - void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), - PLPointer pltr_data, - CONT_LEVEL **contour ) + PLINT ky, PLINT ly, PLFLT *clevel, PLINT nlevel, + void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), + PLPointer pltr_data, + CONT_LEVEL **contour ) { cont3d = 1; plcont( f, nx, ny, kx, lx, ky, ly, clevel, nlevel, - pltr, pltr_data ); + pltr, pltr_data ); *contour = startlev; cont3d = 0; @@ -516,9 +516,9 @@ void c_plcont( PLFLT **f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, - PLINT ky, PLINT ly, PLFLT *clevel, PLINT nlevel, - void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), - PLPointer pltr_data ) + PLINT ky, PLINT ly, PLFLT *clevel, PLINT nlevel, + void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), + PLPointer pltr_data ) { PLfGrid2 grid; @@ -531,8 +531,8 @@ grid.f = f; plfcont( plf2eval2, ( PLPointer ) & grid, - nx, ny, kx, lx, ky, ly, clevel, nlevel, - pltr, pltr_data ); + nx, ny, kx, lx, ky, ly, clevel, nlevel, + pltr, pltr_data ); } /*--------------------------------------------------------------------------*\ @@ -554,11 +554,11 @@ void plfcont( PLFLT ( *f2eval )( PLINT, PLINT, PLPointer ), - PLPointer f2eval_data, - PLINT nx, PLINT ny, PLINT kx, PLINT lx, - PLINT ky, PLINT ly, PLFLT *clevel, PLINT nlevel, - void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), - PLPointer pltr_data ) + PLPointer f2eval_data, + PLINT nx, PLINT ny, PLINT kx, PLINT lx, + PLINT ky, PLINT ly, PLFLT *clevel, PLINT nlevel, + void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), + PLPointer pltr_data ) { PLINT i, **ipts; @@ -589,8 +589,8 @@ for ( i = 0; i < nlevel; i++ ) { plcntr( f2eval, f2eval_data, - nx, ny, kx - 1, lx - 1, ky - 1, ly - 1, clevel[i], ipts, - pltr, pltr_data ); + nx, ny, kx - 1, lx - 1, ky - 1, ly - 1, clevel[i], ipts, + pltr, pltr_data ); if ( error ) { @@ -616,11 +616,11 @@ static void plcntr( PLFLT ( *f2eval )( PLINT, PLINT, PLPointer ), - PLPointer f2eval_data, - PLINT nx, PLINT ny, PLINT kx, PLINT lx, - PLINT ky, PLINT ly, PLFLT flev, PLINT **ipts, - void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), - PLPointer pltr_data ) + PLPointer f2eval_data, + PLINT nx, PLINT ny, PLINT kx, PLINT lx, + PLINT ky, PLINT ly, PLFLT flev, PLINT **ipts, + void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), + PLPointer pltr_data ) { PLINT kcol, krow, lastindex; PLFLT distance; @@ -654,9 +654,9 @@ { /* Follow and draw a contour */ pldrawcn( f2eval, f2eval_data, - nx, ny, kx, lx, ky, ly, flev, flabel, kcol, krow, - 0.0, 0.0, -2, ipts, &distance, &lastindex, - pltr, pltr_data ); + nx, ny, kx, lx, ky, ly, flev, flabel, kcol, krow, + 0.0, 0.0, -2, ipts, &distance, &lastindex, + pltr, pltr_data ); if ( error ) return; @@ -674,13 +674,13 @@ static void pldrawcn( PLFLT ( *f2eval )( PLINT, PLINT, PLPointer ), - PLPointer f2eval_data, - PLINT nx, PLINT ny, PLINT kx, PLINT lx, - PLINT ky, PLINT ly, PLFLT flev, char *flabel, PLINT kcol, PLINT krow, - PLFLT lastx, PLFLT lasty, PLINT startedge, PLINT **ipts, - PLFLT *distance, PLINT *lastindex, - void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), - PLPointer pltr_data ) + PLPointer f2eval_data, + PLINT nx, PLINT ny, PLINT kx, PLINT lx, + PLINT ky, PLINT ly, PLFLT flev, char *flabel, PLINT kcol, PLINT krow, + PLFLT lastx, PLFLT lasty, PLINT startedge, PLINT **ipts, + PLFLT *distance, PLINT *lastindex, + void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), + PLPointer pltr_data ) { PLFLT f[4]; PLFLT px[4], py[4], locx[4], locy[4]; @@ -777,10 +777,10 @@ /* Link to the next point on the contour */ if ( contlabel_active ) pl_drawcontlabel( locx[num], - locy[num], - flabel, - distance, - lastindex ); + locy[num], + flabel, + distance, + lastindex ); else cont_xy_store( locx[num], locy[num] ); /* Need to follow contour into next grid box */ @@ -799,11 +799,11 @@ ( ipts[kcolnext][krownext] == 0 )) { pldrawcn( f2eval, f2eval_data, - nx, ny, kx, lx, ky, ly, flev, flabel, - kcolnext, krownext, - locx[num], locy[num], inext, ipts, - distance, lastindex, - pltr, pltr_data ); + nx, ny, kx, lx, ky, ly, flev, flabel, + kcolnext, krownext, + locx[num], locy[num], inext, ipts, + distance, lastindex, + pltr, pltr_data ); } } /* Hard case where contour passes through corner */ @@ -836,11 +836,11 @@ ( ipts[kcolnext][krownext] == 0 )) { pldrawcn( f2eval, f2eval_data, - nx, ny, kx, lx, ky, ly, flev, flabel, - kcolnext, krownext, - locx[num], locy[num], inext, ipts, - distance, lastindex, - pltr, pltr_data ); + nx, ny, kx, lx, ky, ly, flev, flabel, + kcolnext, krownext, + locx[num], locy[num], inext, ipts, + distance, lastindex, + pltr, pltr_data ); } } if ( first == 1 ) Modified: trunk/src/plcore.c =================================================================== --- trunk/src/plcore.c 2009-09-23 22:33:33 UTC (rev 10466) +++ trunk/src/plcore.c 2009-09-23 23:34:11 UTC (rev 10467) @@ -265,12 +265,12 @@ { args = (EscText*) ptr; difilt( &( args->x ), - &( args->y ), - 1, - &clpxmi, - &clpxma, - &clpymi, - &clpyma ); + &( args->y ), + 1, + &clpxmi, + &clpxma, + &clpymi, + &clpyma ); } } @@ -328,7 +328,7 @@ { char *save_locale = plsave_set_locale(); ( *plsc->dispatch_table->pl_esc )((struct PLStream_struct *) plsc, - PLESC_SWIN, NULL ); + PLESC_SWIN, NULL ); plrestore_locale( save_locale ); } } @@ -388,7 +388,7 @@ } difilt( xscl, yscl, npts, &clpxmi, &clpxma, &clpymi, &clpyma ); plP_pllclp( xscl, yscl, npts, clpxmi, clpxma, clpymi, clpyma, - grpolyline ); + grpolyline ); } else { @@ -455,7 +455,7 @@ } difilt( xscl, yscl, npts, &clpxmi, &clpxma, &clpymi, &clpyma ); plP_plfclp( xscl, yscl, npts, clpxmi, clpxma, clpymi, clpyma, - grfill ); + grfill ); } else { @@ -492,9 +492,9 @@ if ( end != endptr[0] ) { snprintf( msgbuf, - BUFFER_SIZE, - "text2num: invalid control string detected - %c expected", - end ); + BUFFER_SIZE, + "text2num: invalid control string detected - %c expected", + end ); plwarn( msgbuf ); } @@ -520,8 +520,8 @@ \*--------------------------------------------------------------------------*/ int text2fci( const char *text, - unsigned char *hexdigit, - unsigned char *hexpower ) + unsigned char *hexdigit, + unsigned char *hexpower ) { typedef struct { @@ -566,7 +566,7 @@ void plP_text( PLINT base, PLFLT just, PLFLT *xform, PLINT x, PLINT y, - PLINT refx, PLINT refy, const char *string ) + PLINT refx, PLINT refy, const char *string ) { if ( plsc->dev_text ) /* Does the device render it's own text ? */ { @@ -746,8 +746,8 @@ else { i += text2fci( &string[i + 1], - &hexdigit, - &hexpower ); + &hexdigit, + &hexpower ); if ( hexpower < 7 ) { plP_hex2fci( hexdigit, hexpower, &fci ); @@ -910,7 +910,7 @@ PLUNICODE unichar = 0; #ifdef HAVE_LIBUNICODE char * ptr = unicode_get_utf8( string + i, - &unichar ); + &unichar ); #else char* ptr = utf8_to_ucs4( string + i, &unichar ); #endif @@ -920,10 +920,10 @@ strncpy( buf, string, 30 ); buf[30] = '\0'; snprintf( buf, - BUFFER_SIZE, - "UTF-8 string is malformed: %s%s", - buf, - strlen( string ) > 30 ? "[...]" : "" ); + BUFFER_SIZE, + "UTF-8 string is malformed: %s%s", + buf, + strlen( string ) > 30 ? "[...]" : "" ); plabort( buf ); return; } @@ -1120,7 +1120,7 @@ { char *save_locale = plsave_set_locale(); ( *plsc->dispatch_table->pl_line )((struct PLStream_struct *) plsc, - x[0], y[0], x[1], y[1] ); + x[0], y[0], x[1], y[1] ); plrestore_locale( save_locale ); } @@ -1129,7 +1129,7 @@ { char *save_locale = plsave_set_locale(); ( *plsc->dispatch_table->pl_polyline )((struct PLStream_struct *) plsc, - x, y, npts ); + x, y, npts ); plrestore_locale( save_locale ); } @@ -1143,7 +1143,7 @@ save_locale = plsave_set_locale(); ( *plsc->dispatch_table->pl_esc )((struct PLStream_struct *) plsc, - PLESC_FILL, NULL ); + PLESC_FILL, NULL ); plrestore_locale( save_locale ); } @@ -1169,7 +1169,7 @@ void difilt( PLINT *xscl, PLINT *yscl, PLINT npts, - PLINT *clpxmi, PLINT *clpxma, PLINT *clpymi, PLINT *clpyma ) + PLINT *clpxmi, PLINT *clpxma, PLINT *clpymi, PLINT *clpyma ) { PLINT i, x, y; @@ -1238,7 +1238,7 @@ void sdifilt( short *xscl, short *yscl, PLINT npts, - PLINT *clpxmi, PLINT *clpxma, PLINT *clpymi, PLINT *clpyma ) + PLINT *clpxmi, PLINT *clpxma, PLINT *clpymi, PLINT *clpyma ) { int i; short x, y; @@ -1409,8 +1409,8 @@ if ( plsc->difilt & PLDI_DEV ) { pldebug( "pldid2pc", - "Relative device coordinates (in): %f, %f, %f, %f\n", - *xmin, *ymin, *xmax, *ymax ); + "Relative device coordinates (in): %f, %f, %f, %f\n", + *xmin, *ymin, *xmax, *ymax ); pxmin = plP_dcpcx( *xmin ); pymin = plP_dcpcy( *ymin ); @@ -1433,8 +1433,8 @@ *ymax = ( rymax > 1 ) ? 1 : rymax; pldebug( "pldid2pc", - "Relative plot coordinates (out): %f, %f, %f, %f\n", - rxmin, rymin, rxmax, rymax ); + "Relative plot coordinates (out): %f, %f, %f, %f\n", + rxmin, rymin, rxmax, rymax ); } } @@ -1455,8 +1455,8 @@ if ( plsc->difilt & PLDI_DEV ) { pldebug( "pldip2pc", - "Relative plot coordinates (in): %f, %f, %f, %f\n", - *xmin, *ymin, *xmax, *ymax ); + "Relative plot coordinates (in): %f, %f, %f, %f\n", + *xmin, *ymin, *xmax, *ymax ); pxmin = plP_dcpcx( *xmin ); pymin = plP_dcpcy( *ymin ); @@ -1479,8 +1479,8 @@ *ymax = ( rymax > 1 ) ? 1 : rymax; pldebug( "pldip2pc", - "Relative device coordinates (out): %f, %f, %f, %f\n", - rxmin, rymin, rxmax, rymax ); + "Relative device coordinates (out): %f, %f, %f, %f\n", + rxmin, rymin, rxmax, rymax ); } } @@ -1548,7 +1548,7 @@ { char *save_locale = plsave_set_locale(); ( *plsc->dispatch_table->pl_esc )((struct PLStream_struct *) plsc, - PLESC_DI, NULL ); + PLESC_DI, NULL ); plrestore_locale( save_locale ); } @@ -1634,7 +1634,7 @@ { char *save_locale = plsave_set_locale(); ( *plsc->dispatch_table->pl_esc )((struct PLStream_struct *) plsc, - PLESC_DI, NULL ); + PLESC_DI, NULL ); plrestore_locale( save_locale ); } @@ -1756,7 +1756,7 @@ { char *save_locale = plsave_set_locale(); ( *plsc->dispatch_table->pl_esc )((struct PLStream_struct *) plsc, - PLESC_DI, NULL ); + PLESC_DI, NULL ); plrestore_locale( save_locale ); } @@ -1835,7 +1835,7 @@ void c_plsdimap( PLINT dimxmin, PLINT dimxmax, PLINT dimymin, PLINT dimymax, - PLFLT dimxpmm, PLFLT dimypmm ) + PLFLT dimxpmm, PLFLT dimypmm ) { plsetvar( plsc->dimxmin, dimxmin ); plsetvar( plsc->dimxmax, dimxmax ); @@ -1912,7 +1912,7 @@ { char *save_locale = plsave_set_locale(); ( *plsc->dispatch_table->pl_esc )((struct PLStream_struct *) plsc, - PLESC_FLUSH, NULL ); + PLESC_FLUSH, NULL ); plrestore_locale( save_locale ); } else @@ -2265,8 +2265,8 @@ if ( strm < 0 || strm >= PL_NSTREAMS ) { fprintf( stderr, - "plsstrm: Illegal stream number %d, must be in [0, %d]\n", - (int) strm, PL_NSTREAMS ); + "plsstrm: Illegal stream number %d, must be in [0, %d]\n", + (int) strm, PL_NSTREAMS ); } else { @@ -2444,10 +2444,10 @@ if ( !( flags & 0x01 )) { pldebug( "plcpstrm", "mapping parameters: %d %d %d %d %f %f\n", - plsr->phyxmi, plsr->phyxma, plsr->phyymi, plsr->phyyma, - plsr->xpmm, plsr->ypmm ); + plsr->phyxmi, plsr->phyxma, plsr->phyymi, plsr->phyyma, + plsr->xpmm, plsr->ypmm ); plsdimap( plsr->phyxmi, plsr->phyxma, plsr->phyymi, plsr->phyyma, - plsr->xpmm, plsr->ypmm ); + plsr->xpmm, plsr->ypmm ); } /* current color */ @@ -2561,7 +2561,7 @@ } if ( chdir( currdir ) != 0 ) pldebug( "plInBuildTree():", - "Unable to chdir to current directory" ); + "Unable to chdir to current directory" ); } } inited = 1; @@ -2593,7 +2593,7 @@ if ( drvdir == NULL ) { pldebug( "plGetDrvDir", - "Will use drivers dir: " DRV_DIR "\n" ); + "Will use drivers dir: " DRV_DIR "\n" ); drvdir = DRV_DIR; } } @@ -2663,7 +2663,7 @@ int len = strlen( name ) - 3; pldebug( "plInitDispatchTable", - "Consider file %s\n", name ); + "Consider file %s\n", name ); /* Only consider entries that have the ".rc" suffix */ if (( len > 0 ) && ( strcmp( name + len, ".rc" ) == 0 )) @@ -2690,7 +2690,7 @@ * character */ pldebug( "plInitDispatchTable", - "Opened driver info file %s\n", name ); + "Opened driver info file %s\n", name ); while ( fgets( buf, BUFFER2_SIZE, fd ) != NULL ) { fprintf( fp_drvdb, "%s", buf ); @@ -2713,7 +2713,7 @@ if (( dispatch_table = (PLDispatchTable **) malloc(( nplstaticdevices + npldynamicdevices ) * - sizeof ( PLDispatchTable * ))) == NULL ) + sizeof ( PLDispatchTable * ))) == NULL ) { plexit( "plInitDispatchTable: Insufficient memory" ); } @@ -2833,7 +2833,7 @@ * sequence number in the dispatch ttable entries. */ qsort( dispatch_table, npldrivers, sizeof ( PLDispatchTable* ), - plDispatchSequencer ); + plDispatchSequencer ); } /*--------------------------------------------------------------------------*\ @@ -2862,7 +2862,7 @@ { if (( *plsc->DevName == *dispatch_table[i]->pl_DevName ) && ( strncmp( plsc->DevName, - dispatch_table[i]->pl_DevName, length ) == 0 )) + dispatch_table[i]->pl_DevName, length ) == 0 )) break; } if ( i < npldrivers ) @@ -2873,7 +2873,7 @@ else { fprintf( stderr, "Requested device %s not available\n", - plsc->DevName ); + plsc->DevName ); } } @@ -2891,14 +2891,14 @@ for ( i = 0; i < npldrivers; i++ ) { fprintf( stdout, " <%2d> %-10s %s\n", i + 1, - dispatch_table[i]->pl_DevName, - dispatch_table[i]->pl_MenuStr ); + dispatch_table[i]->pl_DevName, + dispatch_table[i]->pl_MenuStr ); } if ( ipls == 0 ) fprintf( stdout, "\nEnter device number or keyword: " ); else fprintf( stdout, "\nEnter device number or keyword (stream %d): ", - (int) ipls ); + (int) ipls ); plio_fgets( response, sizeof ( response ), stdin ); @@ -2912,7 +2912,7 @@ for ( i = 0; i < npldrivers; i++ ) { if ( !strncmp( response, dispatch_table[i]->pl_DevName, - (unsigned int) length )) + (unsigned int) length )) break; } if ( i < npldrivers ) @@ -2998,7 +2998,7 @@ #endif /* LTDL_WIN32 */ pldebug( "plLoadDriver", "Trying to load %s on %s\n", - driver->drvnam, drvspec ); + driver->drvnam, drvspec ); driver->dlhand = lt_dlopenext( drvspec ); } @@ -3007,7 +3007,7 @@ if ( !driver->dlhand ) { pldebug( "plLoadDriver", "lt_dlopenext failed because of " - "the following reason:\n%s\n", lt_dlerror()); + "the following reason:\n%s\n", lt_dlerror()); fprintf( stderr, "Unable to load driver: %s.\n", driver->drvnam ); plexit( "Unable to load driver" ); } @@ -3107,9 +3107,9 @@ static void plgdevlst( const char **p_menustr, - const char **p_devname, - int *p_ndev, - int type ) + const char **p_devname, + int *p_ndev, + int type ) { int i, j; @@ -3141,7 +3141,7 @@ void c_plgpage( PLFLT *p_xp, PLFLT *p_yp, - PLINT *p_xleng, PLINT *p_yleng, PLINT *p_xoff, PLINT *p_yoff ) + PLINT *p_xleng, PLINT *p_yleng, PLINT *p_xoff, PLINT *p_yoff ) { *p_xp = plsc->xdpi; *p_yp = plsc->ydpi; @@ -3266,7 +3266,7 @@ void plsKeyEH( void ( *KeyEH )( PLGraphicsIn *, void *, int * ), - void *KeyEH_data ) + void *KeyEH_data ) { plsc->KeyEH = KeyEH; plsc->KeyEH_data = KeyEH_data; @@ -3276,7 +3276,7 @@ void plsButtonEH( void ( *ButtonEH )( PLGraphicsIn *, void *, int * ), - void *ButtonEH_data ) + void *ButtonEH_data ) { plsc->ButtonEH = ButtonEH; plsc->ButtonEH_data = ButtonEH_data; @@ -3913,14 +3913,14 @@ void plP_image( PLFLT *z, - PLINT ... [truncated message content] |
From: <jb...@us...> - 2009-09-24 01:01:16
|
Revision: 10468 http://plplot.svn.sourceforge.net/plplot/?rev=10468&view=rev Author: jbauck Date: 2009-09-24 01:01:06 +0000 (Thu, 24 Sep 2009) Log Message: ----------- Fix a longstanding problem in Ada examples 17 in which all of the stripchart labels are the same and equal to the last one. Modified Paths: -------------- trunk/bindings/ada/plplot.adb.cmake trunk/bindings/ada/plplot.ads.cmake trunk/bindings/ada/plplot_thin.ads.cmake trunk/bindings/ada/plplot_traditional.adb.cmake trunk/bindings/ada/plplot_traditional.ads.cmake trunk/examples/ada/x19a.adb.cmake trunk/examples/ada/xthick19a.adb.cmake Modified: trunk/bindings/ada/plplot.adb.cmake =================================================================== --- trunk/bindings/ada/plplot.adb.cmake 2009-09-23 23:34:11 UTC (rev 10467) +++ trunk/bindings/ada/plplot.adb.cmake 2009-09-24 01:01:06 UTC (rev 10468) @@ -2859,7 +2859,7 @@ Box_Color, Legend_Color : Plot_Color_Type; Pen_Colors : Integer_Array_1D; Line_Styles : Integer_Array_1D; - Pen_Labels : Stripchart_Label_String_Array_Type; + Pen_Labels : in out Stripchart_Label_String_Array_Type; X_Label, Y_Label, Title_Label : String := To_String(Default_Label_String)) is PL_Autoscale_Y, PL_Accumulate : PLBOOL; @@ -2881,17 +2881,30 @@ PL_Accumulate := PLfalse; end if; - -- Adapt strings for Pen_Labels to C. Head truncates or pads as - -- necessary to the length of Stripchart_String - 1; we then append - -- a null terminator which I suppose C needs. This could have also been - -- accomplished using char_array from the C interfaces. - -- fix this NOTE that the current implementation displays all four - -- legend labels the same, and equal to the fourth legend label. The - -- goal is to match const char *legline[4] in plstripc.c and e.g. - -- in x17c.c. - for Index in Pen_Labels'range loop - Temp_C_Stripchart_String := To_String(Head(Pen_Labels(Index), PL_Stripchart_String'length - 1) & Character'val(0)); - PL_Pen_Labels(Index) := Temp_C_Stripchart_String'Access; + -- Adapt strings for Pen_Labels to C. We have to pass an array of + -- pointers (here, System.Address) to C-style strings, except that the + -- C-style strings usually have the null terminator somewhere in the + -- middle of the allocated string memory, after the "significant text." + -- I'm not sure if C allocates the memory or not--probably not, since + -- this is not a callback as in plslabelfunc where string memory was + -- allocated by the intervening C code. Here, the C string length is set + -- by Max_Stripchart_Label_Length, ranging 0 .. Max_Stripchart_Label_Length. + for I in Pen_Labels'range loop + + -- Check length and adjust if necessary. + if Length(Pen_Labels(I)) >= Max_Stripchart_Label_Length then + Put_Line("*** Warning: Stripchart label was truncated to" + & Integer'Image(Max_Stripchart_Label_Length) & " characters. ***"); + Pen_Labels(I) := Head(Pen_Labels(I), Max_Stripchart_Label_Length); + end if; + + -- Make the C-style string with null character immediately after the text. + C_Stripchart_String_Array(I) := To_C(To_String(Pen_Labels(I) + & Character'val(0) + & (Max_Stripchart_Label_Length - Length(Pen_Labels(I))) * " "), False); + + -- Set the I-th pointer in the array of pointers. + PL_Pen_Labels(I) := C_Stripchart_String_Array(I)'Address; end loop; plstripc(ID, To_C(X_Options), To_C(Y_Options), Modified: trunk/bindings/ada/plplot.ads.cmake =================================================================== --- trunk/bindings/ada/plplot.ads.cmake 2009-09-23 23:34:11 UTC (rev 10467) +++ trunk/bindings/ada/plplot.ads.cmake 2009-09-24 01:01:06 UTC (rev 10468) @@ -88,7 +88,7 @@ -- in Custom_Label_Procedure_Pointer_Type, and plslabelfunc (Set_Custom_Label). -- This length, 0 .. 40, is hardwired in the PLplot C code; this type will -- fail if that length is ever changed. - Label_String_Length : Integer renames PLplot_Thin.Label_String_Length; + Max_Label_String_Length : Integer renames PLplot_Thin.Max_Label_String_Length; subtype Label_String_Type is PLplot_Thin.Label_String_Type; -- "Rename" callback for custom label functions. @@ -142,10 +142,12 @@ type Line_Style_Array_Type is array (1..Max_Lines_For_Multiplot) of Line_Style_Type; Default_Line_Style_Array : Line_Style_Array_Type := (1, 1, 1, 1, 1); - -- Arrays of label strings + -- Things for label strings Default_Label_String : constant Unbounded_String := To_Unbounded_String(""); type Label_String_Array_Type is array (1..Max_Lines_For_Multiplot) of Unbounded_String; Default_Label_String_Array : Label_String_Array_Type := (others => Default_Label_String); + + -- Things for stripcharts Maximum_Number_Of_Stripcharts : Integer := 4; -- Limited by PLplot designers. type Stripchart_Label_String_Array_Type is array (1 .. Maximum_Number_Of_Stripcharts) of Unbounded_String; @@ -1737,7 +1739,7 @@ Box_Color, Legend_Color : Plot_Color_Type; Pen_Colors : Integer_Array_1D; Line_Styles : Integer_Array_1D; - Pen_Labels : Stripchart_Label_String_Array_Type; + Pen_Labels : in out Stripchart_Label_String_Array_Type; X_Label, Y_Label, Title_Label : String := To_String(Default_Label_String)); Modified: trunk/bindings/ada/plplot_thin.ads.cmake =================================================================== --- trunk/bindings/ada/plplot_thin.ads.cmake 2009-09-23 23:34:11 UTC (rev 10467) +++ trunk/bindings/ada/plplot_thin.ads.cmake 2009-09-24 01:01:06 UTC (rev 10468) @@ -89,23 +89,30 @@ -- C code of plstripc which creates a strip chart. The C code will accept -- any length of string and each of the four strings can be different lengths. -- These types are a bit of a hack whereby each of the legend strings is the - -- same length, so that they can be accessed as an array. They are 41 + -- same length, so that they can be accessed as an array. They are Max_Stripchart_Label_Length -- characters long here including a null terminator; I suppose any length -- will work since the stripchart program doesn't seem to mind. The user -- will probably never see this type since he is allowed to set up the -- legend strings as an array of unbounded strings. Only in preparing to -- call the underlying C are the fixed-length strings used. If the user -- specifies unbounded legend strings that are longer than allowed here, - -- they are truncated or padded with spaces, as appropriate, to meet the - -- required length. Although that length is now 41, it is OK to make it + -- they are truncated to meet the required length. Although that length + -- is now Max_Stripchart_Label_Length, it should be OK to make it -- longer or shorter simply by changing the following line, since everything - -- else (padding, truncation, conversion to C-style) works automatically. - -- See the fix this note in plplot.adb and plplot_traditional.adb about how - -- all this somehow doesn't work correctly, causing all four stripchart - -- legends to be the same and equal to the fourth one. - subtype PL_Stripchart_String is String(1 .. 41); - type PL_Stripchart_String_Array is array (1 .. 4) of access PL_Stripchart_String; - Temp_C_Stripchart_String : aliased PL_Stripchart_String; + -- else (truncation, conversion to C-style) works automatically. + -- The current implementation uses char_array for the strings and uses + -- System.Address as the pointer which are assigned to an array of type + -- PL_Stripchart_String_Array (see plstripc). I think it is also possible + -- to subtype String and use access variables assigned to an array of + -- suitable access types. + -- One very important note is that in forming the C string, the null + -- terminator will normally come in the middle of the array, right after + -- the "significant" part of the string. This is handled in plstripc. + Max_Stripchart_Label_Length : constant Integer := 100; + subtype PL_Stripchart_String is + Interfaces.C.char_array(0 .. size_t(Max_Stripchart_Label_Length)); + type PL_Stripchart_String_Array is array (1 .. 4) of PLpointer; + C_Stripchart_String_Array : array(1 .. 4) of PL_Stripchart_String; -- Access-to-procedure type for Draw_Vector_Plot and its kin. @@ -162,8 +169,8 @@ -- in Custom_Label_Procedure_Pointer_Type, and plslabelfunc (Set_Custom_Label). -- This length, 0 .. 40, is hardwired in the PLplot C code; this type will -- fail if that length is ever changed. - Label_String_Length : constant Integer := 40; - subtype Label_String_Type is Interfaces.C.char_array (0 .. size_t(Label_String_Length)); + Max_Label_String_Length : constant Integer := 40; + subtype Label_String_Type is Interfaces.C.char_array (0 .. size_t(Max_Label_String_Length)); -- Access-to-function type for making custom labels such as with plslabelfunc. type Custom_Label_Procedure_Pointer_Type is access Modified: trunk/bindings/ada/plplot_traditional.adb.cmake =================================================================== --- trunk/bindings/ada/plplot_traditional.adb.cmake 2009-09-23 23:34:11 UTC (rev 10467) +++ trunk/bindings/ada/plplot_traditional.adb.cmake 2009-09-24 01:01:06 UTC (rev 10468) @@ -2719,7 +2719,7 @@ Box_Color, Legend_Color : Plot_Color_Type; Pen_Colors : Integer_Array_1D; Line_Styles : Integer_Array_1D; - Pen_Labels : Stripchart_Label_String_Array_Type; + Pen_Labels : in out Stripchart_Label_String_Array_Type; X_Label, Y_Label, Title_Label : String := To_String(Default_Label_String)) is PL_Autoscale_Y, PL_Accumulate : PLBOOL; @@ -2727,7 +2727,7 @@ x_LP : Long_Float renames x_Legend_Position; y_LP : Long_Float renames y_Legend_Position; - + begin if Autoscale_Y then PL_Autoscale_Y := PLtrue; @@ -2741,17 +2741,30 @@ PL_Accumulate := PLfalse; end if; - -- Adapt strings for Pen_Labels to C. Head truncates or pads as - -- necessary to the length of Stripchart_String - 1; we then append - -- a null terminator which I suppose C needs. This could have also been - -- accomplished using char_array from the C interfaces. - -- fix this NOTE that the current implementation displays all four - -- legend labels the same, and equal to the fourth legend label. The - -- goal is to match const char *legline[4] in plstripc.c and e.g. - -- in x17c.c. - for Index in Pen_Labels'range loop - Temp_C_Stripchart_String := To_String(Head(Pen_Labels(Index), PL_Stripchart_String'length - 1) & Character'val(0)); - PL_Pen_Labels(Index) := Temp_C_Stripchart_String'Access; + -- Adapt strings for Pen_Labels to C. We have to pass an array of + -- pointers (here, System.Address) to C-style strings, except that the + -- C-style strings usually have the null terminator somewhere in the + -- middle of the allocated string memory, after the "significant text." + -- I'm not sure if C allocates the memory or not--probably not, since + -- this is not a callback as in plslabelfunc where string memory was + -- allocated by the intervening C code. Here, the C string length is set + -- by Max_Stripchart_Label_Length, ranging 0 .. Max_Stripchart_Label_Length. + for I in Pen_Labels'range loop + + -- Check length and adjust if necessary. + if Length(Pen_Labels(I)) >= Max_Stripchart_Label_Length then + Put_Line("*** Warning: Stripchart label was truncated to" + & Integer'Image(Max_Stripchart_Label_Length) & " characters. ***"); + Pen_Labels(I) := Head(Pen_Labels(I), Max_Stripchart_Label_Length); + end if; + + -- Make the C-style string with null character immediately after the text. + C_Stripchart_String_Array(I) := To_C(To_String(Pen_Labels(I) + & Character'val(0) + & (Max_Stripchart_Label_Length - Length(Pen_Labels(I))) * " "), False); + + -- Set the I-th pointer in the array of pointers. + PL_Pen_Labels(I) := C_Stripchart_String_Array(I)'Address; end loop; PLplot_Thin.plstripc(ID, To_C(X_Options), To_C(Y_Options), Modified: trunk/bindings/ada/plplot_traditional.ads.cmake =================================================================== --- trunk/bindings/ada/plplot_traditional.ads.cmake 2009-09-23 23:34:11 UTC (rev 10467) +++ trunk/bindings/ada/plplot_traditional.ads.cmake 2009-09-24 01:01:06 UTC (rev 10468) @@ -88,7 +88,7 @@ -- in Custom_Label_Procedure_Pointer_Type, and plslabelfunc (Set_Custom_Label). -- This length, 0 .. 40, is hardwired in the PLplot C code; this type will -- fail if that length is ever changed. - Label_String_Length : Integer renames PLplot_Thin.Label_String_Length; + Max_Label_String_Length : Integer renames PLplot_Thin.Max_Label_String_Length; subtype Label_String_Type is PLplot_Thin.Label_String_Type; -- "Rename" callback for custom label functions. @@ -141,10 +141,12 @@ type Line_Style_Array_Type is array (1..Max_Lines_For_Multiplot) of Line_Style_Type; Default_Line_Style_Array : Line_Style_Array_Type := (1, 1, 1, 1, 1); - -- Arrays of label strings + -- Things for label strings Default_Label_String : constant Unbounded_String := To_Unbounded_String(""); type Label_String_Array_Type is array (1..Max_Lines_For_Multiplot) of Unbounded_String; Default_Label_String_Array : Label_String_Array_Type := (others => Default_Label_String); + + -- Things for stripcharts Maximum_Number_Of_Stripcharts : Integer := 4; -- Limited by PLplot designers. type Stripchart_Label_String_Array_Type is array (1 .. Maximum_Number_Of_Stripcharts) of Unbounded_String; @@ -1596,7 +1598,7 @@ Box_Color, Legend_Color : Plot_Color_Type; Pen_Colors : Integer_Array_1D; Line_Styles : Integer_Array_1D; - Pen_Labels : Stripchart_Label_String_Array_Type; + Pen_Labels : in out Stripchart_Label_String_Array_Type; X_Label, Y_Label, Title_Label : String := To_String(Default_Label_String)); Modified: trunk/examples/ada/x19a.adb.cmake =================================================================== --- trunk/examples/ada/x19a.adb.cmake 2009-09-23 23:34:11 UTC (rev 10467) +++ trunk/examples/ada/x19a.adb.cmake 2009-09-24 01:01:06 UTC (rev 10468) @@ -125,14 +125,14 @@ -- Function to convert an unbounded string to a fixed-length C string with the -- null terminator somewhere in the middle and spaces after. The result, of type -- Label_String_Type, is fixed to a length by C, currently at 41, and is - -- indexed in Ada as 0 .. PLplot_Traditional.Label_String_Length. + -- indexed in Ada as 0 .. PLplot_Traditional.Max_Label_String_Length. function Unbounded_To_Weird_C (Item : Unbounded_String; C_Length : size_t) return Label_String_Type is Temp : Unbounded_String; begin - -- Check length and adjust if necessary. Put_Line doesn't work here. + -- Check length and adjust if necessary. if Length(Item) >= Integer(C_Length) then Put_Line("*** Warning: Custom label was truncated to" & Integer'Image(Integer(C_Length)) & " characters. ***"); @@ -140,7 +140,7 @@ return To_C(To_String(Temp), True); else return To_C(To_String(Item & ASCII.nul & - (Label_String_Length - Length(Item)) * " "), False); + (Max_Label_String_Length - Length(Item)) * " "), False); end if; end Unbounded_To_Weird_C; Modified: trunk/examples/ada/xthick19a.adb.cmake =================================================================== --- trunk/examples/ada/xthick19a.adb.cmake 2009-09-23 23:34:11 UTC (rev 10467) +++ trunk/examples/ada/xthick19a.adb.cmake 2009-09-24 01:01:06 UTC (rev 10468) @@ -125,14 +125,14 @@ -- Function to convert an unbounded string to a fixed-length C string with the -- null terminator somewhere in the middle and spaces after. The result, of type -- Label_String_Type, is fixed to a length by C, currently at 41, and is - -- indexed in Ada as 0 .. PLplot_Traditional.Label_String_Length. + -- indexed in Ada as 0 .. PLplot_Traditional.Max_Label_String_Length. function Unbounded_To_Weird_C (Item : Unbounded_String; C_Length : size_t) return Label_String_Type is Temp : Unbounded_String; begin - -- Check length and adjust if necessary. Put_Line doesn't work here. + -- Check length and adjust if necessary. if Length(Item) >= Integer(C_Length) then Put_Line("*** Warning: Custom label was truncated to" & Integer'Image(Integer(C_Length)) & " characters. ***"); @@ -140,7 +140,7 @@ return To_C(To_String(Temp), True); else return To_C(To_String(Item & ASCII.nul & - (Label_String_Length - Length(Item)) * " "), False); + (Max_Label_String_Length - Length(Item)) * " "), False); end if; end Unbounded_To_Weird_C; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2009-09-24 03:50:56
|
Revision: 10470 http://plplot.svn.sourceforge.net/plplot/?rev=10470&view=rev Author: airwin Date: 2009-09-24 03:50:46 +0000 (Thu, 24 Sep 2009) Log Message: ----------- Locally reverted all src changes back to 10456 (using "svn merge --ignore-ancestor -r 10468:10456 .") then reapplied uncrustify with revised uncrustify.cfg where long line splitting had been turned off. The result has a substantially more satisfactory style than revision 10468. The reason is uncrustify is not that reliable in splitting overlong lines so it is better to be conservative here and do that by hand. I have committed these newly styled src results (after a quick check that the PLplot library and C examples still built and the PostScript results of examples showed no visible regressions). Revision Links: -------------- http://plplot.svn.sourceforge.net/plplot/?rev=10468&view=rev Modified Paths: -------------- trunk/src/pdfutils.c trunk/src/plarc.c trunk/src/plargs.c trunk/src/plbox.c trunk/src/plbuf.c trunk/src/plcont.c trunk/src/plcore.c trunk/src/plctrl.c trunk/src/pldtik.c trunk/src/plfreetype.c trunk/src/plgridd.c trunk/src/plimage.c trunk/src/plline.c trunk/src/plmap.c trunk/src/plot3d.c trunk/src/plshade.c trunk/src/plstripc.c trunk/src/plsym.c trunk/src/pltime.c trunk/src/plvect.c trunk/uncrustify.cfg Modified: trunk/src/pdfutils.c =================================================================== --- trunk/src/pdfutils.c 2009-09-24 03:26:53 UTC (rev 10469) +++ trunk/src/pdfutils.c 2009-09-24 03:50:46 UTC (rev 10470) @@ -265,9 +265,7 @@ pldebug( "pdf_putc", "Increasing buffer to %d bytes\n", pdfs->bufmax ); pdfs->bufmax += 512; - if (( pdfs->buffer = - (U_CHAR *) realloc((void *) pdfs->buffer, - pdfs->bufmax )) == NULL ) + if (( pdfs->buffer = (U_CHAR *) realloc((void *) pdfs->buffer, pdfs->bufmax )) == NULL ) { plexit( "pdf_putc: Insufficient memory" ); } @@ -387,8 +385,7 @@ "Increasing buffer to %d bytes\n", pdfs->bufmax ); pdfs->bufmax += 512; if (( pdfs->buffer = (U_CHAR *) - realloc((void *) ( pdfs->buffer ), - pdfs->bufmax )) == NULL ) + realloc((void *) ( pdfs->buffer ), pdfs->bufmax )) == NULL ) { plexit( "pdf_wrx: Insufficient memory" ); } Modified: trunk/src/plarc.c =================================================================== --- trunk/src/plarc.c 2009-09-24 03:26:53 UTC (rev 10469) +++ trunk/src/plarc.c 2009-09-24 03:50:46 UTC (rev 10470) @@ -34,13 +34,7 @@ * *-------------------------------------------------------------------------*/ void -plarc_approx( PLFLT x, - PLFLT y, - PLFLT a, - PLFLT b, - PLFLT angle1, - PLFLT angle2, - PLBOOL fill ) +plarc_approx( PLFLT x, PLFLT y, PLFLT a, PLFLT b, PLFLT angle1, PLFLT angle2, PLBOOL fill ) { PLINT i; PLFLT theta0, theta_step, theta, d_angle; @@ -111,13 +105,7 @@ * *-------------------------------------------------------------------------*/ void -c_plarc( PLFLT x, - PLFLT y, - PLFLT a, - PLFLT b, - PLFLT angle1, - PLFLT angle2, - PLBOOL fill ) +c_plarc( PLFLT x, PLFLT y, PLFLT a, PLFLT b, PLFLT angle1, PLFLT angle2, PLBOOL fill ) { PLINT xscl[2], yscl[2]; PLINT clpxmi, clpxma, clpymi, clpyma; Modified: trunk/src/plargs.c =================================================================== --- trunk/src/plargs.c 2009-09-24 03:26:53 UTC (rev 10469) +++ trunk/src/plargs.c 2009-09-24 03:50:46 UTC (rev 10470) @@ -100,16 +100,8 @@ /* Support functions */ -static int ParseOpt( int *, - const char ***, - int *, - const char ***, - PLOptionTable * ); -static int ProcessOpt( const char *, - PLOptionTable *, - int *, - const char ***, - int * ); +static int ParseOpt( int *, const char ***, int *, const char ***, PLOptionTable * ); +static int ProcessOpt( const char *, PLOptionTable *, int *, const char ***, int * ); static int GetOptarg( const char **, int *, const char ***, int * ); static void Help( void ); static void Syntax( void ); @@ -947,10 +939,7 @@ \*--------------------------------------------------------------------------*/ static int -ParseOpt( int *p_myargc, - const char ***p_argv, - int *p_argc, - const char ***p_argsave, +ParseOpt( int *p_myargc, const char ***p_argv, int *p_argc, const char ***p_argsave, PLOptionTable *option_table ) { PLOptionTable *tab; @@ -1002,10 +991,7 @@ \*--------------------------------------------------------------------------*/ static int -ProcessOpt( const char *opt, - PLOptionTable *tab, - int *p_myargc, - const char ***p_argv, +ProcessOpt( const char *opt, PLOptionTable *tab, int *p_myargc, const char ***p_argv, int *p_argc ) { int need_arg, res; @@ -1041,8 +1027,7 @@ { /* Make a copy, since handler may mung optarg with strtok() */ char *copy = - (char *) malloc((size_t) ( 1 + - strlen( optarg )) * sizeof ( char )); + (char *) malloc((size_t) ( 1 + strlen( optarg )) * sizeof ( char )); if ( copy == NULL ) { plabort( "ProcessOpt: out of memory" ); @@ -1127,10 +1112,7 @@ \*--------------------------------------------------------------------------*/ static int -GetOptarg( const char **poptarg, - int *p_myargc, - const char ***p_argv, - int *p_argc ) +GetOptarg( const char **poptarg, int *p_myargc, const char ***p_argv, int *p_argc ) { int result = 0; @@ -1158,9 +1140,7 @@ { if ( !mode_quiet ) { - fprintf( stderr, - "Argument missing for %s option.\n", - ( *p_argv )[0] ); + fprintf( stderr, "Argument missing for %s option.\n", ( *p_argv )[0] ); plOptUsage(); } } @@ -1365,40 +1345,29 @@ case DRV_STR: *(char **) ( t->var_ptr ) = ( drvp->value ); #ifdef DEBUG - fprintf( stderr, "plParseDrvOpts: %s %s\n", t->opt, - *(char**) t->var_ptr ); + fprintf( stderr, "plParseDrvOpts: %s %s\n", t->opt, *(char**) t->var_ptr ); #endif break; case DRV_INT: if ( sscanf( drvp->value, "%d", (int *) t->var_ptr ) != 1 ) { - snprintf( msg, - sizeof ( msg ) - 1, - "Incorrect argument to '%s' option", - drvp->option ); + snprintf( msg, sizeof ( msg ) - 1, "Incorrect argument to '%s' option", drvp->option ); plexit( msg ); } #ifdef DEBUG - fprintf( stderr, - "plParseDrvOpts: %s %d\n", - t->opt, - *(int *) t->var_ptr ); + fprintf( stderr, "plParseDrvOpts: %s %d\n", t->opt, *(int *) t->var_ptr ); #endif break; case DRV_FLT: if ( sscanf( drvp->value, "%f", (float *) t->var_ptr ) != 1 ) { - snprintf( msg, - sizeof ( msg ) - 1, - "Incorrect argument to '%s' option", - drvp->option ); + snprintf( msg, sizeof ( msg ) - 1, "Incorrect argument to '%s' option", drvp->option ); plexit( msg ); } #ifdef DEBUG - fprintf( stderr, "plParseDrvOpts: %s %f\n", t->opt, - *(float *) t->var_ptr ); + fprintf( stderr, "plParseDrvOpts: %s %f\n", t->opt, *(float *) t->var_ptr ); #endif break; } @@ -1408,11 +1377,7 @@ if ( !fl ) { - snprintf( - msg, - sizeof ( msg ) - 1, - "Option '%s' not recognized.\n\nRecognized options for this driver are:\n", - drvp->option ); + snprintf( msg, sizeof ( msg ) - 1, "Option '%s' not recognized.\n\nRecognized options for this driver are:\n", drvp->option ); plwarn( msg ); plHelpDrvOpts( acc_opt ); plexit( "" ); @@ -1785,9 +1750,7 @@ break; default: - fprintf( stderr, - "Unrecognized background color value %s\n", - color_field ); + fprintf( stderr, "Unrecognized background color value %s\n", color_field ); return 1; } @@ -2017,9 +1980,7 @@ bytemax = (PLINT) ( multiplier * atof( spec )); if ( bytemax <= 0 ) { - fprintf( stderr, - "?invalid file size %d. 2.14G is the maximum.\n", - bytemax ); + fprintf( stderr, "?invalid file size %d. 2.14G is the maximum.\n", bytemax ); return 1; } plsfam( 1, -1, bytemax ); @@ -2167,10 +2128,7 @@ static int opt_plwindow( const char *opt, const char *optarg, void *client_data ) { - if (( plsc->plwindow = - (char *) malloc((size_t) ( 1 + - strlen( optarg )) * - sizeof ( char ))) == NULL ) + if (( plsc->plwindow = (char *) malloc((size_t) ( 1 + strlen( optarg )) * sizeof ( char ))) == NULL ) { plexit( "opt_plwindow: Insufficient memory" ); } @@ -2191,10 +2149,7 @@ { char *newcmd; - if (( newcmd = - (char *) malloc((size_t) ( strlen( optarg ) + - 9 ) * sizeof ( char ))) == - NULL ) + if (( newcmd = (char *) malloc((size_t) ( strlen( optarg ) + 9 ) * sizeof ( char ))) == NULL ) { plexit( "opt_tcl_cmd: Insufficient memory" ); } @@ -2202,9 +2157,7 @@ strcpy( newcmd, "tcl_cmd=" ); strcat( newcmd, optarg ); - fprintf( - stderr, - "-tcl_cmd <cmd> is obsolete. Please use -drvopt tcl_cmd=<cmd> instead\n" ); + fprintf( stderr, "-tcl_cmd <cmd> is obsolete. Please use -drvopt tcl_cmd=<cmd> instead\n" ); opt_drvopt( "drvopt", newcmd, NULL ); free( newcmd ); @@ -2273,10 +2226,7 @@ /* The TK driver uses the geometry string directly */ - if (( plsc->geometry = - (char *) malloc((size_t) ( 1 + - strlen( optarg )) * - sizeof ( char ))) == NULL ) + if (( plsc->geometry = (char *) malloc((size_t) ( 1 + strlen( optarg )) * sizeof ( char ))) == NULL ) { plexit( "opt_geo: Insufficient memory" ); } @@ -2332,10 +2282,7 @@ static int opt_tk_file( const char *opt, const char *optarg, void *client_data ) { - if (( plsc->tk_file = - (char *) malloc((size_t) ( 1 + - strlen( optarg )) * - sizeof ( char ))) == NULL ) + if (( plsc->tk_file = (char *) malloc((size_t) ( 1 + strlen( optarg )) * sizeof ( char ))) == NULL ) { plexit( "opt_tk_file: Insufficient memory" ); } @@ -2453,12 +2400,10 @@ } else { - plwarn( - "Could not use invalid environment (e.g., LC_ALL, LC_NUMERIC, or LANG) to set LC_NUMERIC locale. Falling back to LC_NUMERIC \"C\" locale instead.\n" ); + plwarn( "Could not use invalid environment (e.g., LC_ALL, LC_NUMERIC, or LANG) to set LC_NUMERIC locale. Falling back to LC_NUMERIC \"C\" locale instead.\n" ); if ( !( locale = setlocale( LC_NUMERIC, "C" ))) { - plexit( - "Your platform is seriously broken. Not even a \"C\" locale could be set." ); + plexit( "Your platform is seriously broken. Not even a \"C\" locale could be set." ); } } return 0; Modified: trunk/src/plbox.c =================================================================== --- trunk/src/plbox.c 2009-09-24 03:26:53 UTC (rev 10469) +++ trunk/src/plbox.c 2009-09-24 03:50:46 UTC (rev 10470) @@ -55,15 +55,7 @@ PLFLT wy2, PLFLT disp, PLFLT pos, PLFLT just, const char *text ); static void -plform( PLINT axis, - PLFLT value, - PLINT scale, - PLINT prec, - char *result, - PLINT len, - PLBOOL ll, - PLBOOL lf, - PLBOOL lo ); +plform( PLINT axis, PLFLT value, PLINT scale, PLINT prec, char *result, PLINT len, PLBOOL ll, PLBOOL lf, PLBOOL lo ); static void grid_box( const char *xopt, PLFLT xtick1, PLINT nxsub1, @@ -353,8 +345,7 @@ if ( ldx ) { pldtfac( vpwxmi, vpwxma, &factor, &tstart ); - tp = xtick1 * - ( floor(( vpwxma - tstart ) / xtick1 ) + 1 ) + tstart; + tp = xtick1 * ( floor(( vpwxma - tstart ) / xtick1 ) + 1 ) + tstart; } else tp = xtick1 * ( floor( vpwxma / xtick1 ) + 1 ); @@ -401,8 +392,7 @@ if ( ldy ) { pldtfac( vpwymi, vpwyma, &factor, &tstart ); - tp = ytick1 * - ( floor(( vpwymi - tstart ) / ytick1 ) + 1 ) + tstart; + tp = ytick1 * ( floor(( vpwymi - tstart ) / ytick1 ) + 1 ) + tstart; } else tp = ytick1 * ( floor( vpwyma / ytick1 ) + 1 ); @@ -458,8 +448,7 @@ { temp = tp + xlog[i]; if ( BETW( temp, vpwxmi, vpwxma )) - plxtik( plP_wcpcx( - temp ), (PLINT) yp0, xminor, xminor ); + plxtik( plP_wcpcx( temp ), (PLINT) yp0, xminor, xminor ); } } else @@ -468,8 +457,7 @@ { temp = tp + i * xtick1 / nxsub1; if ( BETW( temp, vpwxmi, vpwxma )) - plxtik( plP_wcpcx( - temp ), (PLINT) yp0, xminor, xminor ); + plxtik( plP_wcpcx( temp ), (PLINT) yp0, xminor, xminor ); } } } @@ -501,8 +489,7 @@ { temp = tp + xlog[i]; if ( BETW( temp, vpwymi, vpwyma )) - plytik((PLINT) xp0, plP_wcpcy( - temp ), yminor, yminor ); + plytik((PLINT) xp0, plP_wcpcy( temp ), yminor, yminor ); } } else @@ -511,8 +498,7 @@ { temp = tp + i * ytick1 / nysub1; if ( BETW( temp, vpwymi, vpwyma )) - plytik((PLINT) xp0, plP_wcpcy( - temp ), yminor, yminor ); + plytik((PLINT) xp0, plP_wcpcy( temp ), yminor, yminor ); } } } @@ -601,9 +587,7 @@ dx = ux - tx; dy = uy - ty; plzbx( zopt, zlabel, 1, dx, dy, ux, uy, - plP_w3wcy( xmax, - ymin, - zmax ), zmin, zmax, ztick, nsubz, &zdigits ); + plP_w3wcy( xmax, ymin, zmax ), zmin, zmax, ztick, nsubz, &zdigits ); tx = plP_w3wcx( xmin, ymax, zmin ); ty = plP_w3wcy( xmin, ymax, zmin ); @@ -617,9 +601,7 @@ /* restore zdigits to initial value for second call */ zdigits = zdigmax; plzbx( zopt, zlabel, 0, dx, dy, tx, ty, - plP_w3wcy( xmin, - ymax, - zmax ), zmin, zmax, ztick, nsubz, &zdigits ); + plP_w3wcy( xmin, ymax, zmax ), zmin, zmax, ztick, nsubz, &zdigits ); } else if ( cxx <= 0.0 && cxy <= 0.0 ) { @@ -634,9 +616,7 @@ dx = ux - tx; dy = uy - ty; plzbx( zopt, zlabel, 1, dx, dy, ux, uy, - plP_w3wcy( xmin, - ymin, - zmax ), zmin, zmax, ztick, nsubz, &zdigits ); + plP_w3wcy( xmin, ymin, zmax ), zmin, zmax, ztick, nsubz, &zdigits ); tx = plP_w3wcx( xmax, ymax, zmin ); ty = plP_w3wcy( xmax, ymax, zmin ); @@ -650,9 +630,7 @@ /* restore zdigits to initial value for second call */ zdigits = zdigmax; plzbx( zopt, zlabel, 0, dx, dy, tx, ty, - plP_w3wcy( xmax, - ymax, - zmax ), zmin, zmax, ztick, nsubz, &zdigits ); + plP_w3wcy( xmax, ymax, zmax ), zmin, zmax, ztick, nsubz, &zdigits ); } else if ( cxx <= 0.0 && cxy >= 0.0 ) { @@ -667,9 +645,7 @@ dx = ux - tx; dy = uy - ty; plzbx( zopt, zlabel, 1, dx, dy, ux, uy, - plP_w3wcy( xmin, - ymax, - zmax ), zmin, zmax, ztick, nsubz, &zdigits ); + plP_w3wcy( xmin, ymax, zmax ), zmin, zmax, ztick, nsubz, &zdigits ); tx = plP_w3wcx( xmax, ymin, zmin ); ty = plP_w3wcy( xmax, ymin, zmin ); @@ -683,9 +659,7 @@ /* restore zdigits to initial value for second call */ zdigits = zdigmax; plzbx( zopt, zlabel, 0, dx, dy, tx, ty, - plP_w3wcy( xmax, - ymin, - zmax ), zmin, zmax, ztick, nsubz, &zdigits ); + plP_w3wcy( xmax, ymin, zmax ), zmin, zmax, ztick, nsubz, &zdigits ); } else if ( cxx >= 0.0 && cxy >= 0.0 ) { @@ -700,9 +674,7 @@ dx = ux - tx; dy = uy - ty; plzbx( zopt, zlabel, 1, dx, dy, ux, uy, - plP_w3wcy( xmax, - ymax, - zmax ), zmin, zmax, ztick, nsubz, &zdigits ); + plP_w3wcy( xmax, ymax, zmax ), zmin, zmax, ztick, nsubz, &zdigits ); tx = plP_w3wcx( xmin, ymin, zmin ); ty = plP_w3wcy( xmin, ymin, zmin ); @@ -716,9 +688,7 @@ /* restore zdigits to initial value for second call */ zdigits = zdigmax; plzbx( zopt, zlabel, 0, dx, dy, tx, ty, - plP_w3wcy( xmin, - ymin, - zmax ), zmin, zmax, ztick, nsubz, &zdigits ); + plP_w3wcy( xmin, ymin, zmax ), zmin, zmax, ztick, nsubz, &zdigits ); } plsxax( xdigmax, xdigits ); plsyax( ydigmax, ydigits ); @@ -1399,23 +1369,11 @@ { if ( ldx ) { - strfqsas( string, - STRING_LEN, - timefmt, - (double) tn, - plsc->qsasconfig ); + strfqsas( string, STRING_LEN, timefmt, (double) tn, plsc->qsasconfig ); } else { - plform( PL_X_AXIS, - tn, - xscale, - xprec, - string, - STRING_LEN, - llx, - lfx, - lox ); + plform( PL_X_AXIS, tn, xscale, xprec, string, STRING_LEN, llx, lfx, lox ); } height = lix ? 1.75 : 1.5; pos = ( vpwxmax > vpwxmin ) ? @@ -1437,11 +1395,9 @@ * label function is provided. */ if ( plsc->label_data ) { - height = - ((PLLabelDefaults *) plsc->label_data )->exp_label_disp; - pos = ((PLLabelDefaults *) plsc->label_data )->exp_label_pos; - just = - ((PLLabelDefaults *) plsc->label_data )->exp_label_just; + height = ((PLLabelDefaults *) plsc->label_data )->exp_label_disp; + pos = ((PLLabelDefaults *) plsc->label_data )->exp_label_pos; + just = ((PLLabelDefaults *) plsc->label_data )->exp_label_just; } else { @@ -1478,23 +1434,11 @@ { if ( ldy ) { - strfqsas( string, - STRING_LEN, - timefmt, - (double) tn, - plsc->qsasconfig ); + strfqsas( string, STRING_LEN, timefmt, (double) tn, plsc->qsasconfig ); } else { - plform( PL_Y_AXIS, - tn, - yscale, - yprec, - string, - STRING_LEN, - lly, - lfy, - loy ); + plform( PL_Y_AXIS, tn, yscale, yprec, string, STRING_LEN, lly, lfy, loy ); } pos = ( vpwymax > vpwymin ) ? ( tn - vpwymi ) / ( vpwyma - vpwymi ) : @@ -1539,11 +1483,9 @@ snprintf( string, STRING_LEN, "(x10#u%d#d)", (int) yscale ); if ( plsc->label_data ) { - height = - ((PLLabelDefaults *) plsc->label_data )->exp_label_disp; - pos = ((PLLabelDefaults *) plsc->label_data )->exp_label_pos; - just = - ((PLLabelDefaults *) plsc->label_data )->exp_label_just; + height = ((PLLabelDefaults *) plsc->label_data )->exp_label_disp; + pos = ((PLLabelDefaults *) plsc->label_data )->exp_label_pos; + just = ((PLLabelDefaults *) plsc->label_data )->exp_label_just; } else { @@ -1592,15 +1534,7 @@ \*--------------------------------------------------------------------------*/ static void -plform( PLINT axis, - PLFLT value, - PLINT scale, - PLINT prec, - char *string, - PLINT len, - PLBOOL ll, - PLBOOL lf, - PLBOOL lo ) +plform( PLINT axis, PLFLT value, PLINT scale, PLINT prec, char *string, PLINT len, PLBOOL ll, PLBOOL lf, PLBOOL lo ) { /* Check to see if a custom labeling function is defined. If not, */ if ( lo && plsc->label_func ) @@ -1611,8 +1545,7 @@ { if ( lo ) { - plwarn( - "Custom axis labels requested without a labeling function \ + plwarn( "Custom axis labels requested without a labeling function \ - using default." ); } if ( ll ) @@ -1696,11 +1629,7 @@ * \*--------------------------------------------------------------------------*/ void -c_plslabelfunc( void ( *label_func )( PLINT, - PLFLT, - char *, - PLINT, - PLPointer ), PLPointer label_data ) +c_plslabelfunc( void ( *label_func )( PLINT, PLFLT, char *, PLINT, PLPointer ), PLPointer label_data ) { plsc->label_func = label_func; plsc->label_data = label_data; Modified: trunk/src/plbuf.c =================================================================== --- trunk/src/plbuf.c 2009-09-24 03:26:53 UTC (rev 10469) +++ trunk/src/plbuf.c 2009-09-24 03:50:46 UTC (rev 10470) @@ -267,10 +267,7 @@ wr_data( pls, pls->dev_ix, sizeof ( short ) * npts ); wr_data( pls, pls->dev_iy, sizeof ( short ) * npts ); - wr_data( pls, - pls->dev_z, - sizeof ( unsigned short ) * - ( pls->dev_nptsX - 1 ) * ( pls->dev_nptsY - 1 )); + wr_data( pls, pls->dev_z, sizeof ( unsigned short ) * ( pls->dev_nptsX - 1 ) * ( pls->dev_nptsY - 1 )); } /*--------------------------------------------------------------------------*\ @@ -310,9 +307,7 @@ wr_data( pls, &text->unicode_array_len, sizeof ( PLINT )); if ( text->unicode_array_len ) - wr_data( pls, - text->unicode_array, - sizeof ( PLUNICODE ) * text->unicode_array_len ); + wr_data( pls, text->unicode_array, sizeof ( PLUNICODE ) * text->unicode_array_len ); } /*--------------------------------------------------------------------------*\ @@ -578,10 +573,7 @@ if ((int) icol0 >= pls->ncol0 ) { char buffer[256]; - snprintf( buffer, - 256, - "rdbuf_state: Invalid color map entry: %d", - (int) icol0 ); + snprintf( buffer, 256, "rdbuf_state: Invalid color map entry: %d", (int) icol0 ); plabort( buffer ); return; } @@ -755,18 +747,12 @@ */ if ((( dev_ix = (short *) malloc( npts * sizeof ( short ))) == NULL ) || (( dev_iy = (short *) malloc( npts * sizeof ( short ))) == NULL ) || - (( dev_z = - (unsigned short *) malloc(( nptsX - - 1 ) * - ( nptsY - - 1 ) * sizeof ( unsigned short ))) == - NULL )) + (( dev_z = (unsigned short *) malloc(( nptsX - 1 ) * ( nptsY - 1 ) * sizeof ( unsigned short ))) == NULL )) plexit( "rdbuf_image: Insufficient memory" ); rd_data( pls, dev_ix, sizeof ( short ) * npts ); rd_data( pls, dev_iy, sizeof ( short ) * npts ); - rd_data( pls, dev_z, sizeof ( unsigned short ) * - ( nptsX - 1 ) * ( nptsY - 1 )); + rd_data( pls, dev_z, sizeof ( unsigned short ) * ( nptsX - 1 ) * ( nptsY - 1 )); /* * COMMENTED OUT by Hezekiah Carty @@ -845,9 +831,7 @@ rd_data( pls, &text.unicode_array_len, sizeof ( PLINT )); if ( text.unicode_array_len ) { - if (( unicode = - (PLUNICODE *) malloc( text.unicode_array_len * - sizeof ( PLUNICODE ))) + if (( unicode = (PLUNICODE *) malloc( text.unicode_array_len * sizeof ( PLUNICODE ))) == NULL ) plexit( "rdbuf_text: Insufficient memory" ); @@ -1010,10 +994,7 @@ break; default: - pldebug( "plbuf_control", - "Unrecognized command %d, previous %d\n", - c, - c_old ); + pldebug( "plbuf_control", "Unrecognized command %d, previous %d\n", c, c_old ); } c_old = c; } @@ -1034,8 +1015,7 @@ #else if ( pls->plbuf_readpos < pls->plbuf_top ) { - *p_c = - *(U_CHAR *) ((U_CHAR *) pls->plbuf_buffer + pls->plbuf_readpos ); + *p_c = *(U_CHAR *) ((U_CHAR *) pls->plbuf_buffer + pls->plbuf_readpos ); pls->plbuf_readpos += sizeof ( U_CHAR ); count = sizeof ( U_CHAR ); } @@ -1086,16 +1066,13 @@ pls->plbuf_buffer_size += pls->plbuf_buffer_grow; if ( pls->verbose ) - printf( "Growing buffer to %d KB\n", - (int) ( pls->plbuf_buffer_size / 1024 )); - if (( pls->plbuf_buffer = - realloc( pls->plbuf_buffer, pls->plbuf_buffer_size )) == NULL ) + printf( "Growing buffer to %d KB\n", (int) ( pls->plbuf_buffer_size / 1024 )); + if (( pls->plbuf_buffer = realloc( pls->plbuf_buffer, pls->plbuf_buffer_size )) == NULL ) plexit( "plbuf wr_data: Plot buffer grow failed" ); } *(U_CHAR *) ((U_CHAR *) pls->plbuf_buffer + pls->plbuf_top ) = c; - pls->plbuf_top += - sizeof ( U_CHAR ); + pls->plbuf_top += sizeof ( U_CHAR ); #endif } @@ -1116,13 +1093,11 @@ /* Not enough space, need to grow the buffer */ /* Must make sure the increase is enough for this data */ pls->plbuf_buffer_size += pls->plbuf_buffer_grow * - (( pls->plbuf_top + buf_size - - pls->plbuf_buffer_size ) / + (( pls->plbuf_top + buf_size - pls->plbuf_buffer_size ) / pls->plbuf_buffer_grow + 1 ); while ( pls->plbuf_top + buf_size >= pls->plbuf_buffer_size ) ; - if (( pls->plbuf_buffer = - realloc( pls->plbuf_buffer, pls->plbuf_buffer_size )) == NULL ) + if (( pls->plbuf_buffer = realloc( pls->plbuf_buffer, pls->plbuf_buffer_size )) == NULL ) plexit( "plbuf wr_data: Plot buffer grow failed" ); } @@ -1206,16 +1181,13 @@ if ( plot_state->size < save_size ) { /* Yes, reallocate a larger one */ - if (( plot_state = - (struct _state *) realloc( state, - save_size )) == NULL ) + if (( plot_state = (struct _state *) realloc( state, save_size )) == NULL ) { /* NOTE: If realloc fails, then plot_state ill be NULL. * This will leave the original buffer untouched, thus we * mark it as invalid and return it back to the caller. */ - plwarn( - "plbuf: Unable to reallocate sufficient memory to save state" ); + plwarn( "plbuf: Unable to reallocate sufficient memory to save state" ); plot_state->valid = 0; return state; @@ -1228,8 +1200,7 @@ /* A buffer does not exist, so we need to allocate one */ if (( plot_state = (struct _state *) malloc( save_size )) == NULL ) { - plwarn( - "plbuf: Unable to allocate sufficient memory to save state" ); + plwarn( "plbuf: Unable to allocate sufficient memory to save state" ); return NULL; } @@ -1275,8 +1246,7 @@ rewind( pls->plbufFile ); while ( count = fread( &tmp, sizeof ( U_CHAR ), 1, pls->plbufFile )) { - if ( fwrite( &tmp, sizeof ( U_CHAR ), 1, - plot_state->plbufFile ) != count ) + if ( fwrite( &tmp, sizeof ( U_CHAR ), 1, plot_state->plbufFile ) != count ) { /* Throw a warning since this might be a permissions problem * and we may not want to force an exit @@ -1301,8 +1271,7 @@ /* Copy the plot buffer to our new buffer. Again, I must stress, that we only * are copying the portion of the plot buffer that is being used */ - if ( memcpy( plot_state->plbuf_buffer, pls->plbuf_buffer, - pls->plbuf_top ) == NULL ) + if ( memcpy( plot_state->plbuf_buffer, pls->plbuf_buffer, pls->plbuf_top ) == NULL ) { /* This should never be NULL */ plwarn( "plbuf: Got a NULL in memcpy!" ); Modified: trunk/src/plcont.c =================================================================== --- trunk/src/plcont.c 2009-09-24 03:26:53 UTC (rev 10469) +++ trunk/src/plcont.c 2009-09-24 03:50:46 UTC (rev 10470) @@ -60,11 +60,7 @@ plP_pcwcy( PLINT y ); static void -pl_drawcontlabel( PLFLT tpx, - PLFLT tpy, - char *flabel, - PLFLT *distance, - PLINT *lastindex ); +pl_drawcontlabel( PLFLT tpx, PLFLT tpy, char *flabel, PLFLT *distance, PLINT *lastindex ); /* Error flag for aborts */ @@ -152,13 +148,9 @@ realloc_line( CONT_LINE *line ) { if ((( line->x = (PLFLT *) realloc( line->x, - ( line->npts + - LINE_ITEMS ) * sizeof ( PLFLT ))) == - NULL ) || + ( line->npts + LINE_ITEMS ) * sizeof ( PLFLT ))) == NULL ) || (( line->y = (PLFLT *) realloc( line->y, - ( line->npts + - LINE_ITEMS ) * sizeof ( PLFLT ))) == - NULL )) + ( line->npts + LINE_ITEMS ) * sizeof ( PLFLT ))) == NULL )) plexit( "realloc_line: Insufficient memory" ); } @@ -258,10 +250,7 @@ } /* small routine to set offset and spacing of contour labels, see desciption above */ -void c_pl_setcontlabelparam( PLFLT offset, - PLFLT size, - PLFLT spacing, - PLINT active ) +void c_pl_setcontlabelparam( PLFLT offset, PLFLT size, PLFLT spacing, PLINT active ) { contlabel_offset = offset; contlabel_size = size; @@ -276,11 +265,7 @@ sigprec = sigdig; } -static void pl_drawcontlabel( PLFLT tpx, - PLFLT tpy, - char *flabel, - PLFLT *distance, - PLINT *lastindex ) +static void pl_drawcontlabel( PLFLT tpx, PLFLT tpy, char *flabel, PLFLT *distance, PLINT *lastindex ) { PLFLT delta_x, delta_y; PLINT currx_old, curry_old; @@ -380,11 +365,7 @@ mant = value / pow( 10.0, exponent ); if ( mant != 0.0 ) - mant = - (int ) ( mant * - pow( 10.0, prec - 1 ) + 0.5 * mant / fabs( mant )) / pow( - 10.0, - prec - 1 ); + mant = (int ) ( mant * pow( 10.0, prec - 1 ) + 0.5 * mant / fabs( mant )) / pow( 10.0, prec - 1 ); snprintf( form, FORM_LEN, "%%.%df", prec - 1 ); snprintf( string, len, form, mant ); @@ -728,9 +709,7 @@ num++; first = 0; } - for ( k = 0, i = ( startedge < 0 ? 0 : startedge ); - k < 4; - k++, i = ( i + 1 ) % 4 ) + for ( k = 0, i = ( startedge < 0 ? 0 : startedge ); k < 4; k++, i = ( i + 1 ) % 4 ) { if ( i == startedge ) continue; @@ -752,12 +731,8 @@ j = ( i + 1 ) % 4; if ( f[i] != 0.0 ) { - locx[num] = - ( px[i] * fabs( f[j] ) + px[j] * - fabs( f[i] )) / fabs( f[j] - f[i] ); - locy[num] = - ( py[i] * fabs( f[j] ) + py[j] * - fabs( f[i] )) / fabs( f[j] - f[i] ); + locx[num] = ( px[i] * fabs( f[j] ) + px[j] * fabs( f[i] )) / fabs( f[j] - f[i] ); + locy[num] = ( py[i] * fabs( f[j] ) + py[j] * fabs( f[i] )) / fabs( f[j] - f[i] ); } else { @@ -776,11 +751,7 @@ { /* Link to the next point on the contour */ if ( contlabel_active ) - pl_drawcontlabel( locx[num], - locy[num], - flabel, - distance, - lastindex ); + pl_drawcontlabel( locx[num], locy[num], flabel, distance, lastindex ); else cont_xy_store( locx[num], locy[num] ); /* Need to follow contour into next grid box */ Modified: trunk/src/plcore.c =================================================================== --- trunk/src/plcore.c 2009-09-24 03:26:53 UTC (rev 10469) +++ trunk/src/plcore.c 2009-09-24 03:50:46 UTC (rev 10470) @@ -126,8 +126,7 @@ * translating the Greek characters from the #g escape sequences into * the Hershey and Unicode codings */ -const char plP_greek_mnemonic[] = - "ABGDEZYHIKLMNCOPRSTUFXQWabgdezyhiklmncoprstufxqw"; +const char plP_greek_mnemonic[] = "ABGDEZYHIKLMNCOPRSTUFXQWabgdezyhiklmncoprstufxqw"; void plP_init( void ) @@ -264,13 +263,7 @@ if ( plsc->difilt ) { args = (EscText*) ptr; - difilt( &( args->x ), - &( args->y ), - 1, - &clpxmi, - &clpxma, - &clpymi, - &clpyma ); + difilt( &( args->x ), &( args->y ), 1, &clpxmi, &clpxma, &clpymi, &clpyma ); } } @@ -424,8 +417,7 @@ { if ( !foo ) { - plwarn( - "Driver does not support hardware solid fills, switching to software fill.\n" ); + plwarn( "Driver does not support hardware solid fills, switching to software fill.\n" ); foo = 1; } plsc->patt = 8; @@ -491,10 +483,7 @@ if ( end != endptr[0] ) { - snprintf( msgbuf, - BUFFER_SIZE, - "text2num: invalid control string detected - %c expected", - end ); + snprintf( msgbuf, BUFFER_SIZE, "text2num: invalid control string detected - %c expected", end ); plwarn( msgbuf ); } @@ -519,9 +508,7 @@ * impossible value, and the function returns 0. \*--------------------------------------------------------------------------*/ -int text2fci( const char *text, - unsigned char *hexdigit, - unsigned char *hexpower ) +int text2fci( const char *text, unsigned char *hexdigit, unsigned char *hexpower ) { typedef struct { @@ -601,8 +588,8 @@ { len = strlen( string ); /* this length is only used in the loop - * counter, we will work out the length of - * the unicode string as we go */ + * counter, we will work out the length of + * the unicode string as we go */ plgesc( &esc ); /* At this stage we will do some translations into unicode, like @@ -623,7 +610,7 @@ plP_esc( PLESC_BEGIN_TEXT, &args ); } for ( j = i = 0; i < len; i++ ) /* Walk through the string, and convert - * some stuff to unicode on the fly */ + * some stuff to unicode on the fly */ { skip = 0; @@ -638,20 +625,16 @@ fcisave = fci; plP_hex2fci( PL_FCI_SYMBOL, PL_FCI_FAMILY, &fci ); unicode_buffer[j++] = fci; - unicode_buffer[j++] = - (PLUNICODE) hershey_to_unicode_lookup_table[idx - ]. - Unicode; + unicode_buffer[j++] = \ + (PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode; if ( plsc->alt_unicode ) { args.n_fci = fci; args.n_ctrl_char = PLTEXT_FONTCHANGE; plP_esc( PLESC_CONTROL_CHAR, &args ); - args.n_char = - (PLUNICODE) hershey_to_unicode_lookup_table - [idx] - .Unicode; + args.n_char = \ + (PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode; plP_esc( PLESC_TEXT_CHAR, &args ); } @@ -662,8 +645,7 @@ * escape characters that are interpreted by the device * driver. */ - if ( unicode_buffer[j - 1] == - esc ) unicode_buffer[j++] = esc; + if ( unicode_buffer[j - 1] == esc ) unicode_buffer[j++] = esc; fci = fcisave; unicode_buffer[j] = fci; skip = 1; @@ -693,8 +675,7 @@ * escape characters that are interpreted by the device * driver. */ - if ( unicode_buffer[j - 1] == - esc ) unicode_buffer[j++] = esc; + if ( unicode_buffer[j - 1] == esc ) unicode_buffer[j++] = esc; fci = fcisave; unicode_buffer[j] = fci; skip = 1; @@ -727,8 +708,7 @@ * digit and hex digit value in second rightmost * hex digit. */ - hexdigit = - ( code >> 4 ) & PL_FCI_HEXDIGIT_MASK; + hexdigit = ( code >> 4 ) & PL_FCI_HEXDIGIT_MASK; hexpower = code & PL_FCI_HEXPOWER_MASK; plP_hex2fci( hexdigit, hexpower, &fci ); unicode_buffer[j] = fci; @@ -745,9 +725,7 @@ else { - i += text2fci( &string[i + 1], - &hexdigit, - &hexpower ); + i += text2fci( &string[i + 1], &hexdigit, &hexpower ); if ( hexpower < 7 ) { plP_hex2fci( hexdigit, hexpower, &fci ); @@ -835,22 +813,17 @@ { if ( ig >= 24 ) ig = ig + 100 - 24; - idx = plhershey2unicode( - ig + 527 ); - unicode_buffer[j++] = - (PLUNICODE) hershey_to_unicode_lookup_table - [idx] - .Unicode; + idx = plhershey2unicode( ig + 527 ); + unicode_buffer[j++] = \ + (PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode; i += 2; skip = 1; /* skip is set if we have copied something - * into the unicode table */ + * into the unicode table */ if ( plsc->alt_unicode ) { - args.n_char = - (PLUNICODE) - hershey_to_unicode_lookup_table[ - idx].Unicode; + args.n_char = \ + (PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode; plP_esc( PLESC_TEXT_CHAR, &args ); } } @@ -861,14 +834,12 @@ unicode_buffer[j++] = (PLUNICODE) 0x00; i += 2; skip = 1; /* skip is set if we have copied something - * into the unicode table */ + * into the unicode table */ if ( plsc->alt_unicode ) { - args.n_char = - (PLUNICODE) - hershey_to_unicode_lookup_table[ - idx].Unicode; + args.n_char = \ + (PLUNICODE) hershey_to_unicode_lookup_table[idx].Unicode; plP_esc( PLESC_TEXT_CHAR, &args ); } } @@ -909,21 +880,17 @@ { PLUNICODE unichar = 0; #ifdef HAVE_LIBUNICODE - char * ptr = unicode_get_utf8( string + i, - &unichar ); + char * ptr = unicode_get_utf8( string + i, &unichar ); #else - char* ptr = utf8_to_ucs4( string + i, &unichar ); + char * ptr = utf8_to_ucs4( string + i, &unichar ); #endif if ( ptr == NULL ) { char buf[BUFFER_SIZE]; strncpy( buf, string, 30 ); buf[30] = '\0'; - snprintf( buf, - BUFFER_SIZE, - "UTF-8 string is malformed: %s%s", - buf, - strlen( string ) > 30 ? "[...]" : "" ); + snprintf( buf, BUFFER_SIZE, "UTF-8 string is malformed: %s%s", + buf, strlen( string ) > 30 ? "[...]" : "" ); plabort( buf ); return; } @@ -953,11 +920,11 @@ if ( j > 0 ) { args.unicode_array_len = j; /* Much easier to set the length than - * work it out later :-) */ + * work it out later :-) */ args.unicode_array = &unicode_buffer[0]; /* Get address of the - * unicode buffer (even - * though it is - * currently static) */ + * unicode buffer (even + * though it is + * currently static) */ } else /* Don't print anything, if there is no unicode to print! */ @@ -1190,12 +1157,8 @@ { for ( i = 0; i < npts; i++ ) { - x = - (PLINT) ( plsc->dioxax * xscl[i] + plsc->dioxay * yscl[i] + - plsc->dioxb ); - y = - (PLINT) ( plsc->dioyax * xscl[i] + plsc->dioyay * yscl[i] + - plsc->dioyb ); + x = (PLINT) ( plsc->dioxax * xscl[i] + plsc->dioxay * yscl[i] + plsc->dioxb ); + y = (PLINT) ( plsc->dioyax * xscl[i] + plsc->dioyay * yscl[i] + plsc->dioyb ); xscl[i] = x; yscl[i] = y; } @@ -1260,12 +1223,8 @@ { for ( i = 0; i < npts; i++ ) { - x = - (PLINT) ( plsc->dioxax * xscl[i] + plsc->dioxay * yscl[i] + - plsc->dioxb ); - y = - (PLINT) ( plsc->dioyax * xscl[i] + plsc->dioyay * yscl[i] + - plsc->dioyb ); + x = (PLINT) ( plsc->dioxax * xscl[i] + plsc->dioxay * yscl[i] + plsc->dioxb ); + y = (PLINT) ( plsc->dioyax * xscl[i] + plsc->dioyay * yscl[i] + plsc->dioyb ); xscl[i] = x; yscl[i] = y; } @@ -1864,10 +1823,8 @@ PLINT pxmin, pxmax, pymin, pymax; PLFLT dimxlen, dimylen, pxlen, pylen; - if (( plsc->dimxmin == plsc->phyxmi ) && - ( plsc->dimxmax == plsc->phyxma ) && - ( plsc->dimymin == plsc->phyymi ) && - ( plsc->dimymax == plsc->phyyma ) && + if (( plsc->dimxmin == plsc->phyxmi ) && ( plsc->dimxmax == plsc->phyxma ) && + ( plsc->dimymin == plsc->phyymi ) && ( plsc->dimymax == plsc->phyyma ) && ( plsc->dimxpmm == plsc->xpmm ) && ( plsc->dimypmm == plsc->ypmm )) { plsc->difilt &= ~PLDI_MAP; @@ -2461,8 +2418,7 @@ if ( plsc->cmap0 != NULL ) free((void *) plsc->cmap0 ); - if (( plsc->cmap0 = - (PLColor *) calloc( 1, plsc->ncol0 * sizeof ( PLColor ))) == NULL ) + if (( plsc->cmap0 = (PLColor *) calloc( 1, plsc->ncol0 * sizeof ( PLColor ))) == NULL ) { plexit( "c_plcpstrm: Insufficient memory" ); } @@ -2477,8 +2433,7 @@ if ( plsc->cmap1 != NULL ) free((void *) plsc->cmap1 ); - if (( plsc->cmap1 = - (PLColor *) calloc( 1, plsc->ncol1 * sizeof ( PLColor ))) == NULL ) + if (( plsc->cmap1 = (PLColor *) calloc( 1, plsc->ncol1 * sizeof ( PLColor ))) == NULL ) { plexit( "c_plcpstrm: Insufficient memory" ); } @@ -2560,8 +2515,7 @@ } } if ( chdir( currdir ) != 0 ) - pldebug( "plInBuildTree():", - "Unable to chdir to current directory" ); + pldebug( "plInBuildTree():", "Unable to chdir to current directory" ); } } inited = 1; @@ -2676,9 +2630,7 @@ fd = fopen( path, "r" ); if ( fd == NULL ) { - snprintf( - buf, - BUFFER2_SIZE, + snprintf( buf, BUFFER2_SIZE, "plInitDispatchTable: Could not open driver info file %s\n", name ); plabort( buf ); @@ -2711,9 +2663,7 @@ /* Allocate space for the dispatch table. */ if (( dispatch_table = (PLDispatchTable **) - malloc(( nplstaticdevices + - npldynamicdevices ) * - sizeof ( PLDispatchTable * ))) == NULL ) + malloc(( nplstaticdevices + npldynamicdevices ) * sizeof ( PLDispatchTable * ))) == NULL ) { plexit( "plInitDispatchTable: Insufficient memory" ); } @@ -2725,9 +2675,7 @@ for ( n = 0; n < nplstaticdevices; n++ ) { - if (( dispatch_table[n] = - (PLDispatchTable *) malloc( sizeof ( PLDispatchTable ))) == - NULL ) + if (( dispatch_table[n] = (PLDispatchTable *) malloc( sizeof ( PLDispatchTable ))) == NULL ) { plexit( "plInitDispatchTable: Insufficient memory" ); } @@ -2741,12 +2689,8 @@ /* Allocate space for the device and driver specs. We may not use all of * these driver descriptors, but we obviously won't need more drivers than * devices... */ - if ((( loadable_device_list = - malloc( npldynamicdevices * sizeof ( PLLoadableDevice ))) == - NULL ) || - (( loadable_driver_list = - malloc( npldynamicdevices * sizeof ( PLLoadableDriver ))) == - NULL )) + if ((( loadable_device_list = malloc( npldynamicdevices * sizeof ( PLLoadableDevice ))) == NULL ) || + (( loadable_driver_list = malloc( npldynamicdevices * sizeof ( PLLoadableDriver ))) == NULL )) { plexit( "plInitDispatchTable: Insufficient memory" ); } @@ -3017,13 +2961,10 @@ snprintf( sym, BUFFER_SIZE, "plD_dispatch_init_%s", tag ); { - PLDispatchInit dispatch_init = (PLDispatchInit) lt_dlsym( - driver->dlhand, - sym ); + PLDispatchInit dispatch_init = (PLDispatchInit) lt_dlsym( driver->dlhand, sym ); if ( !dispatch_init ) { - fprintf( - stderr, + fprintf( stderr, "Unable to locate dispatch table initialization function for driver: %s.\n", driver->drvnam ); return; @@ -3106,10 +3047,7 @@ } static void -plgdevlst( const char **p_menustr, - const char **p_devname, - int *p_ndev, - int type ) +plgdevlst( const char **p_menustr, const char **p_devname, int *p_ndev, int type ) { int i, j; @@ -3157,8 +3095,7 @@ c_plspage( PLFLT xp, PLFLT yp, PLINT xleng, PLINT yleng, PLINT xoff, PLINT yoff ) { if ( plsc->level > 0 ) - plwarn( - "calling plspage() after plinit() may give unpredictable results" ); + plwarn( "calling plspage() after plinit() may give unpredictable results" ); if ( xp ) plsc->xdpi = xp; @@ -3485,12 +3422,10 @@ { PLUNICODE mask; hexpower = hexpower & PL_FCI_HEXPOWER_MASK; - mask = - ~(((PLUNICODE) PL_FCI_HEXDIGIT_MASK ) << ((PLUNICODE) 4 * hexpower )); - *pfci = *pfci & mask; - mask = - (((PLUNICODE) ( hexdigit & PL_FCI_HEXDIGIT_MASK )) << ( 4 * hexpower )); - *pfci = *pfci | mask; + mask = ~(((PLUNICODE) PL_FCI_HEXDIGIT_MASK ) << ((PLUNICODE) 4 * hexpower )); + *pfci = *pfci & mask; + mask = (((PLUNICODE) ( hexdigit & PL_FCI_HEXDIGIT_MASK )) << ( 4 * hexpower )); + *pfci = *pfci | mask; } /* Retrieve hex digit value from FCI that is masked out and shifted to the @@ -3499,9 +3434,8 @@ plP_fci2hex( PLUNICODE fci, unsigned char *phexdigit, unsigned char hexpower ) { PLUNICODE mask; - hexpower = hexpower & PL_FCI_HEXPOWER_MASK; - mask = - (((PLUNICODE) PL_FCI_HEXPOWER_MASK ) << ((PLUNICODE) ( 4 * hexpower ))); + hexpower = hexpower & PL_FCI_HEXPOWER_MASK; + mask = (((PLUNICODE) PL_FCI_HEXPOWER_MASK ) << ((PLUNICODE) ( 4 * hexpower ))); *phexdigit = (unsigned char) (( fci & mask ) >> ((PLUNICODE) ( 4 * hexpower ))); } @@ -3876,7 +3810,7 @@ PLINT ret = 0; /* set up return code to 0, the value if no devices match*/ buff = (char *) malloc((size_t) PL_NSTREAMS * 8 ); /* Allocate enough memory for 8 - * characters for each possible stream */ + * characters for each possible stream */ if ( buff != NULL ) { @@ -3912,15 +3846,8 @@ \*--------------------------------------------------------------------------*/ void -plP_image( PLFLT *z, - PLINT nx, - PLINT ny, - PLFLT xmin, - PLFLT ymin, - PLFLT dx, - PLFLT dy, - void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), - PLPointer pltr_data ) +plP_image( PLFLT *z, PLINT nx, PLINT ny, PLFLT xmin, PLFLT ymin, PLFLT dx, PLFLT dy, + void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ) { plsc->page_status = DRAWING; @@ -3978,8 +3905,7 @@ { PLINT clpxmi, clpxma, clpymi, clpyma; - if ((( xscl = (short *) malloc( nx * ny * sizeof ( short ))) == - NULL ) || + if ((( xscl = (short *) malloc( nx * ny * sizeof ( short ))) == NULL ) || (( yscl = (short *) malloc( nx * ny * sizeof ( short ))) == NULL )) { plexit( "plP_image: Insufficient memory" ); Modified: trunk/src/plctrl.c =================================================================== --- trunk/src/plctrl.c 2009-09-24 03:26:53 UTC (rev 10469) +++ trunk/src/plctrl.c 2009-09-24 03:50:46 UTC (rev 10470) @@ -133,8 +133,7 @@ if ( icol0 < 0 || icol0 >= plsc->ncol0 ) { char buffer[BUFFER_SIZE]; - snprintf( buffer, BUFFER_SIZE, "plcol0: Invalid color map entry: %d", - (int) icol0 ); + snprintf( buffer, BUFFER_SIZE, "plcol0: Invalid color map entry: %d", (int) icol0 ); plabort( buffer ); return; } @@ -168,8 +167,7 @@ if ( col1 < 0 || col1 > 1 || isnan( col1 )) { char buffer[BUFFER_SIZE]; - snprintf( buffer, BUFFER_SIZE, "plcol1: Invalid color map position: %f", - (PLFLT) col1 ); + snprintf( buffer, BUFFER_SIZE, "plcol1: Invalid color map position: %f", (PLFLT) col1 ); plabort( buffer ); return; } @@ -250,8 +248,7 @@ if ( icol0 < 0 || icol0 >= plsc->ncol0 ) { char buffer[BUFFER_SIZE]; - snprintf( buffer, BUFFER_SIZE, "plscol0: Illegal color table value: %d", - (int) icol0 ); + snprintf( buffer, BUFFER_SIZE, "plscol0: Illegal color table value: %d", (int) icol0 ); plabort( buffer ); return; } @@ -282,25 +279,15 @@ if ( icol0 < 0 || icol0 >= plsc->ncol0 ) { char buffer[BUFFER_SIZE]; - snprintf( buffer, - BUFFER_SIZE, - "plscol0a: Illegal color table value: %d", - (int) icol0 ); + snprintf( buffer, BUFFER_SIZE, "plscol0a: Illegal color table value: %d", (int) icol0 ); plabort( buffer ); return; } - if (( r < 0 || - r > 255 ) || - ( g < 0 || g > 255 ) || ( b < 0 || b > 255 ) || ( a < 0 || a > 1.0 )) + if (( r < 0 || r > 255 ) || ( g < 0 || g > 255 ) || ( b < 0 || b > 255 ) || ( a < 0 || a > 1.0 )) { char buffer[BUFFER_SIZE]; - snprintf( buffer, - BUFFER_SIZE, - "plscol0a: Invalid RGB color: %d, %d, %d, %f", - (int) r, - (int) g, - (int) b, - (double) a ); + snprintf( buffer, BUFFER_SIZE, "plscol0a: Invalid RGB color: %d, %d, %d, %f", + (int) r, (int) g, (int) b, (double) a ); plabort( buffer ); return; } @@ -334,10 +321,7 @@ if ( icol0 < 0 || icol0 > plsc->ncol0 ) { char buffer[BUFFER_SIZE]; - snprintf( buffer, - BUFFER_SIZE, - "plgcol0: Invalid color index: %d", - (int) icol0 ); + snprintf( buffer, BUFFER_SIZE, "plgcol0: Invalid color index: %d", (int) icol0 ); plabort( buffer ); return; } @@ -370,10 +354,7 @@ if ( icol0 < 0 || icol0 > plsc->ncol0 ) { char buffer[BUFFER_SIZE]; - snprintf( buffer, - BUFFER_SIZE, - "plgcol0: Invalid color index: %d", - (int) icol0 ); + snprintf( buffer, BUFFER_SIZE, "plgcol0: Invalid color index: %d", (int) icol0 ); plabort( buffer ); return; } @@ -407,12 +388,8 @@ ( b[i] < 0 || b[i] > 255 )) { char buffer[BUFFER_SIZE]; - snprintf( buffer, - BUFFER_SIZE, - "plscmap0: Invalid RGB color: %d, %d, %d", - (int) r[i], - (int) g[i], - (int) b[i] ); + snprintf( buffer, BUFFER_SIZE, "plscmap0: Invalid RGB color: %d, %d, %d", + (int) r[i], (int) g[i], (int) b[i] ); plabort( buffer ); return; } @@ -449,13 +426,8 @@ ( a[i] < 0.0 || a[i] > 1.0 )) { char buffer[BUFFER_SIZE]; - snprintf( buffer, - BUFFER_SIZE, - "plscmap0a: Invalid RGB color: %d, %d, %d, %f", - (int) r[i], - (int) g[i], - (int) b[i], - (double) a[i] ); + snprintf( buffer, BUFFER_SIZE, "plscmap0a: Invalid RGB color: %d, %d, %d, %f", + (int) r[i], (int) g[i], (int) b[i], (double) a[i] ); plabort( buffer ); return; } @@ -491,12 +463,8 @@ ( b[i] < 0 || b[i] > 255 )) { char buffer[BUFFER_SIZE]; - snprintf( buffer, - BUFFER_SIZE, - "plscmap1: Invalid RGB color: %d, %d, %d", - (int) r[i], - (int) g[i], - (int) b[i] ); + snprintf( buffer, BUFFER_SIZE, "plscmap1: Invalid RGB color: %d, %d, %d", + (int) r[i], (int) g[i], (int) b[i] ); plabort( buffer ); return; } @@ -532,13 +500,8 @@ ( a[i] < 0.0 || a[i] > 1.0 )) { char buffer[BUFFER_SIZE]; - snprintf( buffer, - BUFFER_SIZE, - "plscmap1a: Invalid RGB color: %d, %d, %d, %f", - (int) r[i], - (int) g[i], - (int) b[i], - (double) a[i] ); + snprintf( buffer, BUFFER_SIZE, "plscmap1a: Invalid RGB color: %d, %d, %d, %f", + (int) r[i], (int) g[i], (int) b[i], (double) a[i] ); plabort( buffer ); return; } @@ -975,8 +938,7 @@ } else { - if (( plsc->cmap1 = - (PLColor *) calloc( ncol, sizeof ( PLColor ))) == NULL ) + if (( plsc->cmap1 = (PLColor *) calloc( ncol, sizeof ( PLColor ))) == NULL ) { plexit( "c_plscmap1n: Insufficient memory" ); } @@ -1292,10 +1254,7 @@ fp = plLibOpen( PL_DEFAULT_CMAP0_FILE ); if ( fp == NULL ) { - snprintf( msgbuf, - 1024, - ... [truncated message content] |
From: <hez...@us...> - 2009-09-29 05:42:48
|
Revision: 10488 http://plplot.svn.sourceforge.net/plplot/?rev=10488&view=rev Author: hezekiahcarty Date: 2009-09-29 05:42:40 +0000 (Tue, 29 Sep 2009) Log Message: ----------- Initial steps toward adding Plcairo to the PLplot OCaml build system This patch makes a number of changes to the OCaml portion of the CMake build system. A check is added for ocamlfind (an OCaml compilation aid), checks are made for Cairo and Gtk+ (lablgtk2) OCaml bindings. If the extcairo device is built and the Cairo OCaml bindings are found then the Plcairo OCaml module will be built, which includes support for using the extcairo driver from OCaml. The check for OCaml Gtk+ bindings is not currently used but it will be once Plcairo examples are added. Modified Paths: -------------- trunk/bindings/ocaml/CMakeLists.txt trunk/cmake/modules/ocaml.cmake trunk/cmake/modules/plplot.cmake Modified: trunk/bindings/ocaml/CMakeLists.txt =================================================================== --- trunk/bindings/ocaml/CMakeLists.txt 2009-09-29 05:32:56 UTC (rev 10487) +++ trunk/bindings/ocaml/CMakeLists.txt 2009-09-29 05:42:40 UTC (rev 10488) @@ -24,6 +24,9 @@ if(ENABLE_ocaml) + # Try to build the Plcairo module + add_subdirectory(plcairo) + # optional command to generate generated_plplot_h.inc. This generated # version of the file should be identical to plplot_h.inc. if(GENERATE_PLPLOT_H_INC) Modified: trunk/cmake/modules/ocaml.cmake =================================================================== --- trunk/cmake/modules/ocaml.cmake 2009-09-29 05:32:56 UTC (rev 10487) +++ trunk/cmake/modules/ocaml.cmake 2009-09-29 05:42:40 UTC (rev 10488) @@ -77,6 +77,16 @@ endif(ENABLE_ocaml) if(ENABLE_ocaml) + find_program(OCAMLFIND ocamlfind) + if (OCAMLFIND) + message(STATUS "OCAMLFIND = ${OCAMLFIND}") + else (OCAMLFIND) + message(STATUS "WARNING:" + "ocamlfind not found.") + endif (OCAMLFIND) +endif(ENABLE_ocaml) + +if(ENABLE_ocaml) execute_process(COMMAND ${OCAMLC} -version OUTPUT_VARIABLE OCAML_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE @@ -144,4 +154,46 @@ endif(output OR error) endif(GENERATE_PLPLOT_H_INC) + + # Test for the availability of Cairo and Gtk+ bindings + if(OCAMLFIND) + if(PLD_extcairo) + set(text_cairo "module C = Cairo") + file(WRITE ${CMAKE_BINARY_DIR}/test_cairo.ml ${text_cairo}) + execute_process( + COMMAND ${OCAMLFIND} c -package cairo -linkpkg test_cairo.ml -o test_cairo + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + RESULT_VARIABLE OCAML_HAS_CAIRO + ) + # Invert the test result. What CMake takes as true is meant to be false. + set(OCAML_HAS_CAIRO NOT OCAML_HAS_CAIRO) + if(OCAML_HAS_CAIRO) + message(STATUS "Cairo OCaml library found") + else(OCAML_HAS_CAIRO) + message(STATUS "WARNING:" + "Cairo OCaml library not found. Disabling Plcairo module") + endif(OCAML_HAS_CAIRO) + + set(text_gtk + "module G = Gtk + module C = Cairo_lablgtk" + ) + file (WRITE ${CMAKE_BINARY_DIR}/test_gtk.ml ${text_gtk}) + execute_process( + COMMAND ${OCAMLFIND} c -package cairo.lablgtk2 -linkpkg test_gtk.ml -o test_gtk + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + RESULT_VARIABLE OCAML_HAS_GTK + ) + # Invert the test result. What CMake takes as true is meant to be false. + set(OCAML_HAS_GTK NOT OCAML_HAS_GTK) + if(OCAML_HAS_GTK) + message(STATUS "lablgtk2 OCaml library found") + else(OCAML_HAS_GTK) + message(STATUS "WARNING: lablgtk2 OCaml library not found.") + endif(OCAML_HAS_GTK) + endif (PLD_extcairo) + else(OCAMLFIND) + message(STATUS "WARNING:" + "ocamlfind not available. Disabling Plcairo module and lablgtk support") + endif(OCAMLFIND) endif(ENABLE_ocaml) Modified: trunk/cmake/modules/plplot.cmake =================================================================== --- trunk/cmake/modules/plplot.cmake 2009-09-29 05:32:56 UTC (rev 10487) +++ trunk/cmake/modules/plplot.cmake 2009-09-29 05:42:40 UTC (rev 10488) @@ -427,7 +427,9 @@ include(tcl-related) include(pdl) include(ada) -include(ocaml) +# OCaml support is included after the check for output drivers in order to +# check for extcairo support. +#include(ocaml) include(lua) include(d) @@ -458,6 +460,11 @@ include(drivers) # ======================================================================= +# OCaml support (after drivers to check for extcairo) +# ======================================================================= +include(ocaml) + +# ======================================================================= # Miscellaneous other features - including docbook documentation # ======================================================================= include(docbook) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hez...@us...> - 2009-09-30 22:48:20
|
Revision: 10501 http://plplot.svn.sourceforge.net/plplot/?rev=10501&view=rev Author: hezekiahcarty Date: 2009-09-30 22:48:10 +0000 (Wed, 30 Sep 2009) Log Message: ----------- Fix some mismatched if/endif blocks in the OCaml CMake files Modified Paths: -------------- trunk/bindings/ocaml/plcairo/CMakeLists.txt trunk/examples/ocaml/CMakeLists.txt Modified: trunk/bindings/ocaml/plcairo/CMakeLists.txt =================================================================== --- trunk/bindings/ocaml/plcairo/CMakeLists.txt 2009-09-30 19:39:01 UTC (rev 10500) +++ trunk/bindings/ocaml/plcairo/CMakeLists.txt 2009-09-30 22:48:10 UTC (rev 10501) @@ -227,4 +227,4 @@ DESTINATION ${OCAML_INSTALL_DIR}/stublibs ) -endif(ENABLE_ocaml AND OCAML_HAS_CAIRO) +endif(ENABLE_ocaml AND OCAML_HAS_CAIRO AND linkflags) Modified: trunk/examples/ocaml/CMakeLists.txt =================================================================== --- trunk/examples/ocaml/CMakeLists.txt 2009-09-30 19:39:01 UTC (rev 10500) +++ trunk/examples/ocaml/CMakeLists.txt 2009-09-30 22:48:10 UTC (rev 10501) @@ -218,9 +218,9 @@ # DESTINATION ${DATA_DIR}/examples/ocaml # ) -endif(CORE_BUILD) +endif(CORE_BUILD AND OCAML_HAS_CAIRO AND OCAML_HAS_GTK) -if(BUILD_TEST) +if(BUILD_TEST AND OCAML_HAS_CAIRO AND OCAML_HAS_GTK) # Default to using ocaml if ocamlopt is not available. Make sure the proper # files are cleaned up after a build, depending on the compiler used. if (OCAMLOPT) @@ -295,4 +295,4 @@ set_property(GLOBAL APPEND PROPERTY FILES_examples_ocaml ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE_NAME}) endforeach(STRING_INDEX ${ocaml_STRING_INDICES}) set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${ocaml_EXTRA_CLEAN_FILES}") -endif(BUILD_TEST) +endif(BUILD_TEST AND OCAML_HAS_CAIRO AND OCAML_HAS_GTK) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2009-10-01 17:50:38
|
Revision: 10508 http://plplot.svn.sourceforge.net/plplot/?rev=10508&view=rev Author: airwin Date: 2009-10-01 17:50:30 +0000 (Thu, 01 Oct 2009) Log Message: ----------- Determine CAIRO_COMPILE_FLAGS and CAIRO_LINK_FLAGS in more standard way with softer landing in case those flags cannot be determined. Modified Paths: -------------- trunk/bindings/ocaml/plcairo/CMakeLists.txt trunk/cmake/modules/ocaml.cmake Modified: trunk/bindings/ocaml/plcairo/CMakeLists.txt =================================================================== --- trunk/bindings/ocaml/plcairo/CMakeLists.txt 2009-10-01 14:48:13 UTC (rev 10507) +++ trunk/bindings/ocaml/plcairo/CMakeLists.txt 2009-10-01 17:50:30 UTC (rev 10508) @@ -4,6 +4,7 @@ # # # Copyright (C) 2008 Andrew Ross +# Copyright (C) 2009 Alan W. Irwin # Copyright (C) 2009 Hezekiah M. Carty # # This file is part of PLplot. @@ -21,21 +22,7 @@ # along with PLplot; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -if(PKG_CONFIG_EXECUTABLE) - pkg_check_pkgconfig(cairo includedir libdir linkflags cflags version _CAIRO) -endif(PKG_CONFIG_EXECUTABLE) -if(ENABLE_ocaml AND OCAML_HAS_CAIRO AND linkflags) - # Cairo compile and link flags - # A hack to get the compile and link flags from pkg-config - execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --cflags cairo - OUTPUT_VARIABLE CAIRO_COMPILE_FLAGS - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --libs cairo - OUTPUT_VARIABLE CAIRO_LINK_FLAGS - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - +if(ENABLE_ocaml AND OCAML_HAS_CAIRO) # locations of plplot.cma and plplot.cmxa set(PATH_TO_PLPLOT_CMA ${CMAKE_BINARY_DIR}/bindings/ocaml) set(PATH_TO_PLPLOT_CMXA ${CMAKE_BINARY_DIR}/bindings/ocaml) @@ -227,4 +214,4 @@ DESTINATION ${OCAML_INSTALL_DIR}/stublibs ) -endif(ENABLE_ocaml AND OCAML_HAS_CAIRO AND linkflags) +endif(ENABLE_ocaml AND OCAML_HAS_CAIRO) Modified: trunk/cmake/modules/ocaml.cmake =================================================================== --- trunk/cmake/modules/ocaml.cmake 2009-10-01 14:48:13 UTC (rev 10507) +++ trunk/cmake/modules/ocaml.cmake 2009-10-01 17:50:30 UTC (rev 10508) @@ -177,6 +177,25 @@ if(OCAML_HAS_CAIRO) message(STATUS "Cairo OCaml library found") + if(PKG_CONFIG_EXECUTABLE) + pkg_check_pkgconfig(cairo includedir libdir linkflags cflags version _CAIRO1) + # Transform from CMake form to pkg-config form required by ocaml build + # commands. + if(linkflags) + string(REGEX REPLACE ";" " " CAIRO_COMPILE_FLAGS "${cflags}") + pkg_config_link_flags(CAIRO_LINK_FLAGS "${linkflags}") + #message(STATUS "DEBUG: cairo linkflags = ${linkflags}") + #message(STATUS "DEBUG: CAIRO_LINK_FLAGS = ${CAIRO_LINK_FLAGS}") + else(linkflags) + message(STATUS "WARNING:" + "pkg-config could not find cairo module. Disabling Plcairo module") + set(OCAML_HAS_CAIRO OFF) + endif(linkflags) + else(PKG_CONFIG_EXECUTABLE) + message(STATUS "WARNING:" + "pkg-config not found. Disabling Plcairo module") + set(OCAML_HAS_CAIRO OFF) + endif(PKG_CONFIG_EXECUTABLE) else(OCAML_HAS_CAIRO) message(STATUS "WARNING:" "Cairo OCaml library not found. Disabling Plcairo module") @@ -214,4 +233,7 @@ set(OCAML_HAS_CAIRO OFF) set(OCAML_HAS_GTK OFF) endif(OCAMLFIND) +else(ENABLE_ocaml) + set(OCAML_HAS_CAIRO OFF) + set(OCAML_HAS_GTK OFF) endif(ENABLE_ocaml) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hez...@us...> - 2009-10-05 21:08:59
|
Revision: 10514 http://plplot.svn.sourceforge.net/plplot/?rev=10514&view=rev Author: hezekiahcarty Date: 2009-10-05 21:08:49 +0000 (Mon, 05 Oct 2009) Log Message: ----------- Change Plplot.Plot API slightly to make more function parameters optional plot_axes, finish_page, next_page and finish all work when no tick spacing or subtick count is provided. When no values are provided for these, the PLplot defaults are used. xplot01.ml is also updated to reflect these changes. Modified Paths: -------------- trunk/bindings/ocaml/plplot.ml trunk/bindings/ocaml/plplot.mli trunk/examples/ocaml/xplot01.ml Modified: trunk/bindings/ocaml/plplot.ml =================================================================== --- trunk/bindings/ocaml/plplot.ml 2009-10-05 21:06:17 UTC (rev 10513) +++ trunk/bindings/ocaml/plplot.ml 2009-10-05 21:08:49 UTC (rev 10514) @@ -919,7 +919,8 @@ with_stream ?stream (fun () -> colorbar ?label ?log ?pos ?width values) (** An easier to deduce alternative to {Plplot.plbox} *) - let plot_axes ?stream ~xtick ~xsub ~ytick ~ysub ~xoptions ~yoptions = + let plot_axes ?stream ?(xtick = 0.0) ?(xsub =0) + ?(ytick = 0.0) ?(ysub = 0) xoptions yoptions = let map_axis_options ol = List.map ( function @@ -945,7 +946,7 @@ with_stream ?stream (fun () -> plbox xopt xtick xsub yopt ytick ysub) (** Default page ending steps. Just draw the plot axes. *) - let default_finish ?stream ?axis xstep ystep = + let default_finish ?stream ?axis ?xtick ?ytick () = let xopt, yopt = match axis with | None -> default_axis_options, default_axis_options @@ -953,29 +954,27 @@ in set_color_in ?stream Black ( fun () -> - plot_axes ?stream - ~xtick:xstep ~xsub:0 ~xoptions:xopt - ~ytick:ystep ~ysub:0 ~yoptions:yopt; + plot_axes ?stream ?xtick xopt ?ytick yopt; ) (** Plot axes, but don't advance the page or end the session. This is used internally by [finish]. *) - let finish_page ?stream ?f ?post ?axis xstep ystep = + let finish_page ?stream ?f ?post ?axis ?xtick ?ytick () = with_stream ?stream ( fun () -> let actual_finish = match f with | Some custom_finish -> custom_finish - | None -> (fun () -> default_finish ?stream ?axis xstep ystep) + | None -> default_finish ?stream ?axis ?xtick ?ytick in actual_finish (); Option.may (fun f -> f ()) post; ) (** Finish the current page, start a new one. *) - let next_page ?stream ?f ?post ?axis ?(xstep = 0.0) ?(ystep = 0.0) + let next_page ?stream ?f ?post ?axis ?xtick ?ytick (x0, y0) (x1, y1) axis_scaling = - finish_page ?stream ?f ?post ?axis xstep ystep; + finish_page ?stream ?f ?post ?axis ?xtick ?ytick (); start_page ?stream (x0, y0) (x1, y1) axis_scaling; () @@ -985,8 +984,8 @@ (** Finish up the plot by plotting axes and ending the session. This must be called after plotting is complete. *) - let finish ?stream ?f ?post ?axis xstep ystep = - finish_page ?stream ?f ?post ?axis xstep ystep; + let finish ?stream ?f ?post ?axis ?xtick ?ytick () = + finish_page ?stream ?f ?post ?axis ?xtick ?ytick (); with_stream ?stream plend1 end @@ -1051,7 +1050,7 @@ in plot ~stream:p plottable_points; Option.may (fun (x, y, t) -> label ~stream:p x y t) labels; - finish ~stream:p ~axis:(maybe_log log) 0.0 0.0; + finish ~stream:p ~axis:(maybe_log log) (); () (** [lines [xs, ys; ...] plots the line segments described by the coordinates @@ -1072,7 +1071,7 @@ plot ~stream:p plottable_lines; Option.may (fun (x, y, t) -> label ~stream:p x y t) labels; Option.may (fun n -> draw_legend ~stream:p n (Array.to_list colors)) names; - finish ~stream:p ~axis:(maybe_log log) 0.0 0.0; + finish ~stream:p ~axis:(maybe_log log) (); () (** [image ?log m] plots the image [m] with a matching colorbar. If [log] is @@ -1088,7 +1087,7 @@ Option.may (fun (x, y, t) -> label ~stream:p x y t) labels; colorbar ~stream:p ?log ~pos:(Right 0.12) (Array_ext.range ~n:100 m_min m_max); - finish ~stream:p 0.0 0.0; + finish ~stream:p (); () (** [func ?point ?step fs (min, max)] plots the functions [fs] from [x = min] @@ -1122,7 +1121,7 @@ plot ~stream plot_content; Option.may (fun n -> draw_legend ~stream n (Array.to_list colors)) names; Option.may (fun (x, y, t) -> label ~stream x y t) labels; - finish ~stream 0.0 0.0; + finish ~stream (); () end Modified: trunk/bindings/ocaml/plplot.mli =================================================================== --- trunk/bindings/ocaml/plplot.mli 2009-10-05 21:06:17 UTC (rev 10513) +++ trunk/bindings/ocaml/plplot.mli 2009-10-05 21:08:49 UTC (rev 10514) @@ -369,11 +369,11 @@ (** Draw the plot axes on the current plot page *) val plot_axes : ?stream:stream_t -> - xtick:float -> - xsub:int -> - ytick:float -> - ysub:int -> - xoptions:axis_options_t list -> yoptions:axis_options_t list -> unit + ?xtick:float -> + ?xsub:int -> + ?ytick:float -> + ?ysub:int -> + axis_options_t list -> axis_options_t list -> unit (** {4 Finishing up a plot page} *) @@ -384,7 +384,8 @@ ?f:(unit -> unit) -> ?post:(unit -> unit) -> ?axis:axis_options_t list * axis_options_t list -> - float -> float -> unit + ?xtick:float -> ?ytick:float -> + unit -> unit (** Finish the current page, start a new one. *) val next_page : @@ -392,8 +393,8 @@ ?f:(unit -> unit) -> ?post:(unit -> unit) -> ?axis:axis_options_t list * axis_options_t list -> - ?xstep:float -> - ?ystep:float -> + ?xtick:float -> + ?ytick:float -> float * float -> float * float -> plot_scaling_t -> unit (** [finish ?stream xstep ystep] finishes up the plot [stream], using @@ -403,7 +404,8 @@ ?f:(unit -> unit) -> ?post:(unit -> unit) -> ?axis:axis_options_t list * axis_options_t list -> - float -> float -> unit + ?xtick:float -> ?ytick:float -> + unit -> unit end (** {3 A module for quick, "throw-away" plots} *) Modified: trunk/examples/ocaml/xplot01.ml =================================================================== --- trunk/examples/ocaml/xplot01.ml 2009-10-05 21:06:17 UTC (rev 10513) +++ trunk/examples/ocaml/xplot01.ml 2009-10-05 21:08:49 UTC (rev 10514) @@ -101,7 +101,7 @@ ]; (* Show the axes *) - P.finish_page ~stream 0.0 0.0; + P.finish_page ~stream (); (* All done. *) stream @@ -136,7 +136,7 @@ P.Axis :: P.default_axis_options, P.Axis :: P.default_axis_options in - P.finish_page ~stream ~axis 0.0 0.0; + P.finish_page ~stream ~axis (); (* All done. *) () @@ -154,7 +154,7 @@ fun () -> plstyl [|mark1|] [|space1|]; P.set_color P.Yellow; - P.plot_axes 30.0 0 0.2 0 [P.Major_grid] [P.Major_grid]; + P.plot_axes ~xtick:30.0 ~ytick:0.2 [P.Major_grid] [P.Major_grid]; plstyl [||] [||]; ); @@ -180,7 +180,7 @@ ] in - P.finish_page ~stream ~axis 60.0 0.2; + P.finish_page ~stream ~axis ~xtick:60.0 ~ytick:0.2 (); (* All done. *) () @@ -234,7 +234,7 @@ (* Don't forget to finish off! Each function does the needed end-of-page steps, so all we need to do here is wrap up the plotting session. *) - P.finish ~stream ~f:(fun () -> ()) 0.0 0.0; + P.finish ~stream ~f:(fun () -> ()) (); () let () = main true This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hez...@us...> - 2009-10-06 18:45:52
|
Revision: 10517 http://plplot.svn.sourceforge.net/plplot/?rev=10517&view=rev Author: hezekiahcarty Date: 2009-10-06 18:45:37 +0000 (Tue, 06 Oct 2009) Log Message: ----------- OCaml's plshade, plshades and plpoly3 all take bool values when appropriate This is an API change for these three functions! The rest of the OCaml PLplot API uses OCaml's bool for function parameters which are PLBOOL in the C API. A small error in bindings/ocaml/plplot_core.idl had them mapped to int rather than bool for a few functions. Modified Paths: -------------- trunk/bindings/ocaml/plplot.mli trunk/bindings/ocaml/plplot_core.idl trunk/examples/ocaml/x15.ml trunk/examples/ocaml/x16.ml trunk/examples/ocaml/x18.ml trunk/examples/ocaml/x21.ml trunk/examples/ocaml/x30.ml Modified: trunk/bindings/ocaml/plplot.mli =================================================================== --- trunk/bindings/ocaml/plplot.mli 2009-10-05 21:39:29 UTC (rev 10516) +++ trunk/bindings/ocaml/plplot.mli 2009-10-06 18:45:37 UTC (rev 10517) @@ -768,13 +768,13 @@ float -> float -> float -> - float -> int -> float -> int -> int -> int -> int -> int -> int -> unit + float -> int -> float -> int -> int -> int -> int -> int -> bool -> unit = "camlidl_plplot_core_ml_plshade_bytecode" "camlidl_plplot_core_ml_plshade" external plshades : float array array -> float -> - float -> float -> float -> float array -> int -> int -> int -> int -> unit + float -> float -> float -> float array -> int -> int -> int -> bool -> unit = "camlidl_plplot_core_ml_plshades_bytecode" "camlidl_plplot_core_ml_plshades" external plimagefr : @@ -792,7 +792,7 @@ = "camlidl_plplot_core_ml_plmeridians_bytecode" "camlidl_plplot_core_ml_plmeridians" external plpoly3 : - float array -> float array -> float array -> int array -> int -> unit + float array -> float array -> float array -> bool array -> bool -> unit = "camlidl_plplot_core_ml_plpoly3" external pltr0 : float -> float -> float * float = "camlidl_plplot_core_ml_pltr0" Modified: trunk/bindings/ocaml/plplot_core.idl =================================================================== --- trunk/bindings/ocaml/plplot_core.idl 2009-10-05 21:39:29 UTC (rev 10516) +++ trunk/bindings/ocaml/plplot_core.idl 2009-10-06 18:45:37 UTC (rev 10517) @@ -72,7 +72,7 @@ // properly #define PLINT int #define PLFLT double -#define PLBOOL int +#define PLBOOL boolean [mlname(plcont)] void ml_plcont( [size_is(nx,ny)] PLFLT **f, PLINT nx, PLINT ny, Modified: trunk/examples/ocaml/x15.ml =================================================================== --- trunk/examples/ocaml/x15.ml 2009-10-05 21:39:29 UTC (rev 10516) +++ trunk/examples/ocaml/x15.ml 2009-10-06 18:45:37 UTC (rev 10517) @@ -68,7 +68,7 @@ z (-1.0) 1.0 (-1.0) 1.0 shade_min shade_max sh_cmap sh_color sh_width - min_color min_width max_color max_width 1; + min_color min_width max_color max_width true; plcol0 1; plbox "bcnst" 0.0 0 "bcnstv" 0.0 0; @@ -122,7 +122,7 @@ z (-1.0) 1.0 (-1.0) 1.0 shade_min shade_max sh_cmap sh_color sh_width - min_color min_width max_color max_width 1; + min_color min_width max_color max_width true; done; plcol0 1; Modified: trunk/examples/ocaml/x16.ml =================================================================== --- trunk/examples/ocaml/x16.ml 2009-10-05 21:39:29 UTC (rev 10516) +++ trunk/examples/ocaml/x16.ml 2009-10-06 18:45:37 UTC (rev 10517) @@ -131,7 +131,7 @@ plpsty 0; - plshades z (-1.0) 1.0 (-1.0) 1.0 shedge fill_width cont_color cont_width 1; + plshades z (-1.0) 1.0 (-1.0) 1.0 shedge fill_width cont_color cont_width true; plcol0 1; plbox "bcnst" 0.0 0 "bcnstv" 0.0 0; @@ -151,7 +151,7 @@ plpsty 0; plset_pltr (fun x y -> pltr1 x y xg1 yg1); - plshades z (-1.0) 1.0 (-1.0) 1.0 shedge fill_width cont_color cont_width 1; + plshades z (-1.0) 1.0 (-1.0) 1.0 shedge fill_width cont_color cont_width true; plcol0 1; plbox "bcnst" 0.0 0 "bcnstv" 0.0 0; @@ -171,7 +171,8 @@ plpsty 0; plset_pltr (fun x y -> pltr2 x y xg2 yg2); - plshades z (-1.0) 1.0 (-1.0) 1.0 shedge fill_width cont_color cont_width 0; + plshades + z (-1.0) 1.0 (-1.0) 1.0 shedge fill_width cont_color cont_width false; plcol0 1; plbox "bcnst" 0.0 0 "bcnstv" 0.0 0; @@ -192,7 +193,7 @@ plpsty 0; - plshades z (-1.0) 1.0 (-1.) 1.0 shedge fill_width 2 3 0; + plshades z (-1.0) 1.0 (-1.) 1.0 shedge fill_width 2 3 false; plcol0 1; plbox "bcnst" 0.0 0 "bcnstv" 0.0 0; @@ -211,7 +212,8 @@ plpsty 0; plset_defined zdefined; - plshades z (-1.0) 1.0 (-1.0) 1.0 shedge fill_width cont_color cont_width 0; + plshades + z (-1.0) 1.0 (-1.0) 1.0 shedge fill_width cont_color cont_width false; plunset_defined (); plcol0 1; @@ -252,7 +254,8 @@ in (* Now we can shade the interior region. *) - plshades z (-1.0) 1.0 (-1.0) 1.0 shedge fill_width cont_color cont_width 0; + plshades + z (-1.0) 1.0 (-1.0) 1.0 shedge fill_width cont_color cont_width false; (* Now we can draw the perimeter. (If do before, shade stuff may overlap.) *) let px = Array.make perimeterpts 0.0 in Modified: trunk/examples/ocaml/x18.ml =================================================================== --- trunk/examples/ocaml/x18.ml 2009-10-05 21:39:29 UTC (rev 10516) +++ trunk/examples/ocaml/x18.ml 2009-10-06 18:45:37 UTC (rev 10517) @@ -15,10 +15,10 @@ let pi = atan 1.0 *. 4.0 let test_poly k = - let draw = [| [|1; 1; 1; 1|]; - [|1; 0; 1; 0|]; - [|0; 1; 0; 1|]; - [|1; 1; 0; 0|] |] in + let draw = [| [| true; true; true; true|]; + [| true; false; true; false|]; + [|false; true; false; true|]; + [| true; true; false; false|] |] in let two_pi = 2.0 *. pi in @@ -62,7 +62,7 @@ y.(4) <- sin (phi j) *. sin (theta i); z.(4) <- cos (phi j); - plpoly3 x y z draw.(k) 1; + plpoly3 x y z draw.(k) true; done done; Modified: trunk/examples/ocaml/x21.ml =================================================================== --- trunk/examples/ocaml/x21.ml 2009-10-05 21:39:29 UTC (rev 10516) +++ trunk/examples/ocaml/x21.ml 2009-10-06 18:45:37 UTC (rev 10517) @@ -208,7 +208,7 @@ plenv0 xm xM ym yM 2 0; plcol0 15; pllab "X" "Y" title.(alg - 1); - plshades zg xm xM ym yM clev 1 0 1 1; + plshades zg xm xM ym yM clev 1 0 1 true; plcol0 2; ) else ( Modified: trunk/examples/ocaml/x30.ml =================================================================== --- trunk/examples/ocaml/x30.ml 2009-10-05 21:39:29 UTC (rev 10516) +++ trunk/examples/ocaml/x30.ml 2009-10-06 18:45:37 UTC (rev 10517) @@ -135,9 +135,9 @@ (* Set the color levels array. These levels are also between 0.0 and 1.0 *) let clevel = Array.init 101 (fun i -> 0.01 *. float_of_int i) in - (* Draw the shade plot with zmin = 0.0, zmax = 1.0 and x and y coordinate ranges - such that it fills the entire plotting area. *) - plshades z 0.0 1.0 0.0 1.0 clevel 0 (-1) 2 1; + (* Draw the shade plot with zmin = 0.0, zmax = 1.0 and x and y coordinate + ranges such that it fills the entire plotting area. *) + plshades z 0.0 1.0 0.0 1.0 clevel 0 (-1) 2 true; plend (); () This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hba...@us...> - 2009-10-09 00:02:00
|
Revision: 10518 http://plplot.svn.sourceforge.net/plplot/?rev=10518&view=rev Author: hbabcock Date: 2009-10-09 00:01:52 +0000 (Fri, 09 Oct 2009) Log Message: ----------- Initial commit of plget & plset functions for generalized getting and setting of the current stream variables. Modified Paths: -------------- trunk/include/plplot.h trunk/src/CMakeLists.txt Added Paths: ----------- trunk/src/plgset.c Modified: trunk/include/plplot.h =================================================================== --- trunk/include/plplot.h 2009-10-06 18:45:37 UTC (rev 10517) +++ trunk/include/plplot.h 2009-10-09 00:01:52 UTC (rev 10518) @@ -462,6 +462,36 @@ PLFLT exp_label_just; } PLLabelDefaults; +/* + * Structures and Enumerations used by plget and plset. + */ + +enum PLAttributeName { // alphabetical? + PL_CURCOLOR, + PL_ICOL0, + PL_ICOL1, + PL_NCOL0, + PL_NCOL1, + PL_PENWIDTH +}; + +enum PLAttributeType { + PL_COLOR, + PL_FLT, + PL_FLTPTR, + PL_INT, + PL_INTPTR +}; + +typedef struct { + PLINT attributeType; + PLINT intValue; + PLINT *intValues; + PLFLT floatValue; + PLFLT *floatValues; + PLColor colorValue; +} PLAttribute; + /*--------------------------------------------------------------------------*\ * BRAINDEAD-ness * @@ -564,6 +594,7 @@ #define plgfci c_plgfci #define plgfnam c_plgfnam #define plgfont c_plgfont +#define plget c_plget #define plglevel c_plglevel #define plgpage c_plgpage #define plgra c_plgra @@ -635,6 +666,7 @@ #define plsdiplz c_plsdiplz #define plseed c_plseed #define plsesc c_plsesc +#define plset c_plset #define plsetopt c_plsetopt #define plsfam c_plsfam #define plsfci c_plsfci @@ -1670,6 +1702,15 @@ PLDLLIMPEXP void c_plxormod(PLBOOL mode, PLBOOL *status); +/* Get the value of a variable from the current stream. */ +PLDLLIMPEXP void +c_plget(enum PLAttributeName attrName, PLAttribute *attr); + +/* Set the value of a variable in the current stream. */ +PLDLLIMPEXP void +c_plset(enum PLAttributeName attrName, PLAttribute attr); + + /*--------------------------------------------------------------------------*\ * Functions for use from C or C++ only \*--------------------------------------------------------------------------*/ Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2009-10-06 18:45:37 UTC (rev 10517) +++ trunk/src/CMakeLists.txt 2009-10-09 00:01:52 UTC (rev 10518) @@ -32,6 +32,7 @@ pldtik.c plfill.c plfreetype.c + plgset.c plhist.c plimage.c plline.c Added: trunk/src/plgset.c =================================================================== --- trunk/src/plgset.c (rev 0) +++ trunk/src/plgset.c 2009-10-09 00:01:52 UTC (rev 10518) @@ -0,0 +1,95 @@ +/* plget/plset() + * + * Copyright (C) 2009 Hazen Babcock + * + * This file is part of PLplot. + * + * PLplot is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Library Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PLplot is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with PLplot; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "plplotP.h" +#include "plstrm.h" + +/*------------------------------------------------------------------------- + * plget : Get the value of the specified variable in the current plot stream + *-------------------------------------------------------------------------*/ +void +c_plget(enum PLAttributeName attrName, PLAttribute *attrValue) +{ + attrValue->attributeType = -1; + switch(attrName){ + case PL_CURCOLOR: + attrValue->attributeType = PL_COLOR; + attrValue->colorValue.r = plsc->curcolor.r; + attrValue->colorValue.g = plsc->curcolor.g; + attrValue->colorValue.b = plsc->curcolor.b; + attrValue->colorValue.a = plsc->curcolor.a; + break; + case PL_ICOL0: + attrValue->attributeType = PL_INT; + attrValue->intValue = plsc->icol0; + break; + case PL_ICOL1: + attrValue->attributeType = PL_INT; + attrValue->intValue = plsc->icol1; + break; + case PL_NCOL0: + attrValue->attributeType = PL_INT; + attrValue->intValue = plsc->ncol0; + break; + case PL_NCOL1: + attrValue->attributeType = PL_INT; + attrValue->intValue = plsc->ncol1; + break; + case PL_PENWIDTH: + attrValue->attributeType = PL_INT; + attrValue->intValue = plsc->width; + break; + default: + break; + } +} + +/*------------------------------------------------------------------------- + * plset : Set the value of the specified variable in the current plot stream + * + * Note: This is a little tricker since we can't just set the value & expect + * the driver to respond, instead we have to call the appropriate function + * in PLplot core. + * + *-------------------------------------------------------------------------*/ +void +c_plset(enum PLAttributeName attrName, PLAttribute attrValue) +{ + switch(attrName){ + case PL_CURCOLOR: + if (attrValue.attributeType == PL_COLOR){ + plscol0(plsc->icol0, + attrValue.colorValue.r, + attrValue.colorValue.g, + attrValue.colorValue.b); + plcol0(plsc->icol0); + } + break; + case PL_PENWIDTH: + if (attrValue.attributeType == PL_INT){ + plwid(attrValue.intValue); + } + break; + default: + break; + } +} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |