commit - d6b05b5be7694f11ca2fa97e95c4de3f4adbdd3c
commit + b3665f435b3ce062ff932a73056529e5b4afbc4a
blob - bee343160a857c71fd91c99a1c2c493f814e7ddc
blob + bd0490904a9f27b0c02f87572d886ca44adf8e43
--- tog/tog.c
+++ tog/tog.c
}
static struct tog_view *
-open_view(int nlines, int ncols, int begin_y, int begin_x,
+view_open(int nlines, int ncols, int begin_y, int begin_x,
struct tog_view *parent, enum tog_view_type type)
{
struct tog_view *view = malloc(sizeof(*view));
goto done;
}
- view = open_view(0, 0, 0, 0, parent_view, TOG_VIEW_DIFF);
+ view = view_open(0, 0, 0, 0, parent_view, TOG_VIEW_DIFF);
if (view == NULL) {
err = got_error_from_errno();
goto done;
if (err)
return err;
- view = open_view(0, 0, 0, 0, parent_view, TOG_VIEW_TREE);
+ view = view_open(0, 0, 0, 0, parent_view, TOG_VIEW_TREE);
if (view == NULL) {
err = got_error_from_errno();
goto done;
if (error != NULL)
goto done;
- view = open_view(0, 0, 0, 0, NULL, TOG_VIEW_LOG);
+ view = view_open(0, 0, 0, 0, NULL, TOG_VIEW_LOG);
if (view == NULL) {
error = got_error_from_errno();
goto done;
if (error)
goto done;
- view = open_view(0, 0, 0, 0, NULL, TOG_VIEW_DIFF);
+ view = view_open(0, 0, 0, 0, NULL, TOG_VIEW_DIFF);
if (view == NULL) {
error = got_error_from_errno();
goto done;
break;
if (pobj == NULL && obj == NULL)
break;
- diff_view = open_view(0, 0, 0, 0, view,
+ diff_view = view_open(0, 0, 0, 0, view,
TOG_VIEW_DIFF);
if (diff_view == NULL) {
err = got_error_from_errno();
if (error != NULL)
goto done;
- view = open_view(0, 0, 0, 0, NULL, TOG_VIEW_BLAME);
+ view = view_open(0, 0, 0, 0, NULL, TOG_VIEW_BLAME);
if (view == NULL) {
error = got_error_from_errno();
goto done;
if (err)
return err;
- view = open_view(0, 0, 0, 0, parent_view, TOG_VIEW_BLAME);
+ view = view_open(0, 0, 0, 0, parent_view, TOG_VIEW_BLAME);
if (view) {
err = show_blame_view(view, path, commit_id, repo);
close_view(view);
case 'l':
if (selected_entry) {
struct tog_view *log_view;
- log_view = open_view(0, 0, 0, 0, view,
+ log_view = view_open(0, 0, 0, 0, view,
TOG_VIEW_LOG);
if (log_view == NULL) {
err = got_error_from_errno();
if (error != NULL)
goto done;
- view = open_view(0, 0, 0, 0, NULL, TOG_VIEW_TREE);
+ view = view_open(0, 0, 0, 0, NULL, TOG_VIEW_TREE);
if (view == NULL) {
error = got_error_from_errno();
goto done;