Move readline to the readline/readline subdirectory
[deliverable/binutils-gdb.git] / gdb / main.c
index 7fab8ff8dad5789a1585c462e5cc425c5f3295c1..a77d6ec44c56526c3973680c7365c76f577e6079 100644 (file)
@@ -48,6 +48,9 @@
 #include <vector>
 #include "gdbsupport/pathstuff.h"
 #include "cli/cli-style.h"
+#ifdef GDBTK
+#include "gdbtk/generic/gdbtk.h"
+#endif
 
 /* The selected interpreter.  This will be used as a set command
    variable, so it should always be malloc'ed - since
@@ -214,8 +217,7 @@ relocate_gdbinit_path_maybe_in_datadir (const std::string& file)
       size_t start = datadir_len;
       for (; IS_DIR_SEPARATOR (file[start]); ++start)
        ;
-      relocated_path = (std::string (gdb_datadir) + SLASH_STRING
-                       + file.substr (start));
+      relocated_path = gdb_datadir + SLASH_STRING + file.substr (start);
     }
   else
     {
@@ -549,9 +551,8 @@ captured_main_1 (struct captured_main_args *context)
     = xstrdup (relocate_gdb_directory (DEBUGDIR,
                                     DEBUGDIR_RELOCATABLE).c_str ());
 
-  gdb_datadir
-    = xstrdup (relocate_gdb_directory (GDB_DATADIR,
-                                    GDB_DATADIR_RELOCATABLE).c_str ());
+  gdb_datadir = relocate_gdb_directory (GDB_DATADIR,
+                                       GDB_DATADIR_RELOCATABLE);
 
 #ifdef WITH_PYTHON_PATH
   {
@@ -766,8 +767,6 @@ captured_main_1 (struct captured_main_args *context)
 #ifdef GDBTK
          case 'z':
            {
-             extern int gdbtk_test (char *);
-
              if (!gdbtk_test (optarg))
                error (_("%s: unable to load tclcommand file \"%s\""),
                       gdb_program_name, optarg);
@@ -780,8 +779,6 @@ captured_main_1 (struct captured_main_args *context)
            {
              /* Set the external editor commands when gdb is farming out files
                 to be edited by another program.  */
-             extern char *external_editor_command;
-
              external_editor_command = xstrdup (optarg);
              break;
            }
@@ -914,7 +911,7 @@ captured_main_1 (struct captured_main_args *context)
     }
 
   /* Lookup gdbinit files.  Note that the gdbinit file name may be
-     overriden during file initialization, so get_init_files should be
+     overridden during file initialization, so get_init_files should be
      called after gdb_init.  */
   std::string system_gdbinit;
   std::string home_gdbinit;
This page took 0.026048 seconds and 4 git commands to generate.