home *** CD-ROM | disk | FTP | other *** search
- /*
- * UNCOMPRESSBATCH.C
- *
- * UNCOMPRESSBATCH [file]
- *
- * skips cunbatch line and calls uncompress, output to stdout
- */
-
- #include <stdio.h>
- #include <stdlib.h>
- #include "config.h"
- #include "lib_protos.h"
- #include "OwnDevUnit.h"
-
- struct Library *OwnDevUnitBase = NULL;
-
- int main(int ac, char **av)
- {
- char buf[256];
- short bits;
- int r;
-
- if (ac != 1) {
- if (freopen(av[1], "r", stdin) == NULL) {
- fprintf(stderr, "unable to open %s\n", av[1]);
- exit(20);
- }
- }
- fgets(buf, sizeof(buf), stdin);
-
- r = unix_uncompress_to_fp(stdin, stdout, &bits);
- if (r < 0)
- fprintf(stderr, "*** ERROR UNCOMPRESSING BATCH ***\n");
- return(r);
- }
-