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 */ 71652Smckusick 840865Sbostic #ifndef lint 9*62092Sbostic static char sccsid[] = "@(#)FNIL.c 8.1 (Berkeley) 06/06/93"; 1040865Sbostic #endif /* not lint */ 111652Smckusick 121652Smckusick #include "h00vars.h" 131652Smckusick 141652Smckusick char * FNIL(curfile)151652SmckusickFNIL(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