#include #include #include "dff.h" int main(int argc, char *argv[]) { FILE *dff, *obj, *newdff; clump clp; if (argc < 4) { printf("Usage: %s dff obj newdff\n", argv[0]); exit(1); } if ((dff = fopen(argv[1], "rb")) == NULL) { printf("Couldn't open file: %s\n", argv[1]); exit(1); } if ((obj = fopen(argv[2], "wb")) == NULL) { printf("Couldn't open file: %s\n", argv[2]); exit(1); } if ((newdff = fopen(argv[3], "wb")) == NULL) { printf("Couldn't open file: %s\n", argv[3]); exit(1); } ReadDff(&clp, dff); WriteObj(&clp, obj); WriteDff(&clp, newdff); return 0; }