Utiliser le mode binaire pour {in,out}_channel_of_descr

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1779 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Xavier Leroy 1997-11-17 17:40:29 +00:00
parent 194af334a2
commit 1202945db5
2 changed files with 4 additions and 4 deletions

View File

@ -187,12 +187,12 @@ external filedescr_of_fd : int -> file_descr = "win_handle_fd"
let in_channel_of_descr_gen flags handle =
open_read_descriptor(open_handle handle flags)
let in_channel_of_descr handle =
in_channel_of_descr_gen [O_TEXT] handle
in_channel_of_descr_gen [O_BINARY] handle
let out_channel_of_descr_gen flags handle =
open_write_descriptor(open_handle handle flags)
let out_channel_of_descr handle =
out_channel_of_descr_gen [O_TEXT] handle
out_channel_of_descr_gen [O_BINARY] handle
let descr_of_in_channel inchan =
filedescr_of_fd(fd_of_in_channel inchan)

View File

@ -211,10 +211,10 @@ val write : file_descr -> string -> int -> int -> int
val in_channel_of_descr : file_descr -> in_channel
(* Create an input channel reading from the given descriptor.
The input channel is opened in text mode. *)
The input channel is opened in binary mode. *)
val out_channel_of_descr : file_descr -> out_channel
(* Create an output channel writing on the given descriptor.
The output channel is opened in text mode. *)
The output channel is opened in binary mode. *)
val in_channel_of_descr_gen : open_flag list -> file_descr -> in_channel
val out_channel_of_descr_gen : open_flag list -> file_descr -> out_channel
(* Same as [in_channel_of_descr] and [out_channel_of_descr],