2000-03-28 J.T. Conklin <jtc@redback.com>
[deliverable/binutils-gdb.git] / gdb / main.c
index 6c9baa34c21d2bc4d212a43a90e44f64ff3c6813..9f845a89c5ea02d53af4993e96d0ce1edf1ea749 100644 (file)
@@ -53,6 +53,11 @@ int display_space;
    processes UI events asynchronously. */
 int event_loop_p = 1;
 
+#ifdef UI_OUT
+/* Has an interpreter been specified and if so, which. */
+char *interpreter_p;
+#endif
+
 /* Whether this is the command line version or not */
 int tui_version = 0;
 
@@ -255,9 +260,16 @@ captured_main (void *data)
       {"command", required_argument, 0, 'x'},
       {"version", no_argument, &print_version, 1},
       {"x", required_argument, 0, 'x'},
+#ifdef GDBTK
+      {"tclcommand", required_argument, 0, 'z'},
+      {"enable-external-editor", no_argument, 0, 'y'},
+      {"editor-command", required_argument, 0, 'w'},
+#endif
+#ifdef UI_OUT
       {"ui", required_argument, 0, 'i'},
       {"interpreter", required_argument, 0, 'i'},
       {"i", required_argument, 0, 'i'},
+#endif
       {"directory", required_argument, 0, 'd'},
       {"d", required_argument, 0, 'd'},
       {"cd", required_argument, 0, 11},
@@ -334,6 +346,45 @@ captured_main (void *data)
                                             cmdsize * sizeof (*cmdarg));
              }
            break;
+#ifdef GDBTK
+         case 'z':
+           {
+             extern int gdbtk_test PARAMS ((char *));
+             if (!gdbtk_test (optarg))
+               {
+                 fprintf_unfiltered (gdb_stderr, "%s: unable to load tclcommand file \"%s\"",
+                                     argv[0], optarg);
+                 exit (1);
+               }
+             break;
+           }
+         case 'y':
+           {
+             /*
+              * This enables the edit/button in the main window, even
+              * when IDE_ENABLED is set to false. In this case you must
+              * use --tclcommand to specify a tcl/script to be called,
+              * Tcl/Variable to store the edit/command is:
+              * external_editor
+              */
+             enable_external_editor = 1;
+             break;
+           }
+         case 'w':
+           {
+             /*
+              * if editor command is enabled, both flags are set
+              */
+             enable_external_editor = 1;
+             external_editor_command = xstrdup (optarg);
+             break;
+           }
+#endif /* GDBTK */
+#ifdef UI_OUT
+         case 'i':
+           interpreter_p = optarg;
+           break;
+#endif
          case 'd':
            dirarg[ndir++] = optarg;
            if (ndir >= dirsize)
This page took 0.027436 seconds and 4 git commands to generate.