]> git.scottworley.com Git - overonion/blobdiff - reverse_lib.h
Add hashing
[overonion] / reverse_lib.h
index f4d7dd677f91657708fe9a2abb25f2d9832e90ad..d8b04802b607c6d07170b88a2b429b4163a1f79c 100644 (file)
@@ -1,8 +1,15 @@
 #ifndef _OVERONION_REVERSE_LIB_H
 #define _OVERONION_REVERSE_LIB_H
 
-/* Copy the contents of input_filename to output_fd backwards.
+#include <stdio.h>
+
+/* Copy the contents of input_filename to output_stream backwards.
  * input_filename must be a real file, not a pipe. */
-void reverse_file(const char* input_filename, int output_fd);
+void reverse_file(const char* input_filename, FILE* output_stream);
+
+/* Save the contents of input_stream to a temporary file.  On EOF,
+ * emit them backwards to output_stream.  Temporary files go in
+ * $TMPDIR if set, /tmp otherwise. */
+void reverse_stream(FILE* input_stream, FILE* output_stream);
 
 #endif /* _OVERONION_REVERSE_LIB_H */