2 * include file for dir.c
4 * Copyright (c) 1995, Marc van Kempen
8 * This software may be used, modified, copied, distributed, and
9 * sold, in both source and binary form provided that the above
10 * copyright and these terms are retained, verbatim, as the first
11 * lines of this file. Under no circumstances is the author
12 * responsible for the proper functioning of this software, nor does
13 * the author assume any responsibility for damages incurred with
18 #include <sys/types.h>
20 #include <sys/dirent.h>
22 typedef struct DirList { /* structure to hold the directory entries */
23 char filename[MAXNAMLEN]; /* together with the stat-info per file */
24 struct stat filestatus; /* filename, or the name to which it points */
25 int link; /* is it a link ? */
26 char *linkname; /* the name of the file the link points to */
36 void get_dir(char *dirname, char *fmask, DirList **dir, int *n);
37 void get_filenames(DirList *d, int n, char ***names, int *nf);
38 void FreeDir(DirList *d, int n);