diff options
author | Taru Karttunen <taruti@taruti.net> | 2011-03-30 15:46:40 +0300 |
---|---|---|
committer | Taru Karttunen <taruti@taruti.net> | 2011-03-30 15:46:40 +0300 |
commit | e5888a1ffdae813d7575f5fb02275c6bb07e5199 (patch) | |
tree | d8d51eac403f07814b9e936eed0c9a79195e2450 /sys/src/cmd/vac/testinc.c |
Import sources from 2011-03-30 iso image
Diffstat (limited to 'sys/src/cmd/vac/testinc.c')
-rwxr-xr-x | sys/src/cmd/vac/testinc.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/sys/src/cmd/vac/testinc.c b/sys/src/cmd/vac/testinc.c new file mode 100755 index 000000000..0cd431434 --- /dev/null +++ b/sys/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); +} |