#include <sys/ioctl.h>
#include <fnmatch.h>
+#include "agedu.h"
#include "du.h"
#include "trie.h"
#include "index.h"
#include "httpd.h"
#include "fgetline.h"
-#define PNAME "agedu"
-
-#define lenof(x) (sizeof((x))/sizeof(*(x)))
-
/*
* Path separator. This global variable affects the behaviour of
* various parts of the code when they need to deal with path
--- /dev/null
+/*
+ * Central header file for agedu, defining various useful things.
+ */
+
+#define PNAME "agedu"
+
+#define lenof(x) (sizeof((x))/sizeof(*(x)))
+
+extern char pathsep;
#include <limits.h>
#include <time.h>
+#include "agedu.h"
#include "html.h"
#include "malloc.h"
#include "trie.h"
#include "index.h"
-#define lenof(x) ( sizeof((x)) / sizeof(*(x)) )
-
#define MAXCOLOUR 511
-extern char pathsep;
-
struct html {
char *buf;
size_t buflen, bufsize;
#include <assert.h>
#include <stdio.h>
+#include "agedu.h"
#include "malloc.h"
-#define lenof(x) (sizeof((x))/sizeof(*(x)))
-
extern void fatal(const char *, ...);
void *smalloc(size_t size) {
#include <sys/types.h>
#include <unistd.h>
+#include "agedu.h"
#include "malloc.h"
#include "trie.h"
#define alignof(typ) ( offsetof(struct { char c; typ t; }, t) )
-extern char pathsep;
-
/*
* Compare functions for pathnames. Returns the relative order of
* the names, like strcmp; also passes back the offset of the