author | Lars Hjemli <hjemli@gmail.com> | 2010-03-21 23:09:43 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2010-03-21 23:09:43 (UTC) |
commit | ba56a37e863d0f90e3e953047486905cfb959925 (patch) (unidiff) | |
tree | 965e2c917f472264de35125eec35c361984eba4f /cgit.h | |
parent | ff3a3b4e2b7463bb8cb370bdda393e8b3526fcb9 (diff) | |
download | cgit-ba56a37e863d0f90e3e953047486905cfb959925.zip cgit-ba56a37e863d0f90e3e953047486905cfb959925.tar.gz cgit-ba56a37e863d0f90e3e953047486905cfb959925.tar.bz2 |
Add support for environment variable expansion
This patch teaches cgit to expand environment variables in certain
cgitrc option values (cache_root, scan-path, include) plus when
finding the location of cgitrc itself.
One use case for this feature is virtual hosting - e.g. by setting
$CGIT_CONFIG='/etc/cgitrc/$HTTP_HOST' in httpd.conf, all virtual
hosts automatically gets their own cgitrc.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgit.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -283,17 +283,19 @@ extern void cgit_diff_commit(struct commit *commit, filepair_fn fn); | |||
283 | 283 | ||
284 | extern char *fmt(const char *format,...); | 284 | extern char *fmt(const char *format,...); |
285 | 285 | ||
286 | extern struct commitinfo *cgit_parse_commit(struct commit *commit); | 286 | extern struct commitinfo *cgit_parse_commit(struct commit *commit); |
287 | extern struct taginfo *cgit_parse_tag(struct tag *tag); | 287 | extern struct taginfo *cgit_parse_tag(struct tag *tag); |
288 | extern void cgit_parse_url(const char *url); | 288 | extern void cgit_parse_url(const char *url); |
289 | 289 | ||
290 | extern const char *cgit_repobasename(const char *reponame); | 290 | extern const char *cgit_repobasename(const char *reponame); |
291 | 291 | ||
292 | extern int cgit_parse_snapshots_mask(const char *str); | 292 | extern int cgit_parse_snapshots_mask(const char *str); |
293 | 293 | ||
294 | extern int cgit_open_filter(struct cgit_filter *filter); | 294 | extern int cgit_open_filter(struct cgit_filter *filter); |
295 | extern int cgit_close_filter(struct cgit_filter *filter); | 295 | extern int cgit_close_filter(struct cgit_filter *filter); |
296 | 296 | ||
297 | extern int readfile(const char *path, char **buf, size_t *size); | 297 | extern int readfile(const char *path, char **buf, size_t *size); |
298 | 298 | ||
299 | extern char *expand_macros(const char *txt); | ||
300 | |||
299 | #endif /* CGIT_H */ | 301 | #endif /* CGIT_H */ |