/* * glob.h: important things for programs that use * the glob() function. */ #ifndef GLOBFILE_D #define GLOBFILE_D /* dta element returned by globfile */ struct glob_t { char attrib; unsigned wr_time; unsigned wr_date; long size; char name[80]; /* only keep the first 80 characters in a filename */ } ; /* argument vector returned by expand_arglist */ struct args_t { int argc; char **argv; int flags; #define ARGS_EXPANDED 0x01 } ; /* for people who don't want to mess with passing an argument buffer, * expand_arglist supplies one. */ extern struct args_t myargs; #define myargc myargs.argc #define myargv myargs.argv /* attribute flags in glob_t.attrib */ #define F_RDONLY 0x01 /* file is read only */ #define F_HIDDEN 0x02 /* file is hidden */ #define F_SYSTEM 0x04 /* file is systemized */ #define F_DIRECT 0x10 /* file is a directory */ #define F_ARCHIVE 0x20 /* file has archive bit */ #define F_AMASK 0x27 /* mask of all file attributes */ #ifdef __STDC__ extern void expand_arglist(int, char*, struct args_t*); extern char *glob(char *, struct glob_t *); extern char *basename(char*); #else extern void expand_arglist(); extern char *glob(); extern char *basename(); #endif #endif /*GLOBFILE_D*/