summaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
authorJason Molenda <jsm@bugshack.cygnus.com>2000-02-01 03:19:29 +0000
committerJason Molenda <jsm@bugshack.cygnus.com>2000-02-01 03:19:29 +0000
commitad3106c7356724dbf6c26594916e1fd0c88120ec (patch)
treeb406604171b1753986343da333d6bdce47139fa7 /gdb/main.c
parent71cf70deba13c380ea38eaa3f88dad258d1ba76e (diff)
downloadgdb-ad3106c7356724dbf6c26594916e1fd0c88120ec.tar.gz
import gdb-2000-01-31 snapshot
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/gdb/main.c b/gdb/main.c
index 1eb36aef0c0..7ccc47fbd42 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -33,6 +33,11 @@
#include "gdb_string.h"
#include "event-loop.h"
+#if defined (TUI) || defined (GDBTK)
+/* FIXME: cagney/2000-01-31: This #include is to allow older code such
+ as that found in the TUI to continue to build. */
+#include "tui/tui-file.h"
+#endif
/* If nonzero, display time usage both at startup and for each command. */
@@ -187,17 +192,19 @@ captured_main (void *data)
getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
current_directory = gdb_dirbuf;
-#if 0
- /* not yet */
- gdb_stdout = stdio_fileopen (stdout);
- gdb_stderr = stdio_fileopen (stderr);
- gdb_stdlog = gdb_stderr; /* for moment */
- gdb_stdtarg = gdb_stderr; /* for moment */
-#else
+#if defined (TUI) || defined (GDBTK)
+ /* Older code uses the tui_file and fputs_unfiltered_hook(). It
+ should be using a customized GDB_FILE object and re-initializing
+ within its own _initialize function. */
gdb_stdout = tui_fileopen (stdout);
gdb_stderr = tui_fileopen (stderr);
gdb_stdlog = gdb_stdout; /* for moment */
gdb_stdtarg = gdb_stderr; /* for moment */
+#else
+ gdb_stdout = stdio_fileopen (stdout);
+ gdb_stderr = stdio_fileopen (stderr);
+ gdb_stdlog = gdb_stderr; /* for moment */
+ gdb_stdtarg = gdb_stderr; /* for moment */
#endif
/* initialize error() */