Change file close behavior for tee_file
[deliverable/binutils-gdb.git] / gdb / cli / cli-style.h
index 7d5370cb58aadaeff9645a72efff6ed4c36190c2..c0520f9e23f336977bd61599458fae6a5954ead0 100644 (file)
@@ -1,6 +1,6 @@
 /* CLI stylizing
 
-   Copyright (C) 2018 Free Software Foundation, Inc.
+   Copyright (C) 2018-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -17,8 +17,8 @@
    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"
 
@@ -38,9 +38,17 @@ public:
   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:
 
@@ -59,10 +67,6 @@ 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,
@@ -83,7 +87,16 @@ extern cli_style_option file_name_style;
 /* 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 */
This page took 0.025742 seconds and 4 git commands to generate.