~ubuntu-branches/debian/sid/ocaml/sid

« back to all changes in this revision

Viewing changes to stdlib/format.ml

  • Committer: Bazaar Package Importer
  • Author(s): Stephane Glondu
  • Date: 2009-06-24 12:47:31 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090624124731-7wao0d0mnk4d71ee
Remove build-dependency to docbook-* (not needed anymore, since
policy has been moved to dh-ocaml)

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
(*                                                                     *)
12
12
(***********************************************************************)
13
13
 
14
 
(* $Id: format.ml,v 1.74 2008/09/08 12:30:19 weis Exp $ *)
 
14
(* $Id: format.ml,v 1.74.2.1 2009/04/29 18:33:31 weis Exp $ *)
15
15
 
16
16
(* A pretty-printing facility and definition of formatters for ``parallel''
17
17
   (i.e. unrelated or independent) pretty-printing on multiple out channels. *)
1040
1040
  s
1041
1041
;;
1042
1042
 
1043
 
(* [ppf] is supposed to be a pretty-printer that outputs in buffer [b]:
1044
 
   to extract contents of [ppf] as a string we flush [ppf] and get the string
1045
 
   out of [b]. *)
 
1043
(* [ppf] is supposed to be a pretty-printer that outputs to buffer [b]:
 
1044
   to extract the contents of [ppf] as a string we flush [ppf] and get the
 
1045
   string out of [b]. *)
1046
1046
let string_out b ppf =
1047
1047
  pp_flush_queue ppf false;
1048
1048
  get_buffer_out b
1311
1311
  mkprintf false (fun _ -> formatter_of_buffer b) k
1312
1312
;;
1313
1313
 
1314
 
let bprintf b = kbprintf ignore b;;
 
1314
let bprintf b =
 
1315
  let k ppf = pp_flush_queue ppf false in
 
1316
  kbprintf k b
 
1317
;;
1315
1318
 
1316
1319
let ksprintf k =
1317
1320
  let b = Buffer.create 512 in