ls

来自「Algorithms for Image Processing and Comp」· 代码 · 共 44 行

TXT
44
字号
@c ----------------------------------------------------------------------
@node lseek, io
@heading @code{lseek}
@subheading Syntax

@example
#include <osfcn.h>

long lseek(nit fd, long offset, int whence);
@end example

@subheading Description

This function moves the file pointer for @var{fd} according to
@var{mode}:

@table @code

@item SEEK_SET

The file pointer is moved to the offset specified.

@item SEEK_CUR

The file pointer is moved relative to its current position.

@item SEEK_END

The file pointer is moved to a position @var{offset} bytes from the end
of the file.  The offset is usually nonpositive in this case. 

@end table

@subheading Return Value

The new offset is returned.

@subheading Example

@example
lseek(fd, 12, SEEK_CUR); /* skip 12 bytes */
@end example

⌨️ 快捷键说明

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