summaryrefslogtreecommitdiffabout
path: root/ui-repolist.c
Unidiff
Diffstat (limited to 'ui-repolist.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-repolist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui-repolist.c b/ui-repolist.c
index 0de328b..cf27cb3 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -107,27 +107,27 @@ void print_pager(int items, int pagelen, char *search)
107 html("<div class='pager'>"); 107 html("<div class='pager'>");
108 for(i = 0; i * pagelen < items; i++) 108 for(i = 0; i * pagelen < items; i++)
109 cgit_index_link(fmt("[%d]", i+1), fmt("Page %d", i+1), NULL, 109 cgit_index_link(fmt("[%d]", i+1), fmt("Page %d", i+1), NULL,
110 search, i * pagelen); 110 search, i * pagelen);
111 html("</div>"); 111 html("</div>");
112} 112}
113 113
114static int cmp(const char *s1, const char *s2) 114static int cmp(const char *s1, const char *s2)
115{ 115{
116 if (s1 && s2) 116 if (s1 && s2)
117 return strcmp(s1, s2); 117 return strcmp(s1, s2);
118 if (s1 && !s2) 118 if (s1 && !s2)
119 return 1;
120 if (s2 && !s1)
121 return -1; 119 return -1;
120 if (s2 && !s1)
121 return 1;
122 return 0; 122 return 0;
123} 123}
124 124
125static int sort_name(const void *a, const void *b) 125static int sort_name(const void *a, const void *b)
126{ 126{
127 const struct cgit_repo *r1 = a; 127 const struct cgit_repo *r1 = a;
128 const struct cgit_repo *r2 = b; 128 const struct cgit_repo *r2 = b;
129 129
130 return cmp(r1->name, r2->name); 130 return cmp(r1->name, r2->name);
131} 131}
132 132
133static int sort_desc(const void *a, const void *b) 133static int sort_desc(const void *a, const void *b)