2 * Copyright (c) 2019 Tracey Emery <tracey@traceyemery.net>
3 * Copyright (c) 2018, 2019 Stefan Sperling <stsp@openbsd.org>
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 #include <got_error.h>
25 #define GOTWEB_CONF "/etc/gotweb.conf"
26 #define GOTWEB_TMPL_DIR "/cgi-bin/gw_tmpl"
27 #define GOTWEB "/cgi-bin/gotweb/gotweb"
29 #define GOTWEB_GOT_DIR ".got"
30 #define GOTWEB_GIT_DIR ".git"
32 #define D_GOTPATH "/got/public"
33 #define D_GOTWWW "/gotweb"
34 #define D_SITENAME "Gotweb"
35 #define D_SITEOWNER "Got Owner"
36 #define D_SITELINK "Repos"
37 #define D_GOTLOGO "got.png"
38 #define D_GOTURL "https://gameoftrees.org"
40 #define D_SHOWROWNER true
41 #define D_SHOWSOWNER true
42 #define D_SHOWAGE true
43 #define D_SHOWDESC true
44 #define D_SHOWURL true
46 #define D_MAXREPODISP 25
47 #define D_MAXCOMMITDISP 25
49 #define BUFFER_SIZE 2048
61 size_t got_max_repos_display;
62 size_t got_max_commits_display;
64 bool got_show_site_owner;
65 bool got_show_repo_owner;
66 bool got_show_repo_age;
67 bool got_show_repo_description;
68 bool got_show_repo_cloneurl;
71 const struct got_error* parse_conf(const char *, struct gotweb_conf *);