/* Header file for GDB command decoding library.
- Copyright (C) 2000-2019 Free Software Foundation, Inc.
+ Copyright (C) 2000-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#if !defined (CLI_DECODE_H)
-#define CLI_DECODE_H 1
+#ifndef CLI_CLI_DECODE_H
+#define CLI_CLI_DECODE_H
/* This file defines the private interfaces for any code implementing
command internals. */
#include "command.h"
#include "gdb_regex.h"
#include "cli-script.h"
+#include "completer.h"
#if 0
/* FIXME: cagney/2002-03-17: Once cmd_type() has been removed, ``enum
deprecated_warn_user (0),
malloced_replacement (0),
doc_allocated (0),
+ name_allocated (0),
hook_in (0),
allow_unknown (0),
abbrev_flag (0),
{
if (doc && doc_allocated)
xfree ((char *) doc);
+ if (name_allocated)
+ xfree ((char *) name);
}
DISABLE_COPY_AND_ASSIGN (cmd_list_element);
unsigned int doc_allocated : 1;
+ /* Set if the name field should be xfree'd. */
+
+ unsigned int name_allocated : 1;
+
/* Flag that specifies if this command is already running its hook. */
/* Prevents the possibility of hook recursion. */
unsigned int hook_in : 1;
extern void help_cmd (const char *, struct ui_file *);
extern void apropos_cmd (struct ui_file *, struct cmd_list_element *,
- compiled_regex &, const char *);
+ bool verbose, compiled_regex &, const char *);
/* Used to mark commands that don't do anything. If we just leave the
function field NULL, the command is interpreted as a help topic, or
extern void not_just_help_class_command (const char *arg, int from_tty);
-/* Exported to cli/cli-setshow.c */
+/* Print only the first line of STR on STREAM.
+ FOR_VALUE_PREFIX true indicates that the first line is output
+ to be a prefix to show a value (see deprecated_show_value_hack):
+ the first character is printed in uppercase, and the trailing
+ dot character is not printed. */
+
+extern void print_doc_line (struct ui_file *stream, const char *str,
+ bool for_value_prefix);
-extern void print_doc_line (struct ui_file *, const char *);
+/* The enums of boolean commands. */
+extern const char * const boolean_enums[];
+/* The enums of auto-boolean commands. */
extern const char * const auto_boolean_enums[];
/* Verify whether a given cmd_list_element is a user-defined command.
extern int find_command_name_length (const char *);
-#endif /* !defined (CLI_DECODE_H) */
+#endif /* CLI_CLI_DECODE_H */