blob: 3049e34b2a1cfcb8453511e76e89f08472e23656 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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);
}
|