]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/seekdir.3
All pages: Remove the 5th argument to .TH
[thirdparty/man-pages.git] / man3 / seekdir.3
CommitLineData
fea681da
MK
1.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2.\"
5fbde956 3.\" SPDX-License-Identifier: Linux-man-pages-copyleft
fea681da
MK
4.\"
5.\" References consulted:
6.\" Linux libc source code
7.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
8.\" 386BSD man pages
9.\" Modified Sat Jul 24 18:25:21 1993 by Rik Faith (faith@cs.unc.edu)
73f4bf1e 10.\"
45186a5d 11.TH SEEKDIR 3 2021-03-22 "Linux man-pages (unreleased)"
fea681da
MK
12.SH NAME
13seekdir \- set the position of the next readdir() call in the directory
14stream.
63c15895
AC
15.SH LIBRARY
16Standard C library
8fc3b2cf 17.RI ( libc ", " \-lc )
fea681da
MK
18.SH SYNOPSIS
19.nf
20.B #include <dirent.h>
68e4db0a 21.PP
73f4bf1e 22.BI "void seekdir(DIR *" dirp ", long " loc );
fea681da 23.fi
68e4db0a 24.PP
d39ad78f 25.RS -4
cc4615cc
MK
26Feature Test Macro Requirements for glibc (see
27.BR feature_test_macros (7)):
d39ad78f 28.RE
68e4db0a 29.PP
cc4615cc 30.BR seekdir ():
9d281e06 31.nf
38c1dbe9
MK
32 _XOPEN_SOURCE
33 || /* Glibc since 2.19: */ _DEFAULT_SOURCE
7d8d2f09 34 || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
9d281e06 35.fi
fea681da 36.SH DESCRIPTION
60a90ecd
MK
37The
38.BR seekdir ()
39function sets the location in the directory stream
40from which the next
41.BR readdir (2)
42call will start.
73f4bf1e
MK
43The
44.I loc
45argument should be a value returned by a previous call to
60a90ecd 46.BR telldir (3).
47297adb 47.SH RETURN VALUE
60a90ecd
MK
48The
49.BR seekdir ()
50function returns no value.
bbb97a01 51.SH ATTRIBUTES
79e5ca24
PH
52For an explanation of the terms used in this section, see
53.BR attributes (7).
c466875e
MK
54.ad l
55.nh
79e5ca24
PH
56.TS
57allbox;
c466875e 58lbx lb lb
79e5ca24
PH
59l l l.
60Interface Attribute Value
61T{
bbb97a01 62.BR seekdir ()
79e5ca24
PH
63T} Thread safety MT-Safe
64.TE
c466875e
MK
65.hy
66.ad
67.sp 1
3113c7f3 68.SH STANDARDS
ada74aab 69POSIX.1-2001, POSIX.1-2008, 4.3BSD.
fc3c831d
MK
70.SH NOTES
71In glibc up to version 2.1.1, the type of the
73f4bf1e 72.I loc
fc3c831d
MK
73argument was
74.IR off_t .
75POSIX.1-2001 specifies
76.IR long ,
77and this is the type used since glibc 2.1.2.
73f4bf1e
MK
78See
79.BR telldir (3)
80for information on why you should be careful in making any
81assumptions about the value in this argument.
47297adb 82.SH SEE ALSO
fea681da
MK
83.BR lseek (2),
84.BR closedir (3),
85.BR opendir (3),
86.BR readdir (3),
87.BR rewinddir (3),
88.BR scandir (3),
89.BR telldir (3)