diff options
author | Russ Cox <rsc@swtch.com> | 2008-07-03 01:34:48 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2008-07-03 01:34:48 -0400 |
commit | e05b0ff3ebd8086809714527a27b412345ff4d72 (patch) | |
tree | 44dcf95f09055fb28e406a845b2d7fec4c3bd15b /src/cmd/vac/testinc.c | |
parent | d9841dc7adc0ad99e56cf508d5d6b6d2e59afbb5 (diff) | |
download | plan9port-e05b0ff3ebd8086809714527a27b412345ff4d72.tar.gz plan9port-e05b0ff3ebd8086809714527a27b412345ff4d72.tar.bz2 plan9port-e05b0ff3ebd8086809714527a27b412345ff4d72.zip |
vac: add -a and -x flags
Thanks to Michael Kaminsky for the suggestion.
Diffstat (limited to 'src/cmd/vac/testinc.c')
-rw-r--r-- | src/cmd/vac/testinc.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/cmd/vac/testinc.c b/src/cmd/vac/testinc.c new file mode 100644 index 00000000..0cd43143 --- /dev/null +++ b/src/cmd/vac/testinc.c @@ -0,0 +1,31 @@ +#include "stdinc.h" +#include "vac.h" +#include "dat.h" +#include "fns.h" +#include "error.h" + +void +threadmain(int argc, char **argv) +{ + Biobuf b; + char *p; + + ARGBEGIN{ + default: + goto usage; + }ARGEND + + if(argc != 1){ + usage: + fprint(2, "usage: testinc includefile\n"); + threadexitsall("usage"); + } + + loadexcludefile(argv[0]); + Binit(&b, 0, OREAD); + while((p = Brdline(&b, '\n')) != nil){ + p[Blinelen(&b)-1] = 0; + print("%d %s\n", includefile(p), p); + } + threadexitsall(0); +} |