+ else if (strncmp(option, "-basepath", option_len) == 0)
+ {
+ if (option_arg == NULL)
+ Error(ERR_EXIT_HELP, "option '%s' requires an argument", option_str);
+
+ options.base_directory = option_arg;
+ if (option_arg == next_option)
+ options_left++;
+
+ printf("--basepath == '%s'\n", options.base_directory);
+
+ /* adjust path for level directory accordingly */
+ options.level_directory = checked_malloc(strlen(options.base_directory) +
+ strlen(LEVELS_DIRECTORY) + 2);
+ sprintf(options.level_directory, "%s/%s",
+ options.base_directory, LEVELS_DIRECTORY);
+ }