ftp.nice.ch/pub/next/unix/network/news/nn.6.4.16.s.tar.gz#/nn/dir.h

This is dir.h in view mode; [Download] [Up]

/*
 *	(c) Copyright 1990, Kim Fabricius Storm.  All rights reserved.
 *
 *	Directory access routines (faked ones).
 *
 *	If HAVE_DIRECTORY is not defined, traditional sysV directory
 *	structure is assumed unless NOT_SYS5_DIRECTORY is defined (in
 *	which case a shell command is used to list a directory).
 */

#ifndef HAVE_DIRECTORY

#ifndef NOT_SYS5_DIRECTORY
static struct dir_entry {
    short int	d_ino;
    char	d_name[15];
} dirbuf;

#define Direntry struct dir_entry
#define	DIR FILE
#define opendir(name)	fopen(name, "r")
#define readdir(dirp)	(fread(&dirbuf, 16, 1, dirp) == 1 ? &dirbuf : NULL)
#undef rewinddir
#define rewinddir(dirp)	rewind(dirp)
#define closedir(dirp)	fclose(dirp)

#define HAVE_DIRECTORY
#define FAKED_DIRECTORY

#endif
#endif

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.