#ifndef CGIT_H #define CGIT_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* Add isgraph(x) to Git's sane ctype support (see git-compat-util.h) */ #undef isgraph #define isgraph(x) (isprint((x)) && !isspace((x))) /* * Dateformats used on misc. pages */ #define FMT_LONGDATE "%Y-%m-%d %H:%M:%S (%Z)" #define FMT_SHORTDATE "%Y-%m-%d" #define FMT_ATOMDATE "%Y-%m-%dT%H:%M:%SZ" /* * Limits used for relative dates */ #define TM_MIN 60 #define TM_HOUR (TM_MIN * 60) #define TM_DAY (TM_HOUR * 24) #define TM_WEEK (TM_DAY * 7) #define TM_YEAR (TM_DAY * 365) #define TM_MONTH (TM_YEAR / 12.0) /* * Default encoding */ #define PAGE_ENCODING "UTF-8" typedef void (*configfn)(const char *name, const char *value); typedef void (*filepair_fn)(struct diff_filepair *pair); typedef void (*linediff_fn)(char *line, int len); typedef enum { DIFF_UNIFIED, DIFF_SSDIFF, DIFF_STATONLY } diff_type; typedef enum { ABOUT, COMMIT, SOURCE, EMAIL, AUTH, OWNER } filter_type; struct cgit_filter { int (*open)(struct cgit_filter *, va_list ap); int (*close)(struct cgit_filter *); void (*fprintf)(struct cgit_filter *, FILE *, const char *prefix); void (*cleanup)(struct cgit_filter *); int argument_count; }; struct cgit_exec_filter { struct cgit_filter base; char *cmd; char **argv; int old_stdout; int pipe_fh[2]; int pid; }; struct cgit_repo { char *url; char *name; char *path; char *desc; char *owner; char *defbranch; char *module_link; struct string_list readme; char *section; char *clone_url; char *logo; char *logo_link; int snapshots; int enable_commit_graph; int enable_log_filecount; int enable_log_linecount; int enable_remote_branches; int enable_subject_links; int max_stats; int branch_sort; int commit_sort; time_t mtime; struct cgit_filter *about_filter; struct cgit_filter *commit_filter; struct cgit_filter *source_filter; struct cgit_filter *email_filter; struct cgit_filter *owner_filter; struct string_list submodules; int hide; int ignore; }; typedef void (*repo_config_fn)(struct cgit_repo *repo, const char *name, const char *value); struct cgit_repolist { int length; int count; struct cgit_repo *repos; }; struct commitinfo { struct commit *commit; char *author; char *author_email; unsigned long author_date; char *committer; char *committer_email; unsigned long committer_date; char *subject; char *msg; char *msg_encoding; }; struct taginfo { char *ta
#ifndef UI_ATOM_H
#define UI_ATOM_H

extern void cgit_print_atom(char *tip, char *path, int max_count);

#endif