/* command line option handling functions */
/* ------------------------------------------------------------------------- */
-void GetOptions(char *argv[], void (*print_usage_function)(void))
+void GetOptions(char *argv[],
+ void (*print_usage_function)(void),
+ void (*print_version_function)(void))
{
char *ro_base_path = RO_BASE_PATH;
char *rw_base_path = RW_BASE_PATH;
option_len = strlen(option);
if (strEqual(option, "-"))
+ {
Error(ERR_EXIT_HELP, "unrecognized option '%s'", option);
+ }
else if (strncmp(option, "-help", option_len) == 0)
{
print_usage_function();
exit(0);
}
+ else if (strncmp(option, "-version", option_len) == 0 ||
+ strncmp(option, "-V", option_len) == 0)
+ {
+ print_version_function();
+
+ exit(0);
+ }
else if (strncmp(option, "-display", option_len) == 0)
{
if (option_arg == NULL)