From 9bc5cb17bfeffa1f7741645e2cc9091d9008c34e Mon Sep 17 00:00:00 2001 From: Pierre Weis Date: Mon, 6 Nov 2006 10:22:02 +0000 Subject: [PATCH] New type ac (argument counting for format strings). Private export of new function ac_of_format for Scanf (and the typechecker). git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7721 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- stdlib/printf.mli | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/stdlib/printf.mli b/stdlib/printf.mli index b28a8f6df..e197a4821 100644 --- a/stdlib/printf.mli +++ b/stdlib/printf.mli @@ -151,6 +151,14 @@ type index;; external index_of_int : int -> index = "%identity";; +type ac = { + mutable ac_rglr : int; + mutable ac_skip : int; + mutable ac_rdrs : int; +};; + +val ac_of_format : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ac;; + module Sformat : sig external unsafe_to_string : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> string = "%identity" @@ -165,20 +173,22 @@ module Sformat : sig end val scan_format : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> - 'ee array -> + 'g array -> index -> int -> - (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 + (index -> string -> int -> 'h) -> + (index -> 'i -> 'j -> int -> 'h) -> + (index -> 'k -> int -> 'h) -> + (index -> int -> 'h) -> + (index -> ('l, 'm, 'n, 'o, 'p, 'q) format6 -> int -> 'h) -> 'h val sub_format : (('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, 'e, 'f) format6 -> Obj.t array -> 'g) -> ('a, 'b, 'c, 'd, 'e, 'f) format6 -> 'g