This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit/tui] Cleanup TUI includes a little
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 10 Feb 2004 14:06:51 -0500
- Subject: [commit/tui] Cleanup TUI includes a little
Hello,
This cleans up the TUI headers a bit. In particular:
- "defs.h" no longer includes "tui.h"
Where needed "tui/tui.h" is included explicitly (which is still too many
places but it is at least a bit better)
- -I$(srcdir)/tui is not longer specified
So that all code consistently uses "tui/tui.h"
- Adds "gdb_curses.h"
Replacing the #ifdef HAVE_CURSES et.al. logic littered through the tui/
directory (should probably audit things and trim back the number of
places it is included).
- Adds "tui-hooks.h"
To match "tui-hooks.c" moving declarations to there from "tui.h"
- Trims back "tui.h" a bit.
In addition to "tui-hooks.h", other declarations are removed (more
trimming required).
committed,
Andrew
2004-02-10 Andrew Cagney <cagney@redhat.com>
* defs.h: Do not include "tui.h".
* gdb_curses.h: New file.
* tui/tui-hooks.h: New file.
* tui/tui.h (tui_update_all_exec_infos): Delete declaration.
(tui_install_hooks, tui_remove_hooks): Delete declarations.
(tui_initialize_io): Delete declaration.
(tui_initialize_readline: Delete redundant declaration.
(struct tui_point): Delete definition.
* tui/tui-data.h (struct tui_point): Define.
* cli/cli-decode.c [TUI]: Include "tui/tui.h".
* utils.c: Include "tui/tui.h".
* tui/tui-data.h: Include "tui/tui.h" and "gdb_curses.h".
* printcmd.c [TUI]: Include "tui/tui.h".
* cli/cli-cmds.c [TUI]: Include "tui/tui.h".
* tui/tui-command.c: Include "gdb_curses.h".
* tui/tui.c, tui/tui-winsource.c, tui/tui-wingeneral.c: Ditto.
* tui/tui-windata.c, tui/tui-win.c, tui/tui-stack.c: Ditto.
* tui/tui-source.c, tui/tui-regs.c, tui/tui-layout.c: Ditto.
* tui/tui-io.c, tui/tui-disasm.c, tui/tui-data.c: : Ditto.
* tui/tui-hooks.c: Include "tui-hooks.h" and "gdb_curses.h".
* Makefile.in: Update all dependencies.
(tui_hooks_h, gdb_curses_h): Define.
(SUBDIR_TUI_CFLAGS): Remove -I${srcdir}/tui.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.493
diff -u -r1.493 Makefile.in
--- Makefile.in 10 Feb 2004 16:43:58 -0000 1.493
+++ Makefile.in 10 Feb 2004 18:59:49 -0000
@@ -217,7 +217,7 @@
SUBDIR_TUI_DEPS =
SUBDIR_TUI_LDFLAGS=
SUBDIR_TUI_CFLAGS= \
- -DTUI=1 -I${srcdir}/tui
+ -DTUI=1
# Opcodes currently live in one of two places. Either they are in the
@@ -645,8 +645,8 @@
cp_support_h = cp-support.h $(symtab_h)
dcache_h = dcache.h
defs_h = defs.h $(config_h) $(ansidecl_h) $(gdb_locale_h) $(gdb_signals_h) \
- $(libiberty_h) $(progress_h) $(bfd_h) $(tui_h) $(ui_file_h) $(xm_h) \
- $(nm_h) $(tm_h) $(fopen_same_h) $(gdbarch_h)
+ $(libiberty_h) $(progress_h) $(bfd_h) $(ui_file_h) $(xm_h) $(nm_h) \
+ $(tm_h) $(fopen_same_h) $(gdbarch_h)
dictionary_h = dictionary.h
disasm_h = disasm.h
doublest_h = doublest.h $(floatformat_h)
@@ -667,6 +667,7 @@
gdb_assert_h = gdb_assert.h
gdbcmd_h = gdbcmd.h $(command_h) $(ui_out_h)
gdbcore_h = gdbcore.h $(bfd_h)
+gdb_curses_h = gdb_curses.h
gdb_dirent_h = gdb_dirent.h
gdb_events_h = gdb-events.h
gdb_h = gdb.h
@@ -802,10 +803,11 @@
#
tui_command_h = $(srcdir)/tui/tui-command.h
-tui_data_h = $(srcdir)/tui/tui-data.h
+tui_data_h = $(srcdir)/tui/tui-data.h $(tui_h) $(gdb_curses_h)
tui_disasm_h = $(srcdir)/tui/tui-disasm.h $(tui_h) $(tui_data_h)
tui_file_h = $(srcdir)/tui/tui-file.h
tui_h = $(srcdir)/tui/tui.h
+tui_hooks_h = $(srcdir)/tui/tui-hooks.h
tui_io_h = $(srcdir)/tui/tui-io.h
tui_layout_h = $(srcdir)/tui/tui-layout.h $(tui_h) $(tui_data_h)
tui_regs_h = $(srcdir)/tui/tui-regs.h $(tui_data_h)
@@ -2082,12 +2084,11 @@
$(libecoff_h) $(elf_common_h) $(elf_mips_h)
mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(gdb_assert_h) \
$(frame_h) $(inferior_h) $(symtab_h) $(value_h) $(gdbcmd_h) \
- $(language_h) $(gdbcore_h) $(symfile_h) $(objfiles_h) \
- $(gdbtypes_h) $(target_h) $(arch_utils_h) $(regcache_h) \
- $(osabi_h) $(mips_tdep_h) $(block_h) $(reggroups_h) \
- $(opcode_mips_h) $(elf_mips_h) $(elf_bfd_h) $(symcat_h) \
- $(sim_regno_h) $(dis_asm_h) $(frame_unwind_h) $(frame_base_h) \
- $(trad_frame_h)
+ $(language_h) $(gdbcore_h) $(symfile_h) $(objfiles_h) $(gdbtypes_h) \
+ $(target_h) $(arch_utils_h) $(regcache_h) $(osabi_h) $(mips_tdep_h) \
+ $(block_h) $(reggroups_h) $(opcode_mips_h) $(elf_mips_h) \
+ $(elf_bfd_h) $(symcat_h) $(sim_regno_h) $(dis_asm_h) \
+ $(frame_unwind_h) $(frame_base_h) $(trad_frame_h)
mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
$(regcache_h) $(gregset_h)
mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
@@ -2165,7 +2166,7 @@
$(gdbtypes_h) $(value_h) $(language_h) $(expression_h) $(gdbcore_h) \
$(gdbcmd_h) $(target_h) $(breakpoint_h) $(demangle_h) $(valprint_h) \
$(annotate_h) $(symfile_h) $(objfiles_h) $(completer_h) $(ui_out_h) \
- $(gdb_assert_h) $(block_h) $(disasm_h)
+ $(gdb_assert_h) $(block_h) $(disasm_h) $(tui_h)
proc-api.o: proc-api.c $(defs_h) $(gdbcmd_h) $(completer_h) $(gdb_wait_h) \
$(proc_utils_h)
proc-events.o: proc-events.c $(defs_h)
@@ -2460,7 +2461,7 @@
user-regs.o: user-regs.c $(defs_h) $(user_regs_h) $(gdbtypes_h) \
$(gdb_string_h) $(gdb_assert_h) $(frame_h)
utils.o: utils.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(event_top_h) \
- $(gdbcmd_h) $(serial_h) $(bfd_h) $(target_h) $(demangle_h) \
+ $(tui_h) $(gdbcmd_h) $(serial_h) $(bfd_h) $(target_h) $(demangle_h) \
$(expression_h) $(language_h) $(charset_h) $(annotate_h) \
$(filenames_h) $(inferior_h)
uw-thread.o: uw-thread.c $(defs_h) $(gdbthread_h) $(target_h) $(inferior_h) \
@@ -2536,11 +2537,11 @@
$(linespec_h) $(expression_h) $(frame_h) $(value_h) $(language_h) \
$(filenames_h) $(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) \
$(top_h) $(cli_decode_h) $(cli_script_h) $(cli_setshow_h) \
- $(cli_cmds_h)
+ $(cli_cmds_h) $(tui_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c
cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \
$(gdb_regex_h) $(gdb_string_h) $(ui_out_h) $(cli_cmds_h) \
- $(cli_decode_h) $(gdb_assert_h)
+ $(cli_decode_h) $(tui_h) $(gdb_assert_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-decode.c
cli-dump.o: $(srcdir)/cli/cli-dump.c $(defs_h) $(gdb_string_h) \
$(cli_decode_h) $(cli_cmds_h) $(value_h) $(completer_h) \
@@ -2801,22 +2802,22 @@
# Need to explicitly specify the compile rule as make will do nothing
# or try to compile the object file into the sub-directory.
-tui.o: $(srcdir)/tui/tui.c $(defs_h) $(gdbcmd_h) $(tui_h) $(tui_data_h) \
- $(tui_layout_h) $(tui_io_h) $(tui_regs_h) $(tui_stack_h) \
- $(tui_win_h) $(tui_winsource_h) $(tui_windata_h) $(readline_h) \
- $(target_h) $(frame_h) $(breakpoint_h) $(inferior_h) $(symtab_h) \
- $(source_h)
+tui.o: $(srcdir)/tui/tui.c $(defs_h) $(gdbcmd_h) $(tui_h) $(tui_hooks_h) \
+ $(tui_data_h) $(tui_layout_h) $(tui_io_h) $(tui_regs_h) \
+ $(tui_stack_h) $(tui_win_h) $(tui_winsource_h) $(tui_windata_h) \
+ $(readline_h) $(target_h) $(frame_h) $(breakpoint_h) $(inferior_h) \
+ $(symtab_h) $(source_h) $(gdb_curses_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui.c
tui-command.o: $(srcdir)/tui/tui-command.c $(defs_h) $(tui_h) $(tui_data_h) \
- $(tui_win_h) $(tui_io_h)
+ $(tui_win_h) $(tui_io_h) $(gdb_curses_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-command.c
tui-data.o: $(srcdir)/tui/tui-data.c $(defs_h) $(symtab_h) $(tui_h) \
- $(tui_data_h) $(tui_wingeneral_h) $(gdb_string_h)
+ $(tui_data_h) $(tui_wingeneral_h) $(gdb_string_h) $(gdb_curses_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-data.c
tui-disasm.o: $(srcdir)/tui/tui-disasm.c $(defs_h) $(symtab_h) \
$(breakpoint_h) $(frame_h) $(value_h) $(source_h) $(disasm_h) \
$(gdb_string_h) $(tui_h) $(tui_data_h) $(tui_win_h) $(tui_layout_h) \
- $(tui_winsource_h) $(tui_stack_h) $(tui_file_h)
+ $(tui_winsource_h) $(tui_stack_h) $(tui_file_h) $(gdb_curses_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-disasm.c
tui-file.o: $(srcdir)/tui/tui-file.c $(defs_h) $(ui_file_h) $(tui_file_h) \
$(tui_io_h) $(tui_h) $(gdb_string_h)
@@ -2825,8 +2826,9 @@
$(command_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) \
$(gdbcore_h) $(event_loop_h) $(event_top_h) $(frame_h) \
$(breakpoint_h) $(gdb_events_h) $(ui_out_h) $(top_h) $(tui_h) \
- $(tui_data_h) $(tui_layout_h) $(tui_io_h) $(tui_regs_h) $(tui_win_h) \
- $(tui_stack_h) $(tui_windata_h) $(tui_winsource_h)
+ $(tui_hooks_h) $(tui_data_h) $(tui_layout_h) $(tui_io_h) \
+ $(tui_regs_h) $(tui_win_h) $(tui_stack_h) $(tui_windata_h) \
+ $(tui_winsource_h) $(gdb_curses_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-hooks.c
tui-interp.o: $(srcdir)/tui/tui-interp.c $(defs_h) $(interps_h) $(top_h) \
$(event_top_h) $(event_loop_h) $(ui_out_h) $(cli_out_h) \
@@ -2835,12 +2837,13 @@
tui-io.o: $(srcdir)/tui/tui-io.c $(defs_h) $(terminal_h) $(target_h) \
$(event_loop_h) $(event_top_h) $(command_h) $(top_h) $(readline_h) \
$(tui_h) $(tui_data_h) $(tui_io_h) $(tui_command_h) $(tui_win_h) \
- $(tui_wingeneral_h) $(tui_file_h) $(ui_out_h) $(cli_out_h)
+ $(tui_wingeneral_h) $(tui_file_h) $(ui_out_h) $(cli_out_h) \
+ $(gdb_curses_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-io.c
tui-layout.o: $(srcdir)/tui/tui-layout.c $(defs_h) $(command_h) $(symtab_h) \
$(frame_h) $(source_h) $(tui_h) $(tui_data_h) $(tui_windata_h) \
$(tui_wingeneral_h) $(tui_stack_h) $(tui_regs_h) $(tui_win_h) \
- $(tui_winsource_h) $(tui_disasm_h)
+ $(tui_winsource_h) $(tui_disasm_h) $(gdb_curses_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-layout.c
tui-out.o: $(srcdir)/tui/tui-out.c $(defs_h) $(ui_out_h) $(tui_h) \
$(gdb_string_h) $(gdb_assert_h)
@@ -2848,33 +2851,35 @@
tui-regs.o: $(srcdir)/tui/tui-regs.c $(defs_h) $(tui_h) $(tui_data_h) \
$(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(frame_h) $(regcache_h) \
$(inferior_h) $(target_h) $(gdb_string_h) $(tui_layout_h) \
- $(tui_win_h) $(tui_windata_h) $(tui_wingeneral_h) $(tui_file_h)
+ $(tui_win_h) $(tui_windata_h) $(tui_wingeneral_h) $(tui_file_h) \
+ $(gdb_curses_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-regs.c
tui-source.o: $(srcdir)/tui/tui-source.c $(defs_h) $(symtab_h) $(frame_h) \
$(breakpoint_h) $(source_h) $(symtab_h) $(tui_h) $(tui_data_h) \
- $(tui_stack_h) $(tui_winsource_h) $(tui_source_h)
+ $(tui_stack_h) $(tui_winsource_h) $(tui_source_h) $(gdb_curses_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-source.c
tui-stack.o: $(srcdir)/tui/tui-stack.c $(defs_h) $(symtab_h) $(breakpoint_h) \
$(frame_h) $(command_h) $(inferior_h) $(target_h) $(top_h) \
$(gdb_string_h) $(tui_h) $(tui_data_h) $(tui_stack_h) \
- $(tui_wingeneral_h) $(tui_source_h) $(tui_winsource_h) $(tui_file_h)
+ $(tui_wingeneral_h) $(tui_source_h) $(tui_winsource_h) $(tui_file_h) \
+ $(gdb_curses_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-stack.c
tui-win.o: $(srcdir)/tui/tui-win.c $(defs_h) $(command_h) $(symtab_h) \
$(breakpoint_h) $(frame_h) $(cli_cmds_h) $(top_h) $(source_h) \
$(tui_h) $(tui_data_h) $(tui_wingeneral_h) $(tui_stack_h) \
$(tui_regs_h) $(tui_disasm_h) $(tui_source_h) $(tui_winsource_h) \
- $(tui_windata_h) $(gdb_string_h)
+ $(tui_windata_h) $(gdb_curses_h) $(gdb_string_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-win.c
tui-windata.o: $(srcdir)/tui/tui-windata.c $(defs_h) $(tui_h) $(tui_data_h) \
- $(tui_wingeneral_h) $(tui_regs_h)
+ $(tui_wingeneral_h) $(tui_regs_h) $(gdb_curses_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-windata.c
tui-wingeneral.o: $(srcdir)/tui/tui-wingeneral.c $(defs_h) $(tui_h) \
- $(tui_data_h) $(tui_wingeneral_h) $(tui_win_h)
+ $(tui_data_h) $(tui_wingeneral_h) $(tui_win_h) $(gdb_curses_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-wingeneral.c
tui-winsource.o: $(srcdir)/tui/tui-winsource.c $(defs_h) $(symtab_h) \
$(frame_h) $(breakpoint_h) $(value_h) $(source_h) $(tui_h) \
$(tui_data_h) $(tui_stack_h) $(tui_win_h) $(tui_wingeneral_h) \
- $(tui_winsource_h) $(tui_source_h) $(tui_disasm_h)
+ $(tui_winsource_h) $(tui_source_h) $(tui_disasm_h) $(gdb_curses_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-winsource.c
#
Index: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.140
diff -u -r1.140 defs.h
--- defs.h 4 Feb 2004 16:34:51 -0000 1.140
+++ defs.h 10 Feb 2004 18:59:49 -0000
@@ -457,10 +457,6 @@
extern struct ui_file *gdb_stdtargerr;
extern struct ui_file *gdb_stdtargin;
-#if defined(TUI)
-#include "tui.h"
-#endif
-
#include "ui-file.h"
/* More generic printf like operations. Filtered versions may return
Index: printcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/printcmd.c,v
retrieving revision 1.72
diff -u -r1.72 printcmd.c
--- printcmd.c 6 Feb 2004 18:30:47 -0000 1.72
+++ printcmd.c 10 Feb 2004 18:59:50 -0000
@@ -44,6 +44,10 @@
#include "block.h"
#include "disasm.h"
+#ifdef TUI
+#include "tui/tui.h" /* For tui_active et.al. */
+#endif
+
extern int asm_demangle; /* Whether to demangle syms in asm printouts */
extern int addressprint; /* Whether to print hex addresses in HLL " */
Index: utils.c
===================================================================
RCS file: /cvs/src/src/gdb/utils.c,v
retrieving revision 1.114
diff -u -r1.114 utils.c
--- utils.c 21 Jan 2004 18:46:22 -0000 1.114
+++ utils.c 10 Feb 2004 18:59:50 -0000
@@ -27,6 +27,10 @@
#include "gdb_string.h"
#include "event-top.h"
+#ifdef TUI
+#include "tui/tui.h" /* For tui_get_command_dimension. */
+#endif
+
#ifdef __GO32__
#include <pc.h>
#endif
Index: cli/cli-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v
retrieving revision 1.41
diff -u -r1.41 cli-cmds.c
--- cli/cli-cmds.c 7 Feb 2004 17:46:14 -0000 1.41
+++ cli/cli-cmds.c 10 Feb 2004 18:59:50 -0000
@@ -46,6 +46,10 @@
#include "cli/cli-setshow.h"
#include "cli/cli-cmds.h"
+#ifdef TUI
+#include "tui/tui.h" /* For tui_active et.al. */
+#endif
+
#ifndef GDBINIT_FILENAME
#define GDBINIT_FILENAME ".gdbinit"
#endif
Index: cli/cli-decode.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-decode.c,v
retrieving revision 1.34
diff -u -r1.34 cli-decode.c
--- cli/cli-decode.c 8 Nov 2003 00:13:03 -0000 1.34
+++ cli/cli-decode.c 10 Feb 2004 18:59:50 -0000
@@ -29,6 +29,10 @@
#include "cli/cli-cmds.h"
#include "cli/cli-decode.h"
+#ifdef TUI
+#include "tui/tui.h" /* For tui_active et.al. */
+#endif
+
#include "gdb_assert.h"
/* Prototypes for local functions */
Index: tui/tui-command.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-command.c,v
retrieving revision 1.9
diff -u -r1.9 tui-command.c
--- tui/tui-command.c 8 Feb 2004 01:32:26 -0000 1.9
+++ tui/tui-command.c 10 Feb 2004 18:59:51 -0000
@@ -29,13 +29,7 @@
#include "tui/tui-win.h"
#include "tui/tui-io.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
+#include "gdb_curses.h"
/*****************************************
Index: tui/tui-data.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-data.c,v
retrieving revision 1.7
diff -u -r1.7 tui-data.c
--- tui/tui-data.c 8 Feb 2004 00:05:16 -0000 1.7
+++ tui/tui-data.c 10 Feb 2004 18:59:51 -0000
@@ -29,14 +29,7 @@
#include "tui/tui-wingeneral.h"
#include "gdb_string.h"
-
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
+#include "gdb_curses.h"
/****************************
** GLOBAL DECLARATIONS
Index: tui/tui-data.h
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-data.h,v
retrieving revision 1.10
diff -u -r1.10 tui-data.h
--- tui/tui-data.h 7 Feb 2004 20:57:02 -0000 1.10
+++ tui/tui-data.h 10 Feb 2004 18:59:51 -0000
@@ -25,11 +25,14 @@
#ifndef TUI_DATA_H
#define TUI_DATA_H
-#if defined (HAVE_NCURSES_H)
-#include <ncurses.h>
-#elif defined (HAVE_CURSES_H)
-#include <curses.h>
-#endif
+#include "tui/tui.h" /* For enum tui_win_type. */
+#include "gdb_curses.h" /* For WINDOW. */
+
+/* This is a point definition. */
+struct tui_point
+{
+ int x, y;
+};
/* Generic window information */
struct tui_gen_win_info
Index: tui/tui-disasm.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-disasm.c,v
retrieving revision 1.12
diff -u -r1.12 tui-disasm.c
--- tui/tui-disasm.c 8 Feb 2004 01:32:26 -0000 1.12
+++ tui/tui-disasm.c 10 Feb 2004 18:59:51 -0000
@@ -38,13 +38,7 @@
#include "tui/tui-stack.h"
#include "tui/tui-file.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
+#include "gdb_curses.h"
struct tui_asm_line
{
Index: tui/tui-hooks.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-hooks.c,v
retrieving revision 1.18
diff -u -r1.18 tui-hooks.c
--- tui/tui-hooks.c 8 Feb 2004 00:05:16 -0000 1.18
+++ tui/tui-hooks.c 10 Feb 2004 18:59:51 -0000
@@ -40,6 +40,7 @@
#include <fcntl.h>
#include "tui/tui.h"
+#include "tui/tui-hooks.h"
#include "tui/tui-data.h"
#include "tui/tui-layout.h"
#include "tui/tui-io.h"
@@ -49,13 +50,7 @@
#include "tui/tui-windata.h"
#include "tui/tui-winsource.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
+#include "gdb_curses.h"
int tui_target_has_run = 0;
Index: tui/tui-hooks.h
===================================================================
RCS file: tui/tui-hooks.h
diff -N tui/tui-hooks.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tui/tui-hooks.h 10 Feb 2004 18:59:51 -0000
@@ -0,0 +1,28 @@
+/* External/Public TUI hools header file, for GDB the GNU debugger.
+
+ Copyright 2004 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ 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
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef TUI_HOOKS_H
+#define TUI_HOOKS_H
+
+extern void tui_install_hooks (void);
+extern void tui_remove_hooks (void);
+
+#endif
Index: tui/tui-io.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-io.c,v
retrieving revision 1.8
diff -u -r1.8 tui-io.c
--- tui/tui-io.c 8 Feb 2004 01:32:26 -0000 1.8
+++ tui/tui-io.c 10 Feb 2004 18:59:51 -0000
@@ -43,13 +43,7 @@
#include <signal.h>
#include <stdio.h>
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
+#include "gdb_curses.h"
int
key_is_start_sequence (int ch)
Index: tui/tui-layout.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-layout.c,v
retrieving revision 1.15
diff -u -r1.15 tui-layout.c
--- tui/tui-layout.c 8 Feb 2004 01:32:26 -0000 1.15
+++ tui/tui-layout.c 10 Feb 2004 18:59:51 -0000
@@ -39,13 +39,7 @@
#include "tui/tui-winsource.h"
#include "tui/tui-disasm.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
+#include "gdb_curses.h"
/*******************************
** Static Local Decls
Index: tui/tui-regs.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-regs.c,v
retrieving revision 1.10
diff -u -r1.10 tui-regs.c
--- tui/tui-regs.c 8 Feb 2004 01:32:26 -0000 1.10
+++ tui/tui-regs.c 10 Feb 2004 18:59:51 -0000
@@ -39,13 +39,7 @@
#include "tui/tui-wingeneral.h"
#include "tui/tui-file.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
+#include "gdb_curses.h"
/*****************************************
** LOCAL DEFINITIONS **
Index: tui/tui-source.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-source.c,v
retrieving revision 1.9
diff -u -r1.9 tui-source.c
--- tui/tui-source.c 8 Feb 2004 01:32:26 -0000 1.9
+++ tui/tui-source.c 10 Feb 2004 18:59:51 -0000
@@ -36,13 +36,7 @@
#include "tui/tui-winsource.h"
#include "tui/tui-source.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
+#include "gdb_curses.h"
/* Function to display source in the source window. */
enum tui_status
Index: tui/tui-stack.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-stack.c,v
retrieving revision 1.11
diff -u -r1.11 tui-stack.c
--- tui/tui-stack.c 8 Feb 2004 01:32:26 -0000 1.11
+++ tui/tui-stack.c 10 Feb 2004 18:59:51 -0000
@@ -39,13 +39,7 @@
#include "tui/tui-winsource.h"
#include "tui/tui-file.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
+#include "gdb_curses.h"
/* Get a printable name for the function at the address.
The symbol name is demangled if demangling is turned on.
Index: tui/tui-win.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-win.c,v
retrieving revision 1.15
diff -u -r1.15 tui-win.c
--- tui/tui-win.c 8 Feb 2004 01:32:26 -0000 1.15
+++ tui/tui-win.c 10 Feb 2004 18:59:51 -0000
@@ -46,13 +46,7 @@
#include "tui/tui-winsource.h"
#include "tui/tui-windata.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
+#include "gdb_curses.h"
#include "gdb_string.h"
#include <ctype.h>
Index: tui/tui-windata.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-windata.c,v
retrieving revision 1.7
diff -u -r1.7 tui-windata.c
--- tui/tui-windata.c 8 Feb 2004 00:05:16 -0000 1.7
+++ tui/tui-windata.c 10 Feb 2004 18:59:51 -0000
@@ -28,13 +28,7 @@
#include "tui/tui-wingeneral.h"
#include "tui/tui-regs.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
+#include "gdb_curses.h"
/*****************************************
Index: tui/tui-wingeneral.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-wingeneral.c,v
retrieving revision 1.7
diff -u -r1.7 tui-wingeneral.c
--- tui/tui-wingeneral.c 8 Feb 2004 00:05:16 -0000 1.7
+++ tui/tui-wingeneral.c 10 Feb 2004 18:59:51 -0000
@@ -28,13 +28,7 @@
#include "tui/tui-wingeneral.h"
#include "tui/tui-win.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
+#include "gdb_curses.h"
/***********************
** PUBLIC FUNCTIONS
Index: tui/tui-winsource.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-winsource.c,v
retrieving revision 1.13
diff -u -r1.13 tui-winsource.c
--- tui/tui-winsource.c 8 Feb 2004 01:32:26 -0000 1.13
+++ tui/tui-winsource.c 10 Feb 2004 18:59:52 -0000
@@ -39,13 +39,7 @@
#include "tui/tui-source.h"
#include "tui/tui-disasm.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
+#include "gdb_curses.h"
/* Function to display the "main" routine. */
void
Index: tui/tui.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui.c,v
retrieving revision 1.45
diff -u -r1.45 tui.c
--- tui/tui.c 8 Feb 2004 01:32:26 -0000 1.45
+++ tui/tui.c 10 Feb 2004 18:59:52 -0000
@@ -38,6 +38,7 @@
#include "defs.h"
#include "gdbcmd.h"
#include "tui/tui.h"
+#include "tui/tui-hooks.h"
#include "tui/tui-data.h"
#include "tui/tui-layout.h"
#include "tui/tui-io.h"
@@ -54,13 +55,7 @@
#include "symtab.h"
#include "source.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
+#include "gdb_curses.h"
/* Tells whether the TUI is active or not. */
int tui_active = 0;
Index: tui/tui.h
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui.h,v
retrieving revision 1.21
diff -u -r1.21 tui.h
--- tui/tui.h 7 Feb 2004 20:57:02 -0000 1.21
+++ tui/tui.h 10 Feb 2004 18:59:52 -0000
@@ -54,12 +54,6 @@
UNDEFINED_WIN /* LAST */
};
-/* This is a point definition. */
-struct tui_point
-{
- int x, y;
-};
-
/* GENERAL TUI FUNCTIONS */
/* tui.c */
extern CORE_ADDR tui_get_low_disassembly_address (CORE_ADDR, CORE_ADDR);
@@ -94,15 +88,8 @@
/* Change the TUI key mode by installing the appropriate readline keymap. */
extern void tui_set_key_mode (enum tui_key_mode mode);
-extern void tui_initialize_io (void);
-
-extern void tui_initialize_readline (void);
-
extern int tui_active;
-extern void tui_install_hooks (void);
-extern void tui_remove_hooks (void);
-
extern void tui_show_source (const char *file, int line);
extern struct ui_out *tui_out_new (struct ui_file *stream);
@@ -110,8 +97,4 @@
/* tui-layout.c */
extern enum tui_status tui_set_layout_for_display_command (const char *name);
-/* tui-winsource.c */
-extern void tui_update_all_exec_infos (void);
-
#endif
-