11696Smckusick /* Copyright (c) 1979 Regents of the University of California */ 21696Smckusick 3*3869Smckusic static char sccsid[] = "@(#)REWRITE.c 1.3 06/10/81"; 41696Smckusick 51696Smckusick #include "h00vars.h" 61696Smckusick 71696Smckusick REWRITE(filep, name, maxnamlen, datasize) 81696Smckusick 91696Smckusick register struct iorec *filep; 101696Smckusick char *name; 113027Smckusic long maxnamlen; 123027Smckusic long datasize; 131696Smckusick { 141696Smckusick filep = GETNAME (filep, name, maxnamlen, datasize); 151696Smckusick filep->fbuf = fopen(filep->fname, "w"); 161696Smckusick if (filep->fbuf == NULL) { 17*3869Smckusic PERROR("Could not create ",filep->pfname); 181696Smckusick return; 191696Smckusick } 201696Smckusick filep->funit |= (EOFF | FWRITE); 211696Smckusick if (filep->fblk > PREDEF) { 221696Smckusick setbuf(filep->fbuf, &filep->buf[0]); 231696Smckusick } 241696Smckusick } 25