/*
* ar_start_gzip()
- * starts the gzip compression/decompression process as a child, using magic
- * to keep the fd the same in the calling function (parent).
+ * starts the compress, gzip or bzip2 compression/decompression process
+ * as a child, using magic to keep the fd the same in the calling function
+ * (parent).
*/
void
- #ifdef __STDC__
- ar_start_gzip(int fd)
- #else
- ar_start_gzip(fd)
- int fd;
- #endif
+ ar_start_gzip(int fd, const char *gzip_program, int wr)
{
- pid_t pid;
int fds[2];
- char *gzip_flags;
+ const char *gzip_flags;
if (pipe(fds) < 0)
err(1, "could not pipe");