diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-02-10 19:08:19 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-02-10 19:08:19 +0000 |
commit | 6a83354a43c2dc48a253ee15eb62ccd1a8cd1b48 (patch) | |
tree | ebb759b9cd5f1820cb1719a711fc04653840d8c8 /gdb/tui | |
parent | 997470efab22c205bacdd7e0b207b53cdae3e936 (diff) | |
download | gdb-6a83354a43c2dc48a253ee15eb62ccd1a8cd1b48.zip gdb-6a83354a43c2dc48a253ee15eb62ccd1a8cd1b48.tar.gz gdb-6a83354a43c2dc48a253ee15eb62ccd1a8cd1b48.tar.bz2 |
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.
Diffstat (limited to 'gdb/tui')
-rw-r--r-- | gdb/tui/tui-command.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-data.c | 9 | ||||
-rw-r--r-- | gdb/tui/tui-data.h | 13 | ||||
-rw-r--r-- | gdb/tui/tui-disasm.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-hooks.c | 9 | ||||
-rw-r--r-- | gdb/tui/tui-hooks.h | 28 | ||||
-rw-r--r-- | gdb/tui/tui-io.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-layout.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-regs.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-source.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-stack.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-win.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-windata.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-wingeneral.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui-winsource.c | 8 | ||||
-rw-r--r-- | gdb/tui/tui.c | 9 | ||||
-rw-r--r-- | gdb/tui/tui.h | 17 |
17 files changed, 52 insertions, 121 deletions
diff --git a/gdb/tui/tui-command.c b/gdb/tui/tui-command.c index a182b4c..bdb96e2 100644 --- a/gdb/tui/tui-command.c +++ b/gdb/tui/tui-command.c @@ -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" /***************************************** diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c index 1f41023..2b6faa3 100644 --- a/gdb/tui/tui-data.c +++ b/gdb/tui/tui-data.c @@ -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 diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index 8628172..dd8c230 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -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 diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c index a431121..19226b3 100644 --- a/gdb/tui/tui-disasm.c +++ b/gdb/tui/tui-disasm.c @@ -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 { diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c index 43519d0..fbdf5bf 100644 --- a/gdb/tui/tui-hooks.c +++ b/gdb/tui/tui-hooks.c @@ -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; diff --git a/gdb/tui/tui-hooks.h b/gdb/tui/tui-hooks.h new file mode 100644 index 0000000..fa1137d --- /dev/null +++ b/gdb/tui/tui-hooks.h @@ -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 diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c index 6ca2bee..addb3b0 100644 --- a/gdb/tui/tui-io.c +++ b/gdb/tui/tui-io.c @@ -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) diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index 341d3cd..4e3de8f 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -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 diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index d3ff1eb..7ce92c2 100644 --- a/gdb/tui/tui-regs.c +++ b/gdb/tui/tui-regs.c @@ -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 ** diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c index f97de2f..5a148a6 100644 --- a/gdb/tui/tui-source.c +++ b/gdb/tui/tui-source.c @@ -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 diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c index 7285dab..0ee5389 100644 --- a/gdb/tui/tui-stack.c +++ b/gdb/tui/tui-stack.c @@ -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. diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index 3950a7c..afd4b10 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -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> diff --git a/gdb/tui/tui-windata.c b/gdb/tui/tui-windata.c index 6f22d0c..a69fb03 100644 --- a/gdb/tui/tui-windata.c +++ b/gdb/tui/tui-windata.c @@ -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" /***************************************** diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c index 1bd9460..3dc62d5 100644 --- a/gdb/tui/tui-wingeneral.c +++ b/gdb/tui/tui-wingeneral.c @@ -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 diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index 6b77c40..6a2b9cf 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -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 diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index c05c8f9..2da728f 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -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; diff --git a/gdb/tui/tui.h b/gdb/tui/tui.h index 9ba1a35..d7b741c 100644 --- a/gdb/tui/tui.h +++ b/gdb/tui/tui.h @@ -54,12 +54,6 @@ enum tui_win_type 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 @@ extern enum tui_key_mode tui_current_key_mode; /* 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 @@ extern struct ui_out *tui_out_new (struct ui_file *stream); /* 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 - |