Diff for /np2/x11/dosio.c between versions 1.16 and 1.20

version 1.16, 2011/01/03 11:49:25 version 1.20, 2012/01/23 04:05:05
Line 1 Line 1
 /*      $Id$    */  
   
 #include "compiler.h"  #include "compiler.h"
   
 #include <sys/stat.h>  #include <sys/stat.h>
Line 29  dosio_term(void) Line 27  dosio_term(void)
         /* nothing to do */          /* nothing to do */
 }  }
   
 /* ファイル操作 */  /* ファイル操作 */
 FILEH  FILEH
 file_open(const OEMCHAR *path)  file_open(const OEMCHAR *path)
 {  {
Line 162  file_dircreate(const OEMCHAR *path) Line 160  file_dircreate(const OEMCHAR *path)
 }  }
   
   
 /* カレントファイル操作 */  /* カレントファイル操作 */
 void  void
 file_setcd(const OEMCHAR *exepath)  file_setcd(const OEMCHAR *exepath)
 {  {
Line 352  file_catname(OEMCHAR *path, const OEMCHA Line 350  file_catname(OEMCHAR *path, const OEMCHA
                         } else if (((*path - 0x41) & 0xff) < 26) {                          } else if (((*path - 0x41) & 0xff) < 26) {
                                 *path |= 0x20;                                  *path |= 0x20;
                         } else if (*path == '\\') {                          } else if (*path == '\\') {
                                 *path = '/';                                  *path = G_DIR_SEPARATOR;
                         }                          }
                 }                  }
         }          }
Line 376  file_getname(const OEMCHAR *path) Line 374  file_getname(const OEMCHAR *path)
                         if (*path == '\0') {                          if (*path == '\0') {
                                 break;                                  break;
                         }                          }
                 } else if (*path == '/') {                  } else if (*path == G_DIR_SEPARATOR) {
                         ret = path + 1;                          ret = path + 1;
                 }                  }
         }          }
Line 405  file_getext(const OEMCHAR *path) Line 403  file_getext(const OEMCHAR *path)
         if (q == NULL) {          if (q == NULL) {
                 q = p;                  q = p;
         }          }
         return (char *)q;          return (OEMCHAR *)q;
 }  }
   
 void  void
Line 429  file_cutseparator(OEMCHAR *path) Line 427  file_cutseparator(OEMCHAR *path)
         int pos;          int pos;
   
         pos = strlen(path) - 1;          pos = strlen(path) - 1;
         if ((pos > 0) && (path[pos] == '/')) {          if ((pos > 0) && (path[pos] == G_DIR_SEPARATOR)) {
                 path[pos] = '\0';                  path[pos] = '\0';
         }          }
 }  }
Line 440  file_setseparator(OEMCHAR *path, int max Line 438  file_setseparator(OEMCHAR *path, int max
         int pos;          int pos;
   
         pos = strlen(path);          pos = strlen(path);
         if ((pos) && (path[pos-1] != '/') && ((pos + 2) < maxlen)) {          if ((pos) && (path[pos-1] != G_DIR_SEPARATOR) && ((pos + 2) < maxlen)) {
                 path[pos++] = '/';                  path[pos++] = G_DIR_SEPARATOR;
                 path[pos] = '\0';                  path[pos] = '\0';
         }          }
 }  }

Removed from v.1.16  
changed lines
  Added in v.1.20


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