author | Lars Hjemli <hjemli@gmail.com> | 2006-12-16 18:35:31 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2006-12-16 20:02:02 (UTC) |
commit | 9c5229ea394808f90433ee84439503bee124e1de (patch) (unidiff) | |
tree | e43a0a6336bd7c66891ba64da90319c2e866714b /ui-log.c | |
parent | aaa24bdd30303128bded8487cd9f63b54c3b8dcd (diff) | |
download | cgit-9c5229ea394808f90433ee84439503bee124e1de.zip cgit-9c5229ea394808f90433ee84439503bee124e1de.tar.gz cgit-9c5229ea394808f90433ee84439503bee124e1de.tar.bz2 |
Reformat code to avoid excessive line lengths
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | ui-log.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -28,49 +28,51 @@ void print_commit(struct commit *commit) | |||
28 | html("</td><td>"); | 28 | html("</td><td>"); |
29 | html_txt(info->author); | 29 | html_txt(info->author); |
30 | html("</td></tr>\n"); | 30 | html("</td></tr>\n"); |
31 | cgit_free_commitinfo(info); | 31 | cgit_free_commitinfo(info); |
32 | } | 32 | } |
33 | 33 | ||
34 | 34 | ||
35 | void cgit_print_log(const char *tip, int ofs, int cnt) | 35 | void cgit_print_log(const char *tip, int ofs, int cnt) |
36 | { | 36 | { |
37 | struct rev_info rev; | 37 | struct rev_info rev; |
38 | struct commit *commit; | 38 | struct commit *commit; |
39 | const char *argv[2] = {NULL, tip}; | 39 | const char *argv[2] = {NULL, tip}; |
40 | int i; | 40 | int i; |
41 | 41 | ||
42 | init_revisions(&rev, NULL); | 42 | init_revisions(&rev, NULL); |
43 | rev.abbrev = DEFAULT_ABBREV; | 43 | rev.abbrev = DEFAULT_ABBREV; |
44 | rev.commit_format = CMIT_FMT_DEFAULT; | 44 | rev.commit_format = CMIT_FMT_DEFAULT; |
45 | rev.verbose_header = 1; | 45 | rev.verbose_header = 1; |
46 | rev.show_root_diff = 0; | 46 | rev.show_root_diff = 0; |
47 | setup_revisions(2, argv, &rev, NULL); | 47 | setup_revisions(2, argv, &rev, NULL); |
48 | prepare_revision_walk(&rev); | 48 | prepare_revision_walk(&rev); |
49 | 49 | ||
50 | html("<h2>Log</h2>"); | 50 | html("<h2>Log</h2>"); |
51 | html("<table class='list log'>"); | 51 | html("<table class='list log'>"); |
52 | html("<tr><th class='left'>Date</th><th class='left'>Message</th><th class='left'>Author</th></tr>\n"); | 52 | html("<tr><th class='left'>Date</th>" |
53 | "<th class='left'>Message</th>" | ||
54 | "<th class='left'>Author</th></tr>\n"); | ||
53 | 55 | ||
54 | if (ofs<0) | 56 | if (ofs<0) |
55 | ofs = 0; | 57 | ofs = 0; |
56 | 58 | ||
57 | for (i = 0; i < ofs && (commit = get_revision(&rev)) != NULL; i++) { | 59 | for (i = 0; i < ofs && (commit = get_revision(&rev)) != NULL; i++) { |
58 | free(commit->buffer); | 60 | free(commit->buffer); |
59 | commit->buffer = NULL; | 61 | commit->buffer = NULL; |
60 | free_commit_list(commit->parents); | 62 | free_commit_list(commit->parents); |
61 | commit->parents = NULL; | 63 | commit->parents = NULL; |
62 | } | 64 | } |
63 | 65 | ||
64 | for (i = 0; i < cnt && (commit = get_revision(&rev)) != NULL; i++) { | 66 | for (i = 0; i < cnt && (commit = get_revision(&rev)) != NULL; i++) { |
65 | print_commit(commit); | 67 | print_commit(commit); |
66 | free(commit->buffer); | 68 | free(commit->buffer); |
67 | commit->buffer = NULL; | 69 | commit->buffer = NULL; |
68 | free_commit_list(commit->parents); | 70 | free_commit_list(commit->parents); |
69 | commit->parents = NULL; | 71 | commit->parents = NULL; |
70 | } | 72 | } |
71 | html("</table>\n"); | 73 | html("</table>\n"); |
72 | 74 | ||
73 | html("<div class='pager'>"); | 75 | html("<div class='pager'>"); |
74 | if (ofs > 0) { | 76 | if (ofs > 0) { |
75 | html(" <a href='"); | 77 | html(" <a href='"); |
76 | html(cgit_pageurl(cgit_query_repo, cgit_query_page, | 78 | html(cgit_pageurl(cgit_query_repo, cgit_query_page, |