* command.h command.c top.c: Add var_enum command type. It's
authorStu Grossman <grossman@cygnus>
Tue, 7 Mar 1995 09:06:16 +0000 (09:06 +0000)
committerStu Grossman <grossman@cygnus>
Tue, 7 Mar 1995 09:06:16 +0000 (09:06 +0000)
like var_string but allows only only one of the specified strings.

gdb/ChangeLog
gdb/top.c

index b0106f4c64e0eb5c791cbae26ca85e11c8e5d4c1..18bf0c7da2592cd1f522615c25fee3baaea5ed4c 100644 (file)
@@ -8,8 +8,8 @@ Tue Mar  7 00:23:47 1995  Stu Grossman  (grossman@cygnus.com)
        usage of fputc_unfiltered and putchar_unfiltered.  Eliminate
        putc_unfiltered (it's superfluous).
 
-       * command.h command.c:  Add var_enum command type.  It's like
-       var_string but allows only only one of the specified strings.
+       * command.h command.c top.c:  Add var_enum command type.  It's
+       like var_string but allows only only one of the specified strings.
 
 Mon Mar  6 15:03:59 1995  Jim Kingdon  (kingdon@lioth.cygnus.com)
 
index fd5242344b8a7427262a18180ed5205083c0b368..2068471b2821fa08bb124a8b0e9130c3ca19a01d 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1638,6 +1638,12 @@ line_completion_function (text, matches, line_buffer, point)
                      rl_completer_word_break_characters =
                        gdb_completer_command_word_break_characters;
                    }
+                 else if (c->enums)
+                   {
+                     list = complete_on_enum (c->enums, p, word);
+                     rl_completer_word_break_characters =
+                       gdb_completer_command_word_break_characters;
+                   }
                  else
                    {
                      /* It is a normal command; what comes after it is
@@ -1681,6 +1687,10 @@ line_completion_function (text, matches, line_buffer, point)
                     e.g. "info adsfkdj".  */
                  list = NULL;
                }
+             else if (c->enums)
+               {
+                 list = complete_on_enum (c->enums, p, word);
+               }
              else
                {
                  /* It is a normal command.  */