search for: specv

Displaying 8 results from an estimated 8 matches for "specv".

Did you mean: spec
2016 Jul 11
2
[PATCH v2] OCaml tools: add and use a Getopt module
...char *buf = v_buf; + + while (len > 0) { + r = write (fd, buf, len); + if (r == -1) + error (EXIT_FAILURE, errno, "write"); + buf += r; + len -= r; + } +} + +static void +show_help (value specsv, value usage_msgv) +{ + CAMLparam2 (specsv, usage_msgv); + CAMLlocal4 (specv, keysv, actionv, docv); + FILE *f; + CLEANUP_FREE char *buf = NULL; + size_t buf_len = 0; + size_t i, specs_len; + + f = open_memstream (&buf, &buf_len); + if (f == NULL) + error (EXIT_FAILURE, errno, "open_memstream"); + + fprintf (f, _("%s\n" +...
2016 Jul 15
0
[PATCH 1/3] mllib: Fix parsing of integers on the command line and use correct int type.
...- 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, value anon_funv, valu break; case 5: /*...
2016 Jun 24
2
[PATCH] RFC: OCaml tools: add and use a Getopt module
...char *buf = v_buf; + + while (len > 0) { + r = write (fd, buf, len); + if (r == -1) + error (EXIT_FAILURE, errno, "write"); + buf += r; + len -= r; + } +} + +static void +show_help (value specsv, value usage_msgv) +{ + CAMLparam2 (specsv, usage_msgv); + CAMLlocal4 (specv, keysv, actionv, docv); + FILE *f; + CLEANUP_FREE char *buf = NULL; + size_t buf_len = 0; + size_t i, specs_len; + + f = open_memstream (&buf, &buf_len); + if (f == NULL) + error (EXIT_FAILURE, errno, "open_memstream"); + + fprintf (f, _("%s: %s\n" +...
2016 Jul 13
3
[PATCH v3 1/2] OCaml tools: add and use a Getopt module
...ception in getopt callback: %s\n", + caml_format_exception (Extract_exception (rv))); + + CAMLreturn0; +} + +value +guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, value usage_msgv) +{ + CAMLparam4 (argsv, specsv, anon_funv, usage_msgv); + CAMLlocal5 (specv, keysv, actionv, v, v2); + size_t argc; + CLEANUP_FREE_STRING_LIST char **argv = NULL; + size_t specs_len, i; + CLEANUP_FREE char *optstring = NULL; + int optstring_len = 0; + CLEANUP_FREE_OPTION_LIST struct option *longopts = NULL; + int longopts_len = 0; + int c; + int specv_index; + +...
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 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 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
2017 Apr 04
1
[PATCH] Use Unicode single quotes ‘’ in place of short single quoted strings throughout.
...{ - fprintf (stderr, _("%s: '%s' is not allowed for %s%s; allowed values are:\n"), + fprintf (stderr, _("%s: ‘%s’ is not allowed for %s%s; allowed values are:\n"), getprogname (), optarg, vector_has_dashdash_opt (specv, longopts[option_index].name) ? "--" : "-", longopts[option_index].name); @@ -402,7 +402,7 @@ guestfs_int_mllib_getopt_parse (value argsv, value specsv, value anon_funv, valu if (optind < (int) argc) { if (anon_funv == Val_none) { - fprintf...