X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=blobdiff_plain;f=src%2Futils.c;h=67df6503fb5c6584c8e82ae8f584e4ba8a55e2be;hp=8d7ce6656849e1c9587be26dc5f6748f28f02acf;hb=cd2ce4c3f4898481e912a055c6a312baa5b293e7;hpb=7ca5f14a2499189af457af146abd99e7e3cbddb0 diff --git a/src/utils.c b/src/utils.c index 8d7ce6656..67df6503f 100644 --- a/src/utils.c +++ b/src/utils.c @@ -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;