Sub module Sformat now deals with format6.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7703 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Pierre Weis 2006-10-24 21:11:48 +00:00
parent 7e2072cfb7
commit fa5b7ef147
3 changed files with 25 additions and 25 deletions

View File

@ -25,13 +25,13 @@ external format_int64: string -> int64 -> string
= "caml_int64_format"
module Sformat = struct
external unsafe_to_string : ('a, 'b, 'c, 'd) format4 -> string
external unsafe_to_string : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> string
= "%identity"
external length : ('a, 'b, 'c, 'd) format4 -> int
external length : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> int
= "%string_length"
external get : ('a, 'b, 'c, 'd) format4 -> int -> char
external get : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> int -> char
= "%string_safe_get"
external unsafe_get : ('a, 'b, 'c, 'd) format4 -> int -> char
external unsafe_get : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> int -> char
= "%string_unsafe_get"
let sub fmt idx len = String.sub (unsafe_to_string fmt) idx len
let to_string fmt = sub fmt 0 (length fmt)
@ -443,7 +443,7 @@ let scan_format fmt args n pos cont_s cont_a cont_t cont_f cont_m =
end
| '!' -> cont_f n (succ i)
| '{' | '(' as conv (* ')' '}' *) ->
let (xf : ('a, 'b, 'c, 'd) format4) = get_arg spec n in
let (xf : ('a, 'b, 'c, 'd, 'e, 'f) format6) = get_arg spec n in
let i = succ i in
let j = sub_format_for_printf conv fmt i in
if conv = '{' (* '}' *) then

View File

@ -149,33 +149,33 @@ type index;;
external index_of_int : int -> index = "%identity";;
module Sformat : sig
external unsafe_to_string : ('a, 'b, 'c, 'd) format4 -> string
external unsafe_to_string : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> string
= "%identity"
external length : ('a, 'b, 'c, 'd) format4 -> int
external length : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> int
= "%string_length"
external get : ('a, 'b, 'c, 'd) format4 -> int -> char
external get : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> int -> char
= "%string_safe_get"
external unsafe_get : ('a, 'b, 'c, 'd) format4 -> int -> char
external unsafe_get : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> int -> char
= "%string_unsafe_get"
val sub : ('a, 'b, 'c, 'd) format4 -> int -> int -> string
val to_string : ('a, 'b, 'c, 'd) format4 -> string
val sub : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> int -> int -> string
val to_string : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> string
end
val scan_format : ('a, 'b, 'c, 'd) format4 ->
'e array ->
val scan_format : ('a, 'b, 'c, 'd, 'e, 'f) format6 ->
'ee array ->
index ->
int ->
(index -> string -> int -> 'f) ->
(index -> 'g -> 'h -> int -> 'f) ->
(index -> 'i -> int -> 'f) ->
(index -> int -> 'f) ->
(index -> ('j, 'k, 'l, 'm) format4 -> int -> 'f) -> 'f
(index -> string -> int -> 'ff) ->
(index -> 'g -> 'h -> int -> 'ff) ->
(index -> 'i -> int -> 'ff) ->
(index -> int -> 'ff) ->
(index -> ('j, 'k, 'l, 'm, 'n, 'o) format6 -> int -> 'ff) -> 'ff
val sub_format :
(('a, 'b, 'c, 'd) format4 -> int) ->
(('a, 'b, 'c, 'd) format4 -> int -> char -> int) ->
char -> ('a, 'b, 'c, 'd) format4 -> int -> int
val summarize_format_type : ('a, 'b, 'c, 'd) format4 -> string
(('a, 'b, 'c, 'd, 'e, 'f) format6 -> int) ->
(('a, 'b, 'c, 'd, 'e, 'f) format6 -> int -> char -> int) ->
char -> ('a, 'b, 'c, 'd, 'e, 'f) format6 -> int -> int
val summarize_format_type : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> string
val kapr :
(('a, 'b, 'c, 'd) format4 -> Obj.t array -> 'e) ->
('a, 'b, 'c, 'd) format4 -> 'e
(('a, 'b, 'c, 'd, 'e, 'f) format6 -> Obj.t array -> 'g) ->
('a, 'b, 'c, 'd, 'e, 'f) format6 -> 'g

View File

@ -78,4 +78,4 @@ let catch_break on =
(* OCaml version string, must be in the format described in sys.mli. *)
let ocaml_version = "3.10+dev11 (2006-10-24)";;
let ocaml_version = "3.10+dev12 (2006-10-24)";;