if (!event_loop_p) { add_show_from_set (add_set_cmd ("editing", class_support, var_boolean, (char *) &command_editing_p, "Set editing of command lines as they are typed.\n\ Use \"on\" to enable the editing, and \"off\" to disable it.\n\ Without an argument, command line editing is enabled.  To edit, use\n\ EMACS-like or VI-like commands like control-P or ESC.", &setlist), &showlist); } else { c = add_set_cmd ("editing", class_support, var_boolean, (char *) &async_command_editing_p, "Set editing of command lines as they are typed.\n\
c = add_set_cmd ("editing", class_support, var_boolean, (char *) &async_command_editing_p, "Set editing of command lines as they are typed.\n\
init_main (void){  struct cmd_list_element *c;  /* If we are running the asynchronous version,     we initialize the prompts differently. */  if (!event_loop_p)    {      gdb_prompt_string = savestring (DEFAULT_PROMPT, strlen (DEFAULT_PROMPT));    }  else    {      /* initialize the prompt stack to a simple "(gdb) " prompt or to         whatever the DEFAULT_PROMPT is. */      the_prompts.top = 0;      PREFIX (0) = "";      PROMPT (0) = savestring (DEFAULT_PROMPT, strlen (DEFAULT_PROMPT));      SUFFIX (0) = "";      /* Set things up for annotation_level > 1, if the user ever decides         to use it. */      async_annotation_suffix = "prompt";      /* Set the variable associated with the setshow prompt command. */      new_async_prompt = savestring (PROMPT (0), strlen (PROMPT (0)));      /* If gdb was started with --annotate=2, this is equivalent to	 the user entering the command 'set annotate 2' at the gdb	 prompt, so we need to do extra processing. */      if (annotation_level > 1)        set_async_annotation_level (NULL, 0, NULL);    }  /* Set the important stuff up for command editing.  */  command_editing_p = 1;  history_expansion_p = 0;  write_history_p = 0;  /* Setup important stuff for command line editing.  */  rl_completion_entry_function = readline_line_completion_function;  rl_completer_word_break_characters = default_word_break_characters ();  rl_completer_quote_characters = get_gdb_completer_quote_characters ();  rl_readline_name = "gdb";  rl_terminal_name = getenv ("TERM");  /* The name for this defun comes from Bash, where it originated.     15 is Control-o, the same binding this function has in Bash.  */  rl_add_defun ("operate-and-get-next", gdb_rl_operate_and_get_next, 15);  /* The set prompt command is different depending whether or not the     async version is run. NOTE: this difference is going to     disappear as we make the event loop be the default engine of     gdb. */  if (!event_loop_p)    {      add_show_from_set	(add_set_cmd ("prompt", class_support, var_string,		      (char *) &gdb_prompt_string, "Set gdb's prompt",		      &setlist),	 &showlist);    }  else    {      c = add_set_cmd ("prompt", class_support, var_string,		       (char *) &new_async_prompt, "Set gdb's prompt",		       &setlist);      add_show_from_set (c, &showlist);      set_cmd_sfunc (c, set_async_prompt);    }  add_com ("dont-repeat", class_support, dont_repeat_command, "Don't repeat this command.\n\Primarily used inside of user-defined commands that should not be repeated when\n\hitting return.");  /* The set editing command is different depending whether or not the     async version is run. NOTE: this difference is going to disappear     as we make the event loop be the default engine of gdb. */  if (!event_loop_p)    {      add_show_from_set	(add_set_cmd ("editing", class_support, var_boolean, (char *) &command_editing_p,		      "Set editing of command lines as they are typed.\n\Use \"on\" to enable the editing, and \"off\" to disable it.\n\Without an argument, command line editing is enabled.  To edit, use\n\EMACS-like or VI-like commands like control-P or ESC.", &setlist),	 &showlist);    }  else    {      c = add_set_cmd ("editing", class_support, var_boolean, (char *) &async_command_editing_p,		       "Set editing of command lines as they are typed.\n\Use \"on\" to enable the editing, and \"off\" to disable it.\n\Without an argument, command line editing is enabled.  To edit, use\n\EMACS-like or VI-like commands like control-P or ESC.", &setlist);      add_show_from_set (c, &showlist);      set_cmd_sfunc (c, set_async_editing_command);    }  add_show_from_set    (add_set_cmd ("save", no_class, var_boolean, (char *) &write_history_p,		  "Set saving of the history record on exit.\n\Use \"on\" to enable the saving, and \"off\" to disable it.\n\Without an argument, saving is enabled.", &sethistlist),     &showhistlist);  c = add_set_cmd ("size", no_class, var_integer, (char *) &history_size,		   "Set the size of the command history,\n\ie. the number of previous commands to keep a record of.", &sethistlist);  add_show_from_set (c, &showhistlist);  set_cmd_sfunc (c, set_history_size_command);  c = add_set_cmd ("filename", no_class, var_filename,		   (char *) &history_filename,		   "Set the filename in which to record the command history\n\(the list of previous commands of which a record is kept).", &sethistlist);  set_cmd_completer (c, filename_completer);  add_show_from_set (c, &showhistlist);  add_show_from_set    (add_set_cmd ("confirm", class_support, var_boolean,		  (char *) &caution,		  "Set whether to confirm potentially dangerous operations.",		  &setlist),     &showlist);  /* The set annotate command is different depending whether or not     the async version is run. NOTE: this difference is going to     disappear as we make the event loop be the default engine of     gdb. */  if (!event_loop_p)    {      c = add_set_cmd ("annotate", class_obscure, var_zinteger,		       (char *) &annotation_level, "Set annotation_level.\n\0 == normal;     1 == fullname (for use when running under emacs)\n\2 == output annotated suitably for use by programs that control GDB.",		       &setlist);      c = add_show_from_set (c, &showlist);    }  else    {      c = add_set_cmd ("annotate", class_obscure, var_zinteger,		       (char *) &annotation_level, "Set annotation_level.\n\0 == normal;     1 == fullname (for use when running under emacs)\n\2 == output annotated suitably for use by programs that control GDB.",		       &setlist);      add_show_from_set (c, &showlist);      set_cmd_sfunc (c, set_async_annotation_level);    }  if (event_loop_p)    {      add_show_from_set	(add_set_cmd ("exec-done-display", class_support, var_boolean, (char *) &exec_done_display_p,		      "Set notification of completion for asynchronous execution commands.\n\Use \"on\" to enable the notification, and \"off\" to disable it.", &setlist),	 &showlist);    }}