diff options
author | Alain Frisch <alain@frisch.fr> | 2012-04-18 07:17:58 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2012-04-18 07:17:58 +0000 |
commit | 061ed556888aed2c84267caca6a6ab832eb2da46 (patch) | |
tree | dd594255e06294b863e40a382af794adb60682aa /stdlib/printf.ml | |
parent | 215e508e8bd53f7299ffd7d828794e2f4d4ba6f4 (diff) | |
parent | 3930c2fd79e43bd02e3bc79d6b047f3aeab0effe (diff) | |
download | ocaml-more_unboxing.tar.gz |
Sync with trunk.more_unboxing
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/more_unboxing@12369 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/printf.ml')
-rw-r--r-- | stdlib/printf.ml | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/stdlib/printf.ml b/stdlib/printf.ml index c55c64d367..567949064a 100644 --- a/stdlib/printf.ml +++ b/stdlib/printf.ml @@ -638,12 +638,19 @@ let mkprintf to_s get_out outc outs flush k fmt = kapr kpr fmt ;; +(************************************************************** + + Defining [fprintf] and various flavors of [fprintf]. + + **************************************************************) + let kfprintf k oc = mkprintf false (fun _ -> oc) output_char output_string flush k ;; -let ifprintf _ = kapr (fun _ -> Obj.magic ignore);; +let ikfprintf k oc = kapr (fun _ _ -> Obj.magic (k oc));; let fprintf oc = kfprintf ignore oc;; +let ifprintf oc = ikfprintf ignore oc;; let printf fmt = fprintf stdout fmt;; let eprintf fmt = fprintf stderr fmt;; @@ -671,7 +678,12 @@ let ksprintf k = let sprintf fmt = ksprintf (fun s -> s) fmt;; -(* Obsolete and deprecated. *) +(************************************************************** + + Deprecated stuff. + + **************************************************************) + let kprintf = ksprintf;; (* For OCaml system internal use only: needed to implement modules [Format] |