diff options
author | Pierre Weis <Pierre.Weis@inria.fr> | 2000-03-21 15:16:28 +0000 |
---|---|---|
committer | Pierre Weis <Pierre.Weis@inria.fr> | 2000-03-21 15:16:28 +0000 |
commit | 6f4799b3e2054a6f205b2884585bbcd251c4f976 (patch) | |
tree | e3f04fbf4d9757db5f86955e9c9425c7de4d0427 | |
parent | 7dfe9784b74fd0e7d84b223703ebbfa867e2347c (diff) |
Utilisation de format.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2979 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | debugger/main.ml | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/debugger/main.ml b/debugger/main.ml index 3bb4fe4c4..59c36a684 100644 --- a/debugger/main.ml +++ b/debugger/main.ml @@ -24,6 +24,7 @@ open Parameters open Program_management open Frames open Show_information +open Format let line_buffer = Lexing.from_function read_user_input @@ -41,19 +42,18 @@ let rec protect ppf cont = forget_process !current_checkpoint.c_fd !current_checkpoint.c_pid; - flush stdout; + pp_print_flush ppf (); stop_user_input (); loop ppf) | Toplevel -> protect ppf (function ppf -> - flush stdout; + pp_print_flush ppf (); stop_user_input (); loop ppf) | Sys.Break -> protect ppf (function ppf -> - print_endline "Interrupted."; + fprintf ppf "Interrupted.@."; Exec.protect (function () -> - flush stdout; stop_user_input (); if !loaded then begin try_select_frame 0; @@ -62,8 +62,7 @@ let rec protect ppf cont = loop ppf) | Current_checkpoint_lost -> protect ppf (function ppf -> - print_endline "Trying to recover..."; - flush stdout; + fprintf ppf "Trying to recover...@."; stop_user_input (); recover (); try_select_frame 0; @@ -120,9 +119,7 @@ let main () = done end; current_prompt := debugger_prompt; - print_string "\tObjective Caml Debugger version "; - print_string Config.version; - print_newline(); print_newline(); + printf "\tObjective Caml Debugger version %s@.@." Config.version; Config.load_path := !default_load_path; toplevel_loop (); (* Toplevel. *) kill_program (); |