* gdbtypes.h (struct main_type): Change type of name,tag_name,
[deliverable/binutils-gdb.git] / gdb / completer.c
index f0597ce617a13662dda42c719f27227380dc592a..5939d08124e442b58ed3250af8184392a692c3a7 100644 (file)
@@ -1,6 +1,5 @@
 /* Line completion stuff for GDB, the GNU debugger.
-   Copyright (C) 2000, 2001, 2007, 2008, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 2000-2001, 2007-2012 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -387,7 +386,7 @@ add_struct_fields (struct type *type, int *nextp, char **output,
 {
   int i;
   int computed_type_name = 0;
-  char *type_name = NULL;
+  const char *type_name = NULL;
 
   CHECK_TYPEDEF (type);
   for (i = 0; i < TYPE_NFIELDS (type); ++i)
@@ -417,7 +416,7 @@ add_struct_fields (struct type *type, int *nextp, char **output,
 
   for (i = TYPE_NFN_FIELDS (type) - 1; i >= 0; --i)
     {
-      char *name = TYPE_FN_FIELDLIST_NAME (type, i);
+      const char *name = TYPE_FN_FIELDLIST_NAME (type, i);
 
       if (name && ! strncmp (name, fieldname, namelen))
        {
@@ -590,7 +589,7 @@ complete_line_internal (const char *text,
     {
       /* An empty line we want to consider ambiguous; that is, it
         could be any command.  */
-      c = (struct cmd_list_element *) -1;
+      c = CMD_LIST_AMBIGUOUS;
       result_list = 0;
     }
   else
@@ -610,7 +609,7 @@ complete_line_internal (const char *text,
         possible completions.  */
       list = NULL;
     }
-  else if (c == (struct cmd_list_element *) -1)
+  else if (c == CMD_LIST_AMBIGUOUS)
     {
       char *q;
 
@@ -914,10 +913,10 @@ line_completion_function (const char *text, int matches,
 }
 
 /* Skip over the possibly quoted word STR (as defined by the quote
-   characters QUOTECHARS and the the word break characters
-   BREAKCHARS).  Returns pointer to the location after the "word".  If
-   either QUOTECHARS or BREAKCHARS is NULL, use the same values used
-   by the completer.  */
+   characters QUOTECHARS and the word break characters BREAKCHARS).
+   Returns pointer to the location after the "word".  If either
+   QUOTECHARS or BREAKCHARS is NULL, use the same values used by the
+   completer.  */
 
 char *
 skip_quoted_chars (char *str, char *quotechars, char *breakchars)
This page took 0.024747 seconds and 4 git commands to generate.