/*============================================================================= * drt/sys/kfind.h * DRT primitive file searching functions. * * History * 1.00, 1999-04-20, David R Tribble. * First cut. *----------------------------------------------------------------------------*/ #ifndef drt_sys_kfind_h #define drt_sys_kfind_h 100 #ifdef __cplusplus extern "C" { #endif /* Identification */ #ifndef NO_H_IDENT static const char drt_sys_kfind_h_id[] = "@(#)drt/sys/kfind.h 1.00"; #endif /*----------------------------------------------------------------------------- * Manifest constants *----------------------------------------------------------------------------*/ enum /*anonymous*/ { DRT_FIND_F_DFL = 0x0000, /* Default searching */ DRT_FIND_F_FILE = 0x0001, /* Regular files */ DRT_FIND_F_DIR = 0x0002, /* Directories */ DRT_FIND_F_ }; /*----------------------------------------------------------------------------- * Public types *----------------------------------------------------------------------------*/ struct DrtFindExt; #define DrtFind_VS 100 /* Struct version */ struct DrtFind { unsigned int m_magic; /* Magic number */ int m_vers; /* Struct version */ const char * m_pat; /* Filename pattern */ unsigned int m_flags; /* Searching bitflags */ const char * m_name; /* Found filename */ struct DrtFindExt * m_info; /* More control info */ }; /*----------------------------------------------------------------------------- * Public functions *----------------------------------------------------------------------------*/ extern struct DrtFind * drt_find_first(const char *pat, unsigned int m); extern int drt_find_next(struct DrtFind *ctl); extern void drt_find_stop(struct DrtFind *ctl); #ifdef __cplusplus } #endif #endif /* drt_sys_kfind_h */ /* End kfind.h */