2001-03-20 Daniel Berlin <dberlin@redhat.com>
authorDaniel Berlin <dberlin@dberlin.org>
Sun, 1 Apr 2001 19:50:50 +0000 (19:50 +0000)
committerDaniel Berlin <dberlin@dberlin.org>
Sun, 1 Apr 2001 19:50:50 +0000 (19:50 +0000)
* symtab.c (completion_list_add_name): Remove duplicate string checks,
readline already does this, and it's much faster at it, too.

gdb/ChangeLog
gdb/symtab.c

index eef27f309f07b01735493242cd03655d63c2e61d..acba6c29e0007e44709fe798c224d18d07ec0918 100644 (file)
@@ -1,3 +1,8 @@
+2001-03-20  Daniel Berlin  <dberlin@redhat.com>
+       
+       * symtab.c (completion_list_add_name): Remove duplicate string checks,
+       readline already does this, and it's much faster at it, too.
+
 2001-04-01  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * go32-nat.c: Minor tweaks, to pacify the ari script.
index a51126a1d8c10262c0b20a278d27c856eb63bf98..6cb8e963de4aa94b4a5b80cd4b02b56355286b46 100644 (file)
@@ -2844,17 +2844,6 @@ completion_list_add_name (char *symname, char *sym_text, int sym_text_len,
       return;
     }
 
-  /* Clip any symbol names that we've already considered.  (This is a
-     time optimization)  */
-
-  for (i = 0; i < return_val_index; ++i)
-    {
-      if (STREQ (symname, return_val[i]))
-       {
-         return;
-       }
-    }
-
   /* We have a match for a completion, so add SYMNAME to the current list
      of matches. Note that the name is moved to freshly malloc'd space. */
 
@@ -2880,19 +2869,6 @@ completion_list_add_name (char *symname, char *sym_text, int sym_text_len,
        strcat (new, symname);
       }
 
-    /* Recheck for duplicates if we intend to add a modified symbol.  */
-    if (word != sym_text)
-      {
-       for (i = 0; i < return_val_index; ++i)
-         {
-           if (STREQ (new, return_val[i]))
-             {
-               xfree (new);
-               return;
-             }
-         }
-      }
-
     if (return_val_index + 3 > return_val_size)
       {
        newsize = (return_val_size *= 2) * sizeof (char *);
This page took 0.02969 seconds and 4 git commands to generate.