X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/382805ee83b6e6f165159312a9fe20e3971897b6..0df096f6e146187e55e2203ea1c017442cc2c8c6:/shared.c diff --git a/shared.c b/shared.c index 45db735..65fc8b2 100644 --- a/shared.c +++ b/shared.c @@ -12,6 +12,8 @@ struct repolist cgit_repolist; struct repoinfo *cgit_repo; int cgit_cmd; +const char *cgit_version = CGIT_VERSION; + char *cgit_root_title = "Git repository browser"; char *cgit_css = "/cgit.css"; char *cgit_logo = "/git-logo.png"; @@ -84,6 +86,13 @@ int chk_positive(int result, char *msg) return result; } +int chk_non_negative(int result, char *msg) +{ + if (result < 0) + die("%s: %s",msg, strerror(errno)); + return result; +} + struct repoinfo *add_repo(const char *url) { struct repoinfo *ret;