--- np2/x11/dosio.h 2003/11/17 13:17:16 1.3 +++ np2/x11/dosio.h 2004/01/13 16:30:21 1.5 @@ -18,12 +18,15 @@ enum { FTYPE_MIMPI // mimpi default¥Õ¥¡¥¤¥ë }; -typedef FILE* FILEH; -#define FILEH_INVALID NULL +typedef FILE * FILEH; +#define FILEH_INVALID NULL -#define FSEEK_SET SEEK_SET -#define FSEEK_CUR SEEK_CUR -#define FSEEK_END SEEK_END +typedef void * FLISTH; +#define FLISTH_INVALID NULL + +#define FSEEK_SET SEEK_SET +#define FSEEK_CUR SEEK_CUR +#define FSEEK_END SEEK_END enum { FILEATTR_READONLY = 0x01, @@ -34,6 +37,13 @@ enum { FILEATTR_ARCHIVE = 0x20 }; +enum { + FLICAPS_SIZE = (1 << 0), + FLICAPS_ATTR = (1 << 1), + FLICAPS_DATE = (1 << 2), + FLICAPS_TIME = (1 << 3) +}; + typedef struct { UINT16 year; /* cx */ BYTE month; /* dh */ @@ -46,6 +56,15 @@ typedef struct { BYTE second; /* dh */ } DOSTIME; +typedef struct { + UINT caps; + UINT32 size; + UINT32 attr; + DOSDATE date; + DOSTIME time; + char path[MAX_PATH]; +} FLINFO; + #ifdef __cplusplus extern "C" { @@ -78,6 +97,10 @@ FILEH file_create_c(const char *sjis); short file_delete_c(const char *sjis); short file_attr_c(const char *sjis); +FLISTH file_list1st(const char *dir, FLINFO *fli); +BOOL file_listnext(FLISTH hdl, FLINFO *fli); +void file_listclose(FLISTH hdl); + void file_cpyname(char *dst, const char *src, int maxlen); void file_catname(char *path, const char *sjis, int maxlen); BOOL file_cmpname(const char *path, const char *sjis);