#include #include #include "errorAndExit.h" void errorAndExit() { fprintf(stderr, "\nUsage:\n"); fprintf(stderr, " ./patcher-installer --disk main.z01 --offset 456z --size 1000 [--keys 123,123,123] [--prev oldfile.tor]\n"); fprintf(stderr, "Options:\n"); fprintf(stderr, " -d, --disk: The path to the disk file that contains the file we want to extract.\n"); fprintf(stderr, " -o, --offset: The offset into the disk, given in bytes, where the local file header of the file we want to extract starts.\n"); fprintf(stderr, " -s, --size: The stored size of the file we want to extract (= the compressed size). After inflation, the file will likely be bigger than this.\n"); fprintf(stderr, " -k, --keys: Optionally, the three decryption keys used to decrypt the file before inflation.\n"); fprintf(stderr, " -p, --previous: Optionally, the location of the previous version of this file, in case this disk only contains the xdelta3 differences and not an actual file.\n"); exit(1); }