#include #include #include "dff.h" int main(int argc, char *argv[]) { int end; FILE *d, *d1; DFF *dff; if (argc < 2) { fprintf(stderr, "Usage: %s dff\n", argv[0]); exit(1); } if ((d = fopen(argv[1], "rb")) == NULL) { fprintf(stderr, "Couldn't open file %s\n", argv[1]); exit(1); } if ((d1 = fopen(argv[2], "wb")) == NULL) { fprintf(stderr, "Couldn't open file %s\n", argv[2]); exit(1); } fseek(d, 0, SEEK_END); end = ftell(d); fseek(d, 0, 0); dff = dffread(d, 0, end); writeclump(&dff->clp[0], d1); /* printf("%d\n", dff->clumpcount); */ return 0; }