pfclose.c
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· C语言 代码 · 共 42 行
C
42 行
/* 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 + =
减小字号Ctrl + -
显示快捷键?