summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Persch <chpe@gnome.org>2016-02-13 13:33:18 +0100
committerChristian Persch <chpe@gnome.org>2016-02-13 13:33:18 +0100
commitce94be5ea7f68be90849a1147e13747227adf5ee (patch)
tree77b5e0dda35faf9a7a94ae4df941b3a9dda5d7a0
parent1dea919b9aa4b55e2c5c07bf2022769cbac365b5 (diff)
downloadvte-ce94be5ea7f68be90849a1147e13747227adf5ee.tar.gz
regex: Disable PCRE2 for 0.44
I'm not really satisfied with the API, so let's not export this API for 0.44. This patch will be reverted as soon as we branch for vte-0-44.
-rw-r--r--configure.ac6
-rw-r--r--doc/reference/vte-docs.xml3
-rw-r--r--doc/reference/vte-sections.txt12
-rw-r--r--src/Makefile.am7
-rw-r--r--src/vte/vte.h1
-rw-r--r--src/vte/vtedeprecated.h25
-rw-r--r--src/vte/vteenums.h20
-rw-r--r--src/vte/vteterminal.h28
-rw-r--r--src/vteapp.c1
-rw-r--r--src/vtegtk.cc28
-rw-r--r--src/vteinternal.hh2
-rw-r--r--src/vteregexinternal.hh8
12 files changed, 52 insertions, 89 deletions
diff --git a/configure.ac b/configure.ac
index 5b97a71c..0ce1af94 100644
--- a/configure.ac
+++ b/configure.ac
@@ -234,11 +234,7 @@ AM_CONDITIONAL([WITH_GNUTLS],[test "$with_gnutls" = "yes"])
# PCRE2
-AC_MSG_CHECKING([whether PCRE2 support is requested])
-AC_ARG_WITH([pcre2],
- [AS_HELP_STRING([--without-pcre2],[Disable pcre2 support])],
- [],[with_pcre2=yes])
-AC_MSG_RESULT([$with_pcre2])
+with_pcre2=no
PCRE2_PKGS=
if test "$with_pcre2" = "yes"; then
diff --git a/doc/reference/vte-docs.xml b/doc/reference/vte-docs.xml
index 0bf076e6..49f77977 100644
--- a/doc/reference/vte-docs.xml
+++ b/doc/reference/vte-docs.xml
@@ -63,9 +63,6 @@
<xi:include href="xml/vte-terminal.xml"/>
</chapter>
<chapter>
- <xi:include href="xml/vte-regex.xml"/>
- </chapter>
- <chapter>
<xi:include href="xml/vte-pty.xml"/>
</chapter>
<chapter>
diff --git a/doc/reference/vte-sections.txt b/doc/reference/vte-sections.txt
index 8fa4107f..5e65e5f8 100644
--- a/doc/reference/vte-sections.txt
+++ b/doc/reference/vte-sections.txt
@@ -54,7 +54,6 @@ vte_terminal_get_text
vte_terminal_get_text_include_trailing_spaces
vte_terminal_get_text_range
vte_terminal_get_cursor_position
-vte_terminal_match_add_regex
vte_terminal_match_remove
vte_terminal_match_remove_all
vte_terminal_match_check
@@ -70,11 +69,12 @@ vte_terminal_get_word_char_exceptions
vte_terminal_write_contents_sync
vte_terminal_search_find_next
vte_terminal_search_find_previous
-vte_terminal_search_get_regex
vte_terminal_search_get_wrap_around
-vte_terminal_search_set_regex
vte_terminal_search_set_wrap_around
-vte_terminal_event_check_regex_simple
+vte_terminal_match_add_gregex
+vte_terminal_search_get_gregex
+vte_terminal_search_set_gregex
+vte_terminal_event_check_gregex_simple
<SUBSECTION>
vte_get_user_shell
@@ -120,10 +120,6 @@ vte_terminal_get_current_file_uri
<SUBSECTION Deprecated>
vte_terminal_match_set_cursor
-vte_terminal_match_add_gregex
-vte_terminal_search_get_gregex
-vte_terminal_search_set_gregex
-vte_terminal_event_check_gregex_simple
<SUBSECTION Private>
VteCharAttributes
diff --git a/src/Makefile.am b/src/Makefile.am
index 8dcf1701..0b8b66a7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -16,7 +16,6 @@ header_HEADERS = \
vte/vteglobals.h \
vte/vtemacros.h \
vte/vtepty.h \
- vte/vteregex.h \
vte/vteterminal.h \
$(NULL)
@@ -303,9 +302,9 @@ vte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_LDADD = \
if HAVE_GTK_3_16
vte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_VALAFLAGS += -D GTK_3_16
endif
-if WITH_PCRE2
-vte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_VALAFLAGS += -D WITH_PCRE2
-endif
+#if WITH_PCRE2
+#vte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_VALAFLAGS += -D WITH_PCRE2
+#endif
CLEANFILES += \
app.c \
diff --git a/src/vte/vte.h b/src/vte/vte.h
index 85d267b7..f46ff9b6 100644
--- a/src/vte/vte.h
+++ b/src/vte/vte.h
@@ -26,7 +26,6 @@
#include "vteenums.h"
#include "vteglobals.h"
#include "vtepty.h"
-#include "vteregex.h"
#include "vteterminal.h"
#include "vtetypebuiltins.h"
#include "vteversion.h"
diff --git a/src/vte/vtedeprecated.h b/src/vte/vtedeprecated.h
index b3303e30..a67fb184 100644
--- a/src/vte/vtedeprecated.h
+++ b/src/vte/vtedeprecated.h
@@ -33,12 +33,6 @@ G_BEGIN_DECLS
_VTE_DEPRECATED
_VTE_PUBLIC
-int vte_terminal_match_add_gregex(VteTerminal *terminal,
- GRegex *gregex,
- GRegexMatchFlags gflags) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2);
-
-_VTE_DEPRECATED
-_VTE_PUBLIC
void vte_terminal_match_set_cursor(VteTerminal *terminal,
int tag,
GdkCursor *cursor) _VTE_GNUC_NONNULL(1);
@@ -51,25 +45,6 @@ char *vte_terminal_match_check(VteTerminal *terminal,
_VTE_DEPRECATED
_VTE_PUBLIC
-gboolean vte_terminal_event_check_gregex_simple(VteTerminal *terminal,
- GdkEvent *event,
- GRegex **regexes,
- gsize n_regexes,
- GRegexMatchFlags match_flags,
- char **matches) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2);
-
-_VTE_DEPRECATED
-_VTE_PUBLIC
-void vte_terminal_search_set_gregex (VteTerminal *terminal,
- GRegex *gregex,
- GRegexMatchFlags gflags) _VTE_GNUC_NONNULL(1);
-
-_VTE_DEPRECATED
-_VTE_PUBLIC
-GRegex *vte_terminal_search_get_gregex (VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
-
-_VTE_DEPRECATED
-_VTE_PUBLIC
void vte_pty_close (VtePty *pty) _VTE_GNUC_NONNULL(1);
G_END_DECLS
diff --git a/src/vte/vteenums.h b/src/vte/vteenums.h
index a0777bb2..ceb2486c 100644
--- a/src/vte/vteenums.h
+++ b/src/vte/vteenums.h
@@ -117,26 +117,6 @@ typedef enum {
VTE_WRITE_DEFAULT = 0
} VteWriteFlags;
-/**
- * VteRegexError:
- * @VTE_REGEX_ERROR_INCOMPATIBLE: The PCRE2 library was built without
- * Unicode support which is required for VTE
- * @VTE_REGEX_ERROR_NOT_SUPPORTED: Regexes are not supported because VTE was
- * built without PCRE2 support
- *
- * An enum type for regex errors. In addition to the values listed above,
- * any PCRE2 error values may occur.
- *
- * Since: 0.44
- */
-typedef enum {
- /* Negative values are PCRE2 errors */
-
- /* VTE specific values */
- VTE_REGEX_ERROR_INCOMPATIBLE = G_MAXINT-1,
- VTE_REGEX_ERROR_NOT_SUPPORTED = G_MAXINT
-} VteRegexError;
-
G_END_DECLS
#endif /* __VTE_VTE_ENUMS_H__ */
diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h
index c5b900e8..38ea8c3b 100644
--- a/src/vte/vteterminal.h
+++ b/src/vte/vteterminal.h
@@ -31,7 +31,6 @@
#include "vteenums.h"
#include "vtemacros.h"
#include "vtepty.h"
-#include "vteregex.h"
G_BEGIN_DECLS
@@ -338,9 +337,9 @@ void vte_terminal_get_cursor_position(VteTerminal *terminal,
/* Add a matching expression, returning the tag the widget assigns to that
* expression. */
_VTE_PUBLIC
-int vte_terminal_match_add_regex(VteTerminal *terminal,
- VteRegex *regex,
- guint32 flags) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2);
+int vte_terminal_match_add_gregex(VteTerminal *terminal,
+ GRegex *gregex,
+ GRegexMatchFlags gflags) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2);
/* Set the cursor to be used when the pointer is over a given match. */
_VTE_PUBLIC
void vte_terminal_match_set_cursor_type(VteTerminal *terminal,
@@ -364,19 +363,20 @@ char *vte_terminal_match_check_event(VteTerminal *terminal,
GdkEvent *event,
int *tag) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2) G_GNUC_MALLOC;
_VTE_PUBLIC
-gboolean vte_terminal_event_check_regex_simple(VteTerminal *terminal,
- GdkEvent *event,
- VteRegex **regexes,
- gsize n_regexes,
- guint32 match_flags,
- char **matches) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2);
+gboolean vte_terminal_event_check_gregex_simple(VteTerminal *terminal,
+ GdkEvent *event,
+ GRegex **regexes,
+ gsize n_regexes,
+ GRegexMatchFlags match_flags,
+ char **matches) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2);
_VTE_PUBLIC
-void vte_terminal_search_set_regex (VteTerminal *terminal,
- VteRegex *regex,
- guint32 flags) _VTE_GNUC_NONNULL(1);
+void vte_terminal_search_set_gregex (VteTerminal *terminal,
+ GRegex *gregex,
+ GRegexMatchFlags gflags) _VTE_GNUC_NONNULL(1);
_VTE_PUBLIC
-VteRegex *vte_terminal_search_get_regex (VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+GRegex *vte_terminal_search_get_gregex (VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+
_VTE_PUBLIC
void vte_terminal_search_set_wrap_around (VteTerminal *terminal,
gboolean wrap_around) _VTE_GNUC_NONNULL(1);
diff --git a/src/vteapp.c b/src/vteapp.c
index 580cbe9c..e82079ee 100644
--- a/src/vteapp.c
+++ b/src/vteapp.c
@@ -31,6 +31,7 @@
#include "debug.h"
#undef VTE_DISABLE_DEPRECATED
+#undef WITH_PCRE2
#include <vte/vte.h>
#ifdef WITH_PCRE2
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index 025bdd1e..566c74db 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -84,6 +84,25 @@ G_DEFINE_TYPE_WITH_CODE(VteTerminal, vte_terminal, GTK_TYPE_WIDGET,
#define IMPL(t) (reinterpret_cast<VteTerminalPrivate*>(vte_terminal_get_instance_private(t)))
+
+int vte_terminal_match_add_regex(VteTerminal *terminal,
+ VteRegex *regex,
+ guint32 flags);
+
+gboolean vte_terminal_event_check_regex_simple(VteTerminal *terminal,
+ GdkEvent *event,
+ VteRegex **regexes,
+ gsize n_regexes,
+ guint32 match_flags,
+ char **matches);
+
+void vte_terminal_search_set_regex (VteTerminal *terminal,
+ VteRegex *regex,
+ guint32 flags);
+
+VteRegex *vte_terminal_search_get_regex (VteTerminal *terminal);
+
+
guint signals[LAST_SIGNAL];
GParamSpec *pspecs[LAST_PROP];
GTimer *process_timer;
@@ -1677,8 +1696,6 @@ vte_terminal_paste_primary(VteTerminal *terminal)
*
* Returns: an integer associated with this expression, or -1 if @gregex could not be
* transformed into a #VteRegex or @flags were incompatible
- *
- * Deprecated: 0.44: Use vte_terminal_match_add_regex() or vte_terminal_match_add_regex_full() instead.
*/
int
vte_terminal_match_add_gregex(VteTerminal *terminal,
@@ -1850,9 +1867,6 @@ vte_terminal_event_check_regex_simple(VteTerminal *terminal,
* %NULL is stored there.
*
* Returns: %TRUE iff any of the regexes produced a match
- *
- * Since: 0.44
- * Deprecated: 0.44: Use vte_terminal_event_check_regex_simple() instead.
*/
gboolean
vte_terminal_event_check_gregex_simple(VteTerminal *terminal,
@@ -2038,8 +2052,6 @@ vte_terminal_search_get_regex(VteTerminal *terminal)
* @gflags: flags from #GRegexMatchFlags
*
* Sets the #GRegex regex to search for. Unsets the search regex when passed %NULL.
- *
- * Deprecated: 0.44: use vte_terminal_search_set_regex() instead.
*/
void
vte_terminal_search_set_gregex (VteTerminal *terminal,
@@ -2056,8 +2068,6 @@ vte_terminal_search_set_gregex (VteTerminal *terminal,
* @terminal: a #VteTerminal
*
* Returns: (transfer none): the search #GRegex regex set in @terminal, or %NULL
- *
- * Deprecated: 0.44: use vte_terminal_search_get_regex() instead.
*/
GRegex *
vte_terminal_search_get_gregex (VteTerminal *terminal)
diff --git a/src/vteinternal.hh b/src/vteinternal.hh
index 99da6d42..04edeeb8 100644
--- a/src/vteinternal.hh
+++ b/src/vteinternal.hh
@@ -31,6 +31,8 @@
#include "vteregexinternal.hh"
#endif
+#include "vteregex.h"
+
typedef enum {
VTE_REGEX_UNDECIDED,
VTE_REGEX_PCRE2,
diff --git a/src/vteregexinternal.hh b/src/vteregexinternal.hh
index b12d25aa..588f0b16 100644
--- a/src/vteregexinternal.hh
+++ b/src/vteregexinternal.hh
@@ -22,3 +22,11 @@ gboolean _vte_regex_get_jited(VteRegex *regex);
#ifdef WITH_PCRE2
const pcre2_code_8 *_vte_regex_get_pcre (VteRegex *regex);
#endif
+
+typedef enum {
+ /* Negative values are PCRE2 errors */
+
+ /* VTE specific values */
+ VTE_REGEX_ERROR_INCOMPATIBLE = G_MAXINT-1,
+ VTE_REGEX_ERROR_NOT_SUPPORTED = G_MAXINT
+} VteRegexError;