Displaying 20 results from an estimated 600 matches similar to: "[PATCH] mllib: Getopt: fix integer parsing"
2016 Jul 18
0
Re: [PATCH] mllib: Getopt: fix integer parsing
On Mon, Jul 18, 2016 at 10:13:30AM +0200, Pino Toscano wrote:
> Since we are using gnulib already, make use of xstrtol to parse the
> integer arguments to avoid extra suffixes, etc.
>
> Fixes commit 0f7bf8f714898c606e5d5015fff5b7803dcd1aee.
> ---
> mllib/getopt-c.c | 34 ++++++++++++++++++++++++----------
> 1 file changed, 24 insertions(+), 10 deletions(-)
>
> diff
2016 Jul 18
4
[PATCH 1/3] mllib: Getopt: point to man page as additional help
On error, point also to the man page of the current tool in addition to
'$TOOL --help'.
---
mllib/getopt-c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mllib/getopt-c.c b/mllib/getopt-c.c
index bf40f91..3efd5d3 100644
--- a/mllib/getopt-c.c
+++ b/mllib/getopt-c.c
@@ -69,8 +69,8 @@ cleanup_option_list (void *ptr)
static void __attribute__((noreturn))
2016 Jul 18
2
Re: [PATCH] mllib: Getopt: fix integer parsing
On Monday, 18 July 2016 09:38:43 CEST Richard W.M. Jones wrote:
> On Mon, Jul 18, 2016 at 10:13:30AM +0200, Pino Toscano wrote:
> > Since we are using gnulib already, make use of xstrtol to parse the
> > integer arguments to avoid extra suffixes, etc.
> >
> > Fixes commit 0f7bf8f714898c606e5d5015fff5b7803dcd1aee.
> > ---
> > mllib/getopt-c.c | 34
2016 Jul 15
0
[PATCH 1/3] mllib: Fix parsing of integers on the command line and use correct int type.
Currently input such as "1ABC" or "1.1" is parsed (as 1). If there is
trailing data on the command line, refuse to accept it.
In addition this parses the integer into a C 'long', which is as close
as we can get to the OCaml idea of a native int. This prevents the
gross rounding error from the earlier code if the integer parameter
was larger than 32 bits (on a 64 bit
2016 Jul 11
2
[PATCH v2] OCaml tools: add and use a Getopt module
Add a new Getopt module to mllib, to parse command line arguments with
handlers close to the ones used with Arg, but using getopt(3) (actually
getopt_long_only) to do the real parsing. This allow us to provide
options for OCaml tools with a syntax similar to the C tools, and use
the additional features getopt offers and Arg does not.
Do a single-step conversion of Common_utils and all the OCaml
2018 Aug 20
1
[PATCH] common/mltools: getopt: add Getopt.OptString
Introduce a new type of option with an optional string argument.
---
common/mltools/getopt-c.c | 20 +++++++++++++++++++-
common/mltools/getopt.ml | 5 ++++-
common/mltools/getopt.mli | 4 ++++
common/mltools/getopt_tests.ml | 18 +++++++++++++++++-
common/mltools/test-getopt.sh | 11 +++++++++++
5 files changed, 55 insertions(+), 3 deletions(-)
diff --git
2016 Jul 13
3
[PATCH v3 1/2] OCaml tools: add and use a Getopt module
Add a new Getopt module to mllib, to parse command line arguments with
handlers close to the ones used with Arg, but using getopt(3) (actually
getopt_long_only) to do the real parsing. This allow us to provide
options for OCaml tools with a syntax similar to the C tools, and use
the additional features getopt offers and Arg does not.
Getopt now handles every part of the command line handling,
2018 Aug 21
0
[PATCH 1/2] common/mltools: getopt: add Getopt.OptString
Introduce a new type of option with an optional string argument.
---
common/mltools/getopt-c.c | 20 +++++++++++++++++++-
common/mltools/getopt.ml | 5 ++++-
common/mltools/getopt.mli | 4 ++++
common/mltools/getopt_tests.ml | 18 +++++++++++++++++-
common/mltools/test-getopt.sh | 11 +++++++++++
5 files changed, 55 insertions(+), 3 deletions(-)
diff --git
2018 Aug 21
4
[PATCH 0/2] RFC: add output selection for --machine-readable
Hi,
this is a first approach (hence RFC, since it misses tests &
documentation) in selecting the output for --machine-readable.
The possible choices are:
* --machine-readable: to stdout, like before
* --machine-readable=file:name-of-file: to the specified file
* --machine-readable=stream:stdout: explicitly to stdout
* --machine-readable=stream:stderr: explicitly to stderr
This makes it
2016 Jul 15
5
[PATCH 0/3] mllib: Various fixes and changes to Getopt module.
The second patch is obviously not complete yet - for discussion only.
Rich.
2016 Jul 18
0
[PATCH v3 1/3] mllib: getopt: Further fix int parsing.
Don't allow suffixes on integers, and fix the bounds to match the
definitions of Min_long and Max_long in <caml/mlvalues.h>.
Fixes commit 66b54bfefe42f2996d1b42c3646511bbd4349317.
---
mllib/getopt-c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mllib/getopt-c.c b/mllib/getopt-c.c
index bf40f91..13852c2 100644
--- a/mllib/getopt-c.c
+++ b/mllib/getopt-c.c
@@
2016 Jun 24
2
[PATCH] RFC: OCaml tools: add and use a Getopt module
Add a new Getopt module to mllib, to parse command line arguments with
handlers close to the ones used with Arg, but using getopt(3) (actually
getopt_long_only) to do the real parsing. This allow us to provide
options for OCaml tools with a syntax similar to the C tools, and use
the additional features getopt offers and Arg does not.
Do a single-step conversion of Common_utils and all the OCaml
2016 Sep 08
4
[PATCH 0/3] Use gnulib's getprogname
Hi,
this series update libguestfs to a recent gnulib version, so that we
can use its new getprogname module, and solve altogether one of the
porting issues (the need for 'program_name' by the error module of
gnulib), and have a single way to get the name of the current program.
A number of changes in tools mostly, although mechanical.
Thanks,
Pino Toscano (3):
Update gnulib to latest
2016 Jul 11
0
Re: [PATCH v2] OCaml tools: add and use a Getopt module
On Mon, Jul 11, 2016 at 06:03:39PM +0200, Pino Toscano wrote:
> diff --git a/mllib/getopt-c.c b/mllib/getopt-c.c
> new file mode 100644
> index 0000000..e5e832c
> --- /dev/null
> +++ b/mllib/getopt-c.c
> +static void
> +do_call1 (value funv, value paramv)
> +{
> + CAMLparam2 (funv, paramv);
> + CAMLlocal1 (rv);
> +
> + rv = caml_callback_exn (funv, paramv);
2018 Aug 23
3
[PATCH v2 0/2] add output selection for --machine-readable
Hi,
this adds the possibility to select the output for --machine-readable
in OCaml tools.
The possible choices are:
* --machine-readable: to stdout, like before
* --machine-readable=file:name-of-file: to the specified file
* --machine-readable=stream:stdout: explicitly to stdout
* --machine-readable=stream:stderr: explicitly to stderr
This makes it possible to add additional output for
2017 Oct 14
2
Bug in replaceUsesOfWith: does not keep addrspace consistent in GEP
Hello,
Calling `replaceUsesOfWith` with a value in a different addrspace does not
keep the addrspace of a GEP consistent. Is this known? Is this a bug or
expected behaviour?
Minimal counterexample link
<https://gist.github.com/bollu/152ba5e1c20c03c7fc6d8c7b23ba828f>
Reproduced here:
#include <iostream>
#include "llvm/ADT/APFloat.h"
#include
2009 Feb 10
2
rescue_from for NoMethodError
Hi everyone,
I was just trying to catch some exceptions in my app,
for "Record Not Found" I used this
in my application.rb file
rescue_from ActiveRecord::RecordNotFound, :with => :record_not_found
rescue_from ActionController::NoMethodError, :with => :show_error
private
def record_not_found
render :text => "404 Not Found", :status =>
2007 Feb 15
1
wrong startup information in production environment
Hi,
I check out the last codes from merb repository. And the startup
information for production environment just like that:
======================================================
dev:/var/www/apps/upload_merb/current/log# /etc/init.d/merb_init start
Merb started with these options:
---
:template_ext:
:html: :herb
:js: :jerb
:xml: :xerb
:config: dist/conf/upload.conf
:drb_server_port:
2015 Oct 05
3
[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste.
---
align/scan.c | 35 ++++++++++---------
cat/cat.c | 39 +++++++++++----------
cat/filesystems.c | 69 +++++++++++++++++++-------------------
cat/log.c | 35 ++++++++++---------
cat/ls.c | 61 +++++++++++++++++----------------
df/main.c | 43 ++++++++++++------------
diff/diff.c | 67
2007 May 14
7
Help a newb with 0.3.1
Hi, first off thanks Ezra for Merb - it''s certainly interesting and
I''m keen to have a play. However, I''m having difficulties in getting
started. I''ve followed the docs for setting up mrblog and everything
seems to be installed correctly, and merb appears to start fine:
$ merb
you must install the markaby gem to use .mab templates
you must install the