]>
Commit | Line | Data |
---|---|---|
b398ee5a SW |
1 | #ifndef _OVERONION_REVERSE_LIB_H |
2 | #define _OVERONION_REVERSE_LIB_H | |
3 | ||
a99e77b4 SW |
4 | #include <stdio.h> |
5 | ||
6 | /* Copy the contents of input_filename to output_stream backwards. | |
b398ee5a | 7 | * input_filename must be a real file, not a pipe. */ |
a99e77b4 | 8 | void reverse_file(const char* input_filename, FILE* output_stream); |
b398ee5a | 9 | |
a3915755 SW |
10 | /* Save the contents of input_stream to a temporary file. On EOF, |
11 | * emit them backwards to output_stream. Temporary files go in | |
12 | * $TMPDIR if set, /tmp otherwise. */ | |
13 | void reverse_stream(FILE* input_stream, FILE* output_stream); | |
14 | ||
b398ee5a | 15 | #endif /* _OVERONION_REVERSE_LIB_H */ |