xref: /csrg-svn/usr.bin/pascal/libpc/APPEND.c (revision 62092)
140865Sbostic /*-
2*62092Sbostic  * Copyright (c) 1979, 1993
3*62092Sbostic  *	The Regents of the University of California.  All rights reserved.
440865Sbostic  *
540865Sbostic  * %sccs.include.redist.c%
640865Sbostic  */
71727Smckusick 
840865Sbostic #ifndef lint
9*62092Sbostic static char sccsid[] = "@(#)APPEND.c	8.1 (Berkeley) 06/06/93";
1040865Sbostic #endif /* not lint */
111727Smckusick 
121727Smckusick #include "h00vars.h"
131727Smckusick 
APPEND(filep)141727Smckusick APPEND(filep)
151727Smckusick 
161727Smckusick 	register struct iorec	*filep;
171727Smckusick {
181727Smckusick 	filep = GETNAME (filep, 0, 0, 0);
191727Smckusick 	filep->fbuf = fopen(filep->fname, "a");
201727Smckusick 	if (filep->fbuf == NULL) {
213869Smckusic 		PERROR("Could not open ", filep->pfname);
221727Smckusick 		return;
231727Smckusick 	}
241727Smckusick 	filep->funit |= (EOFF | FWRITE);
251727Smckusick 	if (filep->fblk > PREDEF) {
261727Smckusick 		setbuf(filep->fbuf, &filep->buf[0]);
271727Smckusick 	}
281727Smckusick }
29