Fix exec from setuid/setgid binaries
[dragonfly.git] / gnu / lib / libdialog / dir.h
blob7d374cfd60399d67b2eb02f478e8c72a013ff4a0
1 /*
2 * include file for dir.c
4 * Copyright (c) 1995, Marc van Kempen
6 * All rights reserved.
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.
16 * $DragonFly: src/gnu/lib/libdialog/dir.h,v 1.2 2005/08/08 13:38:49 joerg Exp $
19 #include <sys/types.h>
20 #include <sys/stat.h>
21 #include <limits.h>
23 typedef struct DirList { /* structure to hold the directory entries */
24 char filename[NAME_MAX]; /* together with the stat-info per file */
25 struct stat filestatus; /* filename, or the name to which it points */
26 int link; /* is it a link ? */
27 char *linkname; /* the name of the file the link points to */
28 } DirList;
30 #ifndef TRUE
31 #define TRUE (1)
32 #endif
33 #ifndef FALSE
34 #define FALSE (0)
35 #endif
37 void get_dir(char *dirname, char *fmask, DirList **dir, int *n);
38 void get_filenames(DirList *d, int n, char ***names, int *nf);
39 void FreeDir(DirList *d, int n);