[vte] all: Remove unused function argument



commit 194c691f73c0976e46dd79e778b435b4e1ac8047
Author: Christian Persch <chpe gnome org>
Date:   Wed Apr 23 19:21:05 2014 +0200

    all: Remove unused function argument
    
    The result isn't depending on the terminal anymore, so remove that arg.

 src/vte-private.h |    2 +-
 src/vte.c         |   12 +++++-------
 src/vteaccess.c   |   32 ++++++++++++++++----------------
 3 files changed, 22 insertions(+), 24 deletions(-)
---
diff --git a/src/vte-private.h b/src/vte-private.h
index db3ae03..901906d 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -486,7 +486,7 @@ gboolean _vte_terminal_size_to_grid_size(VteTerminal *terminal,
                                          long *cols,
                                          long *rows);
 
-gboolean _vte_terminal_is_word_char(VteTerminal *terminal, gunichar c);
+gboolean _vte_is_word_char(gunichar c) G_GNUC_CONST;
 
 G_END_DECLS
 
diff --git a/src/vte.c b/src/vte.c
index c0c5c27..9e2a342 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -5284,17 +5284,15 @@ vte_terminal_key_release(GtkWidget *widget, GdkEventKey *event)
 }
 
 /*
- * _vte_terminal_is_word_char:
- * @terminal: a #VteTerminal
+ * _vte_is_word_char:
  * @c: a candidate Unicode code point
  *
- * Checks if a particular character is considered to be part of a word or not,
- * based on the values last passed to vte_terminal_set_word_chars().
+ * Checks if a particular character is considered to be part of a word or not.
  *
  * Returns: %TRUE if the character is considered to be part of a word
  */
 gboolean
