commit - 52185f702d047f6581c79bd99a14e3f1b84f2c5c
commit + a915003aad0755429a02502b3e298874c3f0d072
blob - 812afe04bbe182c7c435c0de9361ff3d7feec15b
blob + 536178210cdc7bfff4cefc4cad1bbbd70a8215f3
--- tog/tog.c
+++ tog/tog.c
return NULL;
}
+static void
+init_curses(void)
+{
+ initscr();
+ cbreak();
+ halfdelay(1); /* Do fast refresh while initial view is loading. */
+ noecho();
+ nonl();
+ intrflush(stdscr, FALSE);
+ keypad(stdscr, TRUE);
+ curs_set(0);
+ signal(SIGWINCH, tog_sigwinch);
+}
+
static const struct got_error *
cmd_log(int argc, char *argv[])
{
}
}
+ init_curses();
+
error = apply_unveil(repo_path, NULL);
if (error)
goto done;
id_str2 = argv[2];
} else
usage_diff();
+
+ init_curses();
error = apply_unveil(repo_path, NULL);
if (error)
goto done;
}
}
+
+ init_curses();
error = apply_unveil(repo_path, NULL);
if (error)
return got_error_from_errno();
} else
usage_log();
+
+ init_curses();
error = apply_unveil(repo_path, NULL);
if (error)
if (repo)
got_repo_close(repo);
return error;
-}
-
-static void
-init_curses(void)
-{
- initscr();
- cbreak();
- halfdelay(1); /* Do fast refresh while initial view is loading. */
- noecho();
- nonl();
- intrflush(stdscr, FALSE);
- keypad(stdscr, TRUE);
- curs_set(0);
- signal(SIGWINCH, tog_sigwinch);
}
__dead static void
}
}
- init_curses();
-
error = cmd->cmd_main(argc, cmd_argv ? cmd_argv : argv);
if (error)
goto done;