lose the generated ps files
[debian/dds2tar] / zf-cre-open.h
1
2 /*
3  * This file is part of dds2tar.
4  * Copyright by J"org Weule
5  *
6  * Copyright: GPL
7  */
8
9 #define C_MODE 1                /* compressed */
10 #define T_MODE 0                /* transparent */
11
12 /*
13  * Use popen and gzip to open a file with transparent compression.
14  * The mode may be "r" or "w".
15  */
16 extern FILE *zfopen(
17                            char const *,        /* pathname */
18                            int const,   /* compression, e.g. 0 or 1 */
19                            char const *const    /* open mode, e.g. "r" or "w" */
20 );
21
22 /*
23  * Open a pipe to a child process on a given file number, e.g. 1.
24  *
25  * Example of a pipe to tar -t:
26  *                      static char * av[] = {"/bin/tar","-t",NULL};
27  *                      creopen(1,0,"/bin/tar",av,NULL);
28  */
29 extern int creopen(
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 */
34
35 );
36 extern int cclose(int const);
37
38 /*
39  * Open a file on a given file number, e.g. 1.
40  */
41 extern int reopen(
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 */
46 );