author | Lars Hjemli <hjemli@gmail.com> | 2011-02-19 13:51:00 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2011-02-19 13:51:00 (UTC) |
commit | 979c460e7f71d153ae79da67b8b21c3412f0fe02 (patch) (unidiff) | |
tree | 6da9ffb66ed0a68205e6644cb7e2b4652d6684be /cgit.h | |
parent | fb9e6d1594a24fe4e551fd57a9c91fd18b14806e (diff) | |
parent | 0141b9f889bbaa1fe474f9a98dd377138ac73054 (diff) | |
download | cgit-979c460e7f71d153ae79da67b8b21c3412f0fe02.zip cgit-979c460e7f71d153ae79da67b8b21c3412f0fe02.tar.gz cgit-979c460e7f71d153ae79da67b8b21c3412f0fe02.tar.bz2 |
Merge branch 'br/misc'
* br/misc:
Use transparent background for the cgit logo
ssdiff: anchors for ssdiff
implement repo.logo and repo.logo-link
-rw-r--r-- | cgit.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -26,96 +26,98 @@ | |||
26 | /* | 26 | /* |
27 | * Dateformats used on misc. pages | 27 | * Dateformats used on misc. pages |
28 | */ | 28 | */ |
29 | #define FMT_LONGDATE "%Y-%m-%d %H:%M:%S (%Z)" | 29 | #define FMT_LONGDATE "%Y-%m-%d %H:%M:%S (%Z)" |
30 | #define FMT_SHORTDATE "%Y-%m-%d" | 30 | #define FMT_SHORTDATE "%Y-%m-%d" |
31 | #define FMT_ATOMDATE "%Y-%m-%dT%H:%M:%SZ" | 31 | #define FMT_ATOMDATE "%Y-%m-%dT%H:%M:%SZ" |
32 | 32 | ||
33 | 33 | ||
34 | /* | 34 | /* |
35 | * Limits used for relative dates | 35 | * Limits used for relative dates |
36 | */ | 36 | */ |
37 | #define TM_MIN 60 | 37 | #define TM_MIN 60 |
38 | #define TM_HOUR (TM_MIN * 60) | 38 | #define TM_HOUR (TM_MIN * 60) |
39 | #define TM_DAY (TM_HOUR * 24) | 39 | #define TM_DAY (TM_HOUR * 24) |
40 | #define TM_WEEK (TM_DAY * 7) | 40 | #define TM_WEEK (TM_DAY * 7) |
41 | #define TM_YEAR (TM_DAY * 365) | 41 | #define TM_YEAR (TM_DAY * 365) |
42 | #define TM_MONTH (TM_YEAR / 12.0) | 42 | #define TM_MONTH (TM_YEAR / 12.0) |
43 | 43 | ||
44 | 44 | ||
45 | /* | 45 | /* |
46 | * Default encoding | 46 | * Default encoding |
47 | */ | 47 | */ |
48 | #define PAGE_ENCODING "UTF-8" | 48 | #define PAGE_ENCODING "UTF-8" |
49 | 49 | ||
50 | typedef void (*configfn)(const char *name, const char *value); | 50 | typedef void (*configfn)(const char *name, const char *value); |
51 | typedef void (*filepair_fn)(struct diff_filepair *pair); | 51 | typedef void (*filepair_fn)(struct diff_filepair *pair); |
52 | typedef void (*linediff_fn)(char *line, int len); | 52 | typedef void (*linediff_fn)(char *line, int len); |
53 | 53 | ||
54 | struct cgit_filter { | 54 | struct cgit_filter { |
55 | char *cmd; | 55 | char *cmd; |
56 | char **argv; | 56 | char **argv; |
57 | int old_stdout; | 57 | int old_stdout; |
58 | int pipe_fh[2]; | 58 | int pipe_fh[2]; |
59 | int pid; | 59 | int pid; |
60 | int exitstatus; | 60 | int exitstatus; |
61 | }; | 61 | }; |
62 | 62 | ||
63 | struct cgit_repo { | 63 | struct cgit_repo { |
64 | char *url; | 64 | char *url; |
65 | char *name; | 65 | char *name; |
66 | char *path; | 66 | char *path; |
67 | char *desc; | 67 | char *desc; |
68 | char *owner; | 68 | char *owner; |
69 | char *defbranch; | 69 | char *defbranch; |
70 | char *module_link; | 70 | char *module_link; |
71 | char *readme; | 71 | char *readme; |
72 | char *section; | 72 | char *section; |
73 | char *clone_url; | 73 | char *clone_url; |
74 | char *logo; | ||
75 | char *logo_link; | ||
74 | int snapshots; | 76 | int snapshots; |
75 | int enable_commit_graph; | 77 | int enable_commit_graph; |
76 | int enable_log_filecount; | 78 | int enable_log_filecount; |
77 | int enable_log_linecount; | 79 | int enable_log_linecount; |
78 | int enable_remote_branches; | 80 | int enable_remote_branches; |
79 | int enable_subject_links; | 81 | int enable_subject_links; |
80 | int max_stats; | 82 | int max_stats; |
81 | time_t mtime; | 83 | time_t mtime; |
82 | struct cgit_filter *about_filter; | 84 | struct cgit_filter *about_filter; |
83 | struct cgit_filter *commit_filter; | 85 | struct cgit_filter *commit_filter; |
84 | struct cgit_filter *source_filter; | 86 | struct cgit_filter *source_filter; |
85 | }; | 87 | }; |
86 | 88 | ||
87 | typedef void (*repo_config_fn)(struct cgit_repo *repo, const char *name, | 89 | typedef void (*repo_config_fn)(struct cgit_repo *repo, const char *name, |
88 | const char *value); | 90 | const char *value); |
89 | 91 | ||
90 | struct cgit_repolist { | 92 | struct cgit_repolist { |
91 | int length; | 93 | int length; |
92 | int count; | 94 | int count; |
93 | struct cgit_repo *repos; | 95 | struct cgit_repo *repos; |
94 | }; | 96 | }; |
95 | 97 | ||
96 | struct commitinfo { | 98 | struct commitinfo { |
97 | struct commit *commit; | 99 | struct commit *commit; |
98 | char *author; | 100 | char *author; |
99 | char *author_email; | 101 | char *author_email; |
100 | unsigned long author_date; | 102 | unsigned long author_date; |
101 | char *committer; | 103 | char *committer; |
102 | char *committer_email; | 104 | char *committer_email; |
103 | unsigned long committer_date; | 105 | unsigned long committer_date; |
104 | char *subject; | 106 | char *subject; |
105 | char *msg; | 107 | char *msg; |
106 | char *msg_encoding; | 108 | char *msg_encoding; |
107 | }; | 109 | }; |
108 | 110 | ||
109 | struct taginfo { | 111 | struct taginfo { |
110 | char *tagger; | 112 | char *tagger; |
111 | char *tagger_email; | 113 | char *tagger_email; |
112 | unsigned long tagger_date; | 114 | unsigned long tagger_date; |
113 | char *msg; | 115 | char *msg; |
114 | }; | 116 | }; |
115 | 117 | ||
116 | struct refinfo { | 118 | struct refinfo { |
117 | const char *refname; | 119 | const char *refname; |
118 | struct object *object; | 120 | struct object *object; |
119 | union { | 121 | union { |
120 | struct taginfo *tag; | 122 | struct taginfo *tag; |
121 | struct commitinfo *commit; | 123 | struct commitinfo *commit; |