Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

fseek [2006/10/06 19:08] (current)
Line 1: Line 1:
 +# $EPIC: fseek.txt,v 1.2 2006/10/06 19:08:28 jnelson Exp $
 +$[[fseek]](//file descriptor// //position// //anchor//)
 +This function resets the file pointer to //position// bytes away from 
 +//anchor// The next [[read]] or [[readb]] of the file after this call
 +will read the data from the new location.
 +//Position// can be positive or negative, and //Anchor// must be one of
 +| SET | The beginning of the file |
 +| CUR | The current place in the file |
 +| END | The end of the file | 
 +This function returns the fseek(3) value, which is zero if the operation
 +succeeds and is non-zero if an error occurs.
 +The //file descriptor// must have been a value previously returned by 
 +the [[open]] function. 
 +-1   Error: //file descriptor// was not previously returned by [[open]], or //anchor// is not supported.
 +   The file pointer was reset.
 +   The file pointer could not be reset.
fseek.txt ยท Last modified: 2006/10/06 19:08 (external edit)