Allow flags to be followed directly by their argument, separated by an '='
sign. This is consistent with what GNU getopt_long and many other
command line parsing libraries allow.
Fix for the following issue:
http://caml.inria.fr/mantis/view.php?id=5197
The no_arg function in this patch is a no-op. It will do something
useful in the followups.
The get_arg function simple checks the next position on the command
line exists and returns that argument or raises a Arg.Missing.
This patch should introduce no functional change, it is simply code
refactoring.
In particular, this should not change the treatment of Arg.current
(see: http://caml.inria.fr/mantis/view.php?id=5197#c11147)
Merge of branch 'hex-float'.
- Add support in byterun/floats.c for conversions between floats and strings in hex notation. We cannot rely on the C standard library here because Microsoft consistently fails at supporting hex notation as standardized in C99. Instead, the conversions are implemented from scratch.
- Add support in the lexer so that hex float literals are recognized in OCaml sources.
- Add support in formats. The ISO C99 format letters for hex floats are %a and %A, but %a is already taken. I chose %h and %H, which are rejected today as bad formats (hence no backward incompatibility) and don't mean anything in C either (h is a modifier, not a format letter).
- Add support in printf. All the trimmings are there in the implementation of %h and %H, including sign modifier and fixed precision.
- Benoit Vaugon contributed support in scanf.
Resolved conflicts:
boot/ocamlc
boot/ocamldep
boot/ocamllex
parsing/lexer.mll
(Jérémie Dimino)
- use inline-records to avoid using Obj.magic while keeping
indirections to the minumum
- change the representation from a cyclic list to a simply-linked
list. The drawback is one more word per queue, but it makes the
implementation clearer
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16545 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
to warn when the argument is matches against a constant pattern.
This attributes is applied on predefined exception constructors
which take an purely informational (with no stability guarantee)
message.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16502 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
(Pierre Chambart)
Turn Stream.data into a GADT to ensure that streams built with the
Sbuffio constructor are char streams.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16470 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
(Pierre Chambart)
Stream used to modify blocks allocated as immutable. This Get rid of
most Obj module invocations in this module.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16469 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
breaking, consistent usage of splitting and split; simpler explanation for
break hints and new documentation for pretty-printing boxes.
Tabulation boxes get deprecated: this mechanism does not interact nicely with
the rest of the pretty-printing engine and should be completely revisited...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16444 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
flush_str_formatter rewritten using flush_buffer_formatter.
Consistent naming of pretty-printer formatter as ppf not strange x or o
parameters.
Function ksprintf purposedly defines a new continuation embedding the old
one.
Function asprintf rewritten in a more natural way; spurious pp_flush_queue
deleted in the conitnuation, since it is already done via following
flush_buffer_formatter call.
Indent.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16429 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02