;Z$ 55.5.0+dev0-2025-04-28/*In_channel!tA;@@@A&Stdlib*in_channel@@@@@@@;../../stdlib/in_channel.mli\ww\w@@@@*In_channel@@A@)open_flagB;@@+Open_rdonly@@``@@B@+Open_wronly@@aa@@C@+Open_append@@#b.0$b.=@@"D@*Open_creat@@,c{}-c{@@+E@*Open_trunc@@5d6d@@4F@)Open_excl@@>e?e @@=G@+Open_binary@@GfJLHfJY@@FH@)Open_text@@PgQg@@OI@-Open_nonblock@@YhZh@@XJ@@@A&Stdlib)open_flag@@@@@@@f_ @@A@dA@A@%stdin*In_channel!t@@@@vk22wk2?@@uK@@(open_bin@&string@@@*In_channel!t@@@@@@nllnl@@L@@)open_text@@@@*In_channel!t@@@@@@r  r  %@@M@@(open_gen @$list*In_channel)open_flag@@@@@@@#int@@@@J@@@*In_channel!t@@@@@@@@@@x " "x " U@@N@@-with_open_bin!@b@@@@@*In_channel!t@@@!a@C@@@@@@@@~ U U~ U @@O@@.with_open_text"@@@@@@*In_channel!t@@@!a@C@@@@@@@@C B BC B p@@P@@-with_open_gen#@u*In_channel)open_flag@@@@@@@t@@@@@@@@@*In_channel!t@@@!a@C@@@@@@@@@@@@UG  VG  @@TQ@@%close$@*In_channel!t@@@$unit@@@@@@nK  oK  @@mR@@+close_noerr%@*In_channel!t@@@@@@@@@PP@@S@@*input_char&@*In_channel!t@@@&optionL$char@@@@@@@@@UU@@T@@*input_byte'@*In_channel!t@@@ @@@@@@@@@YY@@U@@*input_line(@*In_channel!t@@@=Y@@@@@@@@@]::]:]@@V@@3really_input_string)@*In_channel!t@@@@2@@@a}@@@@@@@@@@@g<<g<o@@W@@)input_all*@*In_channel!t@@@@@@@@@oo@@X@@+input_lines+@*In_channel!t@@@}֠@@@@@@ @@ @:u;u@@9Y@@%input,@*In_channel!t@@@ @%bytes@@@ @@@@ @@@@@@@@@@@@@@@@hWWiW@@gZ@@.input_bigarray@*In_channel!t@@@@&Stdlib(Bigarray&Array1!t@@ &Stdlib(Bigarray1int8_unsigned_elt@@@ &Stdlib(Bigarray(c_layout@@@ @@@ @@@@ @@@@ @@@ @@ @@ @@ @@ @WW@@[@@,really_input@*In_channel!t@@@ @{@@@ @@@@ @@@@ Dy@@@ @@@ @@ @@ @@ @@ @U@@\@@5really_input_bigarray@*In_channel!t@@@ @&Stdlib(Bigarray&Array1!t@@ &Stdlib(Bigarray1int8_unsigned_elt@@@ &Stdlib(Bigarray(c_layout@@@ @@@ @`@@@ @g@@@ !@@@ "@@@ $@@ %@@ &@@ '@@ (@9;;:@@8]@@*fold_lines@@#acc@ 2C@ )@@@@ * @@ +@@ ,@@*In_channel!t@@@ -@@ .@@ /@@ 0@_`S@@^^@@$seek@*In_channel!t@@@ 3@%int64@@@ 4@@@ 5@@ 6@@ 7@@@~_@@#pos@*In_channel!t@@@ 8@@@ 9@@ :@VVVj@@`@@&length@*In_channel!t@@@ ;6@@@ <@@ =@!3!3!3!J@@a@@/set_binary_mode@*In_channel!t@@@ >@$bool@@@ ?b@@@ @@@ A@@ B@""""@@b@@.is_binary_mode@*In_channel!t@@@ C@@@ D@@ E@$$$$@@c@@&isatty@*In_channel!t@@@ F6@@@ G@@ H@%W%W%W%m@@d@@@3/Input channels.@ This module provides functions for working with input channels. For example, you can use this module to read files or get user input from the terminal.@) See 3In_channel.examples(Examples@4 the example section@' below.@@@@$4.14@@@@@@@A;../../stdlib/in_channel.mliA(channels(Channels@@#,In_channel.t3:The type of input channel.@@@@@@@@@@@@@@AA@;9@@#4In_channel.open_flag32Opening modes for 3In_channel.open_genD@!.@@@@@@@@@@@@@A@@31open for reading.@@@@@@@@@@@@A@@31open for writing.@@@@@@@@@@@@A@@3 0open for appending: always write at end of file.@@@@@@@@@@@@A@@3 %create the file if it does not exist.@@@@@@@@@@@@A@@3 $empty the file if it already exists.@@@@@@@@@@@@A@@3 /fail if Open_creat and the file already exists.@@@@@@@@@@@@A@@3 $open in binary mode (no conversion).@@@@@@@@@@@@A@@3 ,open in text mode (may perform conversions).@@@@@@@@@@@@A@@3:open in non-blocking mode.@@@@@@@@@@@@@AC@=I@@0In_channel.stdin3 #The standard input for the process.@@@@@@@@@@@@@@@@@:3In_channel.open_bin3 zOpen the named file for reading, and return a new input channel on that file, positioned at the beginning of the file.@@@@@@@@@@@@;@ =@@@@14In_channel.open_text3(Same as D@ , but the file is opened in text mode, so that newline translation takes place during reads. On operating systems that do not distinguish between text mode and binary mode, this function behaves like D@!.@@@@@@@@@@@@>@?@@@@43;open_gen mode perm filename O opens the named file for reading, as described above. The extra arguments $mode% and $perm 5 specify the opening mode and file permissions. 2D@% and HD@ ( are special cases of this function.@@@@@@@@@@@@O@EP@HB@K=@@@@28In_channel.with_open_bin32with_open_bin fn f1 opens a channel "ic) on file "fn- and returns (f ic(. After !f : returns, either with a value or by raising an exception, "ic is guaranteed to be closed.@@@@@@@@@@@@T@{U@~Q@@@@C9In_channel.with_open_text3%Like In_channel.really_input_string3:really_input_string ic len' reads #len9 characters from channel "ic 0 and returns them in a new string. Returns $None * if the end of file is reached before #len; characters have been read.@ If the same channel is read concurrently by multiple threads, the returned string is not guaranteed to contain contiguous characters from the input.@@@@@@@@@@@@b@c@\@@@@O4In_channel.input_all3,input_all ic? reads all remaining data from "ic!.@ If the same channel is read concurrently by multiple threads, the returned string is not guaranteed to contain contiguous characters from the input.@@@@@@@@@@@@]@^@@@@S6In_channel.input_lines3.input_lines ic3 reads lines using D@ until the end of file is reached. It returns the list of all lines read, in the order they were read. The newline characters that terminate lines are not included in the returned strings. Empty lines produce empty strings.@@@@#5.1@@@@@@@_@`@@@@OA.advanced_input.Advanced input@@0In_channel.input34input ic buf pos len- reads up to #len ' characters from the given channel "ic , storing them in byte sequence #buf #, starting at character number #pos A. It returns the actual number of characters read, between 0 and #len M (inclusive). A return value of 0 means that the end of file was reached.@) Use 7In_channel.really_inputD@1 to read exactly #len, characters.@@@@@@@@0Invalid_argument#if #pos% and #len ' do not designate a valid range of #buf!.@@@@@@,@/@2@5@@@@9In_channel.input_bigarray3(Same as kD@ $, but read the data into a bigarray.@@@@#5.2@@@@@@@@L@O@Rk@Ug@@@@_T3;really_input ic buf pos len' reads #len9 characters from channel "ic $, storing them in byte sequence #buf?, starting at character number #pos!.@- Returns $None & if the end of file is reached before #len? characters have been read.@ Y If the same channel is read concurrently by multiple threads, the bytes read by ,really_input % are not guaranteed to be contiguous.@@@@@@@@0Invalid_argument#if #pos% and #len ' do not designate a valid range of #buf!.@@@@@@@@@@@@@ In_channel.really_input_bigarray3(Same as D@ $, but read the data into a bigarray.@@@@#5.2@@@@@@@@@@p@l@@@@_5In_channel.fold_lines34fold_lines f init ic2 reads lines from "ic' using D@ Y until the end of file is reached, and successively passes each line to function !f 6 in the style of a fold. More precisely, if lines +l1, ..., lN/ are read, 4fold_lines f init ic* computes !f (... (f (f init l1) l2) ...) lN). If !f 0 has no side effects, this is equivalent to 1List.fold_left f init (In_channel.input_lines ic) W, but is more efficient since it does not construct the list of all lines read.@@@@#5.1@@@@@@@@@ @#@@@@A'seeking'Seeking@@/In_channel.seek3-seek chan pos & sets the current reading position to #pos1 for channel $chan ^. This works only for regular files. On files of other kinds, the behavior is unspecified.@@@@@@@@@@@@@J@M@@@@.In_channel.pos3 Return the current reading position for the given channel. For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with  D@ ), then going back to this position using 0D@ z will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.@@@@@@@@@@@@@h@@@@A*attributes*Attributes@@1In_channel.length3 ]Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless. The returned size does not take into account the end-of-line translations that can be performed when reading from a channel opened in text mode.@@@@@@@@@@@@@@@@@:In_channel.set_binary_mode37set_binary_mode ic true2 sets the channel "ic = to binary mode: no translations take place during input.@% 8set_binary_mode ic false2 sets the channel "ic to text mode: depending on the operating system, some translations may take place during input. For instance, under Windows, end-of-lines will be translated from $\r\n( to "\n!.@ w This function has no effect under operating systems that do not distinguish between text mode and binary mode.@@@@@@@@@@@@@@@@@@9In_channel.is_binary_mode31is_binary_mode ic= returns whether the channel "ic< is in binary mode (see MD@").@@@@#5.2@@@@@@@@@@@@1In_channel.isatty3)isatty ic$ is $true$ if "ic - refers to a terminal or console window, %false+ otherwise.@@@@#5.1@@@@@@@@@@@@A(examples@ ) Reading the contents of a file: S let read_file file = In_channel.with_open_bin file In_channel.input_all @ $ Reading a line from stdin: F let user_input () = In_channel.input_line In_channel.stdin @@@@@A&Stdlib(Bigarray@@@@@