search for: mlpcre

Displaying 20 results from an estimated 82 matches for "mlpcre".

2017 Sep 20
4
[PATCH 0/4] Replace some uses of the Str module with PCRE.
Str is a pretty ugly regexp module. Let's try to replace it with PCRE. This series of commits goes some small way towards that eventual goal. - - - I wonder if there was a deep reason why we had this? let unix2dos s = String.concat "\r\n" (Str.split_delim (Str.regexp_string "\n") s) I replaced it with what I think should be (nearly) equivalent: let unix2dos s =
2019 Mar 29
0
[PATCH v2 1/3] common/mlpcre: add offset flag for PCRE.matches
This way it is possible to change where the matching start, instead of always assuming it is the beginning. --- common/mlpcre/PCRE.ml | 2 +- common/mlpcre/PCRE.mli | 5 ++++- common/mlpcre/pcre-c.c | 16 +++++++++++++--- common/mlpcre/pcre_tests.ml | 11 ++++++++--- 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/common/mlpcre/PCRE.ml b/common/mlpcre/PCRE.ml index b054928f9..33074af1c 10...
2017 Sep 22
0
[PATCH v3 02/22] common/mlpcre: Add PCRE.subi to return indexes instead of the substring.
--- common/mlpcre/PCRE.ml | 3 +-- common/mlpcre/PCRE.mli | 14 ++++++++++++++ common/mlpcre/pcre-c.c | 27 +++++++++++++++++++++++++++ common/mlpcre/pcre_tests.ml | 19 ++++++++++++++++--- 4 files changed, 58 insertions(+), 5 deletions(-) diff --git a/common/mlpcre/PCRE.ml b/common/mlpcre/PCRE.ml...
2019 Feb 25
0
[PATCH 1/3] common/mlpcre: add offset flag for PCRE.matches
This way it is possible to change where the matching start, instead of always assuming it is the beginning. --- common/mlpcre/PCRE.ml | 2 +- common/mlpcre/PCRE.mli | 5 ++++- common/mlpcre/pcre-c.c | 16 +++++++++++++--- common/mlpcre/pcre_tests.ml | 15 ++++++++++++--- 4 files changed, 30 insertions(+), 8 deletions(-) diff --git a/common/mlpcre/PCRE.ml b/common/mlpcre/PCRE.ml index b054928f9..33074af1...
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
2017 Sep 22
0
[PATCH v3 01/22] common/mlpcre: Raise Invalid_argument if PCRE.sub n parameter is negative.
--- common/mlpcre/pcre-c.c | 7 +++++-- common/mlpcre/pcre_tests.ml | 7 +++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/common/mlpcre/pcre-c.c b/common/mlpcre/pcre-c.c index 6fae0e6f4..da9b50d34 100644 --- a/common/mlpcre/pcre-c.c +++ b/common/mlpcre/pcre-c.c @@ -201,6 +201,7 @@ value...
2018 Apr 27
1
[PATCH] common/mlpcre: fix access to freed memory
free_last_match() frees the memory of the match passed as argument, so accessing it is not possible after free_last_match(). Since all we need is the return code, save it locally for later usage. --- common/mlpcre/pcre-c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/mlpcre/pcre-c.c b/common/mlpcre/pcre-c.c index da982025f..0762a8341 100644 --- a/common/mlpcre/pcre-c.c +++ b/common/mlpcre/pcre-c.c @@ -207,8 +207,9 @@ guestfs_int_pcre_matches (value rev, value strv) m->...
2017 Sep 26
5
[PATCH 0/5] Miscellaneous refactoring of common/utils, create common/mltools
Miscellaneous refactoring, but the main one is to rename mllib/ as common/mltools/ Rich.
2019 Sep 05
2
[PATCH 0/1] Build fix for future OCaml 4.09
...upcoming OCaml 4.09, which has a slight API change in the C library. This does not cover embedded copies such as ocaml-augeas, and ocaml-libvirt, which are being fixed separately, and will then be synchronized. Pino Toscano (1): ocaml: make const the return value of caml_named_value() common/mlpcre/pcre-c.c | 2 +- common/mltools/uri-c.c | 2 +- common/mlvisit/visit-c.c | 2 +- generator/daemon.ml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) -- 2.21.0
2019 Mar 29
5
[PATCH v2 0/3] v2v: add -o json output mode
...te the disks, with %{...}-like variables (only 3 added ATM, more can be added) to change their paths depending on data of the guest/disks. Changes from v1: - remove extra code for optional named parameters in pcre_tests.ml - allow %-escaping of variables in Var_expander Pino Toscano (3): common/mlpcre: add offset flag for PCRE.matches v2v: add Var_expander v2v: add -o json output mode .gitignore | 1 + common/mlpcre/PCRE.ml | 2 +- common/mlpcre/PCRE.mli | 5 +- common/mlpcre/pcre-c.c | 16 +- common/mlpcre/pcre_tests.ml | 11 +- v2v/Makef...
2017 Oct 09
1
[PATCH] Fully initialize the custom_operations structs
...compare_ext_default for the compare_ext field. According to the git logs, this was introduced in OCaml 3.12.1, which is earlier than out minimum required version. mlaugeas is not touched by this change, since it is a copy of a 3rd party library (and thus it will be fixed there first). --- common/mlpcre/pcre-c.c | 3 ++- common/mlprogress/progress-c.c | 3 ++- common/mlxml/xml-c.c | 9 ++++++--- ocaml/guestfs-c.c | 3 ++- v2v/qemuopts-c.c | 3 ++- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/common/mlpcre/pcre-c.c b/common/mlpcre/pcre...
2019 Sep 05
1
[PATCH] ocaml: Change calls to caml_named_value() to cope with const value* return.
In OCaml >= 4.09 the return value pointer of caml_named_value is declared const. Based on Pino Toscano's original patch to ocaml-augeas. --- common/mlpcre/pcre-c.c | 3 +-- common/mltools/uri-c.c | 6 ++---- common/mlvisit/visit-c.c | 4 +--- generator/daemon.ml | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/common/mlpcre/pcre-c.c b/common/mlpcre/pcre-c.c index be054a004..d23f17e05 100644 --- a/common/mlpcre/pcre-c.c...
2017 Aug 01
0
[PATCH 2/2] builder: Replace small usage of Str with new PCRE module.
...ilder/Makefile.am b/builder/Makefile.am index e64c8991f..1b51376be 100644 --- a/builder/Makefile.am +++ b/builder/Makefile.am @@ -126,6 +126,7 @@ OCAMLPACKAGES = \ -I $(top_builddir)/ocaml \ -I $(top_builddir)/common/mlstdutils \ -I $(top_builddir)/common/mlutils \ + -I $(top_builddir)/common/mlpcre \ -I $(top_builddir)/mllib \ -I $(top_builddir)/customize OCAMLPACKAGES_TESTS = @@ -156,6 +157,7 @@ OBJECTS = $(XOBJECTS) endif OCAMLLINKFLAGS = \ + mlpcre.$(MLARCHIVE) \ mlstdutils.$(MLARCHIVE) \ mlguestfs.$(MLARCHIVE) \ mlcutils.$(MLARCHIVE) \ @@ -165,6 +167,7 @@ OCAMLLINKFLAGS = \...
2019 May 28
1
[PATCH] build: build C sources using OCaml API with CAML_NAME_SPACE
...symbols are used, reducing the risk of clashes with other code. The only exception is ocaml-augeas, which does not build with CAML_NAME_SPACE; it will be fixed upstream, and it affects only ocaml-augeas itself. --- builder/Makefile.am | 2 ++ common/mllibvirt/Makefile.am | 1 + common/mlpcre/Makefile.am | 1 + common/mlprogress/Makefile.am | 1 + common/mltools/Makefile.am | 1 + common/mlutils/Makefile.am | 1 + common/mlvisit/Makefile.am | 1 + common/mlxml/Makefile.am | 1 + customize/Makefile.am | 1 + daemon/Makefile.am | 2 ++ ocaml/Makefile.a...
2019 Feb 25
7
[PATCH 0/3] RFC: v2v: add -o json output mode
...o unsupported destinations, still based on QEMU/KVM. In addition to a simple different metadata, it offers a way to relocate the disks, with %{...}-like variables (only 3 added ATM, more can be added) to change their paths depending on data of the guest/disks. Thanks, Pino Toscano (3): common/mlpcre: add offset flag for PCRE.matches v2v: add Var_expander v2v: add -o json output mode .gitignore | 1 + common/mlpcre/PCRE.ml | 2 +- common/mlpcre/PCRE.mli | 5 +- common/mlpcre/pcre-c.c | 16 +- common/mlpcre/pcre_tests.ml | 15 +- v2v/Makef...
2018 Apr 09
2
[PATCH] Fix out-of-tree builds of OCaml components
- Add $(srcdir), $(builddir) to Makefiles where required - Post-process ocamldep output - generate ocaml/.depends --- builder/Makefile.am | 7 ++++--- common/mlgettext/Makefile.am | 2 +- common/mlpcre/Makefile.am | 2 +- common/mlprogress/Makefile.am | 2 +- common/mlstdutils/Makefile.am | 2 +- common/mltools/Makefile.am | 2 +- common/mlutils/Makefile.am | 2 +- common/mlvisit/Makefile.am | 2 +- common/mlxml/Makefile.am | 2 +- customize/Makefile.am | 2 +- d...
2019 Sep 05
0
[PATCH 1/1] ocaml: make const the return value of caml_named_value()
With OCaml >= 4.09 caml_named_value() returns a const value *, so keep the constness to build also in this case. --- common/mlpcre/pcre-c.c | 2 +- common/mltools/uri-c.c | 2 +- common/mlvisit/visit-c.c | 2 +- generator/daemon.ml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/mlpcre/pcre-c.c b/common/mlpcre/pcre-c.c index be054a004..62a6dd5da 100644 --- a/common/mlpcre/pcre-c.c +++ b/c...
2017 Aug 01
7
[PATCH 0/2] Add lightweight bindings for PCRE.
We'd like to use PCRE instead of the awful Str module. However I don't necessarily want to pull in the extra dependency of ocaml-pcre, and in any case ocaml-pcre is rather difficult to use. This introduces very simplified and lightweight bindings for PCRE. They work rather like Str in that there is some global state (actually thread-local in this implementation) between the matching and
2017 Aug 01
0
[PATCH v2 3/3] daemon: Restore PCRE regular expressions in OCaml code.
...on/Makefile.am index 1f7cb2277..fc1389f67 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -187,7 +187,8 @@ guestfsd_LDFLAGS = \ -L$(shell $(OCAMLC) -where) \ -L$(shell $(OCAMLC) -where)/hivex \ -L../common/mlutils \ - -L../common/mlstdutils + -L../common/mlstdutils \ + -L../common/mlpcre guestfsd_LDADD = \ ../common/errnostring/liberrnostring.la \ ../common/protocol/libprotocol.la \ @@ -293,7 +294,9 @@ OCAMLPACKAGES = \ -package str,unix,hivex \ -I $(top_srcdir)/common/mlstdutils \ -I $(top_srcdir)/common/mlutils \ - -I $(top_builddir)/common/utils/.libs + -I $(top_build...