summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Weis <Pierre.Weis@inria.fr>2010-05-05 12:58:01 +0000
committerPierre Weis <Pierre.Weis@inria.fr>2010-05-05 12:58:01 +0000
commit1b5c521bb7952fdfc6aafe57d264602fa3f2eff1 (patch)
tree05cd12c74ad94b3196c6364096519f6fe86678f8
parent55e57e57d196ef0f15ba1cfcfa5dc47d83330c1d (diff)
downloadocaml-1b5c521bb7952fdfc6aafe57d264602fa3f2eff1.tar.gz
Forgotten export added. Remove spurious warninggs from Oug[1].
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10374 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--stdlib/scanf.ml9
-rw-r--r--stdlib/scanf.mli4
2 files changed, 7 insertions, 6 deletions
diff --git a/stdlib/scanf.ml b/stdlib/scanf.ml
index ac87aad640..fe22ec3254 100644
--- a/stdlib/scanf.ml
+++ b/stdlib/scanf.ml
@@ -414,10 +414,6 @@ let bad_input_escape c =
bad_input (Printf.sprintf "illegal escape character %C" c)
;;
-let bad_input_char message c =
- bad_input (Printf.sprintf "found character %C which is not %s" c message)
-;;
-
let bad_token_length message =
bad_input
(Printf.sprintf
@@ -707,7 +703,7 @@ let scan_optionally_signed_int max ib =
scan_unsigned_int max ib
;;
-let scan_int_conv conv max ib =
+let scan_int_conv conv max _min ib =
match conv with
| 'b' -> scan_binary_int max ib
| 'd' -> scan_optionally_signed_decimal_int max ib
@@ -1363,6 +1359,7 @@ let scan_format ib ef fmt rv f =
and scan_conversion skip max_opt min_opt ir f i =
let stack = if skip then no_stack else stack in
let max = int_max max_opt in
+ let min = int_min min_opt in
match Sformat.get fmt i with
| '%' as conv ->
check_char ib conv; scan_fmt ir f (succ i)
@@ -1388,7 +1385,7 @@ let scan_format ib ef fmt rv f =
let _x = scan_Char max ib in
scan_fmt ir (stack f (token_char ib)) (succ i)
| 'd' | 'i' | 'o' | 'u' | 'x' | 'X' as conv ->
- let _x = scan_int_conv conv max ib in
+ let _x = scan_int_conv conv max min ib in
scan_fmt ir (stack f (token_int conv ib)) (succ i)
| 'N' as conv ->
scan_fmt ir (stack f (get_count conv ib)) (succ i)
diff --git a/stdlib/scanf.mli b/stdlib/scanf.mli
index 70bc6c4364..dae3000c73 100644
--- a/stdlib/scanf.mli
+++ b/stdlib/scanf.mli
@@ -119,6 +119,10 @@ val open_in : string -> in_channel;;
val open_in_bin : string -> in_channel;;
(** Bufferized file reading in binary mode. *)
+val close_in : in_channel -> unit;;
+(** Close the [Pervasives.input_channel] associated with the given
+ [Scanning.in_channel]. *)
+
val from_file : string -> in_channel;;
(** An alias for [open_in] above. *)
val from_file_bin : string -> in_channel;;