Use selected text on reply/forward.
[claws.git] / src / utils.c
index 8d7ce6656849e1c9587be26dc5f6748f28f02acf..67df6503fb5c6584c8e82ae8f584e4ba8a55e2be 100644 (file)
@@ -1842,6 +1842,22 @@ FILE *my_tmpfile(void)
        return tmpfile();
 }
 
+gchar *write_buffer_to_file(const gchar *buf, guint bufsize)
+{
+       FILE *fp;
+       gchar *tmp_file = NULL;
+
+       tmp_file = get_tmp_file();
+       fp = fopen(tmp_file, "w");
+       if (fp) {
+               fwrite(buf, 1, bufsize, fp);
+               fclose(fp);
+       }
+       else tmp_file = NULL;
+
+       return tmp_file;
+}
+
 gint execute_async(gchar *const argv[])
 {
        pid_t pid;