aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cache.c2
-rw-r--r--cgit.c26
-rw-r--r--configfile.c6
-rw-r--r--html.c6
-rw-r--r--parsing.c6
-rw-r--r--shared.c12
-rw-r--r--ui-atom.c2
-rw-r--r--ui-diff.c5
-rw-r--r--ui-log.c6
-rw-r--r--ui-repolist.c14
-rw-r--r--ui-shared.c18
-rw-r--r--ui-snapshot.c2
-rw-r--r--ui-stats.c17
-rw-r--r--ui-tag.c2
14 files changed, 64 insertions, 60 deletions
diff --git a/cache.c b/cache.c
index 47cdcb4..3127fc2 100644
--- a/cache.c
+++ b/cache.c
@@ -363,7 +363,7 @@ int cache_process(int size, const char *path, const char *key, int ttl,
363/* Return a strftime formatted date/time 363/* Return a strftime formatted date/time
364 * NB: the result from this function is to shared memory 364 * NB: the result from this function is to shared memory
365 */ 365 */
366char *sprintftime(const char *format, time_t time) 366static char *sprintftime(const char *format, time_t time)
367{ 367{
368 static char buf[64]; 368 static char buf[64];
369 struct tm *tm; 369 struct tm *tm;
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
diff --git a/configfile.c b/configfile.c
index 3fa217f..d98989c 100644
--- a/configfile.c
+++ b/configfile.c
@@ -10,7 +10,7 @@
10#include <stdio.h> 10#include <stdio.h>
11#include "configfile.h" 11#include "configfile.h"
12 12
13int next_char(FILE *f) 13static int next_char(FILE *f)
14{ 14{
15 int c = fgetc(f); 15 int c = fgetc(f);
16 if (c == '\r') { 16 if (c == '\r') {
@@ -23,7 +23,7 @@ int next_char(FILE *f)
23 return c; 23 return c;
24} 24}
25 25
26void skip_line(FILE *f) 26static void skip_line(FILE *f)
27{ 27{
28 int c; 28 int c;
29 29
@@ -31,7 +31,7 @@ void skip_line(FILE *f)
31 ; 31 ;
32} 32}
33 33
34int read_config_line(FILE *f, char *line, const char **value, int bufsize) 34static int read_config_line(FILE *f, char *line, const char **value, int bufsize)
35{ 35{
36 int i = 0, isname = 0; 36 int i = 0, isname = 0;
37 37
diff --git a/html.c b/html.c
index 90cc1c0..b5c6903 100644
--- a/html.c
+++ b/html.c
@@ -39,7 +39,7 @@ static const char* url_escape_table[256] = {
39 "%fe", "%ff" 39 "%fe", "%ff"
40}; 40};
41 41
42int htmlfd = STDOUT_FILENO; 42static int htmlfd = STDOUT_FILENO;
43 43
44char *fmt(const char *format, ...) 44char *fmt(const char *format, ...)
45{ 45{
@@ -266,7 +266,7 @@ int html_include(const char *filename)
266 return 0; 266 return 0;
267} 267}
268 268
269int hextoint(char c) 269static int hextoint(char c)
270{ 270{
271 if (c >= 'a' && c <= 'f') 271 if (c >= 'a' && c <= 'f')
272 return 10 + c - 'a'; 272 return 10 + c - 'a';
@@ -278,7 +278,7 @@ int hextoint(char c)
278 return -1; 278 return -1;
279} 279}
280 280
281char *convert_query_hexchar(char *txt) 281static char *convert_query_hexchar(char *txt)
282{ 282{
283 int d1, d2, n; 283 int d1, d2, n;
284 n = strlen(txt); 284 n = strlen(txt);
diff --git a/parsing.c b/parsing.c
index 9b7efb3..658621d 100644
--- a/parsing.c
+++ b/parsing.c
@@ -52,7 +52,7 @@ void cgit_parse_url(const char *url)
52 } 52 }
53} 53}
54 54
55char *substr(const char *head, const char *tail) 55static char *substr(const char *head, const char *tail)
56{ 56{
57 char *buf; 57 char *buf;
58 58
@@ -64,7 +64,7 @@ char *substr(const char *head, const char *tail)
64 return buf; 64 return buf;
65} 65}
66 66
67char *parse_user(char *t, char **name, char **email, unsigned long *date) 67static char *parse_user(char *t, char **name, char **email, unsigned long *date)
68{ 68{
69 char *p = t; 69 char *p = t;
70 int mode = 1; 70 int mode = 1;
@@ -101,7 +101,7 @@ char *parse_user(char *t, char **name, char **email, unsigned long *date)
101#ifdef NO_ICONV 101#ifdef NO_ICONV
102#define reencode(a, b, c) 102#define reencode(a, b, c)
103#else 103#else
104const char *reencode(char **txt, const char *src_enc, const char *dst_enc) 104static const char *reencode(char **txt, const char *src_enc, const char *dst_enc)
105{ 105{
106 char *tmp; 106 char *tmp;
107 107
diff --git a/shared.c b/shared.c
index e732064..124d079 100644
--- a/shared.c
+++ b/shared.c
@@ -158,7 +158,7 @@ void cgit_add_ref(struct reflist *list, struct refinfo *ref)
158 list->refs[list->count++] = ref; 158 list->refs[list->count++] = ref;
159} 159}
160 160
161struct refinfo *cgit_mk_refinfo(const char *refname, const unsigned char *sha1) 161static struct refinfo *cgit_mk_refinfo(const char *refname, const unsigned char *sha1)
162{ 162{
163 struct refinfo *ref; 163 struct refinfo *ref;
164 164
@@ -187,8 +187,8 @@ int cgit_refs_cb(const char *refname, const unsigned char *sha1, int flags,
187 return 0; 187 return 0;
188} 188}
189 189
190void cgit_diff_tree_cb(struct diff_queue_struct *q, 190static void cgit_diff_tree_cb(struct diff_queue_struct *q,
191 struct diff_options *options, void *data) 191 struct diff_options *options, void *data)
192{ 192{
193 int i; 193 int i;
194 194
@@ -224,7 +224,7 @@ static int load_mmfile(mmfile_t *file, const unsigned char *sha1)
224char *diffbuf = NULL; 224char *diffbuf = NULL;
225int buflen = 0; 225int buflen = 0;
226 226
227int filediff_cb(void *priv, mmbuffer_t *mb, int nbuf) 227static int filediff_cb(void *priv, mmbuffer_t *mb, int nbuf)
228{ 228{
229 int i; 229 int i;
230 230
@@ -461,14 +461,14 @@ int readfile(const char *path, char **buf, size_t *size)
461 return (*size == st.st_size ? 0 : e); 461 return (*size == st.st_size ? 0 : e);
462} 462}
463 463
464int is_token_char(char c) 464static int is_token_char(char c)
465{ 465{
466 return isalnum(c) || c == '_'; 466 return isalnum(c) || c == '_';
467} 467}
468 468
469/* Replace name with getenv(name), return pointer to zero-terminating char 469/* Replace name with getenv(name), return pointer to zero-terminating char
470 */ 470 */
471char *expand_macro(char *name, int maxlength)