fclose.gml
来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 37 行
GML
37 行
.func fclose
#include <stdio.h>
int fclose( FILE *fp );
.ixfunc2 '&StrIo' &func
.funcend
.desc begin
The &func function closes the file
.arg fp.
If there was any unwritten buffered data for the file, it is written out
before the file is closed.
Any unread buffered data is discarded.
If the associated buffer was automatically allocated, it is deallocated.
.desc end
.return begin
The &func function returns zero if the file was successfully
closed, or non-zero if any errors were detected.
.im errnoref
.return end
.see begin
.seelist &function. fclose fcloseall fdopen fopen freopen _fsopen
.see end
.exmp begin
#include <stdio.h>
void main()
{
FILE *fp;
.exmp break
fp = fopen( "stdio.h", "r" );
if( fp != NULL ) {
fclose( fp );
}
}
.exmp end
.class ANSI
.system
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?