texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/info indices.c


From: Sergey Poznyakoff
Subject: texinfo/info indices.c
Date: Thu, 28 Jul 2011 08:13:44 +0000

CVSROOT:        /cvsroot/texinfo
Module name:    texinfo
Changes by:     Sergey Poznyakoff <gray>        11/07/28 08:13:44

Modified files:
        info           : indices.c 

Log message:
        (do_info_index_search): Do not search
        for patterns shorter than min_search_length.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/info/indices.c?cvsroot=texinfo&r1=1.14&r2=1.15

Patches:
Index: indices.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/info/indices.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- indices.c   28 Jul 2011 07:15:01 -0000      1.14
+++ indices.c   28 Jul 2011 08:13:43 -0000      1.15
@@ -1,5 +1,5 @@
 /* indices.c -- deal with an Info file index.
-   $Id: indices.c,v 1.14 2011/07/28 07:15:01 gray Exp $
+   $Id: indices.c,v 1.15 2011/07/28 08:13:43 gray Exp $
 
    Copyright (C) 1993, 1997, 1998, 1999, 2002, 2003, 2004, 2007, 2008
    Free Software Foundation, Inc.
@@ -21,6 +21,7 @@
 
 #include "info.h"
 #include "indices.h"
+#include "variables.h"
 
 /* User-visible variable controls the output of info-index-next. */
 int show_index_match = 1;
@@ -246,6 +247,14 @@
         }
     }
 
+  if (mbslen (line) < min_search_length)
+    {
+      info_error (_("Search string too short"));
+      free (line);
+      return;
+    }
+
+  
   /* The user typed either a completed index label, or a partial string.
      Find an exact match, or, failing that, the first index entry containing
      the partial string.  So, we just call info_next_index_match () with minor



reply via email to

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