-_vte_terminal_is_word_char(VteTerminal *terminal, gunichar c)
+_vte_is_word_char(gunichar c)
 {
        return g_unichar_isgraph(c) &&
                (g_unichar_isalnum(c) ||
@@ -5310,7 +5308,7 @@ vte_same_class(VteTerminal *terminal, glong acol, glong arow,
        const VteCell *pcell = NULL;
        gboolean word_char;
        if ((pcell = vte_terminal_find_charcell(terminal, acol, arow)) != NULL && pcell->c != 0) {
-               word_char = _vte_terminal_is_word_char(terminal, _vte_unistr_get_base (pcell->c));
+               word_char = _vte_is_word_char(_vte_unistr_get_base (pcell->c));
 
                /* Lets not group non-wordchars together (bug #25290) */
                if (!word_char)
@@ -5320,7 +5318,7 @@ vte_same_class(VteTerminal *terminal, glong acol, glong arow,
                if (pcell == NULL || pcell->c == 0) {
                        return FALSE;
                }
-               if (word_char != _vte_terminal_is_word_char(terminal, _vte_unistr_get_base (pcell->c))) {
+               if (word_char != _vte_is_word_char(_vte_unistr_get_base (pcell->c))) {
                        return FALSE;
                }
                return TRUE;
diff --git a/src/vteaccess.c b/src/vteaccess.c
index 1c9603a..f7c1598 100644
--- a/src/vteaccess.c
+++ b/src/vteaccess.c
@@ -930,7 +930,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
                        /* Back up to the previous non-word-word transition. */
                        while (offset > 0) {
                                prev = vte_terminal_accessible_get_character_at_offset(text, offset - 1);
-                               if (_vte_terminal_is_word_char(terminal, prev)) {
+                               if (_vte_is_word_char(prev)) {
                                        offset--;
                                } else {
                                        break;
@@ -944,7 +944,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
                        if (direction == direction_previous) {
                                while (offset > 0) {
                                        prev = vte_terminal_accessible_get_character_at_offset(text, offset - 
1);
-                                       if (!_vte_terminal_is_word_char(terminal, prev)) {
+                                       if (!_vte_is_word_char(prev)) {
                                                offset--;
                                        } else {
                                                break;
@@ -952,7 +952,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
                                }
                                while (offset > 0) {
                                        prev = vte_terminal_accessible_get_character_at_offset(text, offset - 
1);
-                                       if (_vte_terminal_is_word_char(terminal, prev)) {
+                                       if (_vte_is_word_char(prev)) {
                                                offset--;
                                        } else {
                                                break;
@@ -967,7 +967,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
                        if (direction == direction_next) {
                                while (offset < (int) priv->snapshot_characters->len) {
                                        next = vte_terminal_accessible_get_character_at_offset(text, offset);
-                                       if (_vte_terminal_is_word_char(terminal, next)) {
+                                       if (_vte_is_word_char(next)) {
                                                offset++;
                                        } else {
                                                break;
@@ -975,7 +975,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
                                }
                                while (offset < (int) priv->snapshot_characters->len) {
                                        next = vte_terminal_accessible_get_character_at_offset(text, offset);
-                                       if (!_vte_terminal_is_word_char(terminal, next)) {
+                                       if (!_vte_is_word_char(next)) {
                                                offset++;
                                        } else {
                                                break;
@@ -986,7 +986,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
                        /* Now find the end of this word. */
                        while (offset < (int) priv->snapshot_characters->len) {
                                current = vte_terminal_accessible_get_character_at_offset(text, offset);
-                               if (_vte_terminal_is_word_char(terminal, current)) {
+                               if (_vte_is_word_char(current)) {
                                        offset++;
                                } else {
                                        break;
@@ -996,7 +996,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
                        /* Now find the next non-word-word transition */
                        while (offset < (int) priv->snapshot_characters->len) {
                                next = vte_terminal_accessible_get_character_at_offset(text, offset);
-                               if (!_vte_terminal_is_word_char(terminal, next)) {
+                               if (!_vte_is_word_char(next)) {
                                        offset++;
                                } else {
                                        break;
@@ -1009,8 +1009,8 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
                        current = vte_terminal_accessible_get_character_at_offset(text, offset);
                        while (offset > 0) {
                                prev = vte_terminal_accessible_get_character_at_offset(text, offset - 1);
-                               if (_vte_terminal_is_word_char(terminal, prev) &&
-                                   !_vte_terminal_is_word_char(terminal, current)) {
+                               if (_vte_is_word_char(prev) &&
+                                   !_vte_is_word_char(current)) {
                                        break;
                                } else {
                                        offset--;
@@ -1025,7 +1025,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
                        if (direction == direction_previous) {
                                while (offset > 0) {
                                        prev = vte_terminal_accessible_get_character_at_offset(text, offset - 
1);
-                                       if (_vte_terminal_is_word_char(terminal, prev)) {
+                                       if (_vte_is_word_char(prev)) {
                                                offset--;
                                        } else {
                                                break;
@@ -1034,8 +1034,8 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
                                current = vte_terminal_accessible_get_character_at_offset(text, offset);
                                while (offset > 0) {
                                        prev = vte_terminal_accessible_get_character_at_offset(text, offset - 
1);
-                                       if (_vte_terminal_is_word_char(terminal, prev) &&
-                                           !_vte_terminal_is_word_char(terminal, current)) {
+                                       if (_vte_is_word_char(prev) &&
+                                           !_vte_is_word_char(current)) {
                                                break;
                                        } else {
                                                offset--;
@@ -1051,7 +1051,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
                        if (direction == direction_next) {
                                while (offset < (int) priv->snapshot_characters->len) {
                                        current = vte_terminal_accessible_get_character_at_offset(text, 
offset);
-                                       if (!_vte_terminal_is_word_char(terminal, current)) {
+                                       if (!_vte_is_word_char(current)) {
                                                offset++;
                                        } else {
                                                break;
@@ -1059,7 +1059,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
                                }
                                while (offset < (int) priv->snapshot_characters->len) {
                                        current = vte_terminal_accessible_get_character_at_offset(text, 
offset);
-                                       if (_vte_terminal_is_word_char(terminal, current)) {
+                                       if (_vte_is_word_char(current)) {
                                                offset++;
                                        } else {
                                                break;
@@ -1070,7 +1070,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
                        /* Now find the next word end. */
                        while (offset < (int) priv->snapshot_characters->len) {
                                current = vte_terminal_accessible_get_character_at_offset(text, offset);
-                               if (!_vte_terminal_is_word_char(terminal, current)) {
+                               if (!_vte_is_word_char(current)) {
                                        offset++;
                                } else {
                                        break;
@@ -1078,7 +1078,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
                        }
                        while (offset < (int) priv->snapshot_characters->len) {
                                current = vte_terminal_accessible_get_character_at_offset(text, offset);
-                               if (_vte_terminal_is_word_char(terminal, current)) {
+                               if (_vte_is_word_char(current)) {
                                        offset++;
                                } else {
                                        break;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]