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. |