search for: specsv

Displaying 20 results from an estimated 25 matches for "specsv".

Did you mean: specs
2016 Jul 15
0
[PATCH 1/3] mllib: Fix parsing of integers on the command line and use correct int type.
...e) 'int'. --- mllib/getopt-c.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mllib/getopt-c.c b/mllib/getopt-c.c index 1f129a7..afb8793 100644 --- a/mllib/getopt-c.c +++ b/mllib/getopt-c.c @@ -247,7 +247,8 @@ guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, valu actionv = Field (specv, 1); switch (Tag_val (actionv)) { - int num; + long num; + int nchars; case 0: /* Unit of (unit -> unit) */ v = Field (actionv, 0); @@ -274,7 +275,8 @@ guestfs_int_mllib_getopt_parse (value argsv, value specsv, val...
2018 Aug 20
1
[PATCH] common/mltools: getopt: add Getopt.OptString
...++++++++++ 5 files changed, 55 insertions(+), 3 deletions(-) diff --git a/common/mltools/getopt-c.c b/common/mltools/getopt-c.c index 7b7e39be2..5fa703428 100644 --- a/common/mltools/getopt-c.c +++ b/common/mltools/getopt-c.c @@ -274,6 +274,10 @@ guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, valu has_arg = 1; break; + case 8: /* OptString of string * (string option -> unit) */ + has_arg = 2; + break; + default: error (EXIT_FAILURE, 0, "internal error: unhandled Tag_val (actionv) = %d"...
2016 Jul 18
2
[PATCH] mllib: Getopt: fix integer parsing
...RE); + } + + if (num <= INT_MIN || num >= INT_MAX) { + fprintf (stderr, _("%s: %s: integer out of range\n"), + guestfs_int_program_name, arg); + show_error (EXIT_FAILURE); + } + + return (int) num; +} + value guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, value usage_msgv) { @@ -274,21 +296,13 @@ guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, valu break; case 5: /* Int of string * (int -> unit) */ - if (sscanf (optarg, "%d", &num) != 1) { - fprintf (stderr, _...
2010 Oct 29
1
Tukey post hoc comparison (glht?) after 3factorial mixed model (lmer)
...meas 222484.2 471.682 NaN Residual 9439.4 97.157 Number of obs: 360, groups: box_id, 120 Fixed effects: Estimate Std. Error t value (Intercept) -353.554 65.777 -5.375 specSt -103.111 93.023 -1.108 specSv -4.485 93.023 -0.048 comproot -41.686 93.023 -0.448 compshoot 241.847 93.023 2.600 compxfull 316.849 93.023 3.406 watermoist -48.620 93.023 -0.523 specSt:comproot...
2018 Aug 21
0
[PATCH 1/2] common/mltools: getopt: add Getopt.OptString
...++++++++++ 5 files changed, 55 insertions(+), 3 deletions(-) diff --git a/common/mltools/getopt-c.c b/common/mltools/getopt-c.c index 7b7e39be2..5fa703428 100644 --- a/common/mltools/getopt-c.c +++ b/common/mltools/getopt-c.c @@ -274,6 +274,10 @@ guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, valu has_arg = 1; break; + case 8: /* OptString of string * (string option -> unit) */ + has_arg = 2; + break; + default: error (EXIT_FAILURE, 0, "internal error: unhandled Tag_val (actionv) = %d"...
2016 Jul 11
2
[PATCH v2] OCaml tools: add and use a Getopt module
...lt;caml/fail.h> +#include <caml/memory.h> +#include <caml/mlvalues.h> +#include <caml/callback.h> +#include <caml/printexc.h> + +#include <guestfs.h> +#include "guestfs-internal-frontend.h" + +extern value guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, value usage_msgv); + +#define Val_none Val_int(0) + +#ifdef HAVE_ATTRIBUTE_CLEANUP +#define CLEANUP_FREE_OPTION_LIST __attribute__((cleanup(cleanup_option_list))) + +static void +cleanup_option_list (void *ptr) +{ + struct option *opts = * (struct option **) ptr; + struct option...
2016 Jul 11
0
Re: [PATCH v2] OCaml tools: add and use a Getopt module
...gt; + > + if (Is_exception_result (rv)) > + fprintf (stderr, > + "libguestfs: uncaught OCaml exception in getopt callback: %s", Does this need \n? > + case 0: > + if (STREQ (longopts[option_index].name, "help")) { > + show_help (specsv, usage_msgv); > + } > + /* specv_index set already -- nothing to do. */ > + break; > + > + case 'h': > + show_help (specsv, usage_msgv); > + break; Is this right? Several commands (eg. virt-df) take a -h option which isn't for help. Th...
2016 Jul 18
0
Re: [PATCH] mllib: Getopt: fix integer parsing
...show_error (EXIT_FAILURE); These bounds are not tight enough. On 32 bit they should check the range of a 31 bit signed int, and on 64 bit, a 63 bit signed int. Rich. > + } > + > + return (int) num; > +} > + > value > guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, value usage_msgv) > { > @@ -274,21 +296,13 @@ guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, valu > break; > > case 5: /* Int of string * (int -> unit) */ > - if (sscanf (optarg, "%d", &num) != 1)...
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 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 Jun 24
2
[PATCH] RFC: OCaml tools: add and use a Getopt module
...lt;caml/fail.h> +#include <caml/memory.h> +#include <caml/mlvalues.h> +#include <caml/callback.h> +#include <caml/printexc.h> + +#include <guestfs.h> +#include "guestfs-internal-frontend.h" + +extern value guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, value usage_msgv); + +#define Val_none Val_int(0) + +static void +xwrite (int fd, const void *v_buf, size_t len) +{ + int r; + const char *buf = v_buf; + + while (len > 0) { + r = write (fd, buf, len); + if (r == -1) + error (EXIT_FAILURE, errno, "write"...
2016 Jul 13
3
[PATCH v3 1/2] OCaml tools: add and use a Getopt module
...caml/alloc.h> +#include <caml/fail.h> +#include <caml/memory.h> +#include <caml/mlvalues.h> +#include <caml/callback.h> +#include <caml/printexc.h> + +#include "guestfs-internal-frontend.h" + +extern value guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, value usage_msgv); + +#define Val_none Val_int(0) + +#ifdef HAVE_ATTRIBUTE_CLEANUP +#define CLEANUP_FREE_OPTION_LIST __attribute__((cleanup(cleanup_option_list))) + +static void +cleanup_option_list (void *ptr) +{ + struct option *opts = * (struct option **) ptr; + struct option...
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.
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
2010 Oct 31
1
R-help Digest, Vol 92, Issue 31
...meas 222484.2 471.682 NaN Residual 9439.4 97.157 Number of obs: 360, groups: box_id, 120 Fixed effects: Estimate Std. Error t value (Intercept) -353.554 65.777 -5.375 specSt -103.111 93.023 -1.108 specSv -4.485 93.023 -0.048 comproot -41.686 93.023 -0.448 compshoot 241.847 93.023 2.600 compxfull 316.849 93.023 3.406 watermoist -48.620 93.023 -0.523 specSt:comproot...
2017 Jun 15
0
[PATCH v6 11/41] utils: Rename ‘guestfs-internal-frontend.h’ to ‘utils.h’.
.....7b9af5958 100644 --- a/mllib/getopt-c.c +++ b/mllib/getopt-c.c @@ -40,7 +40,7 @@ #include <caml/callback.h> #include <caml/printexc.h> -#include "guestfs-internal-frontend.h" +#include "utils.h" extern value guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, value usage_msgv); diff --git a/mllib/uri-c.c b/mllib/uri-c.c index ffb55306b..592d09939 100644 --- a/mllib/uri-c.c +++ b/mllib/uri-c.c @@ -31,7 +31,7 @@ #include <caml/mlvalues.h> #include <guestfs.h> -#include "guestfs-internal-frontend.h" +#include &...
2017 Jun 19
0
[PATCH v7 12/13] utils: Rename ‘guestfs-internal-frontend.h’ to ‘guestfs-utils.h’.
...be2 100644 --- a/mllib/getopt-c.c +++ b/mllib/getopt-c.c @@ -40,7 +40,7 @@ #include <caml/callback.h> #include <caml/printexc.h> -#include "guestfs-internal-frontend.h" +#include "guestfs-utils.h" extern value guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, value usage_msgv); diff --git a/mllib/uri-c.c b/mllib/uri-c.c index ffb55306b..3e539c50e 100644 --- a/mllib/uri-c.c +++ b/mllib/uri-c.c @@ -31,7 +31,7 @@ #include <caml/mlvalues.h> #include <guestfs.h> -#include "guestfs-internal-frontend.h" +#include &...
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 Jun 27
0
Re: [PATCH] RFC: OCaml tools: add and use a Getopt module
...ng them, and setting [long_options] to them. > > diff --git a/mllib/getopt-c.c b/mllib/getopt-c.c > new file mode 100644 > index 0000000..d44448f > --- /dev/null > +++ b/mllib/getopt-c.c > @@ -0,0 +1,398 @@ > +value > +guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, value usage_msgv) I'm not convinced that this function is safe against OCaml GC compaction. In particular there are problems such as: ... > + for (j = 0; j < len; ++j) { > + const char *key = String_val (Field (keysv, j)); key now points to a string on the...
2017 Apr 04
1
[PATCH] Use Unicode single quotes ‘’ in place of short single quoted strings throughout.
...- fprintf (stderr, _("%s: '%s' is not a numeric value.\n"), + fprintf (stderr, _("%s: ‘%s’ is not a numeric value.\n"), getprogname (), arg); show_error (EXIT_FAILURE); } @@ -375,10 +375,10 @@ guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, valu v = Field (actionv, 1); if (!list_mem (v, optarg)) { if (c != 0) { - fprintf (stderr, _("%s: '%s' is not allowed for -%c; allowed values are:\n"), + fprintf (stderr, _("%s: ‘%s’ is not allowed for -%c; allowed va...