]> git.cameronkatri.com Git - cgit.git/blobdiff - ui-repolist.c
Remove redundant includes
[cgit.git] / ui-repolist.c
index 4b16b6e34225ca383c53503ed7b153becea01861..43253ed92c93e3a0597da3c3944b8f77793f9f68 100644 (file)
@@ -10,7 +10,6 @@
 #include "ui-repolist.h"
 #include "html.h"
 #include "ui-shared.h"
-#include <strings.h>
 
 static time_t read_agefile(char *path)
 {
@@ -108,7 +107,7 @@ static int is_in_url(struct cgit_repo *repo)
 static void print_sort_header(const char *title, const char *sort)
 {
        html("<th class='left'><a href='");
-       html_attr(ctx.qry.url);
+       html_attr(cgit_currenturl());
        htmlf("?s=%s", sort);
        if (ctx.qry.search) {
                html("&amp;q=");
@@ -117,7 +116,7 @@ static void print_sort_header(const char *title, const char *sort)
        htmlf("'>%s</a></th>", title);
 }
 
-static void print_header()
+static void print_header(void)
 {
        html("<tr class='nohover'>");
        print_sort_header("Name", "name");
@@ -140,7 +139,7 @@ static void print_pager(int items, int pagelen, char *search, char *sort)
                class = (ctx.qry.ofs == ofs) ? "current" : NULL;
                html("<li>");
                cgit_index_link(fmt("[%d]", i + 1), fmt("Page %d", i + 1),
-                               class, search, sort, ofs);
+                               class, search, sort, ofs, 0);
                html("</li>");
        }
        html("</ul>");
@@ -223,7 +222,7 @@ struct sortcolumn {
        int (*fn)(const void *a, const void *b);
 };
 
-struct sortcolumn sortcolumn[] = {
+static const struct sortcolumn sortcolumn[] = {
        {"section", sort_section},
        {"name", sort_name},
        {"desc", sort_desc},
@@ -234,7 +233,7 @@ struct sortcolumn sortcolumn[] = {
 
 static int sort_repolist(char *field)
 {
-       struct sortcolumn *column;
+       const struct sortcolumn *column;
 
        for (column = &sortcolumn[0]; column->name; column++) {
                if (strcmp(field, column->name))
@@ -247,7 +246,7 @@ static int sort_repolist(char *field)
 }
 
 
-void cgit_print_repolist()
+void cgit_print_repolist(void)
 {
        int i, columns = 3, hits = 0, header = 0;
        char *last_section = NULL;
@@ -315,7 +314,7 @@ void cgit_print_repolist()
                                cgit_close_filter(ctx.repo->owner_filter);
                        } else {
                                html("<a href='");
-                               html_attr(ctx.qry.url);
+                               html_attr(cgit_currenturl());
                                html("?q=");
                                html_url_arg(ctx.repo->owner);
                                html("'>");
@@ -330,7 +329,7 @@ void cgit_print_repolist()
                        html("<td>");
                        cgit_summary_link("summary", NULL, "button", NULL);
                        cgit_log_link("log", NULL, "button", NULL, NULL, NULL,
-                                     0, NULL, NULL, ctx.qry.showmsg);
+                                     0, NULL, NULL, ctx.qry.showmsg, 0);
                        cgit_tree_link("tree", NULL, "button", NULL, NULL, NULL);
                        html("</td>");
                }
@@ -344,7 +343,7 @@ void cgit_print_repolist()
        cgit_print_docend();
 }
 
-void cgit_print_site_readme()
+void cgit_print_site_readme(void)
 {
        if (!ctx.cfg.root_readme)
                return;