From: Jason A. Donenfeld Date: Wed, 20 Mar 2013 19:21:25 +0000 (+0100) Subject: Merge branch 'wip' X-Git-Url: https://gitweb.ps.run/ps-cgit/commitdiff_plain/0255821e22678d4c58c809efe17bf2798835d5b9 Merge branch 'wip' --- 0255821e22678d4c58c809efe17bf2798835d5b9 diff --cc ui-shared.c index 80f4aee,d3e6488..968933f --- a/ui-shared.c +++ b/ui-shared.c @@@ -433,63 -421,62 +421,63 @@@ void cgit_stats_link(const char *name, reporevlink("stats", name, title, class, head, NULL, path); } - void cgit_self_link(char *name, const char *title, const char *class, - struct cgit_context *ctx) + static void cgit_self_link(char *name, const char *title, const char *class, + struct cgit_context *ctx) { if (!strcmp(ctx->qry.page, "repolist")) - return cgit_index_link(name, title, class, ctx->qry.search, ctx->qry.sort, - ctx->qry.ofs); + cgit_index_link(name, title, class, ctx->qry.search, ctx->qry.sort, + ctx->qry.ofs); else if (!strcmp(ctx->qry.page, "summary")) - return cgit_summary_link(name, title, class, ctx->qry.head); + cgit_summary_link(name, title, class, ctx->qry.head); else if (!strcmp(ctx->qry.page, "tag")) - return cgit_tag_link(name, title, class, ctx->qry.head, - ctx->qry.has_sha1 ? ctx->qry.sha1 : NULL); + cgit_tag_link(name, title, class, ctx->qry.head, + ctx->qry.has_sha1 ? ctx->qry.sha1 : NULL); else if (!strcmp(ctx->qry.page, "tree")) - return cgit_tree_link(name, title, class, ctx->qry.head, - ctx->qry.has_sha1 ? ctx->qry.sha1 : NULL, - ctx->qry.path); + cgit_tree_link(name, title, class, ctx->qry.head, + ctx->qry.has_sha1 ? ctx->qry.sha1 : NULL, + ctx->qry.path); else if (!strcmp(ctx->qry.page, "plain")) - return cgit_plain_link(name, title, class, ctx->qry.head, - ctx->qry.has_sha1 ? ctx->qry.sha1 : NULL, - ctx->qry.path); + cgit_plain_link(name, title, class, ctx->qry.head, + ctx->qry.has_sha1 ? ctx->qry.sha1 : NULL, + ctx->qry.path); else if (!strcmp(ctx->qry.page, "log")) - return cgit_log_link(name, title, class, ctx->qry.head, - ctx->qry.has_sha1 ? ctx->qry.sha1 : NULL, - ctx->qry.path, ctx->qry.ofs, - ctx->qry.grep, ctx->qry.search, - ctx->qry.showmsg); + cgit_log_link(name, title, class, ctx->qry.head, + ctx->qry.has_sha1 ? ctx->qry.sha1 : NULL, + ctx->qry.path, ctx->qry.ofs, + ctx->qry.grep, ctx->qry.search, + ctx->qry.showmsg); else if (!strcmp(ctx->qry.page, "commit")) - return cgit_commit_link(name, title, class, ctx->qry.head, - ctx->qry.has_sha1 ? ctx->qry.sha1 : NULL, - ctx->qry.path, 0); + cgit_commit_link(name, title, class, ctx->qry.head, + ctx->qry.has_sha1 ? ctx->qry.sha1 : NULL, + ctx->qry.path, 0); else if (!strcmp(ctx->qry.page, "patch")) - return cgit_patch_link(name, title, class, ctx->qry.head, - ctx->qry.has_sha1 ? ctx->qry.sha1 : NULL, - ctx->qry.path); + cgit_patch_link(name, title, class, ctx->qry.head, + ctx->qry.has_sha1 ? ctx->qry.sha1 : NULL, + ctx->qry.path); else if (!strcmp(ctx->qry.page, "refs")) - return cgit_refs_link(name, title, class, ctx->qry.head, - ctx->qry.has_sha1 ? ctx->qry.sha1 : NULL, - ctx->qry.path); + cgit_refs_link(name, title, class, ctx->qry.head, + ctx->qry.has_sha1 ? ctx->qry.sha1 : NULL, + ctx->qry.path); else if (!strcmp(ctx->qry.page, "snapshot")) - return cgit_snapshot_link(name, title, class, ctx->qry.head, - ctx->qry.has_sha1 ? ctx->qry.sha1 : NULL, - ctx->qry.path); + cgit_snapshot_link(name, title, class, ctx->qry.head, + ctx->qry.has_sha1 ? ctx->qry.sha1 : NULL, + ctx->qry.path); else if (!strcmp(ctx->qry.page, "diff")) - return cgit_diff_link(name, title, class, ctx->qry.head, - ctx->qry.sha1, ctx->qry.sha2, - ctx->qry.path, 0); + cgit_diff_link(name, title, class, ctx->qry.head, + ctx->qry.sha1, ctx->qry.sha2, + ctx->qry.path, 0); else if (!strcmp(ctx->qry.page, "stats")) - return cgit_stats_link(name, title, class, ctx->qry.head, - ctx->qry.path); - - /* Don't known how to make link for this page */ - repolink(title, class, ctx->qry.page, ctx->qry.head, ctx->qry.path); - html(">"); - html_txt(name); - html(""); + cgit_stats_link(name, title, class, ctx->qry.head, + ctx->qry.path); + else { + /* Don't known how to make link for this page */ + repolink(title, class, ctx->qry.page, ctx->qry.head, ctx->qry.path); + html(">"); + html_txt(name); + html(""); + } } void cgit_object_link(struct object *obj)