pcreregex instead of regex
A user suggested pcreregex instead of regex:
Index: urlview.c
--- urlview.c (revision 15) +++ urlview.c (working copy) @@ -42,7 +42,7 @@ #include <sys/stat.h>
#ifdef HAVE_REGEX_H -#include <regex.h> +#include <pcreposix.h> #else #include <rx/rxposix.h> #endif
see aso http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/182853
I has to be linked with
LDFLAGS+= -L${LOCALBASE}/lib -lpcreposix -lpcre
On FreeBSD it builds and works fine with this change, but I'm not sure you want to add it the code. What do you think?
This would be ok, but it should be enabled by the configure script, like configure --with-pcre, and the default should make urlview function the way it traditionally has, by using posix regex.
Would you please add mentioned functionality? PCRE is very useful when one wants to e.g. exclude some urls using zero-width look-ahead assertions - like "(?!pattern)" - from catching by urlview . Thanx in advance.
I've submitted a WIP PR for this https://github.com/sigpipe/urlview/pull/11
thanx