3 * This file is part of dds2tar.
4 * Copyright by J"org Weule
9 #define C_MODE 1 /* compressed */
10 #define T_MODE 0 /* transparent */
13 * Use popen and gzip to open a file with transparent compression.
14 * The mode may be "r" or "w".
17 char const *, /* pathname */
18 int const, /* compression, e.g. 0 or 1 */
19 char const *const /* open mode, e.g. "r" or "w" */
23 * Open a pipe to a child process on a given file number, e.g. 1.
25 * Example of a pipe to tar -t:
26 * static char * av[] = {"/bin/tar","-t",NULL};
27 * creopen(1,0,"/bin/tar",av,NULL);
30 int const, /* file number of the parent */
31 int const, /* file number of the child */
32 char const *const, /* name of the program */
33 char const *const * /* argv of the program */
36 extern int cclose(int const);
39 * Open a file on a given file number, e.g. 1.
42 int const, /* file number */
43 char const *const, /* name of the file */
44 int const, /* mode of the open */
45 int const /* file mode */