From 0efd168f4840787bf9026a8441ccf43eb86cf616 Mon Sep 17 00:00:00 2001 From: Pierre Weis Date: Fri, 25 May 2007 07:17:37 +0000 Subject: [PATCH] Typos reported by Hendrik Tews (PR #4292) No 4, 6, 10, 11. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8275 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- otherlibs/bigarray/bigarray.mli | 2 +- stdlib/pervasives.mli | 19 ++++++++++++------- stdlib/scanf.mli | 11 ++++++----- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/otherlibs/bigarray/bigarray.mli b/otherlibs/bigarray/bigarray.mli index 74848843e..617dba011 100644 --- a/otherlibs/bigarray/bigarray.mli +++ b/otherlibs/bigarray/bigarray.mli @@ -391,7 +391,7 @@ module Genarray : the file descriptor [fd] (as opened previously with [Unix.openfile], for example). The optional [pos] parameter is the byte offset in the file of the data being mapped; - it default to 0 (map from the beginning of the file). + it defaults to 0 (map from the beginning of the file). If [shared] is [true], all modifications performed on the array are reflected in the file. This requires that [fd] be opened diff --git a/stdlib/pervasives.mli b/stdlib/pervasives.mli index 3ff3f4041..32cd32374 100644 --- a/stdlib/pervasives.mli +++ b/stdlib/pervasives.mli @@ -674,7 +674,7 @@ val open_in_bin : string -> in_channel mode, this function behaves like {!Pervasives.open_in}. *) val open_in_gen : open_flag list -> int -> string -> in_channel -(** [open_in mode perm filename] opens the named file for reading, +(** [open_in_gen mode perm filename] opens the named file for reading, as described above. The extra arguments [mode] and [perm] specify the opening mode and file permissions. {!Pervasives.open_in} and {!Pervasives.open_in_bin} are special @@ -816,17 +816,22 @@ external decr : int ref -> unit = "%decr" (** {6 Operations on format strings} *) -(** See modules {!Printf} and {!Scanf} for more operations on - format strings. *) -type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6 +(** Format strings are used to read and print data using formatted input + functions in module {!Scanf} and formatted output in modules {!Printf} and + {!Format}. *) -type ('a, 'b, 'c) format = ('a, 'b, 'c, 'c) format4 -(** Simplified type for format strings, included for backward compatibility - with earlier releases of Objective Caml. +(** Format strings have a general and highly polymorphic type + [('a, 'b, 'c, 'd, 'e, 'f) format6]. Type [format6] is built in. + The two simplified types, [format] and [format4] below are + included for and backward compatibility with earlier releases of Objective + Caml. ['a] is the type of the parameters of the format, ['c] is the result type for the "printf"-style function, and ['b] is the type of the first argument given to [%a] and [%t] printing functions. *) +type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6 + +type ('a, 'b, 'c) format = ('a, 'b, 'c, 'c) format4 val string_of_format : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> string (** Converts a format string into a string. *) diff --git a/stdlib/scanf.mli b/stdlib/scanf.mli index da80c9e0e..e921d812f 100644 --- a/stdlib/scanf.mli +++ b/stdlib/scanf.mli @@ -184,11 +184,12 @@ val bscanf : Scanning.scanbuf -> ('a, 'b, 'c, 'd) scanner;; - [u]: reads an unsigned decimal integer. - [x] or [X]: reads an unsigned hexadecimal integer. - [o]: reads an unsigned octal integer. - - [s]: reads a string argument that spreads as much as possible, - until the next white space, the next scanning indication, or the - end-of-input is reached. Hence, this conversion always succeeds: - it returns an empty string if the bounding condition holds - when the scan begins. + - [s]: reads a string argument that spreads as much as possible, until the + following bounding condition holds: a whitespace has been found, a + scanning indication has been encountered, or the end-of-input has been + reached. + Hence, this conversion always succeeds: it returns an empty + string if the bounding condition holds when the scan begins. - [S]: reads a delimited string argument (delimiters and special escaped characters follow the lexical conventions of Caml). - [c]: reads a single character. To test the current input character