seek.2
来自「UNIX v6源代码 这几乎是最经典的unix版本 unix操作系统设计和莱」· 2 代码 · 共 61 行
2
61 行
.th SEEK II 8/5/73.sh NAMEseek \*- move read/write pointer.sh SYNOPSIS(seek = 19.).br(file descriptor in r0).ft B.brsys seek; offset; ptrname.s3seek(fildes, offset, ptrname).ft R.sh DESCRIPTIONThe filedescriptor refers to a file open for reading or writing.The read (resp. write) pointer for the file is set as follows:.s3.lp +6 3if.it ptrnameis 0, the pointer is set to.it offset..s3.lp +6 3if.it ptrnameis 1, the pointer is set to its current location plus.it offset..s3.lp +6 3if.it ptrnameis 2, the pointer is set to the size of thefile plus.it offset..s3.lp +6 3if.it ptrnameis 3, 4 or 5,the meaning is as above for0, 1 and 2 except thatthe offset ismultiplied by 512..s3.i0If.it ptrnameis 0 or 3,.it offsetis unsigned,otherwiseit is signed..sh "SEE ALSO"open (II), creat (II).sh DIAGNOSTICSThe error bit(c-bit) is set for an undefined file descriptor.From C, a \*-1 return indicates an error.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?