1: int open[9] { 1 };
2: int n 1;
3: int t 0;
4:
5: char in[512];
6:
7: char out[512];
8:
9: main(argc,argv)
10: char **argv;
11: {
12: int register r,w,p;
13: struct { int x1[2], type, x2[15]; } buf;
14: fstat(1,&buf);
15: t = (buf.type&060000)==020000;
16: while(argc-->1) {
17: open[n++] = creat(argv[1],0666);
18: if(stat(argv[1],&buf)>=0)
19: if((buf.type&060000)==020000)
20: t++;
21: argv++;
22: }
23: r = w = 0;
24: for(;;) {
25: for(p=0;p<512;) {
26: if(r>=w) {
27: if(t>0&&p>0) break;
28: w = read(0,in,512);
29: r = 0;
30: if(w<=0) {
31: stash(p);
32: return;
33: }
34: }
35: out[p++] = in[r++];
36: }
37: stash(p);
38: }
39: }
40:
41: stash(p)
42: {
43: int k;
44: int i;
45: int d;
46: d = t ? 10 : p;
47: for(i=0; i<p; i=+d)
48: for(k=0;k<n;k++)
49: write(open[k], out+i, d<p-i?d:p-i);
50: }
Defined functions
main
defined in line
9;
never used
stash
defined in line
41; used 2 times
Defined variables
in
defined in line
5; used 2 times
n
defined in line
2; used 2 times
open
defined in line
1; used 49 times
- in line 17,
49
- in /usr/source/s2/mail.c line
51
- in /usr/source/s2/mkfs.c line
86-91(2),
116,
238
- in /usr/source/s2/mount.c line
17
- in /usr/source/s2/ncheck.c line
88
- in /usr/source/s2/nm.c line
55-56(2)
- in /usr/source/s2/od.c line
69
- in /usr/source/s2/passwd.c line
34,
125
- in /usr/source/s2/pr.c line
169
- in /usr/source/s2/prof.c line
94,
108,
178
- in /usr/source/s2/ps.c line
103,
177,
220
- in /usr/source/s2/ptx.c line
41,
72
- in /usr/source/s2/pwd.c line
14,
30
- in /usr/source/s2/rc.c line
284
- in /usr/source/s2/restor.c line
145,
464
- in /usr/source/s2/sa.c line
284,
389,
404
- in /usr/source/s2/sh.c line
107,
118,
628,
637,
668
- in /usr/source/s2/size.c line
19
- in /usr/source/s2/typo.c line
68,
78,
90,
121-126(2),
163
- in /usr/source/s2/umount.c line
17
- in /usr/source/s2/uniq.c line
31
- in /usr/source/s2/wall.c line
17,
26,
58
- in /usr/source/s2/who.c line
25
out
defined in line
7; used 2 times
t
defined in line
3; used 4 times