#pragma once #include /* Config file format * * Each line is a command that modifies some part of the configuration. A line * starting with a '#' is a comment and is ignored. The available commands are * as follows: * - 'apikey': the line contains three space-separated fields: 'apikey', the * key itself, and a permission bit vector (string of 0/1 characters). The * permission bit vector has the following elements: * 1. Whether 'sendat' is allowed. */ // Writes to stderr and exits on failure. void config_init(const char *filename); // Permissions for a particular API key struct apikey_perm { bool sendat; }; struct apikey_perm config_check_apikey(const char *apikey);