diff options
author | Pierre Weis <Pierre.Weis@inria.fr> | 2006-04-05 15:39:10 +0000 |
---|---|---|
committer | Pierre Weis <Pierre.Weis@inria.fr> | 2006-04-05 15:39:10 +0000 |
commit | cd49f2b78101a9dcbe81044d778b72d44895b8a2 (patch) | |
tree | 5fafd5da4b7a5728f86a82d845ba54d8ff26bc16 | |
parent | 176b3c0da8acab2483256770b1a1e212b672885f (diff) |
Dead code removed + typos.
cvs: ----------------------------------------------------------------------
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7375 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | stdlib/printf.ml | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/stdlib/printf.ml b/stdlib/printf.ml index 1acb41b6e..69c2ecf63 100644 --- a/stdlib/printf.ml +++ b/stdlib/printf.ml @@ -33,10 +33,6 @@ module Sformat = struct = "%string_safe_get" external unsafe_get : ('a, 'b, 'c, 'd) format4 -> int -> char = "%string_unsafe_get" -(* external set : ('a, 'b, 'c, 'd) format4 -> int -> char -> unit - = "%string_safe_set" - external unsafe_set : ('a, 'b, 'c, 'd) format4 -> int -> char -> unit - = "%string_unsafe_set" *) let sub fmt idx len = String.sub (unsafe_to_string fmt) idx len let to_string fmt = sub fmt 0 (length fmt) end;; @@ -457,11 +453,10 @@ let scan_format fmt args n pos cont_s cont_a cont_t cont_f cont_m = scan_positional n [] (succ pos);; -let mkprintf str get_out outc outs flush k fmt = +let mkprintf to_s get_out outc outs flush k fmt = -(* let fmt = Sformat.length fmt in*) (* out is global to this invocation of pr, and must be shared by all its - recursive calls (fif) any. *) + recursive calls (if any). *) let out = get_out fmt in let rec pr k n fmt v = @@ -476,13 +471,13 @@ let mkprintf str get_out outc outs flush k fmt = and cont_s n s i = outs out s; doprn n i and cont_a n printer arg i = - if str then + if to_s then outs out ((Obj.magic printer : unit -> _ -> string) () arg) else printer out arg; doprn n i and cont_t n printer i = - if str then + if to_s then outs out ((Obj.magic printer : unit -> string) ()) else printer out; |