]> git.scottworley.com Git - overonion/blobdiff - temp_file.h
Pull out make_temporary_file
[overonion] / temp_file.h
diff --git a/temp_file.h b/temp_file.h
new file mode 100644 (file)
index 0000000..d4fe41e
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef _OVERONION_TEMP_FILE_H
+#define _OVERONION_TEMP_FILE_H
+
+#include <stdio.h>
+
+/* Create a temporary file in $TMPDIR, or /tmp if TMPDIR is not set.
+ * Caller must free temp_filename and fclose temp_file.  Succeeds or terminates
+ * the process. */
+void make_temporary_file(char** temp_filename, FILE** temp_file);
+
+#endif /* _OVERONION_TEMP_FILE_H */