summaryrefslogtreecommitdiffabout
path: root/shared.c
Unidiff
Diffstat (limited to 'shared.c') (more/less context) (show whitespace changes)
-rw-r--r--shared.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/shared.c b/shared.c
index cd60da5..48002ac 100644
--- a/shared.c
+++ b/shared.c
@@ -1,40 +1,38 @@
1/* shared.c: global vars + some callback functions 1/* shared.c: global vars + some callback functions
2 * 2 *
3 * Copyright (C) 2006 Lars Hjemli 3 * Copyright (C) 2006 Lars Hjemli
4 * 4 *
5 * Licensed under GNU General Public License v2 5 * Licensed under GNU General Public License v2
6 * (see COPYING for full license text) 6 * (see COPYING for full license text)
7 */ 7 */
8 8
9#include "cgit.h" 9#include "cgit.h"
10 10
11struct cgit_repolist cgit_repolist; 11struct cgit_repolist cgit_repolist;
12struct cgit_context ctx; 12struct cgit_context ctx;
13int cgit_cmd; 13int cgit_cmd;
14 14
15const char *cgit_version = CGIT_VERSION;
16
17int chk_zero(int result, char *msg) 15int chk_zero(int result, char *msg)
18{ 16{
19 if (result != 0) 17 if (result != 0)
20 die("%s: %s", msg, strerror(errno)); 18 die("%s: %s", msg, strerror(errno));
21 return result; 19 return result;
22} 20}
23 21
24int chk_positive(int result, char *msg) 22int chk_positive(int result, char *msg)
25{ 23{
26 if (result <= 0) 24 if (result <= 0)
27 die("%s: %s", msg, strerror(errno)); 25 die("%s: %s", msg, strerror(errno));
28 return result; 26 return result;
29} 27}
30 28
31int chk_non_negative(int result, char *msg) 29int chk_non_negative(int result, char *msg)
32{ 30{
33 if (result < 0) 31 if (result < 0)
34 die("%s: %s",msg, strerror(errno)); 32 die("%s: %s",msg, strerror(errno));
35 return result; 33 return result;
36} 34}
37 35
38struct cgit_repo *cgit_add_repo(const char *url) 36struct cgit_repo *cgit_add_repo(const char *url)
39{ 37{
40 struct cgit_repo *ret; 38 struct cgit_repo *ret;