search for: float_of_string

Displaying 10 results from an estimated 10 matches for "float_of_string".

2017 Sep 21
18
[PATCH v2 00/18] Replace many more uses of the Str module with PCRE.
v1 was here: https://www.redhat.com/archives/libguestfs/2017-September/msg00135.html This is a more complete evolution of the earlier patch. It replaces most important uses of Str with PCRE throughout the code. It also extends the bindings with some useful features like case-insensitive regexps. The main places I *didn't* touch are the generator (GObject uses Str extensively); and
2017 Sep 22
27
[PATCH v3 00/22] Replace almost all uses of the Str module with PCRE.
v1: https://www.redhat.com/archives/libguestfs/2017-September/msg00135.html v2: https://www.redhat.com/archives/libguestfs/2017-September/msg00158.html v3 is almost identical to v2, but I have added 4 extra commits to almost finish the job of replacing Str everywhere possible (note it's not possible to replace Str in common/mlstdutils or the generator because those are pure OCaml). As
2007 Nov 25
0
[LLVMdev] OCaml
> On Sunday 25 November 2007 03:42, Christopher Lamb wrote: >> Try this google query. I know there's been some discussion/work on >> OCaml and LLVM. >> >> site:lists.cs.uiuc.edu/pipermail/llvmdev OCaml interface > > I just rediscovered the OCaml bindings in bindings/ocaml (rather than the > ones > in test/Bindings/OCaml!). They do indeed look quite
2007 Nov 25
2
[LLVMdev] OCaml
On Sunday 25 November 2007 03:42, Christopher Lamb wrote: > Try this google query. I know there's been some discussion/work on > OCaml and LLVM. > > site:lists.cs.uiuc.edu/pipermail/llvmdev OCaml interface I just rediscovered the OCaml bindings in bindings/ocaml (rather than the ones in test/Bindings/OCaml!). They do indeed look quite complete but I can't find any examples
2007 Nov 25
2
[LLVMdev] OCaml
...expr; ")" -> e ] | [ f = STRING; "("; args = LIST0 expr; ")" -> Call(f, args) ] | [ "def"; f = STRING; "("; vars = LIST0 [ s = STRING -> s ]; ")"; body = expr -> Function(f, vars, body) ] | [ x = FLOAT -> Num(float_of_string x) ] | [ v = LIDENT -> Var v ] ]; END;; Probably better to use conventional lex and yacc though... -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e
2015 Jul 13
2
[PATCH 1/2] utils: import parse_size from libguestfs
...f_float f + | "K" -> Int64.of_float (f *. 1024.) + | "M" -> Int64.of_float (f *. 1024. *. 1024.) + | "G" -> Int64.of_float (f *. 1024. *. 1024. *. 1024.) + | _ -> assert false + in + + if matches const_re then ( + size_scaled (float_of_string (sub 1)) (sub 2) + ) else ( + eprintf "supermin: cannot parse size field '%s'\n" field; + exit 1 + ) diff --git a/src/utils.mli b/src/utils.mli index 5de940d..7896e34 100644 --- a/src/utils.mli +++ b/src/utils.mli @@ -90,3 +90,6 @@ val compare_version : string -&gt...
2016 Feb 18
0
[PATCH 3/3] Add and use an helper error function
...a; - exit 1 + error "missing support for architecture '%s'\nIt may need to be added to supermin." + a in compare (index_of_architecture a1) (index_of_architecture a2) @@ -213,6 +214,5 @@ let parse_size = if matches const_re then ( size_scaled (float_of_string (sub 1)) (sub 2) ) else ( - eprintf "supermin: cannot parse size field '%s'\n" field; - exit 1 + error "cannot parse size field '%s'" field ) diff --git a/src/utils.mli b/src/utils.mli index 1a7687a..c5e931b 100644 --- a/src/utils.mli +++...
2016 Feb 18
4
[PATCH 0/3] supermin: miscellaneous cleanups
Hi, few cleanups in the supermin codebase; no actual functional change. Thanks, -- Pino Toscano (3): ext2: simplify tracking of visited modules utils: remove unused run_python function Add and use an helper error function src/build.ml | 20 +++++----------- src/dpkg.ml | 4 +--- src/ext2_initrd.ml | 10 ++++---- src/kernel.ml | 27
2015 May 15
5
[PATCH 0/4] Only tell people to use -v -x when reporting bugs if they're not using those flags.
.. and a lot of refactoring. https://bugzilla.redhat.com/show_bug.cgi?id=1167623 Rich.
2015 May 15
6
[PATCH v2 0/4] Only tell people to use -v -x when reporting bugs if they're not using those flags.
https://bugzilla.redhat.com/show_bug.cgi?id=1167623