| -rw-r--r-- | cache.c | 2 | ||||
| -rw-r--r-- | cgit.c | 26 | ||||
| -rw-r--r-- | configfile.c | 6 | ||||
| -rw-r--r-- | html.c | 6 | ||||
| -rw-r--r-- | parsing.c | 6 | ||||
| -rw-r--r-- | shared.c | 12 | ||||
| -rw-r--r-- | ui-atom.c | 2 | ||||
| -rw-r--r-- | ui-diff.c | 5 | ||||
| -rw-r--r-- | ui-log.c | 6 | ||||
| -rw-r--r-- | ui-repolist.c | 14 | ||||
| -rw-r--r-- | ui-shared.c | 18 | ||||
| -rw-r--r-- | ui-snapshot.c | 2 | ||||
| -rw-r--r-- | ui-stats.c | 17 | ||||
| -rw-r--r-- | ui-tag.c | 2 |
14 files changed, 60 insertions, 64 deletions
@@ -363,7 +363,7 @@ int cache_process(int size, const char *path, const char *key, int ttl, /* Return a strftime formatted date/time * NB: the result from this function is to shared memory */ -static char *sprintftime(const char *format, time_t time) +char *sprintftime(const char *format, time_t time) { static char buf[64]; struct tm *tm; @@ -18,7 +18,7 @@ const char *cgit_version = CGIT_VERSION; -static void add_mimetype(const char *name, const char *value) +void add_mimetype(const char *name, const char *value) { struct string_list_item *item; @@ -26,7 +26,7 @@ static void add_mimetype(const char *name, const char *value) item->util = xstrdup(value); } -static struct cgit_filter *new_filter(const char *cmd, filter_type filtertype) +struct cgit_filter *new_filter(const char *cmd, filter_type filtertype) { struct cgit_filter *f; int args_size = 0; @@ -58,7 +58,7 @@ static struct cgit_filter *new_filter(const char *cmd, filter_type filtertype) static void process_cached_repolist(const char *path); -static void repo_config(struct cgit_repo *repo, const char *name, const char *value) +void repo_config(struct cgit_repo *repo, const char *name, const char *value) { struct string_list_item *item; @@ -114,7 +114,7 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va } } -static void config_cb(const char *name, const char *value) +void config_cb(const char *name, const char *value) { if (!strcmp(name, "section") || !strcmp(name, "repo.group")) ctx.cfg.section = xstrdup(value); @@ -333,7 +333,7 @@ static void querystring_cb(const char *name, const char *value) } } -static char *xstrdupn(const char *str) +char *xstrdupn(const char *str) { return (str ? xstrdup(str) : NULL); } @@ -414,8 +414,8 @@ struct refmatch { int match; }; -static int find_current_ref(const char *refname, const unsigned char *sha1, - int flags, void *cb_data) +int find_current_ref(const char *refname, const unsigned char *sha1, + int flags, void *cb_data) { struct refmatch *info; @@ -427,7 +427,7 @@ static int find_current_ref(const char *refname, const unsigned char *sha1, return info->match; } -static char *find_default_branch(struct cgit_repo *repo) +char *find_default_branch(struct cgit_repo *repo) { struct refmatch info; char *ref; @@ -569,13 +569,13 @@ static void process_request(void *cbdata) cgit_print_docend(); } -static int cmp_repos(const void *a, const void *b) +int cmp_repos(const void *a, const void *b) { const struct cgit_repo *ra = a, *rb = b; return strcmp(ra->url, rb->url); } -static char *build_snapshot_setting(int bitmap) +char *build_snapshot_setting(int bitmap) { const struct cgit_snapshot_format *f; char *result = xstrdup(""); @@ -595,7 +595,7 @@ static char *build_snapshot_setting(int bitmap) return result; } -static char *get_first_line(char *txt) +char *get_first_line(char *txt) { char *t = xstrdup(txt); char *p = strchr(t, '\n'); @@ -604,7 +604,7 @@ static char *get_first_line(char *txt) return t; } -static void print_repo(FILE *f, struct cgit_repo *repo) +void print_repo(FILE *f, struct cgit_repo *repo) { fprintf(f, "repo.url=%s\n", repo->url); fprintf(f, "repo.name=%s\n", repo->name); @@ -649,7 +649,7 @@ static void print_repo(FILE *f, struct cgit_repo *repo) fprintf(f, "\n"); } -static void print_repolist(FILE *f, struct cgit_repolist *list, int start) +void print_repolist(FILE *f, struct cgit_repolist *list, int start) { int i; diff --git a/configfile.c b/configfile.c index d98989c..3fa217f 100644 --- a/configfile.c +++ b/configfile.c @@ -10,7 +10,7 @@ #include <stdio.h> #include "configfile.h" -static int next_char(FILE *f) +int next_char(FILE *f) { int c = fgetc(f); if (c == '\r') { @@ -23,7 +23,7 @@ static int next_char(FILE *f) return c; } -static void skip_line(FILE *f) +void skip_line(FILE *f) { int c; @@ -31,7 +31,7 @@ static void skip_line(FILE *f) ; } -static int read_config_line(FILE *f, char *line, const char **value, int bufsize) +int read_config_line(FILE *f, char *line, const char **value, int bufsize) { int i = 0, isname = 0; @@ -39,7 +39,7 @@ static const char* url_escape_table[256] = { "%fe", "%ff" }; -static int htmlfd = STDOUT_FILENO; +int htmlfd = STDOUT_FILENO; char *fmt(const char *format, ...) { @@ -266,7 +266,7 @@ int html_include(const char *filename) return 0; } -static int hextoint(char c) +int hextoint(char c) { if (c >= 'a' && c <= 'f') return 10 + c - 'a'; @@ -278,7 +278,7 @@ static int hextoint(char c) return -1; } -static char *convert_query_hexchar(char *txt) +char *convert_query_hexchar(char *txt) { int d1, d2, n; n = strlen(txt); @@ -52,7 +52,7 @@ void cgit_parse_url(const char *url) } } -static char *substr(const char *head, const char *tail) +char *substr(const char *head, const char *tail) { char *buf; @@ -64,7 +64,7 @@ static char *substr(const char *head, const char *tail) return buf; } -static char *parse_user(char *t, char **name, char **email, unsigned long *date) +char *parse_user(char *t, char **name, char **email, unsigned long *date) { char *p = t; int mode = 1; @@ -101,7 +101,7 @@ static char *parse_user(char *t, char **name, char **email, unsigned long *date) #ifdef NO_ICONV #define reencode(a, b, c) #else -static const char *reencode(char **txt, const char *src_enc, const char *dst_enc) +const char *reencode(char **txt, const char *src_enc, const char *dst_enc) { char *tmp; @@ -158,7 +158,7 @@ void cgit_add_ref(struct reflist *list, struct refinfo *ref) list->refs[list->count++] = ref; } -static struct refinfo *cgit_mk_refinfo(const char *refname, const unsigned char *sha1) +struct refinfo *cgit_mk_refinfo(const char *refname, const unsigned char *sha1) { struct refinfo *ref; @@ -187,8 +187,8 @@ int cgit_refs_cb(const char *refname, const unsigned char *sha1, int flags, return 0; } -static void cgit_diff_tree_cb(struct diff_queue_struct *q, - struct diff_options *options, void *data) +void cgit_diff_tree_cb(struct diff_queue_struct *q, + struct diff_options *options, void *data) { int i; @@ -224,7 +224,7 @@ static int load_mmfile(mmfile_t *file, const unsigned char *sha1) char *diffbuf = NULL; int buflen = 0; -static int filediff_cb(void *priv, mmbuffer_t *mb, int nbuf) +int filediff_cb(void *priv, mmbuffer_t *mb, int nbuf) { int i; @@ -461,14 +461,14 @@ int readfile(const char *path, char **buf, size_t *size) return (*size == st.st_size ? 0 : e); } -static int is_token_char(char c) +int is_token_char(char c) { return isalnum(c) || c == '_'; } /* Replace name with getenv(name), return pointer to zero-terminating char */ -static char *expand_macro(char *name, int maxlength) +char *expand_macro(char *name, int maxlength) { char *value; int len; @@ -10,7 +10,7 @@ #include "html.h" #include "ui-shared.h" -static void add_entry(struct commit *commit, char *host) +void add_entry(struct commit *commit, char *host) { char delim = '&'; char *hex; @@ -166,9 +166,8 @@ static void inspect_filepair(struct diff_filepair *pair) total_rems += lines_removed; } -static void cgit_print_diffstat(const unsigned char *old_sha1, - const unsigned char *new_sha1, - const char *prefix) +void cgit_print_diffstat(const unsigned char *old_sha1, + const unsigned char *new_sha1, const char *prefix) { int i; @@ -28,7 +28,7 @@ static const char *column_colors_html[] = { #define COLUMN_COLORS_HTML_MAX (ARRAY_SIZE(column_colors_html) - 1) -static void count_lines(char *line, int size) +void count_lines(char *line, int size) { if (size <= 0) return; @@ -40,7 +40,7 @@ static void count_lines(char *line, int size) rem_lines++; } -static void inspect_files(struct diff_filepair *pair) +void inspect_files(struct diff_filepair *pair) { unsigned long old_size = 0; unsigned long new_size = 0; @@ -95,7 +95,7 @@ next: } } -static void print_commit(struct commit *commit, struct rev_info *revs) +void print_commit(struct commit *commit, struct rev_info *revs) { struct commitinfo *info; int cols = revs->graph ? 3 : 2; diff --git a/ui-repolist.c b/ui-repolist.c index 66c88c4..1ae22aa 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -12,7 +12,7 @@ #include "ui-shared.h" #include <strings.h> -static time_t read_agefile(char *path) +time_t read_agefile(char *path) { time_t result; size_t size; @@ -76,7 +76,7 @@ static void print_modtime(struct cgit_repo *repo) cgit_print_age(t, -1, NULL); } -static int is_match(struct cgit_repo *repo) +int is_match(struct cgit_repo *repo) { if (!ctx.qry.search) return 1; @@ -91,7 +91,7 @@ static int is_match(struct cgit_repo *repo) return 0; } -static int is_in_url(struct cgit_repo *repo) +int is_in_url(struct cgit_repo *repo) { if (!ctx.qry.url) return 1; @@ -100,7 +100,7 @@ static int is_in_url(struct cgit_repo *repo) return 0; } -static void print_sort_header(const char *title, const char *sort) +void print_sort_header(const char *title, const char *sort) { htmlf("<th class='left'><a href='%s?s=%s", cgit_rooturl(), sort); if (ctx.qry.search) { @@ -110,7 +110,7 @@ static void print_sort_header(const char *title, const char *sort) htmlf("'>%s</a></th>", title); } -static void print_header() +void print_header() { html("<tr class='nohover'>"); print_sort_header("Name", "name"); @@ -124,7 +124,7 @@ static void print_header() } -static void print_pager(int items, int pagelen, char *search, char *sort) +void print_pager(int items, int pagelen, char *search, char *sort) { int i, ofs; char *class = NULL; @@ -223,7 +223,7 @@ struct sortcolumn sortcolumn[] = { {NULL, NULL} }; -static int sort_repolist(char *field) +int sort_repolist(char *field) { struct sortcolumn *column; diff --git a/ui-shared.c b/ui-shared.c index 63a7116..af5310b 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -121,7 +121,7 @@ const char *cgit_repobasename(const char *reponame) return rvbuf; } -static char *cgit_currurl() +char *cgit_currurl() { if (!ctx.cfg.virtual_root) return ctx.cfg.script_name; @@ -433,8 +433,8 @@ void cgit_stats_link(const char *name, const char *title, const char *class, reporevlink("stats", name, title, class, head, NULL, path); } -static void cgit_self_link(char *name, const char *title, const char *class, - struct cgit_context *ctx) +void cgit_self_link(char *name, const char *title, const char *class, + struct cgit_context *ctx) { if (!strcmp(ctx->qry.page, "repolist")) return cgit_index_link(name, title, class, ctx->qry.search, ctx->qry.sort, @@ -512,8 +512,8 @@ void cgit_object_link(struct object *obj) reporevlink(page, name, NULL, NULL, ctx.qry.head, fullrev, NULL); } -static struct string_list_item *lookup_path(struct string_list *list, - const char *path) +struct string_list_item *lookup_path(struct string_list *list, + const char *path) { struct string_list_item *item; @@ -716,16 +716,16 @@ void cgit_print_docend() html("</body>\n</html>\n"); } -static int print_branch_option(const char *refname, const unsigned char *sha1, - int flags, void *cb_data) +int print_branch_option(const char *refname, const unsigned char *sha1, + int flags, void *cb_data) { char *name = (char *)refname; html_option(name, name, ctx.qry.head); return 0; } -static int print_archive_ref(const char *refname, const unsigned char *sha1, - int flags, void *cb_data) +int print_archive_ref(const char *refname, const unsigned char *sha1, + int flags, void *cb_data) { struct tag *tag; struct taginfo *info; diff --git a/ui-snapshot.c b/ui-snapshot.c index e199a92..54e659c 100644 --- a/ui-snapshot.c +++ b/ui-snapshot.c @@ -153,7 +153,7 @@ static const char *get_ref_from_filename(const char *url, const char *filename, return NULL; } -static void show_error(char *msg) +void show_error(char *msg) { ctx.page.mimetype = "text/html"; cgit_print_http_headers(&ctx); @@ -211,8 +211,8 @@ static int cmp_total_commits(const void *a1, const void *a2) /* Walk the commit DAG and collect number of commits per author per * timeperiod into a nested string_list collection. */ -static struct string_list collect_stats(struct cgit_context *ctx, - struct cgit_period *period) +struct string_list collect_stats(struct cgit_context *ctx, + struct cgit_period *period) { struct string_list authors; struct rev_info rev; @@ -253,12 +253,9 @@ static struct string_list collect_stats(struct cgit_context *ctx, return authors; } -static void print_combined_authorrow(struct string_list *authors, int from, - int to, const char *name, - const char *leftclass, - const char *centerclass, - const char *rightclass, - struct cgit_period *period) +void print_combined_authorrow(struct string_list *authors, int from, int to, + const char *name, const char *leftclass, const char *centerclass, + const char *rightclass, struct cgit_period *period) { struct string_list_item *author; struct authorstat *authorstat; @@ -296,8 +293,8 @@ static void print_combined_authorrow(struct string_list *authors, int from, htmlf("<td class='%s'>%ld</td></tr>", rightclass, total); } -static void print_authors(struct string_list *authors, int top, - struct cgit_period *period) +void print_authors(struct string_list *authors, int top, + struct cgit_period *period) { struct string_list_item *author; struct authorstat *authorstat; @@ -30,7 +30,7 @@ static void print_tag_content(char *buf) } } -static void print_download_links(char *revname) +void print_download_links(char *revname) { html("<tr><th>download</th><td class='sha1'>"); cgit_print_snapshot_links(ctx.qry.repo, ctx.qry.head, |