|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T c
Length: 626 (0x272)
Types: TextFile
Names: »closedir.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
└─⟦eba4602b1⟧ »./isode-5.0.tar.Z«
└─⟦d3ac74d73⟧
└─⟦this⟧ »isode-5.0/dirent/closedir.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z«
└─⟦de7628f85⟧
└─⟦this⟧ »isode-6.0/dirent/closedir.c«
/*
closedir -- close a directory stream
last edit: 25-Apr-1987 D A Gwyn
*/
#include <sys/errno.h>
#include <sys/types.h>
#include "usr.dirent.h"
#ifndef GETDENTS
typedef char *pointer; /* (void *) if you have it */
extern void free();
extern int close();
extern int errno;
#ifndef NULL
#define NULL 0
#endif
int
closedir( dirp )
register DIR *dirp; /* stream from opendir() */
{
register int fd;
if ( dirp == NULL || dirp->dd_buf == NULL )
{
errno = EFAULT;
return -1; /* invalid pointer */
}
fd = dirp-> dd_fd;
free( (pointer)dirp->dd_buf );
free( (pointer)dirp );
return close( fd );
}
#endif