/* UI_FILE - a generic STDIO like output stream.
- Copyright (C) 1999-2018 Free Software Foundation, Inc.
+ Copyright (C) 1999-2019 Free Software Foundation, Inc.
This file is part of GDB.
#include "ui-file.h"
#include "gdb_obstack.h"
#include "gdb_select.h"
-#include "filestuff.h"
+#include "common/filestuff.h"
null_file null_stream;
void
ui_file::putstrn (const char *str, int n, int quoter)
{
- fputstrn_unfiltered (str, n, quoter, this);
+ fputstrn_unfiltered (str, n, quoter, fputc_unfiltered, this);
}
int
void
stdio_file::puts (const char *linebuffer)
{
+ /* This host-dependent function (with implementations in
+ posix-hdep.c and mingw-hdep.c) is given the opportunity to
+ process the output first in host-dependent way. If it does, it
+ should return non-zero, to avoid calling fputs below. */
+ if (gdb_console_fputs (linebuffer, m_file))
+ return;
/* Calling error crashes when we are called from the exception framework. */
if (fputs (linebuffer, m_file))
{