search for: argsv

Displaying 20 results from an estimated 35 matches for "argsv".

Did you mean: args
2016 Jul 15
0
[PATCH 1/3] mllib: Fix parsing of integers on the command line and use correct int type.
...using (native) '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, val...
2005 Jul 19
1
Nested drag and drop rendering issue with ie
...ction(event) { //**MOD BELOW*/ if (!event) var event = window.event; event.cancelBubble = true; if (event.stopPropagation) event.stopPropagation(); //**MOD ABOVE**/ I have no idea if this is the best solution, I just started working the lib yesterday, but it works for me currently. argsv
2018 Aug 20
1
[PATCH] common/mltools: getopt: add Getopt.OptString
...pt.sh | 11 +++++++++++ 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 (actio...
2016 Jul 18
2
[PATCH] mllib: Getopt: fix integer parsing
...r (EXIT_FAILURE); + } + + 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) { - fpri...
2011 Feb 28
2
[LLVMdev] Extending FunctionType
Hi all, I am trying to extend a FunctionType to include new parameters. In particular, I want to ensure that the main function has been declared with both argsc and argsv. However there seems to be no easy way to accomplish this: llvm::Function::getFunctionType() returns a a reference to a const object, while modifying only the argument list yields an error during verification since the function type does not match its arguments. Is there any approach that I am m...
2010 Feb 17
2
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...tion *CalleeF = TheModule->getFunction(Callee); if (CalleeF == 0) return ErrorV("Unknown function referenced"); // If argument mismatch error. if (CalleeF->arg_size() != Args.size()) return ErrorV("Incorrect # arguments passed"); std::vector<Value*> ArgsV; for (unsigned i = 0, e = Args.size(); i != e; ++i) { ArgsV.push_back(Args[i]->Codegen()); if (ArgsV.back() == 0) return 0; } return Builder.CreateCall(CalleeF, ArgsV.begin(), ArgsV.end(), "calltmp"); } Function *PrototypeAST::Codegen() { // Make the function type: d...
2010 Feb 17
0
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...tFunction(Callee); > if (CalleeF == 0) > return ErrorV("Unknown function referenced"); > > // If argument mismatch error. > if (CalleeF->arg_size() != Args.size()) > return ErrorV("Incorrect # arguments passed"); > > std::vector<Value*> ArgsV; > for (unsigned i = 0, e = Args.size(); i != e; ++i) { > ArgsV.push_back(Args[i]->Codegen()); > if (ArgsV.back() == 0) return 0; > } > > return Builder.CreateCall(CalleeF, ArgsV.begin(), ArgsV.end(), "calltmp"); > } > > Function *PrototypeAST::Codeg...
2018 Aug 21
0
[PATCH 1/2] common/mltools: getopt: add Getopt.OptString
...pt.sh | 11 +++++++++++ 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 (actio...
2005 Jul 20
3
examples of drag n drop
...t line so it is more specific > than "Re: Contents of Rails-spinoffs digest..." > > > Today''s Topics: > > 1. quick dragdrop question (dave crane) > 2. Drag and drop question (Chih-Chao Lam) > 3. Nested drag and drop rendering issue with ie > (argsv@technologicaleden.com) > 4. Re: Nested drag and drop rendering issue with ie (Thomas Fuchs) > 5. Re: a frightfully newbish question about dragdrop.js (Eric) > 6. Re: a frightfully newbish question about dragdrop.js > (Thomas Fuchs) > 7. draggables bug(s) (Jesse Andrews)...
2016 Jul 18
0
Re: [PATCH] mllib: Getopt: fix integer parsing
...arg); > + 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", &...
2011 Feb 28
0
[LLVMdev] Extending FunctionType
On 2/28/11 6:31 AM, Gabriel Rodríguez wrote: > Hi all, > > I am trying to extend a FunctionType to include new parameters. In > particular, I want to > ensure that the main function has been declared with both argsc and > argsv. However > there seems to be no easy way to accomplish this: > llvm::Function::getFunctionType() returns a > a reference to a const object, while modifying only the argument list > yields an error during verification > since the function type does not match its arguments. Is there...
2010 Feb 17
1
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...(CalleeF == 0) >>    return ErrorV("Unknown function referenced"); >> >>  // If argument mismatch error. >>  if (CalleeF->arg_size() != Args.size()) >>    return ErrorV("Incorrect # arguments passed"); >> >>  std::vector<Value*> ArgsV; >>  for (unsigned i = 0, e = Args.size(); i != e; ++i) { >>    ArgsV.push_back(Args[i]->Codegen()); >>    if (ArgsV.back() == 0) return 0; >>  } >> >>  return Builder.CreateCall(CalleeF, ArgsV.begin(), ArgsV.end(), >> "calltmp"); >> } &g...
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
2011 Feb 28
3
[LLVMdev] Extending FunctionType
...1/2/28 John Criswell <criswell at illinois.edu>: > On 2/28/11 6:31 AM, Gabriel Rodríguez wrote: > > Hi all, > > I am trying to extend a FunctionType to include new parameters. In > particular, I want to > ensure that the main function has been declared with both argsc and argsv. > However > there seems to be no easy way to accomplish this: > llvm::Function::getFunctionType() returns a > a reference to a const object, while modifying only the argument list yields > an error during verification > since the function type does not match its arguments. Is the...
2011 Feb 28
0
[LLVMdev] Extending FunctionType
...swell at illinois.edu>: >> On 2/28/11 6:31 AM, Gabriel Rodríguez wrote: >> >> Hi all, >> >> I am trying to extend a FunctionType to include new parameters. In >> particular, I want to >> ensure that the main function has been declared with both argsc and argsv. >> However >> there seems to be no easy way to accomplish this: >> llvm::Function::getFunctionType() returns a >> a reference to a const object, while modifying only the argument list yields >> an error during verification >> since the function type does not mat...
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.
2011 Feb 28
2
[LLVMdev] Extending FunctionType
On Mon, Feb 28, 2011 at 5:10 PM, John Criswell <criswell at illinois.edu> wrote: > On 2/28/11 10:04 AM, Frits van Bommel wrote: >> I don't think a full clone is necessary, since he wants to replace the >> function. He only needs to create the new function and splice in the >> body of the old one. > > That is exactly what MakeFunctionClone() does.  It creates a
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
2016 Jul 11
2
[PATCH v2] OCaml tools: add and use a Getopt module
...; +#include <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; +...