* cli/cli-cmds.c (_initialize_cli_cmds): New function.
[deliverable/binutils-gdb.git] / gdb / cli / cli-cmds.c
index dcf53694f409db9db989fd752a34e2f8c6a20754..6ee3e3c2e79102d242134933d98ba488926d2ef1 100644 (file)
@@ -762,7 +762,8 @@ edit_command (char *arg, int from_tty)
   struct symbol *sym;
   char *arg1;
   char *editor;
-  char *p, *fn;
+  char *p;
+  const char *fn;
 
   /* Pull in the current default source line if necessary.  */
   if (arg == 0)
@@ -1642,11 +1643,13 @@ show_max_user_call_depth (struct ui_file *file, int from_tty,
 }
 
 \f
+
+initialize_file_ftype _initialize_cli_cmds;
+
 void
-init_cli_cmds (void)
+_initialize_cli_cmds (void)
 {
   struct cmd_list_element *c;
-  char *source_help_text;
 
   /* Define the classes of commands.
      They will appear in the help list in alphabetical order.  */
@@ -1713,20 +1716,6 @@ End with a line of just \"end\".\n\
 Use the \"document\" command to give documentation for the new command.\n\
 Commands defined in this way may have up to ten arguments."));
 
-  source_help_text = xstrprintf (_("\
-Read commands from a file named FILE.\n\
-\n\
-Usage: source [-s] [-v] FILE\n\
--s: search for the script in the source search path,\n\
-    even if FILE contains directories.\n\
--v: each command in FILE is echoed as it is executed.\n\
-\n\
-Note that the file \"%s\" is read automatically in this way\n\
-when GDB is started."), gdbinit);
-  c = add_cmd ("source", class_support, source_command,
-              source_help_text, &cmdlist);
-  set_cmd_completer (c, filename_completer);
-
   add_setshow_enum_cmd ("script-extension", class_support,
                        script_ext_enums, &script_ext_mode, _("\
 Set mode for script filename extension recognition."), _("\
@@ -1938,3 +1927,24 @@ Make \"spe\" an alias of \"set print elements\":\n\
 Make \"elms\" an alias of \"elements\" in the \"set print\" command:\n\
   alias -a set print elms = set print elements"));
 }
+
+void
+init_cli_cmds (void)
+{
+  struct cmd_list_element *c;
+  char *source_help_text;
+
+  source_help_text = xstrprintf (_("\
+Read commands from a file named FILE.\n\
+\n\
+Usage: source [-s] [-v] FILE\n\
+-s: search for the script in the source search path,\n\
+    even if FILE contains directories.\n\
+-v: each command in FILE is echoed as it is executed.\n\
+\n\
+Note that the file \"%s\" is read automatically in this way\n\
+when GDB is started."), gdbinit);
+  c = add_cmd ("source", class_support, source_command,
+              source_help_text, &cmdlist);
+  set_cmd_completer (c, filename_completer);
+}
This page took 0.023491 seconds and 4 git commands to generate.