Diff for /np2/sdl/dosio.c between versions 1.7 and 1.9

version 1.7, 2004/06/21 02:01:32 version 1.9, 2011/07/21 06:40:18
Line 1 Line 1
 #include        "compiler.h"  #include        "compiler.h"
 #include        <sys/stat.h>  #include        <sys/stat.h>
 #include        <time.h>  #include        <time.h>
   #if defined(WIN32) && defined(OSLANG_EUC)
   #include        "codecnv.h"
   #endif
 #include        "dosio.h"  #include        "dosio.h"
 #if defined(WIN32)  #if defined(WIN32)
 #include        <direct.h>  #include        <direct.h>
Line 27  FILEH file_open(const char *path) { Line 30  FILEH file_open(const char *path) {
   
 #if defined(WIN32) && defined(OSLANG_EUC)  #if defined(WIN32) && defined(OSLANG_EUC)
         char    sjis[MAX_PATH];          char    sjis[MAX_PATH];
         codecnv_euc2sjis(sjis, sizeof(sjis), path, (UINT)-1);          codecnv_euctosjis(sjis, sizeof(sjis), path, (UINT)-1);
         return(fopen(sjis, "rb+"));          return(fopen(sjis, "rb+"));
 #else  #else
         return(fopen(path, "rb+"));          return(fopen(path, "rb+"));
Line 38  FILEH file_open_rb(const char *path) { Line 41  FILEH file_open_rb(const char *path) {
   
 #if defined(WIN32) && defined(OSLANG_EUC)  #if defined(WIN32) && defined(OSLANG_EUC)
         char    sjis[MAX_PATH];          char    sjis[MAX_PATH];
         codecnv_euc2sjis(sjis, sizeof(sjis), path, (UINT)-1);          codecnv_euctosjis(sjis, sizeof(sjis), path, (UINT)-1);
         return(fopen(sjis, "rb+"));          return(fopen(sjis, "rb+"));
 #else  #else
         return(fopen(path, "rb+"));          return(fopen(path, "rb+"));
Line 49  FILEH file_create(const char *path) { Line 52  FILEH file_create(const char *path) {
   
 #if defined(WIN32) && defined(OSLANG_EUC)  #if defined(WIN32) && defined(OSLANG_EUC)
         char    sjis[MAX_PATH];          char    sjis[MAX_PATH];
         codecnv_euc2sjis(sjis, sizeof(sjis), path, (UINT)-1);          codecnv_euctosjis(sjis, sizeof(sjis), path, (UINT)-1);
         return(fopen(sjis, "wb+"));          return(fopen(sjis, "wb+"));
 #else  #else
         return(fopen(path, "wb+"));          return(fopen(path, "wb+"));
Line 248  static BOOL setflist(WIN32_FIND_DATA *w3 Line 251  static BOOL setflist(WIN32_FIND_DATA *w3
                 fli->caps |= FLICAPS_DATE | FLICAPS_TIME;                  fli->caps |= FLICAPS_DATE | FLICAPS_TIME;
         }          }
 #if defined(OSLANG_EUC)  #if defined(OSLANG_EUC)
         codecnv_sjis2euc(fli->path, sizeof(fli->path),          codecnv_sjistoeuc(fli->path, sizeof(fli->path),
                                                                                                 w32fd->cFileName, (UINT)-1);                                                                                                  w32fd->cFileName, (UINT)-1);
 #else  #else
         file_cpyname(fli->path, w32fd->cFileName, sizeof(fli->path));          file_cpyname(fli->path, w32fd->cFileName, sizeof(fli->path));
Line 342  struct stat  sb; Line 345  struct stat  sb;
                         fli->size = 0;                          fli->size = 0;
                         fli->attr = 0;                          fli->attr = 0;
                 }                  }
                 mileuc_ncpy(fli->path, de->d_name, sizeof(fli->path));                  milstr_ncpy(fli->path, de->d_name, sizeof(fli->path));
         }          }
         return(SUCCESS);          return(SUCCESS);
 }  }

Removed from v.1.7  
changed lines
  Added in v.1.9


RetroPC.NET-CVS <cvs@retropc.net>