2 #include "statichuff.h"
5 int main(int argc, char* argv[])
10 long int volumesize = 0;
13 while ((ch = getopt(argc, argv, "cdt:")) != -1) {
23 volumesize = atoi(optarg);
26 default: fprintf(stderr, "Usage: %s [-cdt] sourcefile targetfile\n", argv[0]);
31 if ( (argc == 1) || (cflag & dflag) || !(cflag | dflag) || ((argc - optind) < 2) ) {
32 fprintf(stderr, "Usage: %s [-cdt] sourcefile targetfile\n", argv[0]);
33 if ((tflag == 1) && (volumesize < 0)) fprintf(stderr,"Error: The volume size must be a non-zero value\n");
39 return shuff_encode_file(argv[optind],argv[optind+1],volumesize*1024);
44 return shuff_decode_file(argv[optind],argv[optind+1]);