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