* corelow.c, exec.c, inftarg.c, m3-nat.c, op50-rom.c, procfs.c,
[deliverable/binutils-gdb.git] / gdb / command.c
index cb727aa1081dbdcad5db75716e326712f53eec72..f2af0d5aa12936f1eaf36e8127a953de25d6b04a 100644 (file)
@@ -190,9 +190,19 @@ add_abbrev_prefix_cmd (name, class, fun, doc, prefixlist, prefixname,
   return c;
 }
 
-/* ARGSUSED */
+/* This is an empty "cfunc".  */
 void
-not_just_help_class_command (args, from_tty, c)
+not_just_help_class_command (args, from_tty)
+     char *args;
+     int from_tty;
+{
+}
+
+/* This is an empty "sfunc".  */
+static void empty_sfunc PARAMS ((char *, int, struct cmd_list_element *));
+
+static void
+empty_sfunc (args, from_tty, c)
      char *args;
      int from_tty;
      struct cmd_list_element *c;
@@ -223,7 +233,7 @@ add_set_cmd (name, class, var_type, var, doc, list)
   c->var = var;
   /* This needs to be something besides NO_FUNCTION so that this isn't
      treated as a help class.  */
-  c->function.sfunc = not_just_help_class_command;
+  c->function.sfunc = empty_sfunc;
   return c;
 }
 
@@ -674,12 +684,15 @@ lookup_cmd (line, list, cmdtype, allow_unknown, ignore_help_classes)
   struct cmd_list_element *last_list = 0;
   struct cmd_list_element *c =
     lookup_cmd_1 (line, list, &last_list, ignore_help_classes);
+#if 0
+  /* This is wrong for complete_command.  */
   char *ptr = (*line) + strlen (*line) - 1;
 
   /* Clear off trailing whitespace.  */
   while (ptr >= *line && (*ptr == ' ' || *ptr == '\t'))
     ptr--;
   *(ptr + 1) = '\0';
+#endif
   
   if (!c)
     {
@@ -1040,6 +1053,11 @@ do_setshow_command (arg, from_tty, c)
                  {
                    /* \ at end of argument is used after spaces
                       so they won't be lost.  */
+                   /* This is obsolete now that we no longer strip
+                      trailing whitespace and actually, the backslash
+                      didn't get here in my test, readline or
+                      something did something funky with a backslash
+                      right before a newline.  */
                    if (*p == 0)
                      break;
                    ch = parse_escape (&p);
@@ -1051,8 +1069,10 @@ do_setshow_command (arg, from_tty, c)
                else
                  *q++ = ch;
              }
+#if 0
            if (*(p - 1) != '\\')
              *q++ = ' ';
+#endif
            *q++ = '\0';
            new = (char *) xrealloc (new, q - new);
            if (*(char **)c->var != NULL)
This page took 0.024718 seconds and 4 git commands to generate.