2 .\" Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH TELL 3C "Jan 28, 1998"
8 tell \- return a file offset for a file descriptor
14 \fBoff_t\fR \fBtell\fR(\fBint\fR \fIfd\fR);
20 The \fBtell()\fR function obtains the current value of the file-position
21 indicator for the file descriptor \fIfd\fR.
25 Upon successful completion, \fBtell()\fR returns the current value of the
26 file-position indicator for \fIfd\fR measured in bytes from the beginning of
30 Otherwise, it returns \fB\(mi1\fR and sets \fBerrno\fR to indicate the error.
34 The \fBtell()\fR function will fail if:
41 The file descriptor \fIfd\fR is not an open file descriptor.
50 The current file offset cannot be represented correctly in an object of type
60 The file descriptor \fIfd\fR is associated with a pipe or FIFO.
66 The \fBtell()\fR function is equivalent to \fBlseek(\fR\fIfd\fR\fB, 0,
71 See \fBattributes\fR(5) for descriptions of the following attributes:
79 ATTRIBUTE TYPE ATTRIBUTE VALUE
87 \fBlseek\fR(2), \fBattributes\fR(5)