rewind.gml
来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 46 行
GML
46 行
.func rewind
#include <stdio.h>
void rewind( FILE *fp );
.ixfunc2 '&StrIo' &func
.funcend
.desc begin
The &func function sets the file position indicator for the stream
indicated to by
.arg fp
to the beginning of the file.
It is equivalent to
.millust begin
fseek( fp, 0L, SEEK_SET );
.millust end
.pc
except that the error indicator for the stream is cleared.
.desc end
.return begin
The &func function returns no value.
.return end
.see begin
.seelist rewind fopen clearerr
.see end
.exmp begin
#include <stdio.h>
static assemble_pass( int passno )
{
printf( "Pass %d\n", passno );
}
.exmp break
void main()
{
FILE *fp;
if( (fp = fopen( "program.asm", "r")) != NULL ) {
assemble_pass( 1 );
rewind( fp );
assemble_pass( 2 );
fclose( fp );
}
}
.exmp end
.class ANSI
.system
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?