summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2000-04-10 14:59:29 +0000
committerXavier Leroy <xavier.leroy@inria.fr>2000-04-10 14:59:29 +0000
commit1926b350c08b65449bc119efe54c5a33acd7082c (patch)
tree521fb2feb1ff27bebd9f8144ea55e2a492072bd0
parent10ceb26643238f44ad052e0afb36e8ef4c5b2012 (diff)
Envoyer les sorties du toplevel sur stdout, pas stderr
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3051 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--toplevel/topdirs.ml20
-rw-r--r--toplevel/topmain.ml2
2 files changed, 11 insertions, 11 deletions
diff --git a/toplevel/topdirs.ml b/toplevel/topdirs.ml
index 544c58616..f7ae7c00b 100644
--- a/toplevel/topdirs.ml
+++ b/toplevel/topdirs.ml
@@ -24,8 +24,8 @@ open Printval
open Trace
open Toploop
-(* The standard error formatter *)
-let std_err = err_formatter
+(* The standard output formatter *)
+let std_out = std_formatter
(* To quit *)
@@ -112,13 +112,13 @@ let dir_load ppf name =
close_in ic
with Not_found -> fprintf ppf "Cannot find file %s.@." name
-let _ = Hashtbl.add directive_table "load" (Directive_string (dir_load std_err))
+let _ = Hashtbl.add directive_table "load" (Directive_string (dir_load std_out))
(* Load commands from a file *)
let dir_use ppf name = ignore(Toploop.use_file ppf name)
-let _ = Hashtbl.add directive_table "use" (Directive_string (dir_use std_err))
+let _ = Hashtbl.add directive_table "use" (Directive_string (dir_use std_out))
(* Install, remove a printer *)
@@ -161,9 +161,9 @@ let dir_remove_printer ppf lid =
with Exit -> ()
let _ = Hashtbl.add directive_table "install_printer"
- (Directive_ident (dir_install_printer std_err))
+ (Directive_ident (dir_install_printer std_out))
let _ = Hashtbl.add directive_table "remove_printer"
- (Directive_ident (dir_remove_printer std_err))
+ (Directive_ident (dir_remove_printer std_out))
(* The trace *)
@@ -238,10 +238,10 @@ let parse_warnings ppf s =
with Arg.Bad err -> fprintf ppf "%s.@." err
let _ =
- Hashtbl.add directive_table "trace" (Directive_ident (dir_trace std_err));
- Hashtbl.add directive_table "untrace" (Directive_ident (dir_untrace std_err));
+ Hashtbl.add directive_table "trace" (Directive_ident (dir_trace std_out));
+ Hashtbl.add directive_table "untrace" (Directive_ident (dir_untrace std_out));
Hashtbl.add directive_table
- "untrace_all" (Directive_none (dir_untrace_all std_err));
+ "untrace_all" (Directive_none (dir_untrace_all std_out));
(* Control the printing of values *)
@@ -256,4 +256,4 @@ let _ =
(Directive_bool(fun b -> Clflags.classic := not b));
Hashtbl.add directive_table "warnings"
- (Directive_string (parse_warnings std_err))
+ (Directive_string (parse_warnings std_out))
diff --git a/toplevel/topmain.ml b/toplevel/topmain.ml
index 173c087f1..a34382995 100644
--- a/toplevel/topmain.ml
+++ b/toplevel/topmain.ml
@@ -46,6 +46,6 @@ let main () =
"-dlambda", Arg.Set dump_lambda, " (undocumented)";
"-dinstr", Arg.Set dump_instr, " (undocumented)"
] file_argument usage;
- Toploop.loop Format.err_formatter
+ Toploop.loop Format.std_formatter
let _ = Printexc.catch main ()