Only have one API for unfiltered output
[binutils-gdb.git] / gdb / top.c
index e225662950b47a6dde9e15047b458e6071051d27..afd3c94283d4e6deea15d0852101f466d81e070f 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -247,13 +247,6 @@ void (*deprecated_readline_end_hook) (void);
 void (*deprecated_attach_hook) (void);
 void (*deprecated_detach_hook) (void);
 
-/* Called when going to wait for the target.  Usually allows the GUI
-   to run while waiting for target events.  */
-
-ptid_t (*deprecated_target_wait_hook) (ptid_t ptid,
-                                      struct target_waitstatus *status,
-                                      int options);
-
 /* Used by UI as a wrapper around command execution.  May do various
    things like enabling/disabling buttons, etc...  */
 
@@ -385,7 +378,7 @@ new_ui_command (const char *args, int from_tty)
     ui.release ();
   }
 
-  printf_unfiltered ("New UI allocated\n");
+  printf_filtered ("New UI allocated\n");
 }
 
 /* Handler for SIGHUP.  */
@@ -652,7 +645,7 @@ execute_command (const char *p, int from_tty)
          std::string prefixname = c->prefixname ();
           std::string prefixname_no_space
            = prefixname.substr (0, prefixname.length () - 1);
-         printf_unfiltered
+         printf_filtered
            ("\"%s\" must be followed by the name of a subcommand.\n",
             prefixname_no_space.c_str ());
          help_list (*c->subcommands, prefixname.c_str (), all_commands,
@@ -873,7 +866,7 @@ gdb_readline_no_editing (const char *prompt)
       /* Don't use a _filtered function here.  It causes the assumed
         character position to be off, since the newline we read from
         the user is not accounted for.  */
-      fputs_unfiltered (prompt, gdb_stdout);
+      printf_unfiltered ("%s", prompt);
       gdb_flush (gdb_stdout);
     }
 
@@ -1364,7 +1357,7 @@ command_line_input (const char *prompt_arg, const char *annotation_suffix)
       /* Make sure that all output has been output.  Some machines may
         let you get away with leaving out some of the gdb_flush, but
         not all.  */
-      wrap_here ("");
+      gdb_stdout->wrap_here (0);
       gdb_flush (gdb_stdout);
       gdb_flush (gdb_stderr);
 
@@ -1372,11 +1365,7 @@ command_line_input (const char *prompt_arg, const char *annotation_suffix)
        ++source_line_number;
 
       if (from_tty && annotation_level > 1)
-       {
-         puts_unfiltered ("\n\032\032pre-");
-         puts_unfiltered (annotation_suffix);
-         puts_unfiltered ("\n");
-       }
+       printf_unfiltered ("\n\032\032pre-%s\n", annotation_suffix);
 
       /* Don't use fancy stuff if not talking to stdin.  */
       if (deprecated_readline_hook