mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-12 06:57:33 +02:00
This also refactors temp_stream() to its own module, in preparation for use by split. * src/tac.c: Refactor temp_stream() out to ... * src/temp-stream.c: ... A new module mostly refactored from tac, but uses tmpdir to more robustly support $TMPDIR, while falling back to /tmp if not available. * src/temp-stream.h: The new module interface. * src/local.mk: Reference the new module from tac. * tests/tac/tac.pl: Adjust to non failing missing $TMPDIR. * po/POTFILES.in: Reference the new module with translatable strings. * NEWS: Mention the user visible improvements to tac TMPDIR handling.
7 lines
321 B
C
7 lines
321 B
C
/* A wrapper around mkstemp that gives us both an open stream pointer,
|
|
FP, and the corresponding FILE_NAME. Always return the same FP/name
|
|
pair, rewinding/truncating it upon each reuse.
|
|
|
|
Note this honors $TMPDIR, unlike the standard defined tmpfile(). */
|
|
extern bool temp_stream (FILE **fp, char **file_name);
|