- struct chan chan[C];
- struct mach mach[M];
- struct line line[M-1];
- int mptbc;
- char mptbuf[TBSIZ];
- register struct chan *cp;
- register struct mach *mp;
- register struct line *lp;
- int loc, nc;
-
- lseek(fc, (long)setup[SMPXC].value, 0);
- read(fc, chan, sizeof(chan));
- lseek(fc, (long)setup[SMPXM].value, 0);
- read(fc, mach, sizeof(mach));
- lseek(fc, (long)setup[SMPXB1].value, 0);
- read(fc, &mptbc, sizeof(mptbc));
- lseek(fc, (long)setup[SMPXB2].value, 0);
- read(fc, mptbuf, sizeof(mptbuf));
- lseek(fc, (long)setup[SMPSM].value, 0);
- read(fc, line, sizeof(line));
- nc = 0;
- for(cp=chan; cp < &chan[C]; cp++)
- if(cp->cflag&ALLOC)
- nc++;
- printf("%d mpx channels\n", nc);
- printf(" LOC FLG M C DEST\n");
- for(cp=chan,loc=setup[SMPXC].value; cp < &chan[C]; cp++,loc=+sizeof(chan[0])) {
- if((cp->cflag&ALLOC) == 0)
- continue;
- printf("%7.1o ", loc);
- putf(cp->cflag&BLOCK, 'B');
- putf(cp->cflag&WWAIT, 'B');
- putf(cp->cflag&CRUN, 'R');
- putf(cp->cflag&RWAIT, 'W');
- putf(cp->cflag&ALLOC, 'A');
- putf(cp->cflag&DIS, 'D');
- putf(cp->cflag&DLY, 'D');
- printf(" %1d %3d ", mask(cp->m), mask(cp->c));
- printf("%7.1o ", cp->dest);
- printf("\n");
- }
+ struct proc proc[NPROC];
+ struct text xtext[NTEXT];
+ struct map swapmap[SMAPSIZ];
+ register struct proc *pp;
+ int nswap, used, tused, free;
+ register struct map *mp;
+ register struct text *xp;