aboutsummaryrefslogtreecommitdiffstats
path: root/cgit.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/cgit.c b/cgit.c
index 2ccf864..5b20de3 100644
--- a/cgit.c
+++ b/cgit.c
@@ -18,7 +18,7 @@
18 18
19const char *cgit_version = CGIT_VERSION; 19const char *cgit_version = CGIT_VERSION;
20 20
21void add_mimetype(const char *name, const char *value) 21static void add_mimetype(const char *name, const char *value)
22{ 22{
23 struct string_list_item *item; 23 struct string_list_item *item;
24 24
@@ -26,7 +26,7 @@ void add_mimetype(const char *name, const char *value)
26 item->util = xstrdup(value); 26 item->util = xstrdup(value);
27} 27}
28 28
29struct cgit_filter *new_filter(const char *cmd, filter_type filtertype) 29static struct cgit_filter *new_filter(const char *cmd, filter_type filtertype)
30{ 30{
31 struct cgit_filter *f; 31 struct cgit_filter *f;
32 int args_size = 0; 32 int args_size = 0;
@@ -58,7 +58,7 @@ struct cgit_filter *new_filter(const char *cmd, filter_type filtertype)
58 58
59static void process_cached_repolist(const char *path); 59static void process_cached_repolist(const char *path);
60 60
61void repo_config(struct cgit_repo *repo, const char *name, const char *value) 61static void repo_config(struct cgit_repo *repo, const char *name, const char *value)
62{ 62{
63 struct string_list_item *item; 63 struct string_list_item *item;
64 64
@@ -114,7 +114,7 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value)
114 } 114 }
115} 115}
116 116
117void config_cb(const char *name, const char *value) 117static void config_cb(const char *name, const char *value)
118{ 118{
119 if (!strcmp(name, "section") || !strcmp(name, "repo.group")) 119 if (!strcmp(name, "section") || !strcmp(name, "repo.group"))
120 ctx.cfg.section = xstrdup(value); 120 ctx.cfg.section = xstrdup(value);
@@ -333,7 +333,7 @@ static void querystring_cb(const char *name, const char *value)
333 } 333 }
334} 334}
335 335
336char *xstrdupn(const char *str) 336static char *xstrdupn(const char *str)
337{ 337{
338 return (str ? xstrdup(str) : NULL); 338 return (str ? xstrdup(str) : NULL);
339} 339}
@@ -414,8 +414,8 @@ struct refmatch {
414 int match; 414 int match;
415}; 415};
416 416
417int find_current_ref(const char *refname, const unsigned char *sha1, 417static int find_current_ref(const char *refname, const unsigned char *sha1,
418 int flags, void *cb_data) 418 int flags, void *cb_data)
419{ 419{
420 struct refmatch *info; 420 struct refmatch *info;
421 421
@@ -427,7 +427,7 @@ int find_current_ref(const char *refname, const unsigned char *sha1,
427 return info->match; 427 return info->match;
428} 428}
429 429
430char *find_default_branch(struct cgit_repo *repo) 430static char *find_default_branch(struct cgit_repo *repo)
431{ 431{
432 struct refmatch info; 432 struct refmatch info;
433 char *ref; 433 char *ref;
@@ -569,13 +569,13 @@ static void process_request(void *cbdata)
569 cgit_print_docend(); 569 cgit_print_docend();
570} 570}
571 571
572int cmp_repos(const void *a, const void *b) 572static int cmp_repos(const void *a, const void *b)
573{ 573{
574 const struct cgit_repo *ra = a, *rb = b; 574 const struct cgit_repo *ra = a, *rb = b;
575 return strcmp(ra->url, rb->url); 575 return strcmp(ra->url, rb->url);
576} 576}
577 577
578char *build_snapshot_setting(int bitmap) 578static char *build_snapshot_setting(int bitmap)
579{ 579{
580 const struct cgit_snapshot_format *f; 580 const struct cgit_snapshot_format *f;
581 char *result = xstrdup(""); 581 char *result = xstrdup("");
@@ -595,7 +595,7 @@ char *build_snapshot_setting(int bitmap)
595 return result; 595 return result;
596} 596}
597 597
598char *get_first_line(char *txt) 598static char *get_first_line(char *txt)
599{ 599{
600 char *t = xstrdup(txt); 600 char *t = xstrdup(txt);
601 char *p = strchr(t, '\n'); 601 char *p = strchr(t, '\n');
@@ -604,7 +604,7 @@ char *get_first_line(char *txt)
604 return t; 604 return t;
605} 605}
606 606
607void print_repo(FILE *f, struct cgit_repo *repo) 607static void print_repo(FILE *f, struct cgit_repo *repo)
608{ 608{
609 fprintf(f, "repo.url=%s\n", repo->url); 609 fprintf(f, "repo.url=%s\n", repo->url);
610 fprintf(f, "repo.name=%s\n", repo->name); 610 fprintf(f, "repo.name=%s\n", repo->name);
@@ -649,7 +649,7 @@ void print_repo(FILE *f, struct cgit_repo *repo)
649 fprintf(f, "\n"); 649 fprintf(f, "\n");
650} 650}
651 651
652void print_repolist(FILE *f, struct cgit_repolist *list, int start) 652static void print_repolist(FILE *f, struct cgit_repolist *list, int start)
653{ 653{
654 int i; 654 int i;
655 655