search for: 78618f5

Displaying 5 results from an estimated 5 matches for "78618f5".

2016 Dec 07
0
[PATCH v3 4/6] mllib: modify nsplit to take optional noempty and count arguments
...s do as many splits as possible Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com> --- mllib/common_utils.ml | 12 +++++++++--- mllib/common_utils.mli | 12 ++++++++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 78618f5..2d373f9 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -92,15 +92,21 @@ module String = struct s' ^ s2 ^ replace s'' s1 s2 ) - let rec nsplit sep str = + let rec nsplit ?(noempty = true) ?(count = -1) sep str = let len = length str in...
2016 Dec 09
0
Re: [PATCH] generator: Share Common_utils code.
...let text = replace_str text "<" "&lt;" in > - let text = replace_str text ">" "&gt;" in > - text Not a big deal, but could this be left here to reduce the diff? > diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml > index 78618f5..e1d1ab8 100644 > --- a/mllib/common_utils.ml > +++ b/mllib/common_utils.ml > @@ -16,7 +16,13 @@ > * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. > *) > > +(* The parts between <stdlib>..</stdlib> are copied into the > + * generator/common_ut...
2016 Sep 23
2
[PATCH 1/2] mllib: move remove_duplicates from v2v
Simple code motion. --- mllib/common_utils.ml | 9 +++++++++ mllib/common_utils.mli | 6 ++++++ v2v/utils.ml | 9 --------- v2v/utils.mli | 3 --- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 81d8202..78618f5 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -297,6 +297,15 @@ let sort_uniq ?(cmp = Pervasives.compare) xs = let xs = uniq ~cmp xs in xs +let remove_duplicates xs = + let h = Hashtbl.create (List.length xs) in + let rec loop = function + | [] -> [] + | x ::...
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
...reates a string of n spaces. *) - val args_of_optargs : Types.optargs -> Types.args (** Convert a list of optargs into an equivalent list of args *) - -val html_escape : string -> string -(** Escape a text for HTML display. *) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 78618f5..e1d1ab8 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -16,7 +16,13 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) +(* The parts between <stdlib>..</stdlib> are copied into the + * generator/common_utils.ml file. These parts must ONLY use...
2016 Dec 07
12
[PATCH v3 0/6] Import directly from OVA tar archive if possible
v3: Addressed Pino's comments, namely: - input_ova.ml - untar takes list of paths - renamed untar_partial to untar_metadata - replaced uggly regex with nsplit - tests - test changes are part of the main commit - renamed test-data/guestfs-hashsums.sh to test-data/test-utils.sh - renamed qemu_version to qemu_is_version and moved it to test-data/test-utils.sh - normalize paths