1 /* Copyright (c) 1979 Regents of the University of California */ 2 3 static char sccsid[] = "@(#)APPEND.c 1.1 10/31/80"; 4 5 #include "h00vars.h" 6 #include "h01errs.h" 7 8 APPEND(filep) 9 10 register struct iorec *filep; 11 { 12 filep = GETNAME (filep, 0, 0, 0); 13 filep->fbuf = fopen(filep->fname, "a"); 14 if (filep->fbuf == NULL) { 15 ERROR(EOPEN, filep->pfname); 16 return; 17 } 18 filep->funit |= (EOFF | FWRITE); 19 if (filep->fblk > PREDEF) { 20 setbuf(filep->fbuf, &filep->buf[0]); 21 } 22 } 23