diff options
| author | glondu | 2010-12-03 19:06:20 +0000 |
|---|---|---|
| committer | glondu | 2010-12-03 19:06:20 +0000 |
| commit | 0d87d99747d1ad6b8a69672b08a2bb5b2174adc6 (patch) | |
| tree | 2bed98a433b30ea9e20b5b70fe571a654963a910 /lib/pp_control.ml | |
| parent | e895f9ca19247f4fe58833f91e948e200bc9a6e5 (diff) | |
Remove dead code
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13669 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib/pp_control.ml')
| -rw-r--r-- | lib/pp_control.ml | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/lib/pp_control.ml b/lib/pp_control.ml index 289a159267..cefd08c559 100644 --- a/lib/pp_control.ml +++ b/lib/pp_control.ml @@ -47,40 +47,18 @@ let get_gp ft = max_depth = Format.pp_get_max_boxes ft (); ellipsis = Format.pp_get_ellipsis_text ft () } - -(* Output functions of pretty-printing *) - -type 'a pp_formatter_params = { - fp_output : out_channel ; - fp_output_function : string -> int -> int -> unit ; - fp_flush_function : unit -> unit } - -(* Output functions for stdout and stderr *) - -let std_fp = { - fp_output = stdout ; - fp_output_function = output stdout; - fp_flush_function = (fun () -> flush stdout) } - -let err_fp = { - fp_output = stderr ; - fp_output_function = output stderr; - fp_flush_function = (fun () -> flush stderr) } - (* with_fp : 'a pp_formatter_params -> Format.formatter * returns of formatter for given formatter functions *) -let with_fp fp = - let ft = Format.make_formatter fp.fp_output_function fp.fp_flush_function in - Format.pp_set_formatter_out_channel ft fp.fp_output; +let with_fp chan out_function flush_function = + let ft = Format.make_formatter out_function flush_function in + Format.pp_set_formatter_out_channel ft chan; ft (* Output on a channel ch *) let with_output_to ch = - let ft = with_fp { fp_output = ch ; - fp_output_function = (output ch) ; - fp_flush_function = (fun () -> flush ch) } in + let ft = with_fp ch (output ch) (fun () -> flush ch) in set_gp ft deep_gp; ft |
