8498 ficl: variable 'count' might be clobbered by 'longjmp' or 'vfork'
[unleashed.git] / share / man / man3c / rewind.3c
blob89dca974cb01309f2e70caea0080e05734208ae2
1 '\" te
2 .\"  Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved  Portions Copyright (c) 1992, X/Open Company Limited  All Rights Reserved
3 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
4 .\" http://www.opengroup.org/bookstore/.
5 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
6 .\"  This notice shall appear on any product containing this material.
7 .\" 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.
8 .\" 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.
9 .\" 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]
10 .TH REWIND 3C "Aug 14, 2002"
11 .SH NAME
12 rewind \- reset file position indicator in a stream
13 .SH SYNOPSIS
14 .LP
15 .nf
16 #include <stdio.h>
18 \fBvoid\fR \fBrewind\fR(\fBFILE *\fR\fIstream\fR);
19 .fi
21 .SH DESCRIPTION
22 .sp
23 .LP
24 The call:
25 .sp
26 .in +2
27 .nf
28 rewind(stream)
29 .fi
30 .in -2
32 .sp
33 .LP
34 is equivalent to:
35 .sp
36 .in +2
37 .nf
38 (void) fseek(stream, 0L, SEEK_SET)
39 .fi
40 .in -2
42 .sp
43 .LP
44 except that \fBrewind()\fR also clears the error indicator.
45 .SH RETURN VALUES
46 .sp
47 .LP
48 The \fBrewind()\fR function returns no value.
49 .SH ERRORS
50 .sp
51 .LP
52 Refer to \fBfseek\fR(3C) with the exception of \fBEINVAL\fR which does not
53 apply.
54 .SH USAGE
55 .sp
56 .LP
57 Because \fBrewind()\fR does not return a value, an application wishing to
58 detect errors should clear \fBerrno\fR, then call \fBrewind()\fR, and if
59 \fBerrno\fR is non-zero, assume an error has occurred.
60 .SH ATTRIBUTES
61 .sp
62 .LP
63 See \fBattributes\fR(5) for descriptions of the following attributes:
64 .sp
66 .sp
67 .TS
68 box;
69 c | c
70 l | l .
71 ATTRIBUTE TYPE  ATTRIBUTE VALUE
73 Interface Stability     Standard
75 MT-Level        MT-Safe
76 .TE
78 .SH SEE ALSO
79 .sp
80 .LP
81 \fBfseek\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)