From 0d87d99747d1ad6b8a69672b08a2bb5b2174adc6 Mon Sep 17 00:00:00 2001 From: glondu Date: Fri, 3 Dec 2010 19:06:20 +0000 Subject: Remove dead code git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13669 85f007b7-540e-0410-9357-904b9bb8a0f7 --- lib/pp_control.ml | 30 ++++-------------------------- lib/pp_control.mli | 9 --------- 2 files changed, 4 insertions(+), 35 deletions(-) (limited to 'lib') diff --git a/lib/pp_control.ml b/lib/pp_control.ml index 289a15926..cefd08c55 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 diff --git a/lib/pp_control.mli b/lib/pp_control.mli index d8970d8db..c66255f96 100644 --- a/lib/pp_control.mli +++ b/lib/pp_control.mli @@ -23,15 +23,6 @@ val get_gp : Format.formatter -> pp_global_params (** {6 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 } - -val std_fp : (int*string) pp_formatter_params -val err_fp : (int*string) pp_formatter_params - -val with_fp : 'a pp_formatter_params -> Format.formatter val with_output_to : out_channel -> Format.formatter val std_ft : Format.formatter ref -- cgit v1.2.3