diff options
| author | monate | 2003-03-06 19:16:31 +0000 |
|---|---|---|
| committer | monate | 2003-03-06 19:16:31 +0000 |
| commit | ff05f4ed59b3b77e6d77ae9b0cd0785f46c971a6 (patch) | |
| tree | 31a3aba7e99273beb11aa940171916be49ff1621 /ide/ideutils.ml | |
| parent | 59cfe64fc355ac910d3c795cec08ecc97c77589d (diff) | |
coqide: fenetre de cmmandes . undo correct
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3747 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'ide/ideutils.ml')
| -rw-r--r-- | ide/ideutils.ml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ide/ideutils.ml b/ide/ideutils.ml index 784c4a4d4b..20a06ae12e 100644 --- a/ide/ideutils.ml +++ b/ide/ideutils.ml @@ -106,3 +106,14 @@ let set_highlight_timer f = revert_timer := Some (GMain.Timeout.add ~ms:2000 ~callback:(fun () -> f (); highlight_timer := None; true)) + + +(* Get back the standard coq out channels *) +let read_stdout,clear_stdout = + let out_buff = Buffer.create 100 in + Pp_control.std_ft := Format.formatter_of_buffer out_buff; + (fun () -> Format.pp_print_flush !Pp_control.std_ft (); + let r = Buffer.contents out_buff in + Buffer.clear out_buff; r), + (fun () -> + Format.pp_print_flush !Pp_control.std_ft (); Buffer.clear out_buff) |
