Category : C Source Code
Archive   : OHLMAKE.ZIP
Filename : MSD_DIR.H

Output of file : MSD_DIR.H contained in archive : OHLMAKE.ZIP
/* msd_dir.c - portable directory routines
Copyright (C) 1990 by Thorsten Ohl, [email protected]

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


This code is not an official part of the GNU project and the
author is not affiliated to the Free Software Foundation.
He just likes their code and spirit.

$Header: e:/gnu/make/RCS/msd_dir.h'v 2.0 90/06/29 00:35:36 tho Stable $

/* Everything non trivial in this code is taken from: @(#)msd_dir.c 1.4
87/11/06. A public domain implementation of BSD directory routines
for MS-DOS. Written by Michael Rendell ({uunet,utai}michael@garfield),
August 1897 */

#define rewinddir(dirp) seekdir(dirp, 0L)

#define MAXNAMLEN 12

struct direct
ino_t d_ino; /* a bit of a farce */
int d_reclen; /* more farce */
int d_namlen; /* length of d_name */
char d_name[MAXNAMLEN + 1]; /* garentee null termination */

struct _dircontents
char *_d_entry;
struct _dircontents *_d_next;

typedef struct _dirdesc
int dd_id; /* uniquely identify each open directory */
long dd_loc; /* where we are in directory entry is this */
struct _dircontents *dd_contents; /* pointer to contents of dir */
struct _dircontents *dd_cp; /* pointer to current position */
} DIR;

extern void seekdir (DIR *, long);
extern long telldir (DIR *);
extern DIR *opendir (char *);
extern void closedir (DIR *);
extern struct direct *readdir (DIR *);

  3 Responses to “Category : C Source Code
Archive   : OHLMAKE.ZIP
Filename : MSD_DIR.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: