diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-09-14 19:00:01 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-09-14 19:00:01 +0200 |
commit | ab0d97147d8c19eabc41b11698dff13cd04d67ae (patch) | |
tree | b9f7cb00405b41fce77c5df3ac9a7ea0e2ebfc1c /src/Makefile.am | |
parent | 07d9cdfd3d1462f5f19cfa1422d9b5710c9e139d (diff) | |
download | sciteco-ab0d97147d8c19eabc41b11698dff13cd04d67ae.tar.gz |
imported Henry Spencer's regex implementation from Tcl
Source: github.com/garyhouston/hsrex
* This version should be a Thompson NFA, using backtracking only
for backreferences, so it should be much safer than PCRE (GRegex).
Search times should be linear and there should be no way to cause
stack overflows (unless we would generate backreferences).
* Importing the lib makes sure we don't add another compile-time
dependency. Also, we could implement our own regcomp() which
translates directly from TECO patterns.
* This is still WIP and currently only works with the ASCII version.
The widechar version does not define re_comp() and re_exec().
* Apparently we can't have an ASCII and widechar version at the same time,
so we must build two libtool libraries and somehow mangle the names.
* Ideally the widechar version will also work with UTF-8 strings.
* An alternative might be to import the Gnulib regex module.
How does it choose the encoding anyway?
* Or we could just use Oniguruma - but this would have to be a new
external library dependency.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 5b2572e..b850905 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -13,7 +13,7 @@ include $(top_srcdir)/contrib/scintilla.am # FIXME: Common flags should be in configure.ac AM_CFLAGS = -std=gnu11 -Wall -Wno-initializer-overrides -Wno-unused-value -AM_CPPFLAGS += -I$(top_srcdir)/contrib/rb3ptr +AM_CPPFLAGS += -I$(top_srcdir)/contrib/rb3ptr -I$(top_srcdir)/contrib/hsrex AM_LDFLAGS = if STATIC_EXECUTABLES @@ -57,7 +57,8 @@ libsciteco_base_la_SOURCES = main.c sciteco.h list.h \ # NOTE: We cannot link in Scintilla (static library) into # a libtool convenience library libsciteco_base_la_LIBADD = $(LIBSCITECO_INTERFACE) \ - $(top_builddir)/contrib/rb3ptr/librb3ptr.la + $(top_builddir)/contrib/rb3ptr/librb3ptr.la \ + $(top_builddir)/contrib/hsrex/libhswrex.la if REPLACE_MALLOC libsciteco_base_la_LIBADD += $(top_builddir)/contrib/dlmalloc/libdlmalloc.la endif |