|
|
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 - download
Length: 384 (0x180)
Types: TextFile
Names: »opendir.c«
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit
└─⟦3658e588a⟧ »EurOpenD3/mail/mh/mh-6.7.tar.Z«
└─⟦c75e36ecb⟧
└─⟦this⟧ »mh-6.7/miscellany/libndir/opendir.c«
static char sccsid[] = "@(#)opendir.c 4.4 11/12/82";
#include <sys/param.h>
#include <dir.h>
/*
* open a directory.
*/
DIR *
opendir(name)
char *name;
{
register DIR *dirp;
register int fd;
if ((fd = open(name, 0)) == -1)
return NULL;
if ((dirp = (DIR *)malloc(sizeof(DIR))) == NULL) {
close (fd);
return NULL;
}
dirp->dd_fd = fd;
dirp->dd_loc = 0;
return dirp;
}