/* CLI stylizing
- Copyright (C) 2018 Free Software Foundation, Inc.
+ Copyright (C) 2018-2019 Free Software Foundation, Inc.
This file is part of GDB.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef CLI_STYLE_H
-#define CLI_STYLE_H
+#ifndef CLI_CLI_STYLE_H
+#define CLI_CLI_STYLE_H
#include "ui-file.h"
void add_setshow_commands (const char *name,
enum command_class theclass,
const char *prefix_doc,
- const char *prefixname,
struct cmd_list_element **set_list,
- struct cmd_list_element **show_list);
+ void (*do_set) (const char *args, int from_tty),
+ struct cmd_list_element **show_list,
+ void (*do_show) (const char *args, int from_tty));
+
+ /* Return the 'set style NAME' command list, that can be used
+ to build a lambda DO_SET to call add_setshow_commands. */
+ struct cmd_list_element *set_list () { return m_set_list; };
+
+ /* Same as SET_LIST but for the show command list. */
+ struct cmd_list_element *show_list () { return m_show_list; };
private:
struct cmd_list_element *m_set_list = nullptr;
struct cmd_list_element *m_show_list = nullptr;
- /* Callback to set a value. */
- static void do_set (const char *args, int from_tty);
- /* Callback to show a value. */
- static void do_show (const char *args, int from_tty);
/* Callback to show the foreground. */
static void do_show_foreground (struct ui_file *file, int from_tty,
struct cmd_list_element *cmd,
/* The function name style. */
extern cli_style_option function_name_style;
+/* The variable name style. */
+extern cli_style_option variable_name_style;
+
+/* The address style. */
+extern cli_style_option address_style;
+
+/* True if source styling is enabled. */
+extern int source_styling;
+
/* True if styling is enabled. */
extern int cli_styling;
-#endif /* CLI_STYLE_H */
+#endif /* CLI_CLI_STYLE_H */