Probably about time I had a central header file containing misc stuff.
[sgt/agedu] / agedu.c
diff --git a/agedu.c b/agedu.c
index a104dd7..83f8ead 100644 (file)
--- a/agedu.c
+++ b/agedu.c
@@ -20,6 +20,7 @@
 #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
@@ -604,7 +601,15 @@ int main(int argc, char **argv)
                    printf("FIXME: version();\n");
                    return 0;
                  case OPT_LICENCE:
-                   printf("FIXME: licence();\n");
+                   {
+                       extern const char *const licence[];
+                       int i;
+
+                       for (i = 0; licence[i]; i++)
+                           fputs(licence[i], stdout);
+
+                       return 0;
+                   }
                    return 0;
                  case OPT_SCAN:
                    if (nactions >= actionsize) {