Merge from vendor branch TCPDUMP:
[dragonfly.git] / gnu / lib / libdialog / dir.h
1 /*
2  * include file for dir.c
3  *
4  * Copyright (c) 1995, Marc van Kempen
5  *
6  * All rights reserved.
7  *
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
14  * its use.
15  *
16  */
17
18 #include <sys/types.h>
19 #include <sys/stat.h>
20 #include <sys/dirent.h>
21
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 */
27 } DirList;
28
29 #ifndef TRUE
30 #define TRUE (1)
31 #endif
32 #ifndef FALSE
33 #define FALSE (0)
34 #endif
35
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);