+int is_match(struct cgit_repo *repo)
+{
+ if (!ctx.qry.search)
+ return 1;
+ if (repo->url && strcasestr(repo->url, ctx.qry.search))
+ return 1;
+ if (repo->name && strcasestr(repo->name, ctx.qry.search))
+ return 1;
+ if (repo->desc && strcasestr(repo->desc, ctx.qry.search))
+ return 1;
+ if (repo->owner && strcasestr(repo->owner, ctx.qry.search))
+ return 1;
+ return 0;
+}
+
+int is_in_url(struct cgit_repo *repo)
+{
+ if (!ctx.qry.url)
+ return 1;
+ if (repo->url && !prefixcmp(repo->url, ctx.qry.url))
+ return 1;
+ return 0;
+}
+
+void print_header(int columns)
+{
+ html("<tr class='nohover'>"
+ "<th class='left'>Name</th>"
+ "<th class='left'>Description</th>"
+ "<th class='left'>Owner</th>"
+ "<th class='left'>Idle</th>");
+ if (ctx.cfg.enable_index_links)
+ html("<th class='left'>Links</th>");
+ html("</tr>\n");
+}
+
+
+void print_pager(int items, int pagelen, char *search)
+{
+ int i;
+ html("<div class='pager'>");
+ for(i = 0; i * pagelen < items; i++)
+ cgit_index_link(fmt("[%d]", i+1), fmt("Page %d", i+1), NULL,
+ search, i * pagelen);
+ html("</div>");
+}
+