commit b01e7d3b675302f732c8f7d4798bbd621d4f387a from: Stefan Sperling date: Sat Aug 04 13:37:59 2018 UTC de-anonymize type-specific tog view state strucures commit - ba4f502b21b11dc2b15f628f8d85530cf233d74a commit + b01e7d3b675302f732c8f7d4798bbd621d4f387a blob - aeac875436cd6ccf6485d823fcecffdabef330be blob + 6ddb4fe45911e4fedf75c85370274526080a4ce1 --- tog/tog.c +++ tog/tog.c @@ -98,6 +98,23 @@ TAILQ_HEAD(commit_queue_head, commit_queue_entry); struct commit_queue { int ncommits; struct commit_queue_head head; +}; + +struct tog_diff_view_state { + FILE *f; + int first_displayed_line; + int last_displayed_line; +}; + +struct tog_log_view_state { + struct got_commit_graph *graph; + struct commit_queue commits; + struct commit_queue_entry *first_displayed_entry; + struct commit_queue_entry *last_displayed_entry; + struct commit_queue_entry *selected_entry; + int selected; + char *in_repo_path; + struct got_repository *repo; }; struct tog_view { @@ -110,21 +127,8 @@ struct tog_view { /* type-specific state */ enum tog_view_type type; union { - struct { - FILE *f; - int first_displayed_line; - int last_displayed_line; - } diff; - struct { - struct got_commit_graph *graph; - struct commit_queue commits; - struct commit_queue_entry *first_displayed_entry; - struct commit_queue_entry *last_displayed_entry; - struct commit_queue_entry *selected_entry; - int selected; - char *in_repo_path; - struct got_repository *repo; - } log; + struct tog_diff_view_state diff; + struct tog_log_view_state log; } state; };