diff options
Diffstat (limited to 'testing/toxic/main.c')
-rw-r--r-- | testing/toxic/main.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/testing/toxic/main.c b/testing/toxic/main.c index 001d3382..3b45a89f 100644 --- a/testing/toxic/main.c +++ b/testing/toxic/main.c | |||
@@ -283,6 +283,7 @@ void prepare_window(WINDOW* w) { | |||
283 | int main(int argc, char* argv[]) { | 283 | int main(int argc, char* argv[]) { |
284 | int ch; | 284 | int ch; |
285 | int i = 0; | 285 | int i = 0; |
286 | int f_flag = 0; | ||
286 | char *filename = "data"; | 287 | char *filename = "data"; |
287 | ToxWindow* a; | 288 | ToxWindow* a; |
288 | 289 | ||
@@ -292,7 +293,7 @@ int main(int argc, char* argv[]) { | |||
292 | if(argv[i + 1] != NULL) | 293 | if(argv[i + 1] != NULL) |
293 | filename = argv[i + 1]; | 294 | filename = argv[i + 1]; |
294 | else { | 295 | else { |
295 | fputs("[!] you passed '-f' without giving an argument!\n", stderr); | 296 | f_flag = -1; |
296 | } | 297 | } |
297 | } | 298 | } |
298 | } | 299 | } |
@@ -303,6 +304,14 @@ int main(int argc, char* argv[]) { | |||
303 | load_data(filename); | 304 | load_data(filename); |
304 | init_windows(); | 305 | init_windows(); |
305 | 306 | ||
307 | if(f_flag == -1) { | ||
308 | attron(COLOR_PAIR(3) | A_BOLD); | ||
309 | wprintw(prompt->window, "You passed '-f' without giving an argument!\n" | ||
310 | "defaulting to 'data' for a keyfile...\n"); | ||
311 | attroff(COLOR_PAIR(3) | A_BOLD); | ||
312 | } | ||
313 | |||
314 | |||
306 | while(true) { | 315 | while(true) { |
307 | // Update tox. | 316 | // Update tox. |
308 | do_tox(); | 317 | do_tox(); |