texinfo-commits
[Top][All Lists]
Advanced

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

[7713] match_in_match_list use helper functions


From: gavinsmith0123
Subject: [7713] match_in_match_list use helper functions
Date: Sun, 9 Apr 2017 15:43:25 -0400 (EDT)

Revision: 7713
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7713
Author:   gavin
Date:     2017-04-09 15:43:24 -0400 (Sun, 09 Apr 2017)
Log Message:
-----------
match_in_match_list use helper functions

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/search.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2017-04-09 19:04:15 UTC (rev 7712)
+++ trunk/ChangeLog     2017-04-09 19:43:24 UTC (rev 7713)
@@ -1,5 +1,10 @@
 2017-04-09  Gavin Smith  <address@hidden>
 
+       * info/search.c (match_in_match_list): Use helper functions
+       at_end_of_matches and match_by_index.
+
+2017-04-09  Gavin Smith  <address@hidden>
+
        * info/session.c (info_search_in_node_internal): Always save
        the updated match state for a window.
 

Modified: trunk/info/search.c
===================================================================
--- trunk/info/search.c 2017-04-09 19:04:15 UTC (rev 7712)
+++ trunk/info/search.c 2017-04-09 19:43:24 UTC (rev 7713)
@@ -517,14 +517,14 @@
   size_t i = *match_index;
   int m = *in_match;
 
-  for (; i < matches->match_count; i++)
+  for (; !at_end_of_matches (matches, i); i++)
     {
-      if (matches->matches[i].rm_so > off)
+      if (match_by_index (matches, i).rm_so > off)
         break;
 
       m = 1;
 
-      if (matches->matches[i].rm_eo > off)
+      if (match_by_index (matches, i).rm_eo > off)
         break;
 
       m = 0;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]