commit 5c5136c581793e9da589af3917c7b59619481ebb from: Stefan Sperling date: Sun May 20 09:46:22 2018 UTC remove unused main window/panel in tog commit - 511a516b74d9f5e498a5dc2de97b0e488df51088 commit + 5c5136c581793e9da589af3917c7b59619481ebb blob - db5f5fc1ee2a0a8f2bc288df7d3b5a2b6178638a blob + d13a58d7ceada39cdf8a15fba84eeb29089826fd --- tog/tog.c +++ tog/tog.c @@ -77,8 +77,6 @@ struct tog_cmd tog_commands[] = { }; /* globals */ -WINDOW *tog_main_win; -PANEL *tog_main_panel; static struct tog_log_view { WINDOW *window; PANEL *panel; @@ -944,7 +942,7 @@ cmd_blame(int argc, char *argv[]) return got_error(GOT_ERR_NOT_IMPL); } -static const struct got_error * +static void init_curses(void) { initscr(); @@ -954,15 +952,6 @@ init_curses(void) intrflush(stdscr, FALSE); keypad(stdscr, TRUE); curs_set(0); - - tog_main_win = newwin(0, 0, 0, 0); - if (tog_main_win == NULL) - return got_error_from_errno(); - tog_main_panel = new_panel(tog_main_win); - if (tog_main_panel == NULL) - return got_error_from_errno(); - - return NULL; } __dead void @@ -1068,11 +1057,7 @@ main(int argc, char *argv[]) } } - error = init_curses(); - if (error) { - fprintf(stderr, "cannot initialize ncurses: %s\n", error->msg); - return 1; - } + init_curses(); error = cmd->cmd_main(argc, cmd_argv ? cmd_argv : argv); if (error)