NAME
    fseek - seek to a position in a file

SYNOPSIS
    fseek(fd, loc)

TYPES
    fd		file
    loc		int

    return	int

DESCRIPTION
    This function sets the current position to byte loc.  Setting
    the current position to 0 rewinds the file to the beginning.
    This function returns the new current position.

EXAMPLE
    > fd = fopen("/tmp/curds", "w")
    > fsize(fd)
	    0
    > fseek(fd, 1)
	    1

    > ftell(fd)
	    1
    > fputc(fd, "\n")
    > ftell(fd)
	    2
    > fsize(fd)
	    2
    > fseek(fd, 0)
	    0

    > ftell(fd)
	    0
    > fputc(fd, "!")
    > ftell(fd)
	    1
    > fd2 = fopen("/tmp/curds", "r")
    > fgetline(fd2)
	    "!"

LIMITS
    fd must be associaed with an open file
    fd != files(0) && fd != files(1) && fd != files(2)

LIBRARY
    none

SEE ALSO
    errno, fclose, feof, ferror, fflush, fgetc, fgetline, fgets, files, fopen,
    fprintf, fputc, fputs, fseek, fsize, ftell, isfile, printf, prompt
