Introduce ui_file_as_string
[deliverable/binutils-gdb.git] / gdb / ui-file.h
index f6df57265ae34c885dfe6a52a0eb23d3cc4621eb..2ed11ded82caf9090e815062a27d222011b6d363 100644 (file)
@@ -22,6 +22,8 @@
 struct obstack;
 struct ui_file;
 
+#include <string>
+
 /* Create a generic ui_file object with null methods.  */
 
 extern struct ui_file *ui_file_new (void);
@@ -117,6 +119,10 @@ extern void ui_file_put (struct ui_file *src,
    minus that appended NUL.  */
 extern char *ui_file_xstrdup (struct ui_file *file, long *length);
 
+/* Returns a std::string containing the entire contents of FILE (as
+   determined by ui_file_put()).  */
+extern std::string ui_file_as_string (struct ui_file *file);
+
 /* Similar to ui_file_xstrdup, but return a new string allocated on
    OBSTACK.  */
 extern char *ui_file_obsavestring (struct ui_file *file,
This page took 0.033879 seconds and 4 git commands to generate.