1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-23 03:13:01 +01:00

added -n argument to toxic to disable loading keys from file (for testing)

This commit is contained in:
irungentoo 2013-08-08 18:50:29 -04:00
parent 7501822535
commit 7de004aea1

4
main.c
View File

@ -354,6 +354,7 @@ int main(int argc, char *argv[])
char *user_config_dir = get_user_config_dir(); char *user_config_dir = get_user_config_dir();
char *filename; char *filename;
int config_err = create_user_config_dir(user_config_dir); int config_err = create_user_config_dir(user_config_dir);
uint8_t loadfromfile = 1;
if(config_err) { if(config_err) {
filename = "data"; filename = "data";
} else { } else {
@ -374,12 +375,15 @@ int main(int argc, char *argv[])
filename = argv[i + 1]; filename = argv[i + 1];
else else
f_flag = -1; f_flag = -1;
} else if (argv[i][1] == 'n') {
loadfromfile = 0;
} }
} }
} }
init_term(); init_term();
init_tox(); init_tox();
if(loadfromfile)
load_data(filename); load_data(filename);
free(filename); free(filename);
init_windows(); init_windows();