Pierre Weis
c5289420e9
Module Printf, Format, and Scanf are printed in -w A warning mode. This found an old and subtle bug in Format; for other modules, the code is clearer and cleaner!
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11100 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-06-20 21:46:20 +00:00
Pierre Weis
0d2a1430d0
Defining type file_name.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10963 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-02-23 18:39:15 +00:00
Pierre Weis
2855154d6c
Typo in module Scanf prevented tests to succeeded properly.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10377 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-05 17:49:19 +00:00
Pierre Weis
1b5c521bb7
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
2010-05-05 12:58:01 +00:00
Pierre Weis
8fdedc9035
PR#4983. Test suite succesfully passed.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10344 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-02 18:38:35 +00:00
Pierre Weis
c73e191b80
Documentation + some rewriting in check_next_char.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10318 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-04-27 10:35:18 +00:00
Pierre Weis
5a23453ce6
Bug in function scan: the size of the string format argument must be calculated inside the scan function body, not before. Otherwise, recursive independant calls to scan assume a wrong length for the format string. More explicit error messages.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10305 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-04-25 14:56:59 +00:00
Pierre Weis
818c9a0742
Adding a close-in function to module Scanf, to be able to close a Scanf scan buffer (hence its underlying Pervasives.in_channel, if any).
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9501 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-12-29 19:04:35 +00:00
Pierre Weis
0dfebd6355
Doc. Reporting PRs.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9434 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-11-30 22:43:27 +00:00
Pierre Weis
ada3c31be9
Introducing formatted input channels.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9428 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-11-30 21:47:56 +00:00
Pierre Weis
bbbe01a9e4
Doc.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9343 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-09-23 11:16:33 +00:00
Pierre Weis
7be229fab3
Documentation.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9330 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-09-11 16:16:44 +00:00
Damien Doligez
ed32f569e3
merge changes from ocaml3110 to ocaml3111rc0
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9270 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-05-20 11:52:42 +00:00
Pierre Weis
0515798a72
Correcting documentation in scan_Char.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9206 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-03-30 08:00:40 +00:00
Pierre Weis
cb77d49e01
Wrong scanning of continuation line breaks corrected (BR#4758).
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9205 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-03-30 07:21:02 +00:00
Pierre Weis
a548eb3a13
Understanding the notion of standard channel for Format and Scanf.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9166 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-01-25 22:46:15 +00:00
Pierre Weis
5dcc6d8b6b
Better semantics for fscanf.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9039 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-09-27 20:45:05 +00:00
Damien Doligez
f855dcf49a
PR#4321 bug with positional parameters
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9017 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-09-10 15:34:51 +00:00
Pierre Weis
5abe61a5ad
Char count was wrong in case of lookahead.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8898 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-07-01 09:53:56 +00:00
Pierre Weis
c2b4fdde78
Better treatment of meta formats.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8411 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-10-04 21:02:39 +00:00
Pierre Weis
8e5fb9bb75
Added shared library support for NetBSD and OpenBSD.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8394 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-08-23 07:43:06 +00:00
Pierre Weis
5dbc715029
Indent.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8215 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-05-09 21:04:24 +00:00
Pierre Weis
4f37f1c289
Documentation.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8212 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-05-08 16:58:11 +00:00
Pierre Weis
236baa6ee4
Encapsulation of system specific exports in module Printf.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7735 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-11-17 08:34:05 +00:00
Pierre Weis
4c493c3292
Implementing %r.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7719 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-11-06 10:19:12 +00:00
Pierre Weis
dd25537b69
Defining an abbrev to give a readable type to scanf functions. Using format6. Format_from_string specification changed.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7706 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-10-27 09:12:07 +00:00
Pierre Weis
5c04d6cade
Bug report 0004119: Issue with Scanf.Scanning.from_file
...
Bumping the version sub number and date.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7678 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-10-04 10:02:01 +00:00
Pierre Weis
cf0590146f
Code review before adding new typing of format string.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7396 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-05-04 12:52:22 +00:00
Pierre Weis
a09a711749
Dead code removed. Typos corrected + documentation.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7376 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-04-05 15:40:03 +00:00
Pierre Weis
176b3c0da8
Module Sformat is internal to printf. Better typing specifications of functions working with format strings.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7374 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-04-05 11:49:07 +00:00
Pierre Weis
dc068cdbe1
Sscanf_format gets a type consistent with the type of sscanf.
...
Adding a function scan_format that scan a string to directely return a format4
value.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7324 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-01-12 10:18:18 +00:00
Damien Doligez
125ea40d4c
fusion 3.09.0 -> 3.09.1
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7307 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-01-04 16:55:50 +00:00
Pierre Weis
d154852500
Last correction for l, n, L numbers scanning.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7299 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-01-03 18:27:32 +00:00
Pierre Weis
a3b605a2db
New function sscanf_format to read a format from a string.
...
The type of the resulting format is dynamically checked and should be
the type of the template format which is the second argument.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7061 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-09-20 21:42:44 +00:00
Pierre Weis
d21474e7b3
Documentation.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6965 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-07-11 14:49:57 +00:00
Pierre Weis
6fae6a771a
A subtile bug in scanf: stopper character have not to be always
...
present in the input (in this case the token spreads to the end of
file, as specified, and this is not an error!).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6946 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-07-02 21:10:04 +00:00
Pierre Weis
4018798e3f
A bug in the treatment of (implicit) string delimitors (' ' '\n' '\r'
...
'\t'): the delimitor should not be skipped. This way
sscanf "hello\n" "%s\n" (fun s -> s) = "hello"
(not exception End_of_file !)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6942 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-07-01 09:02:02 +00:00
Pierre Weis
9bc393e8f2
A major modification: the main invariant has been modified !
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6939 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-07-01 08:15:02 +00:00
Pierre Weis
ea8c2fdc2a
Doc.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6813 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-03-11 13:41:25 +00:00
Pierre Weis
280dcb3097
Correcting bug about erroneous erro reporting in case of wrong
...
conversions in format strings.
Static and dynamic messages about wrong format strings are now very
similar in printf.ml, scanf.ml, and typecore.ml.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6802 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-03-04 14:51:31 +00:00
Pierre Weis
53c525611e
Invalid format string error report is more uniform.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6726 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-12-07 06:17:12 +00:00
Damien Doligez
1971a6ba83
changements sur les warnings
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6720 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-11-30 18:57:04 +00:00
Pierre Weis
b5c447dba6
Exporting the name_of_input function to get the name of the input
...
buffer's character source.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6629 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-10-05 06:54:45 +00:00
Pierre Weis
486d45c826
Careful review of meta formats.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6626 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-10-04 20:19:44 +00:00
Pierre Weis
b0270c4cf9
Implementation des meta formats.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6621 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-09-22 09:17:21 +00:00
Xavier Leroy
63c1789b5e
Fusion des modifs faites sur la branche release jusqu'a la release 3.08.0
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-07-13 12:25:21 +00:00
Pierre Weis
d29a2ec4df
Wrong treatment of 3 chars long patterns, when a range is specified.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6373 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-06-04 13:27:24 +00:00
Pierre Weis
5873271ba9
Integer conversions are now treated uniformly: End_of_file is raised
...
hwen end of input is reached before a valid integer has been read.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6183 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-04-01 15:07:02 +00:00
Pierre Weis
ff0f8b35ca
Better error report.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6145 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-03-10 22:10:54 +00:00
Pierre Weis
177a7a8ce0
Format %F shoudl to be documented on its own.
...
More documentation and some code rewriting in Scanf.ml; push the
special case for ranges of length 3 to make_setp.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6108 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-02-04 10:16:25 +00:00