Lexer actually lexes filenames now, and odats are made out of mapvariants
[henge/webcc.git] / src / bin / tools / apc.c
index be902bd..2307ccc 100644 (file)
@@ -14,7 +14,7 @@
 /* Standard */
 #include <stdio.h>  //print
 #include <errno.h>  //errors
-#include <string.h> //strnlen
+#include <string.h> //strndupa
 /* Posix */
 #include <stdlib.h> //exit
 #include <unistd.h> //getopt
@@ -45,6 +45,7 @@ int main
 #define $($)#$ //stringifier
 #define MAXSTR 255
 #define MAXERR "-%c allows at most " $(MAXSTR) " input characters\n", opt
+#define OPTS  "d:o:h-"
 #define USAGE "Usage %s [-d dir_root][-o output_file][-h]\n", argv[0]
 #define USAGE_LONG                                     \
   "\tOptions:\n"                                       \
@@ -55,7 +56,7 @@ int main
 { int   opt;
 
  getopt:
-  switch (opt = getopt(argc, argv, "d:o:h-"))
+  switch (opt = getopt(argc, argv, OPTS))
   { case DONE:
       break;
     case 'd' :