⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pfclose.c

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 C
字号:
/* Copyright (c) 1982 Regents of the University of California */static	char sccsid[] = "@(#)PFCLOSE.c	1.3	(Berkeley)	1/21/83";/* * Close a Pascal file deallocating resources as appropriate. */#include "h00vars.h"#include "libpc.h"struct iorec *PFCLOSE(filep, lastuse)	register struct iorec *filep;	bool lastuse;{	if ((filep->funit & FDEF) == 0 && filep->fbuf != NULL) {		/*		 * Have a previous buffer, close associated file.		 */		if (filep->fblk > PREDEF) {			fflush(filep->fbuf);			setbuf(filep->fbuf, NULL);		}		fclose(filep->fbuf);		if (ferror(filep->fbuf)) {			ERROR("%s: Close failed\n", filep->pfname);			return;		}		/*		 * Temporary files are discarded.		 */		if ((filep->funit & TEMP) != 0 && lastuse &&		    unlink(filep->pfname)) {			PERROR("Could not remove ", filep->pfname);			return;		}	}	_actfile[filep->fblk] = FILNIL;	return (filep->fchain);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -