Commit 6fa99f95 authored by erwan's avatar erwan
Browse files

Change the behaviour of 'lutin -o somefile.rif'

It was avoiding to override the file somefile.rif by creating a
somefile-i.rif; but practice, it appears to be very cumbersome.
parent 3a7968f8
OASISFormat: 0.4 OASISFormat: 0.4
Name: Lutin Name: Lutin
Version: 2.23 Version: 2.24
Authors: Erwan Jahier Authors: Erwan Jahier
Maintainers: erwan.jahier@imag.fr Maintainers: erwan.jahier@imag.fr
License: PROP License: PROP
......
...@@ -84,5 +84,4 @@ returns(x, y: real) = ...@@ -84,5 +84,4 @@ returns(x, y: real) =
node idiot (t:bool) returns(x,y:real) = node idiot (t:bool) returns(x,y:real) =
assert x = 10. in
run x,y := ivrogne(20., 20., 20., 20., 0., 100., 0., 200.) run x,y := ivrogne(20., 20., 20., 20., 0., 100., 0., 200.)
\ No newline at end of file
...@@ -329,21 +329,21 @@ let (mkoptab : t -> unit) = ...@@ -329,21 +329,21 @@ let (mkoptab : t -> unit) =
["-o"] ["-o"]
~arg:" <string>" ~arg:" <string>"
(Arg.String(function s -> (Arg.String(function s ->
opt._outfile <- Some s; opt._outfile <- Some s;
let news = if not (Sys.file_exists s) (*let news = if not (Sys.file_exists s) *)
then s else (* then s else *)
let rec find_free_name b i = (* let rec find_free_name b i = *)
let f = Printf.sprintf "%s-%d.rif" b i in (* let f = Printf.sprintf "%s-%d.rif" b i in *)
if Sys.file_exists f then (* if Sys.file_exists f then *)
find_free_name b (i+1) (* find_free_name b (i+1) *)
else (* else *)
f (* f *)
in (* in *)
find_free_name (Filename.chop_extension s) 1 (* find_free_name (Filename.chop_extension s) 1 *)
in (* in *)
if (Filename.check_suffix s ".rif") then ( if (Filename.check_suffix s ".rif") then (
opt._riffile <- Some news; opt._riffile <- Some s;
Luc2c.option.Luc2c.rif <- Some news Luc2c.option.Luc2c.rif <- Some s
))) )))
["output file name"] ["output file name"]
; ;
......
let str="2.23" let str="2.24"
let sha="7fc81dd" let sha="3a7968f"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment