X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=miniexpect.h;h=2e9b534c95f9e43f522e13ef5809349cec4cf737;hb=fcf73607913050d246dbcc4f39e7717d0960763f;hp=14d8236507c969973bd45038609c2d220b93b4bd;hpb=eba90008396f05e2c0fa752421793b797383fca7;p=miniexpect.git diff --git a/miniexpect.h b/miniexpect.h index 14d8236..2e9b534 100644 --- a/miniexpect.h +++ b/miniexpect.h @@ -1,5 +1,5 @@ /* miniexpect - * Copyright (C) 2014 Red Hat Inc. + * Copyright (C) 2014-2022 Red Hat Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -32,7 +32,8 @@ #include #include -#include +#define PCRE2_CODE_UNIT_WIDTH 8 +#include /* This handle is created per subprocess that is spawned. */ struct mexp_h { @@ -84,8 +85,7 @@ extern int mexp_close (mexp_h *h); /* Expect. */ struct mexp_regexp { int r; - const pcre *re; - const pcre_extra *extra; + const pcre2_code *re; int options; }; typedef struct mexp_regexp mexp_regexp; @@ -98,7 +98,7 @@ enum mexp_status { }; extern int mexp_expect (mexp_h *h, const mexp_regexp *regexps, - int *ovector, int ovecsize); + pcre2_match_data *match_data); /* Sending commands, keypresses. */ extern int mexp_printf (mexp_h *h, const char *fs, ...)