fseek.3s
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3S 代码 · 共 76 行
3S
76 行
.\" SCCSID: @(#)fseek.3s 8.1 9/11/90.TH fseek 3s.SH Namefseek, ftell, rewind \- reposition a file pointer in a stream.SH Syntax.B #include <stdio.h>.PP.B int fseek(\fIstream, offset, ptrname\fP).br.SM.B FILE.B *\fIstream\fP;.br.B long \fIoffset\fP;.br.B int \fIptrname\fP;.PP.B long ftell(\fIstream\fP).br.SM.B FILE.B *\fIstream\fP;.PP.B void rewind(\fIstream\fP).br.SM.B FILE.B *\fIstream\fP;.SH Description.NXR "fseek subroutine (standard I/O)".NXR "ftell subroutine (standard I/O)".NXR "rewind subroutine".NXR "stream" "repositioning"The.PN fseekfunction sets the position of the next input or outputoperation on the.IR stream .The new position is at the signed distance.I offsetbytesfrom the beginning, the current position, or the end of the file,according as .I ptrnamehas the value SEEK_SET, SEEK_CUR, or SEEK_END..PPThe.PN fseekfunction undoes any effects of.MS ungetc 3s ..PPThe.PN ftellfunction returns the current value of the offset relative to the beginningof the file associated with the named.IR stream .It is measured in bytes and is the only foolproof way to obtainan.I offsetfor.PN fseek ..PPThe.PN rewind (stream)function is equivalent to.PN fseek (stream , 0L, 0, SEEK_SET), except that no value is returned..SH Return ValuesThe.PN fseekfunction returns \-1 for improper seeks, otherwise 0..SH See Alsolseek(2), fopen(3s)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?