ack/lang/cem/libcc/gen/closedir.c

17 lines
248 B
C
Raw Permalink Normal View History

1994-06-24 14:02:31 +00:00
/* $Id$ */
1987-01-27 15:57:55 +00:00
#include <sys/types.h>
#include <sys/dir.h>
/*
* close a directory.
*/
closedir(dirp)
register DIR *dirp;
{
if (dirp->dd_fd >= 0) close(dirp->dd_fd);
1987-01-27 15:57:55 +00:00
dirp->dd_fd = -1;
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
}