]> git.scottworley.com Git - overonion/blame_incremental - reverse_lib.h
keyline() and keyfield() operations
[overonion] / reverse_lib.h
... / ...
CommitLineData
1#ifndef _OVERONION_REVERSE_LIB_H
2#define _OVERONION_REVERSE_LIB_H
3
4#include <stdio.h>
5
6/* Copy the contents of input_filename to output_stream backwards.
7 * input_filename must be a real file, not a pipe. */
8void reverse_file(const char* input_filename, FILE* output_stream);
9
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. */
13void reverse_stream(FILE* input_stream, FILE* output_stream);
14
15#endif /* _OVERONION_REVERSE_LIB_H */