diff options
-rw-r--r-- | dat.h | 1 | ||||
-rw-r--r-- | fns.h | 0 | ||||
-rw-r--r-- | main.c | 31 | ||||
-rw-r--r-- | mkfile | 11 | ||||
-rw-r--r-- | parser.c | 5 |
5 files changed, 48 insertions, 0 deletions
@@ -0,0 +1 @@ +int debug;
\ No newline at end of file @@ -0,0 +1,31 @@ +#include <u.h> +#include <libc.h> + +#include "dat.h" +#include "fns.h" + +void usage(void); + +void +main(int argc, char *argv[]) +{ + ARGBEGIN{ + case 'd': + debug = 1; + break; + default: + usage(); + }ARGEND + + if(argc != 0) + usage(); + + exits(nil); +} + +void +usage(void) +{ + fprint(2, "Usage: pprolog [-d]\n"); + exits("Usage"); +}
\ No newline at end of file @@ -0,0 +1,11 @@ +</$objtype/mkfile + +TARG=pprolog + +OFILES=main.$O parser.$O + +HFILES=dat.h fns.h + +BIN=/$objtype/bin + +</sys/src/cmd/mkone
\ No newline at end of file diff --git a/parser.c b/parser.c new file mode 100644 index 0000000..0a5e9d4 --- /dev/null +++ b/parser.c @@ -0,0 +1,5 @@ +#include <u.h> +#include <libc.h> + +#include "dat.h" +#include "fns.h" |