1*30246Smckusick /* 2*30246Smckusick * Copyright (c) 1986 Regents of the University of California. 3*30246Smckusick * All rights reserved. The Berkeley software License Agreement 4*30246Smckusick * specifies the terms and conditions for redistribution. 5*30246Smckusick */ 6*30246Smckusick 7*30246Smckusick #ifndef lint 8*30246Smckusick char copyright[] = 9*30246Smckusick "@(#) Copyright (c) 1986 Regents of the University of California.\n\ 10*30246Smckusick All rights reserved.\n"; 11*30246Smckusick #endif not lint 12*30246Smckusick 13*30246Smckusick #ifndef lint 14*30246Smckusick static char sccsid[] = "@(#)20b.c 5.1 (Berkeley) 12/03/86"; 15*30246Smckusick #endif not lint 16*30246Smckusick 17*30246Smckusick main() 18*30246Smckusick { 19*30246Smckusick register char *base, *current; 20*30246Smckusick register int cc, want; 21*30246Smckusick int bsize = 20 * 512; 22*30246Smckusick char *alloca(); 23*30246Smckusick 24*30246Smckusick base = alloca(bsize); 25*30246Smckusick for(cc = bsize; cc > 0;) { 26*30246Smckusick current = base; 27*30246Smckusick for(want = bsize; want > 0 && cc > 0; want -= cc) { 28*30246Smckusick cc = read(0,current,want); 29*30246Smckusick current += cc; 30*30246Smckusick } 31*30246Smckusick if((want = bsize - want) > 0) 32*30246Smckusick write(1,base,want); 33*30246Smckusick } 34*30246Smckusick return(0); 35*30246Smckusick } 36