Displaying 20 results from an estimated 2000 matches similar to: "[PATCH] mllib: Add String.map function for OCaml < 4.00.0."
2015 Oct 06
0
[PATCH 3/5] mllib: Add (Char|String).(lower|upper)case_ascii functions.
These functions come from upstream OCaml (4.03) where they were
written by Gabriel Scherer under a compatible license.
See also:
http://caml.inria.fr/mantis/view.php?id=6694
http://caml.inria.fr/mantis/view.php?id=6695
---
mllib/common_utils.ml | 13 +++++++++++++
mllib/common_utils.mli | 6 ++++++
v2v/convert_windows.ml | 3 ++-
v2v/utils.ml | 6 +++---
4 files changed, 24
2015 Oct 07
1
Re: [PATCH 3/5] mllib: Add (Char|String).(lower|upper)case_ascii functions.
On Tuesday 06 October 2015 13:30:48 Richard W.M. Jones wrote:
> These functions come from upstream OCaml (4.03) where they were
> written by Gabriel Scherer under a compatible license.
>
> See also:
> http://caml.inria.fr/mantis/view.php?id=6694
> http://caml.inria.fr/mantis/view.php?id=6695
> ---
> mllib/common_utils.ml | 13 +++++++++++++
> mllib/common_utils.mli |
2017 Jun 15
0
[PATCH v6 04/41] mllib: Split ‘Common_utils’ into ‘Std_utils’ + ‘Common_utils’.
The new module ‘Std_utils’ contains only functions which are pure
OCaml and depend only on the OCaml stdlib. Therefore these functions
may be used by the generator.
The new module is moved to ‘common/mlstdutils’.
This also removes the "<stdlib>" hack, and the code which copied the
library around.
Also ‘Guestfs_config’, ‘Libdir’ and ‘StringMap’ modules are moved
since these are
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
For a very long time we have maintained two sets of utility functions,
in mllib/common_utils.ml and generator/utils.ml. This changes things
so that the same set of utility functions can be shared with both
directories.
It's not possible to use common_utils.ml directly in the generator
because it provides several functions that use modules outside the
OCaml stdlib. Therefore we add some
2016 Aug 25
1
[PATCH 1.32] mllib: Add String.map function for OCaml < 4.00.0.
Same patch as just posted, but this is the modified version
required for the stable-1.32 branch.
Rich.
2016 Dec 09
0
Re: [PATCH] generator: Share Common_utils code.
On Thursday, 8 December 2016 10:36:45 CET Richard W.M. Jones wrote:
> For a very long time we have maintained two sets of utility functions,
> in mllib/common_utils.ml and generator/utils.ml. This changes things
> so that the same set of utility functions can be shared with both
> directories.
>
> It's not possible to use common_utils.ml directly in the generator
>
2016 Sep 19
0
[PATCH 2/3] mllib: expose disk decrypt functionalities
Expose via Common_utils the C functions & variables (part of guestfish)
that handle decryption of LUKS partitions, and the additional command
line arguments to tune the way they work. This way it will be easy to
provide (basic) crypto support also in OCaml-based tools.
Related to: RHBZ#1362649
---
mllib/Makefile.am | 3 ++
mllib/common_utils-c.c | 75
2015 Oct 06
0
[PATCH 5/5] mllib: Replace various ad hoc string_* functions with String.*
This is just a straight refactoring. Various ad hoc string_*
functions that appeared in Common_utils have been renamed and placed
in the String.* namespace. The old vs "new" functions are:
string_prefix -> String.is_prefix
string_suffix -> String.is_suffix
string_find -> String.find
replace_str -> String.replace
string_nsplit -> String.nsplit
string_split
2016 Aug 23
1
[PATCH] mllib: do not assume $PATH is set
Make 'which' gracefully handle the case where $PATH is not set
(it will raise Executable_not_found, but that is the expected thing to
do).
Related to RHBZ#1367839.
---
mllib/common_utils.ml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index fdca713..9210cf8 100644
--- a/mllib/common_utils.ml
+++
2016 Aug 02
2
[PATCH] mllib: move which and its exception from dib
Rename it from "tool" to "executable" in the process, but otherwise
it is just code motion (with minimal adjustments in dib).
---
dib/dib.ml | 2 +-
dib/utils.ml | 16 +---------------
mllib/common_utils.ml | 14 ++++++++++++++
mllib/common_utils.mli | 9 +++++++++
4 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/dib/dib.ml b/dib/dib.ml
2015 Oct 06
10
[PATCH 0/5] mllib: Hide bad String functions and miscellaneous refactoring.
Hide/prevent the use of bad string functions like String.lowercase.
These are replaced by safe functions that won't break UTF-8 strings.
Other miscellaneous refactoring.
Rich.
2017 Apr 12
1
[PATCH] mllib: Bind %identity C primitive to Common_utils.identity.
---
mllib/common_utils.ml | 2 ++
mllib/common_utils.mli | 2 ++
mllib/xpath_helpers.ml | 2 --
v2v/input_vmx.ml | 2 --
v2v/v2v_unit_tests.ml | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 63d8dd92e..6a9b08973 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -282,6 +282,8 @@ let ( /^ ) =
2016 May 23
0
[PATCH 4/5] mllib: move stringify_args from dib
Move the make_dib_args helper function to Common_utils as
stringify_args, so it can be used also within Common_utils itself.
This is mostly code motion.
---
dib/dib.ml | 12 +-----------
mllib/common_utils.ml | 10 ++++++++++
mllib/common_utils.mli | 4 ++++
3 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/dib/dib.ml b/dib/dib.ml
index b988f14..a76eb5e 100644
---
2017 Mar 07
0
[PATCH v4 8/9] mllib: add do_mv helper function to Common_utils
---
mllib/common_utils.ml | 6 ++++++
mllib/common_utils.mli | 5 ++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 945728b5e..7932707c9 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -1172,3 +1172,9 @@ let do_cp src destdir =
let cmd = [ "cp"; "-t"; destdir; "-a"; src ] in
2017 Mar 23
0
[PATCH v5 08/10] mllib: add do_mv helper function to Common_utils
---
mllib/common_utils.ml | 6 ++++++
mllib/common_utils.mli | 3 +++
2 files changed, 9 insertions(+)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 945728b5e..7932707c9 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -1172,3 +1172,9 @@ let do_cp src destdir =
let cmd = [ "cp"; "-t"; destdir; "-a"; src ] in
if run_command
2017 Apr 12
0
[PATCH v6 08/10] mllib: add do_mv helper function to Common_utils
---
mllib/common_utils.ml | 6 ++++++
mllib/common_utils.mli | 3 +++
2 files changed, 9 insertions(+)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index ceac57711..5cc865659 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -1191,3 +1191,9 @@ let do_cp src destdir =
let cmd = [ "cp"; "-t"; destdir; "-a"; src ] in
if run_command
2017 Sep 12
0
[PATCH v8 5/7] mllib: add do_mv helper function to Common_utils
---
mllib/common_utils.ml | 6 ++++++
mllib/common_utils.mli | 3 +++
2 files changed, 9 insertions(+)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 597128967..1126f233b 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -561,3 +561,9 @@ let inspect_decrypt g =
* function.
*)
c_inspect_decrypt g#ocaml_handle (Guestfs.c_pointer g#ocaml_handle)
+
+let
2016 Jun 15
3
[PATCH 2/3] Convert source so it can be compiled with OCaml '-safe-string' option.
OCaml 4.02 introduced the 'bytes' type, a mutable string intended to
replace the existing 'string' type for those cases where the byte
array can be mutated. In future the 'string' type will become
immutable. This is not the default now, but it can be forced using
the '-safe-string' compile option.
I tested this on Fedora 24 (OCaml 4.02) & RHEL 7 (OCaml 4.01).
2016 Jun 16
1
[PATCH] mllib: Add isspace, triml, trimr and trim functions.
---
mllib/common_utils.ml | 29 +++++++++++++++++++++++++++++
mllib/common_utils.mli | 8 ++++++++
2 files changed, 37 insertions(+)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 64bf3d3..34e1285 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -49,6 +49,35 @@ module String = struct
and len = length str in
len >= sufflen && sub str
2015 Jul 17
0
[PATCH 1/2] mllib: add and use read_first_line_from_file
Move the read_password_from_file helper in Password to mllib with a more
generic name, and use it in place of the former.
Also, use it in v2v instead of reading the whole file contaning a
password: given that the documentation says that the whole content is
used, there will not be newlines in the password file, so the behaviour
will be preserved. The oly difference is that newline is no more an