X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/ac70cb4795c90db02917db63d169b0fadfe9fb99..c4ef667961ef4668c9449124f97d55b9ac46c059:/cgit.h diff --git a/cgit.h b/cgit.h index 6e95673..43de375 100644 --- a/cgit.h +++ b/cgit.h @@ -1,12 +1,26 @@ #ifndef CGIT_H #define CGIT_H -#include "git.h" -#include -#include -#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + 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); struct cacheitem { char *name; @@ -21,6 +35,7 @@ struct repoinfo { char *path; char *desc; char *owner; + char *module_link; int snapshots; }; @@ -58,6 +73,7 @@ extern char *cgit_root_title; extern char *cgit_css; extern char *cgit_logo; extern char *cgit_logo_link; +extern char *cgit_module_link; extern char *cgit_virtual_root; extern char *cgit_cache_root; @@ -103,6 +119,16 @@ extern int hextoint(char c); extern void *cgit_free_commitinfo(struct commitinfo *info); +extern int cgit_diff_files(const unsigned char *old_sha1, + const unsigned char *new_sha1, + linediff_fn fn); + +extern void cgit_diff_tree(const unsigned char *old_sha1, + const unsigned char *new_sha1, + filepair_fn fn); + +extern void cgit_diff_commit(struct commit *commit, filepair_fn fn); + extern char *fmt(const char *format,...); extern void html(const char *txt); @@ -143,7 +169,8 @@ extern void cgit_print_snapshot_start(const char *mimetype, extern void cgit_print_repolist(struct cacheitem *item); extern void cgit_print_summary(); extern void cgit_print_log(const char *tip, int ofs, int cnt, char *grep); -extern void cgit_print_view(const char *hex); +extern void cgit_print_view(const char *hex, char *path); +extern void cgit_print_blob(struct cacheitem *item, const char *hex, char *path); extern void cgit_print_tree(const char *hex, char *path); extern void cgit_print_commit(const char *hex); extern void cgit_print_diff(const char *old_hex, const char *new_hex);