more fixes
[unix-history] / usr / src / share / man / man3f / fseek.3
CommitLineData
7381a715
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
7eb2074c 5.\" @(#)fseek.3 6.1 (Berkeley) %G%
7381a715 6.\"
7eb2074c 7.TH FSEEK 3F ""
7381a715
KM
8.UC 5
9.SH NAME
10fseek, ftell \- reposition a file on a logical unit
11.SH SYNOPSIS
12.B integer function fseek (lunit, offset, from)
13.br
14.B integer offset, from
15.sp 1
16.B integer function ftell (lunit)
17.SH DESCRIPTION
18.I lunit
19must refer to an open logical unit.
20.I offset
21is an offset in bytes relative to the position specified by
22.I from.
23Valid values for
24.I from
25are:
26.sp 1
27.in +5
280 meaning 'beginning of the file'
29.br
301 meaning 'the current position'
31.br
322 meaning 'the end of the file'
33.in -5
34.PP
35The value returned by
36.I fseek
37will be 0 if successful, a system error code otherwise.
38(See perror(3F))
39.PP
40.I Ftell
41returns the current position of the file associated with the specified
42logical unit. The value is an offset, in bytes, from the beginning of the file.
43If the value returned is negative, it indicates an error and will be
44the negation of the system error code. (See perror(3F))
45.SH FILES
46.ie \nM /usr/ucb/lib/libU77.a
47.el /usr/lib/libU77.a
48.SH "SEE ALSO"
49fseek(3S), perror(3F)