1*40865Sbostic /*- 2*40865Sbostic * Copyright (c) 1979 The Regents of the University of California. 3*40865Sbostic * All rights reserved. 4*40865Sbostic * 5*40865Sbostic * %sccs.include.redist.c% 6*40865Sbostic */ 71652Smckusick 8*40865Sbostic #ifndef lint 9*40865Sbostic static char sccsid[] = "@(#)FNIL.c 1.5 (Berkeley) 04/09/90"; 10*40865Sbostic #endif /* not lint */ 111652Smckusick 121652Smckusick #include "h00vars.h" 131652Smckusick 141652Smckusick char * 151652Smckusick FNIL(curfile) 161652Smckusick 171652Smckusick register struct iorec *curfile; 181652Smckusick { 191652Smckusick if (curfile->fblk >= MAXFILES || _actfile[curfile->fblk] != curfile) { 203867Smckusic ERROR("Reference to an inactive file\n", 0); 211652Smckusick } 221652Smckusick if (curfile->funit & FDEF) { 233867Smckusic ERROR("%s: Reference to an inactive file\n", curfile->pfname); 241652Smckusick } 251652Smckusick if (curfile->funit & FREAD) { 261652Smckusick IOSYNC(curfile); 271652Smckusick } 281652Smckusick return curfile->fileptr; 291652Smckusick } 30