chiark / gitweb /
Source code reorganization:
[disorder] / lib / configuration.c
index 5c1d4cef429720f80472dc07bf944929fda9d9f0..c66f66bf04f8c44709a69ad35585349ddd562df1 100644 (file)
  * @brief Configuration file support
  */
 
-#include <config.h>
-#include "types.h"
+#include "common.h"
 
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -311,7 +307,7 @@ static int set_restrict(const struct config_state *cs,
   };
 
   for(n = 0; n < nvec; ++n) {
-    if((i = TABLE_FIND(restrictions, struct restriction, name, vec[n])) < 0) {
+    if((i = TABLE_FIND(restrictions, name, vec[n])) < 0) {
       error(0, "%s:%d: invalid restriction '%s'",
            cs->path, cs->line, vec[n]);
       return -1;
@@ -986,7 +982,7 @@ static const struct conf conf[] = {
 static const struct conf *find(const char *key) {
   int n;
 
-  if((n = TABLE_FIND(conf, struct conf, name, key)) < 0)
+  if((n = TABLE_FIND(conf, name, key)) < 0)
     return 0;
   return &conf[n];
 }