commit - 511a516b74d9f5e498a5dc2de97b0e488df51088
commit + 5c5136c581793e9da589af3917c7b59619481ebb
blob - db5f5fc1ee2a0a8f2bc288df7d3b5a2b6178638a
blob + d13a58d7ceada39cdf8a15fba84eeb29089826fd
--- tog/tog.c
+++ tog/tog.c
};
/* globals */
-WINDOW *tog_main_win;
-PANEL *tog_main_panel;
static struct tog_log_view {
WINDOW *window;
PANEL *panel;
return got_error(GOT_ERR_NOT_IMPL);
}
-static const struct got_error *
+static void
init_curses(void)
{
initscr();
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
}
}
- 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)