| version 1.1.1.1, 2003/10/16 17:59:40 | version 1.9, 2005/03/09 16:13:24 | 
| Line 1 | Line 1 | 
 |  | #ifndef NP2_X11_DOSIO_H__ | 
 |  | #define NP2_X11_DOSIO_H__ | 
 |  |  | 
| enum {                                                                                          // ver0.28 | #include <dirent.h> | 
| FTYPE_NONE = 0,         // ¼«Æ°È½ÊÌ or PC |  | 
| FTYPE_SMIL,                     // ¥·¥¹¥Æ¥àͽÌó |  | 
| FTYPE_TEXT,                     // ¥Æ¥¥¹¥È¥Õ¥¡¥¤¥ë |  | 
| FTYPE_BMP,                      // Bitmap |  | 
| FTYPE_PICT,                     // Picture (ͽÌó) |  | 
| FTYPE_PNG,                      // Png (ͽÌó) |  | 
| FTYPE_WAV,                      // Wave |  | 
| FTYPE_D88,                      // D88 |  | 
| FTYPE_BETA,                     // ¥Ù¥¿¥¤¥á¡¼¥¸ |  | 
| FTYPE_THD,                      // .thd ¥Ï¡¼¥É¥Ç¥£¥¹¥¯¥¤¥á¡¼¥¸ |  | 
| FTYPE_HDI,                      // .hdi ¥Ï¡¼¥É¥Ç¥£¥¹¥¯¥¤¥á¡¼¥¸ |  | 
| FTYPE_HDD,                      // .hdd ¥Ï¡¼¥É¥Ç¥£¥¹¥¯¥¤¥á¡¼¥¸ (ͽÌó) |  | 
| FTYPE_S98,                      // .s98 ¥Ï¡¼¥É¥Ç¥£¥¹¥¯¥¤¥á¡¼¥¸ |  | 
| FTYPE_MIMPI                     // mimpi default¥Õ¥¡¥¤¥ë |  | 
| }; |  | 
 |  |  | 
 | typedef FILE *                  FILEH; | typedef FILE *                  FILEH; | 
| #define FILEH_INVALID   NULL | #define FILEH_INVALID           NULL | 
 |  |  | 
