home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
comp
/
pakutl12.lzh
/
DIRFN.H
< prev
next >
Wrap
Text File
|
1988-08-20
|
2KB
|
60 lines
/*
DIRFN.H: Definitions for DIRFN.C routines
Copyright 1987,1988 Michael J. Housky
Released to the public domain: Aug. 20, 1988 by Michael J. Housky
*/
/* ------------ CONSTANTS, MACROS: */
/* DOS Directory Attribute Bit Definitions: */
#define DATR_RDONLY 0x01 /* File is read-only */
#define DATR_HIDDEN 0x02 /* File is hidden */
#define DATR_SYSTEM 0x04 /* File is a system file */
#define DATR_VLABEL 0x08 /* Volume label entry, not a file */
#define DATR_SUBDIR 0x10 /* File is a subdirectory */
#define DATR_ARCHIV 0x20 /* File selected for archive. */
/* ------------ TYPE DEFINITIONS: */
typedef struct /* structure of DOS FIND DTA, used by */
{ /* used by dir_sscan/dir_cscan functions */
char resv[21]; /* reserved for DOS */
unsigned char
attr; /* attribute byte */
unsigned time; /* time word */
unsigned date; /* date word */
long size; /* file size in bytes */
char name[13]; /* file name */
} FIND_DTA;
typedef struct { /* filename entry of array returned by */
/* get_files() function */
char filename[13];
} FILE_TYPE;
/* ------------ GETFILE.C Functions: */
int get_files(
char *,int,FILE_TYPE **);
/* ------------ DIRFN.C Functions: */
char far *cur_dta( /* Return far pointer to current DTA */
void);
void set_dta( /* Set DOS Disk Transfer Address */
char far *); /* pdta: far pointer to new DTA */
FIND_DTA *dir_sscan( /* Start a directory scan */
FIND_DTA*, /* pdta: pointer to caller's DTA struct, or */
/* NULL to malloc and return pointer. */
char*, /* fn: drive:path\filename to match */
int); /* attr: attribute bits to match */
FIND_DTA *dir_cscan( /* Continue a directory scan. */
FIND_DTA*); /* pdta: pointer to caller's DTA struct, */
/* previously established by a dir_sscan. */