]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/cli/cli-decode.c
-Wwrite-strings: The Rest
[thirdparty/binutils-gdb.git] / gdb / cli / cli-decode.c
index 436a7ed4ca92ea177b0d0219e332afca91c19ab0..fc14465211f5d9a5f821b5cba4051b0eb5fcba25 100644 (file)
@@ -1255,7 +1255,9 @@ find_cmd (const char *command, int len, struct cmd_list_element *clist,
   return found;
 }
 
-static int
+/* Return the length of command name in TEXT.  */
+
+int
 find_command_name_length (const char *text)
 {
   const char *p = text;
@@ -1378,19 +1380,6 @@ lookup_cmd_1 (const char **text, struct cmd_list_element *clist,
   nfound = 0;
   found = find_cmd (command, len, clist, ignore_help_classes, &nfound);
 
-  /* We didn't find the command in the entered case, so lower case it
-     and search again.  */
-  if (!found || nfound == 0)
-    {
-      for (tmp = 0; tmp < len; tmp++)
-       {
-         char x = command[tmp];
-
-         command[tmp] = isupper (x) ? tolower (x) : x;
-       }
-      found = find_cmd (command, len, clist, ignore_help_classes, &nfound);
-    }
-
   /* If nothing matches, we have a simple failure.  */
   if (nfound == 0)
     return 0;
@@ -1490,7 +1479,8 @@ undef_cmd_error (const char *cmdtype, const char *q)
    the function field of the struct cmd_list_element is 0).  */
 
 struct cmd_list_element *
-lookup_cmd (const char **line, struct cmd_list_element *list, char *cmdtype,
+lookup_cmd (const char **line, struct cmd_list_element *list,
+           const char *cmdtype,
            int allow_unknown, int ignore_help_classes)
 {
   struct cmd_list_element *last_list = 0;
@@ -1731,20 +1721,6 @@ lookup_cmd_composition (const char *text,
       nfound = 0;
       *cmd = find_cmd (command, len, cur_list, 1, &nfound);
       
-      /* We didn't find the command in the entered case, so lower case
-        it and search again.
-      */
-      if (!*cmd || nfound == 0)
-       {
-         for (tmp = 0; tmp < len; tmp++)
-           {
-             char x = command[tmp];
-
-             command[tmp] = isupper (x) ? tolower (x) : x;
-           }
-         *cmd = find_cmd (command, len, cur_list, 1, &nfound);
-       }
-      
       if (*cmd == CMD_LIST_AMBIGUOUS)
        {
          return 0;              /* ambiguous */