char* output = NULL;
uint64_t split = 0;
- uint32_t c = 0;
- while ((c = getopt(argc, argv, ":59bcf:hi:o:v")) != -1) {
- switch (c) {
+ struct option loption[] = {
+ { "input", required_argument, 0, 'i' },
+ { "output", required_argument, 0, 'o' },
+ { "dvd5", no_argument, 0, '5' },
+ { "dvd9", no_argument, 0, '9' },
+ { "bluray", no_argument, 0, 'b' },
+ { "cd", no_argument, 0, 'c' },
+ { "help", no_argument, 0, 'h' },
+ { "version", no_argument, 0, 'v' },
+ { "free-size", required_argument, 0, 'f' }
+ };
+
+ int32_t opt_index = 0;
+ int32_t opt_value = 0;
+ for (uint32_t i = 0; i < argc; i++) {
+ opt_index = 0;
+ opt_value = getopt_long(argc, argv, "i:o:59bcfhv", loption, &opt_index);
+ switch (opt_value) {
+ case -1:
+ break;
case 'i':
input = optarg;
break;