install C version of _doprnt
[unix-history] / usr / src / lib / libc / gen / directory.3
index d1feae8..43e0d0c 100644 (file)
@@ -2,12 +2,12 @@
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
-.\"    @(#)directory.3 6.2 (Berkeley) %G%
+.\"    @(#)directory.3 6.3 (Berkeley) %G%
 .\"
 .TH DIRECTORY 3 ""
 .UC 5
 .SH NAME
 .\"
 .TH DIRECTORY 3 ""
 .UC 5
 .SH NAME
-opendir, readdir, telldir, seekdir, rewinddir, closedir \- directory operations
+opendir, readdir, telldir, seekdir, rewinddir, closedir, dirfd \- directory operations
 .SH SYNOPSIS
 .B #include <sys/types.h>
 .br
 .SH SYNOPSIS
 .B #include <sys/types.h>
 .br
@@ -52,6 +52,12 @@ opendir, readdir, telldir, seekdir, rewinddir, closedir \- directory operations
 .SM
 .B DIR
 .B *dirp;
 .SM
 .B DIR
 .B *dirp;
+.PP
+.B dirfd(dirp)
+.br
+.SM
+.B DIR
+.B *dirp;
 .SH DESCRIPTION
 .I Opendir
 opens the directory named by
 .SH DESCRIPTION
 .I Opendir
 opens the directory named by
@@ -114,6 +120,11 @@ closes the named
 .I directory stream
 and frees the structure associated with the DIR pointer.
 .PP
 .I directory stream
 and frees the structure associated with the DIR pointer.
 .PP
+.I Dirfd
+returns the integer file descriptor associated with the named
+.I directory stream,
+see open(2).
+.PP
 Sample code which searchs a directory for entry ``name'' is:
 .PP
 .br
 Sample code which searchs a directory for entry ``name'' is:
 .PP
 .br