X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fui-file.h;h=1562d5a75dbbace83e9013a7b137afd6ee1cddf8;hb=8dfc33311a3f662f4ec519f965879cc9e8e58705;hp=c805335bc5f90e66c56d30fc8a490e30e5e197c4;hpb=d9fcf2fb1c12d48f657c974dc5b6898022bf9ccf;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/ui-file.h b/gdb/ui-file.h index c805335bc5..1562d5a75d 100644 --- a/gdb/ui-file.h +++ b/gdb/ui-file.h @@ -1,11 +1,11 @@ /* UI_FILE - a generic STDIO like output stream. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GDB. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -14,9 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + along with this program. If not, see . */ #ifndef UI_FILE_H #define UI_FILE_H @@ -41,6 +39,9 @@ extern void set_ui_file_write (struct ui_file *stream, ui_file_write_ftype *fput typedef void (ui_file_fputs_ftype) (const char *, struct ui_file * stream); extern void set_ui_file_fputs (struct ui_file *stream, ui_file_fputs_ftype * fputs); +typedef long (ui_file_read_ftype) (struct ui_file * stream, char *buf, long length_buf); +extern void set_ui_file_read (struct ui_file *stream, ui_file_read_ftype *fread); + typedef int (ui_file_isatty_ftype) (struct ui_file * stream); extern void set_ui_file_isatty (struct ui_file *stream, ui_file_isatty_ftype * isatty); @@ -78,6 +79,8 @@ extern char *ui_file_xstrdup (struct ui_file *file, long *length); +extern long ui_file_read (struct ui_file *file, char *buf, long length_buf); + /* Create/open a memory based file. Can be used as a scratch buffer for collecting output. */ extern struct ui_file *mem_fileopen (void); @@ -90,4 +93,11 @@ extern struct ui_file *stdio_fileopen (FILE *file); /* Open NAME returning an STDIO based UI_FILE. */ extern struct ui_file *gdb_fopen (char *name, char *mode); +/* Create a file which writes to both ONE and TWO. CLOSE_ONE + and CLOSE_TWO indicate whether the original files should be + closed when the new file is closed. */ +struct ui_file *tee_file_new (struct ui_file *one, + int close_one, + struct ui_file *two, + int close_two); #endif