Skip to content
Snippets Groups Projects
Commit 66a23e9e authored by erwan's avatar erwan
Browse files

Update: refactor -h outputs

parent 3209cf68
No related branches found
No related tags found
No related merge requests found
(* Time-stamp: <modified the 14/03/2019 (at 13:36) by Erwan Jahier> *) (* Time-stamp: <modified the 14/03/2019 (at 16:15) by Erwan Jahier> *)
type t = { type t = {
...@@ -18,8 +18,8 @@ type t = { ...@@ -18,8 +18,8 @@ type t = {
mutable _margin : int; mutable _margin : int;
} }
let usage_msg = ("usage: " ^Sys.argv.(0) ^ " [<option>] [<topology>.dot file] let usage_msg = ("usage: " ^Sys.argv.(0) ^ " [<option>]* <topology>.dot
use --help to see the available options. use -h to see the available options.
" ) " )
let print_usage () = Printf.printf "%s\n" usage_msg; flush stdout let print_usage () = Printf.printf "%s\n" usage_msg; flush stdout
...@@ -91,29 +91,29 @@ let (mkoptab : t -> unit) = ...@@ -91,29 +91,29 @@ let (mkoptab : t -> unit) =
mkopt opt ["--central-demon";"-cd"] mkopt opt ["--central-demon";"-cd"]
(Arg.Unit(fun () -> args.demon <- Demon.Central)) (Arg.Unit(fun () -> args.demon <- Demon.Central))
["Use a Central deamon (selects exactly one action)"]; ["Use a Central deamon (which selects exactly one action)"];
mkopt opt ["--locally-central-demon";"-lcd"] mkopt opt ["--locally-central-demon";"-lcd"]
(Arg.Unit(fun () -> args.demon <- Demon.LocallyCentral)) (Arg.Unit(fun () -> args.demon <- Demon.LocallyCentral))
["Use a Locally Central deamon (never activates two neighbor"; ["Use a Locally Central deamon (which never activates two neighbors";
"actions in the same step)"]; "actions in the same step)"];
mkopt opt ["--distributed-demon";"-dd"] mkopt opt ["--distributed-demon";"-dd"]
(Arg.Unit(fun () -> args.demon <- Demon.Distributed)) (Arg.Unit(fun () -> args.demon <- Demon.Distributed))
["Use a Distributed deamon (select at least one action)"]; ["Use a Distributed deamon (which select at least one action)"];
mkopt opt ["--custom-demon";"-custd"] mkopt opt ["--custom-demon";"-custd"]
(Arg.Unit(fun () -> args.demon <- Demon.Custom)) (Arg.Unit(fun () -> args.demon <- Demon.Custom;args.rif <- true))
["Use a Custom deamon"]; ["Use a Custom deamon (forces --rif)"];
mkopt opt ["--rif";"-rif"] mkopt opt ["--rif";"-rif"]
(Arg.Unit(fun () -> args.rif <- true)) (Arg.Unit(fun () -> args.rif <- true))
["Follows RIF conventions"]; ["Follows RIF conventions"];
mkopt opt ["--gen-lutin-demon";"-gld"] mkopt opt ~hide:true ["--gen-lutin-demon";"-gld"]
(Arg.Unit(fun () -> args.gen_lutin <- true)) (Arg.Unit(fun () -> args.gen_lutin <- true))
["Generate Lutin demons and exit"]; ["Generate Lutin demons and exit"];
mkopt opt ["--ignore-first-inputs"; "-ifi"] mkopt opt ~hide:true ["--ignore-first-inputs"; "-ifi"]
(Arg.Unit(fun () -> args.ifi <- true)) (Arg.Unit(fun () -> args.ifi <- true))
["Ignore first inputs (necessary to use luciole via lurette/rdbg/luciole-rif)"]; ["Ignore first inputs (necessary to use luciole via lurette/rdbg/luciole-rif)"];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment