+ for (i = 0; i < cnt && (commit = get_revision(&rev)) != NULL; i++) {
+ print_commit(commit);
+ free(commit->buffer);
+ commit->buffer = NULL;
+ free_commit_list(commit->parents);
+ commit->parents = NULL;
+ }
+ if (pager) {
+ htmlf("</table><div class='pager'>",
+ columns);
+ if (ofs > 0) {
+ cgit_log_link("[prev]", NULL, NULL, ctx.qry.head,
+ ctx.qry.sha1, ctx.qry.path,
+ ofs - cnt, ctx.qry.grep,
+ ctx.qry.search);
+ html(" ");
+ }
+ if ((commit = get_revision(&rev)) != NULL) {
+ cgit_log_link("[next]", NULL, NULL, ctx.qry.head,
+ ctx.qry.sha1, ctx.qry.path,
+ ofs + cnt, ctx.qry.grep,
+ ctx.qry.search);
+ }
+ html("</div>");
+ } else if ((commit = get_revision(&rev)) != NULL) {
+ html("<tr class='nohover'><td colspan='3'>");
+ cgit_log_link("[...]", NULL, NULL, ctx.qry.head, NULL, NULL, 0,
+ NULL, NULL);
+ html("</td></tr>\n");
+ }
+}