| #define FSEEK_SET       SEEK_SET | #define FSEEK_SET               SEEK_SET | 
| #define FSEEK_CUR       SEEK_CUR | #define FSEEK_CUR               SEEK_CUR | 
| #define FSEEK_END       SEEK_END | #define FSEEK_END               SEEK_END | 
 |  |  | 
 | enum { | enum { | 
 | FILEATTR_READONLY       = 0x01, | FILEATTR_READONLY       = 0x01, | 
| Line 32  enum { | Line 19  enum { | 
 | FILEATTR_ARCHIVE        = 0x20 | FILEATTR_ARCHIVE        = 0x20 | 
 | }; | }; | 
 |  |  | 
 |  | enum { | 
 |  | FLICAPS_SIZE            = (1 << 0), | 
 |  | FLICAPS_ATTR            = (1 << 1), | 
 |  | FLICAPS_DATE            = (1 << 2), | 
 |  | FLICAPS_TIME            = (1 << 3) | 
 |  | }; | 
 |  |  | 
 | typedef struct { | typedef struct { | 
 | UINT16  year;           /* cx */ | UINT16  year;           /* cx */ | 
 | BYTE    month;          /* dh */ | BYTE    month;          /* dh */ | 
| Line 44  typedef struct { | Line 38  typedef struct { | 
 | BYTE    second;         /* dh */ | BYTE    second;         /* dh */ | 
 | } DOSTIME; | } DOSTIME; | 
 |  |  | 
 |  | typedef struct { | 
 |  | char    path[MAX_PATH]; | 
 |  | DIR     *hdl; | 
 |  | } _FLISTH, *FLISTH; | 
 |  | #define FLISTH_INVALID          NULL | 
 |  |  | 
 |  | typedef struct { | 
 |  | UINT    caps; | 
 |  | UINT32  size; | 
 |  | UINT32  attr; | 
 |  | DOSDATE date; | 
 |  | DOSTIME time; | 
 |  | char    path[MAX_PATH]; | 
 |  | } FLINFO; | 
 |  |  | 
 |  |  | 
 | #ifdef  __cplusplus | #ifdef  __cplusplus | 
 | extern "C" { | extern "C" { | 
 | #endif | #endif | 
 |  |  | 
| /* DOSIO:´Ø¿ô¤Î½àÈ÷ */ | /* DOSIO:¥¨¥ê¥½ô¤Î½àÈ*/ | 
 | void dosio_init(void); | void dosio_init(void); | 
 | void dosio_term(void); | void dosio_term(void); | 
 |  |  | 
| /* ¥Õ¥¡¥¤¥ëÁàºî */ | /* ¡¦¥æ¡¦¡£¡¦¡¢¡¦öÃà¼*/ | 
| FILEH file_open(const char *path); | FILEH file_open(const OEMCHAR *path); | 
| FILEH file_open_rb(const char *path); | FILEH file_open_rb(const OEMCHAR *path); | 
| FILEH file_create(const char *path); | FILEH file_create(const OEMCHAR *path); | 
 | long file_seek(FILEH handle, long pointer, int method); | long file_seek(FILEH handle, long pointer, int method); | 
 | UINT file_read(FILEH handle, void *data, UINT length); | UINT file_read(FILEH handle, void *data, UINT length); | 
 | UINT file_write(FILEH handle, const void *data, UINT length); | UINT file_write(FILEH handle, const void *data, UINT length); | 
 | short file_close(FILEH handle); | short file_close(FILEH handle); | 
 | UINT file_getsize(FILEH handle); | UINT file_getsize(FILEH handle); | 
 | short file_getdatetime(FILEH handle, DOSDATE *dosdate, DOSTIME *dostime); | short file_getdatetime(FILEH handle, DOSDATE *dosdate, DOSTIME *dostime); | 
| short file_delete(const char *path); | short file_delete(const OEMCHAR *path); | 
| short file_attr(const char *path); | short file_attr(const OEMCHAR *path); | 
| short file_dircreate(const char *path); | short file_dircreate(const OEMCHAR *path); | 
|  |  | 
| /* ¥«¥ì¥ó¥È¥Õ¥¡¥¤¥ëÁàºî */ | /* ¡¦¥©¡¦ø§ó¥È¥Õ¥¡¥¤¥ëÁàº*/ | 
| void file_setcd(const char *exepath); | void file_setcd(const OEMCHAR *exepath); | 
| char *file_getcd(const char *sjis); | char *file_getcd(const OEMCHAR *sjis); | 
| FILEH file_open_c(const char *sjis); | FILEH file_open_c(const OEMCHAR *sjis); | 
| FILEH file_open_rb_c(const char *sjis); | FILEH file_open_rb_c(const OEMCHAR *sjis); | 
| FILEH file_create_c(const char *sjis); | FILEH file_create_c(const OEMCHAR *sjis); | 
| short file_delete_c(const char *sjis); | short file_delete_c(const OEMCHAR *sjis); | 
| short file_attr_c(const char *sjis); | short file_attr_c(const OEMCHAR *sjis); | 
|  |  | 
|  | FLISTH file_list1st(const OEMCHAR *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_cpyname(char *dst, const char *src, int maxlen); | 
 | void file_catname(char *path, const char *sjis, int maxlen); | void file_catname(char *path, const char *sjis, int maxlen); | 
| BOOL file_cmpname(char *path, const char *sjis); | BOOL file_cmpname(const char *path, const char *sjis); | 
| char *file_getname(char *path); | OEMCHAR *file_getname(const OEMCHAR *path); | 
| void file_cutname(char *path); | void file_cutname(OEMCHAR *path); | 
| char *file_getext(char *path); | OEMCHAR *file_getext(const OEMCHAR *path); | 
| void file_cutext(char *path); | void file_cutext(OEMCHAR *path); | 
| void file_cutseparator(char *path); | void file_cutseparator(OEMCHAR *path); | 
| void file_setseparator(char *path, int maxlen); | void file_setseparator(OEMCHAR *path, int maxlen); | 
 |  |  | 
 | #ifdef  __cplusplus | #ifdef  __cplusplus | 
 | }; | }; | 
 | #endif | #endif | 
 |  |  | 
 |  | #endif  /* NP2_X11_DOSIO_H__ */ |