[vte] regex: Move some shared code to vte_terminal_match_check_internal
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] regex: Move some shared code to vte_terminal_match_check_internal
- Date: Sun, 4 Oct 2015 20:53:49 +0000 (UTC)
commit 4fb5732547c8b618e57d59b505300d076f54c6a9
Author: Christian Persch <chpe gnome org>
Date: Sun Oct 4 22:45:02 2015 +0200
regex: Move some shared code to vte_terminal_match_check_internal
Initialising the out params can be done in the main function.
src/vte.cc | 28 ++++++++++------------------
1 files changed, 10 insertions(+), 18 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 34301ec..5f8fa42 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -1631,15 +1631,6 @@ vte_terminal_match_check_internal_pcre(VteTerminal *terminal,
"Checking for pcre match at (%ld,%ld).\n", row, column);
/* Identical with vte_terminal_match_check_internal_gregex until END */
- if (tag != NULL) {
- *tag = -1;
- }
- if (start != NULL) {
- *start = 0;
- }
- if (end != NULL) {
- *end = 0;
- }
if (!match_rowcol_to_offset(terminal, column,row,
&offset, &sattr, &eattr))
@@ -1814,15 +1805,6 @@ vte_terminal_match_check_internal_gregex(VteTerminal *terminal,
"Checking for gregex match at (%ld,%ld).\n", row, column);
/* Identical with vte_terminal_match_check_internal_pcre until END */
- if (tag != NULL) {
- *tag = -1;
- }
- if (start != NULL) {
- *start = 0;
- }
- if (end != NULL) {
- *end = 0;
- }
if (!match_rowcol_to_offset(terminal, column,row,
&offset, &sattr, &eattr))
@@ -1957,6 +1939,16 @@ vte_terminal_match_check_internal(VteTerminal *terminal,
vte_terminal_match_contents_refresh(terminal);
}
+ if (tag != NULL) {
+ *tag = -1;
+ }
+ if (start != NULL) {
+ *start = 0;
+ }
+ if (end != NULL) {
+ *end = 0;
+ }
+
#ifdef WITH_PCRE2
if (G_LIKELY(pvt->match_regex_mode == VTE_REGEX_PCRE2))
return vte_terminal_match_check_internal_pcre(terminal, column, row, tag, start, end);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]