diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2004-11-02 10:42:58 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2004-11-02 10:42:58 +0000 |
commit | 85cb1262d68f1196542effa9eede2eb1cd1a9312 (patch) | |
tree | 8b2f830340b42307bb7bc40d7792d1cb0a215d47 | |
parent | 06703fdc45f7142cc32a269869f9ce5e4309be10 (diff) |
ajout option -noprompt (toplevel)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6653 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | toplevel/toploop.ml | 3 | ||||
-rw-r--r-- | toplevel/topmain.ml | 1 | ||||
-rw-r--r-- | utils/clflags.ml | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/toplevel/toploop.ml b/toplevel/toploop.ml index 1e2037d5d..6757abf34 100644 --- a/toplevel/toploop.ml +++ b/toplevel/toploop.ml @@ -339,7 +339,8 @@ let read_interactive_input = ref read_input_default let refill_lexbuf buffer len = if !got_eof then (got_eof := false; 0) else begin let prompt = - if !first_line then "# " + if !Clflags.noprompt then "" + else if !first_line then "# " else if Lexer.in_comment () then "* " else " " in diff --git a/toplevel/topmain.ml b/toplevel/topmain.ml index cca331e8a..981b5cb83 100644 --- a/toplevel/topmain.ml +++ b/toplevel/topmain.ml @@ -54,6 +54,7 @@ let main () = "-labels", Arg.Clear classic, " Labels commute (default)"; "-noassert", Arg.Set noassert, " Do not compile assertion checks"; "-nolabels", Arg.Set classic, " Ignore labels and do not commute"; + "-noprompt", Arg.Set noprompt, " Suppress all prompts"; "-nostdlib", Arg.Set no_std_include, " do not add default directory to the list of include directories"; "-principal", Arg.Set principal, " Check principality of type inference"; diff --git a/utils/clflags.ml b/utils/clflags.ml index a58d8954b..4d7987565 100644 --- a/utils/clflags.ml +++ b/utils/clflags.ml @@ -38,6 +38,7 @@ and use_threads = ref false (* -thread *) and use_vmthreads = ref false (* -vmthread *) and noassert = ref false (* -noassert *) and verbose = ref false (* -verbose *) +and noprompt = ref false (* -noprompt *) and use_prims = ref "" (* -use-prims ... *) and use_runtime = ref "" (* -use-runtime ... *) and principal = ref false (* -principal *) |