/* UI_FILE - a generic STDIO like output stream.
- Copyright (C) 1999, 2000, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2007, 2008, 2009, 2010
+ Free Software Foundation, Inc.
This file is part of GDB.
#ifndef UI_FILE_H
#define UI_FILE_H
+struct obstack;
struct ui_file;
/* Create a generic ui_file object with null methods. */
/* Returns a freshly allocated buffer containing the entire contents
of FILE (as determined by ui_file_put()) with a NUL character
- appended. LENGTH is set to the size of the buffer minus that
- appended NUL. */
+ appended. LENGTH, if not NULL, is set to the size of the buffer
+ minus that appended NUL. */
extern char *ui_file_xstrdup (struct ui_file *file, long *length);
-
+/* Similar to ui_file_xstrdup, but return a new string allocated on
+ OBSTACK. */
+extern char *ui_file_obsavestring (struct ui_file *file,
+ struct obstack *obstack, long *length);
extern long ui_file_read (struct ui_file *file, char *buf, long length_buf);