summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2021-06-05 19:49:28 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2021-06-05 19:49:28 -0400
commitf47ec6a1b8379e1430a219fa053f6926f3b33a57 (patch)
treeb8f4752f4c88b5a97ee150e743b522575d3dda62 /config.c
parent4d51c5958dce97f8ba0c5a751c9b3e31ae0fb135 (diff)
Rename var to func, and change all the variables to
function addresses. This is to get rid of the need for global variables.
Diffstat (limited to 'config.c')
-rw-r--r--config.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/config.c b/config.c
index 7e25f34..8ce7ebc 100644
--- a/config.c
+++ b/config.c
@@ -4,14 +4,14 @@
#include <string.h>
static const config_opt config_opts[] = {
- /* {"name", "desc", type, var} */
- {"git-root", "Root of git server (can also be a url).", TYPE_STRING, git_root},
- {"socket-type", "Socket type to use (options: unix, network. default: network).", TYPE_STRING, sock_type},
- {"socket", "Path, IP address, or domain name of socket.", TYPE_STRING, sock},
- {"port", "Port to listen on (network socket only).", TYPE_INT, &sock_port},
- {"merge-type", "Type of merge (options: 0 = Merge individually, 1 = Merge into one).", TYPE_INT, &merge_type},
- {"pr-root", "Directory to store pull requests in.", TYPE_STRING, pr_root},
- {"key-file", "Path to file containing gpg/pgp public keys of each maintainer.", TYPE_STRING, key_path},
+ /* {"name", "desc", type, &func} */
+ {"git-root", "Root of git server (can also be a url).", TYPE_STRING, &get_git_root},
+ {"socket-type", "Socket type to use (options: unix, network. default: network).", TYPE_STRING, &get_sock_type},
+ {"socket", "Path, IP address, or domain name of socket.", TYPE_STRING, &get_sock},
+ {"port", "Port to listen on (network socket only).", TYPE_INT, &get_sock_port},
+ {"merge-type", "Type of merge (options: 0 = Merge individually, 1 = Merge into one).", TYPE_INT, &get_merge_type},
+ {"pr-root", "Directory to store pull requests in.", TYPE_STRING, &pr_root},
+ {"key-file", "Path to file containing gpg/pgp public keys of each maintainer.", TYPE_STRING, &get_key_path},
};
char *read_file(const char *filename, long *size) {