Incorporate miniexpect with
<
https://github.com/rwmjones/miniexpect/pull/1> applied, so we can build
virt-p2v with "-Wall -Wextra -Wshadow" later.
Signed-off-by: Laszlo Ersek <lersek(a)redhat.com>
---
miniexpect/miniexpect.c | 2 +-
miniexpect/README | 23 ++++++++++++--------
2 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/miniexpect/miniexpect.c b/miniexpect/miniexpect.c
index 77d781c0be9f..85335147034b 100644
--- a/miniexpect/miniexpect.c
+++ b/miniexpect/miniexpect.c
@@ -356,7 +356,7 @@ mexp_expect (mexp_h *h, const mexp_regexp *regexps,
if (match_data)
ovector = pcre2_get_ovector_pointer (match_data);
- if (ovector != NULL && ovector[1] >= 0)
+ if (ovector != NULL && ovector[1] != ~(PCRE2_SIZE)0)
h->next_match = ovector[1];
else
h->next_match = -1;
diff --git a/miniexpect/README b/miniexpect/README
index 828c449d5f33..030d26570f41 100644
--- a/miniexpect/README
+++ b/miniexpect/README
@@ -1,14 +1,19 @@
-miniexpect is a very simple expect-like library for C.
+Miniexpect is a very simple expect-like library
-It has a saner interface than libexpect, and doesn't depend on Tcl.
-It is also thread safe, const-correct and uses modern C standards.
+Expect (
https://core.tcl-lang.org/expect/index) is a venerable Tcl
+program for automating interactive services, often for automating
+logins over telnet, ftp, ssh, etc.
-It is standalone, except that it requires the PCRE2 (Perl Compatible
-Regular Expressions) library from
http://www.pcre.org/. The PCRE2
-dependency is fundamental because we want to offer the most powerful
-regular expression syntax to match on, but more importantly because
-PCRE2 has a convenient way to detect partial matches which made this
-library very simple to implement.
+Miniexpect is a C library which has a saner interface than libexpect,
+and doesn't depend on Tcl. It is also thread safe, const-correct and
+uses modern C standards.
+
+Miniexpect is standalone, except that it requires the PCRE2 (Perl
+Compatible Regular Expressions) library from
http://www.pcre.org/.
+The PCRE2 dependency is fundamental because we want to offer the most
+powerful regular expression syntax to match on, but more importantly
+because PCRE2 has a convenient way to detect partial matches which
+made miniexpect very simple to implement.
License
-------