[cmd] add -g option to disable the commandline hogger (rufus.com)

* This can be useful when launching Rufus from the commandline or a batch file with 'start /wait'
* Also fix a crash when specifying an unknown commandline option
* Also fix the commandline usage help
This commit is contained in:
Pete Batard 2015-02-22 01:14:00 +00:00
parent fe55f30277
commit 821a9df1c8
3 changed files with 88 additions and 49 deletions

View file

@ -72,6 +72,7 @@ static htab_table htab_loc = HTAB_EMPTY;
int loc_line_nr;
struct list_head locale_list = {NULL, NULL};
char *loc_filename = NULL, *embedded_loc_filename = "embedded.loc";
static BOOL localization_initialized = FALSE;
/* Message table */
char* default_msg_table[MSG_MAX-MSG_000] = {"%s", 0};
@ -188,9 +189,12 @@ void _init_localization(BOOL reinit) {
if (!reinit)
list_init(&locale_list);
htab_create(LOC_HTAB_SIZE, &htab_loc);
localization_initialized = TRUE;
}
void _exit_localization(BOOL reinit) {
if (!localization_initialized)
return;
if (!reinit) {
free_locale_list();
if (loc_filename != embedded_loc_filename)