ToxWindow *init_windows(Tox *m) { int n_prompt = add_window(m, new_prompt()); if (n_prompt == -1 || add_window(m, new_friendlist()) == -1) exit_toxic_err("failed in init_windows", FATALERR_WININIT); prompt = &windows[n_prompt]; active_window = prompt; return prompt; }
static void init_windows() { w_num = 0; int n_prompt = 0; int n_friendslist = 1; if (add_window(new_prompt(), n_prompt) == -1 || add_window(new_friendlist(), n_friendslist) == -1) { fprintf(stderr, "add_window() failed.\n"); endwin(); exit(1); } prompt = &windows[n_prompt]; }
static void init_windows() { w_num = 0; w_active = 0; if(add_window(new_prompt()) == -1 || add_window(new_friendlist()) == -1) { fprintf(stderr, "add_window() failed.\n"); endwin(); exit(1); } prompt = &windows[0]; }
ToxWindow * init_windows() { w_num = 0; int n_prompt = 0; int n_friendslist = 1; if (add_window(m, new_prompt(on_friendadded), n_prompt) == -1 || add_window(m, new_friendlist(WINDOW_STATUS), n_friendslist) == -1) { fprintf(stderr, "add_window() failed.\n"); endwin(); exit(1); } prompt = &windows[n_prompt]; return prompt; }
ToxWindow *init_windows(Tox *m) { int n_prompt = add_window(m, new_prompt()); if (n_prompt == -1 || add_window(m, new_friendlist()) == -1) { endwin(); fprintf(stderr, "add_window() failed. Aborting...\n"); exit(EXIT_FAILURE); } prompt = &windows[n_prompt]; active_window = prompt; return prompt; }