1/* UI_FILE - a generic STDIO like output stream.
2   Copyright (C) 1999-2023 Free Software Foundation, Inc.
3
4   This file is part of GDB.
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 3 of the License, or
9   (at your option) any later version.
10
11   This program is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   GNU General Public License for more details.
15
16   You should have received a copy of the GNU General Public License
17   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
18
19#include "defs.h"
20#include "tui/tui-file.h"
21#include "tui/tui-io.h"
22#include "tui/tui-command.h"
23#include "tui.h"
24
25void
26tui_file::puts (const char *linebuffer)
27{
28  tui_puts (linebuffer);
29  if (!m_buffered)
30    tui_refresh_cmd_win ();
31}
32
33void
34tui_file::write (const char *buf, long length_buf)
35{
36  tui_write (buf, length_buf);
37  if (!m_buffered)
38    tui_refresh_cmd_win ();
39}
40
41void
42tui_file::flush ()
43{
44  if (m_buffered)
45    tui_refresh_cmd_win ();
46  stdio_file::flush ();
47}
48