1987-01-27 15:57:55 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/dir.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* close a directory.
|
|
|
|
*/
|
|
|
|
closedir(dirp)
|
|
|
|
register DIR *dirp;
|
|
|
|
{
|
1987-03-27 15:11:06 +00:00
|
|
|
if (dirp->dd_fd >= 0) close(dirp->dd_fd);
|
1987-01-27 15:57:55 +00:00
|
|
|
dirp->dd_fd = -1;
|
1987-03-27 15:11:06 +00:00
|
|
|
dirp->dd_loc = -1;
|
1987-02-24 13:10:59 +00:00
|
|
|
free(dirp->dd_buf);
|
|
|
|
free((char *)dirp);
|
1987-01-27 15:57:55 +00:00
|
|
|
}
|