texinfo-commits
[Top][All Lists]
Advanced

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

[5722] info_search_in_node merged into caller


From: Gavin D. Smith
Subject: [5722] info_search_in_node merged into caller
Date: Sun, 27 Jul 2014 10:03:35 +0000

Revision: 5722
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5722
Author:   gavin
Date:     2014-07-27 10:03:34 +0000 (Sun, 27 Jul 2014)
Log Message:
-----------
info_search_in_node merged into caller

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/session.c
    trunk/info/session.h

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-07-26 11:15:54 UTC (rev 5721)
+++ trunk/ChangeLog     2014-07-27 10:03:34 UTC (rev 5722)
@@ -1,3 +1,8 @@
+2014-07-27  Gavin Smith  <address@hidden>
+
+       * info/session.c (info_search_in_node): Merged into caller in
+       info_target_search_node.
+
 2014-07-26  Gavin Smith  <address@hidden>
 
        * info/session.c (info_search_1): Unused 'key' argument removed.

Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c        2014-07-26 11:15:54 UTC (rev 5721)
+++ trunk/info/session.c        2014-07-27 10:03:34 UTC (rev 5722)
@@ -3505,20 +3505,6 @@
   return result;
 }
 
-long
-info_search_in_node (char *string, NODE *node, long int start,
-                    WINDOW *window, int dir, int case_sensitive,
-                    int match_regexp)
-{
-  long offset;
-  if (info_search_in_node_internal (string, node, start,
-                                   window, dir, case_sensitive, 0,
-                                   match_regexp,
-                                   &offset, NULL) == search_success)
-    return offset;
-  return -1;
-}
-
 /* Search NODE, looking for the largest possible match of STRING.  Start the
    search at START.  Return the absolute position of the match, or -1, if
    no part of the string could be found. */
@@ -3527,7 +3513,7 @@
                         int use_regex_mask)
 {
   register int i;
-  long offset = 0;
+  long offset = -1;
   char *target;
 
   target = xstrdup (string);
@@ -3537,12 +3523,16 @@
      the end of it. */
   while (i)
     {
+      enum search_result ret;
       target[i] = '\0';
-      offset = info_search_in_node (target, node, start, NULL, 1, 0,
-                                   use_regex & use_regex_mask);
 
-      if (offset != -1)
+      ret = info_search_in_node_internal (target, node, start,
+                                   NULL, 1, 0, 0,
+                                   use_regex & use_regex_mask,
+                                   &offset, NULL);
+      if (ret == search_success)
         break;
+      offset = -1;
 
       /* Delete the last word from TARGET. */
       for (; i && (!whitespace (target[i]) && (target[i] != ',')); i--);

Modified: trunk/info/session.h
===================================================================
--- trunk/info/session.h        2014-07-26 11:15:54 UTC (rev 5721)
+++ trunk/info/session.h        2014-07-27 10:03:34 UTC (rev 5722)
@@ -80,9 +80,6 @@
 extern void initialize_keyseq (void);
 extern void add_char_to_keyseq (int character);
 extern FILE_BUFFER *file_buffer_of_window (WINDOW *window);
-extern long info_search_in_node (char *string, NODE *node,
-    long int start, WINDOW *window, int dir, int case_sensitive,
-    int use_regexp);
 extern long info_target_search_node (NODE *node, char *string,
     long int start, int use_regexp_mask);
 extern int info_select_reference (WINDOW *window, REFERENCE *entry);




reply via email to

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