Diff for /np2/macosx/fdefine.cpp between versions 1.5 and 1.9

version 1.5, 2003/11/21 16:01:41 version 1.9, 2004/01/31 19:45:25
Line 8 Line 8
 void Setfiletype(int ftype, OSType *creator, OSType *fileType) {  void Setfiletype(int ftype, OSType *creator, OSType *fileType) {
   
         *creator = 'SMil';          *creator = 'SMil';
         *fileType = '????';  //      *fileType = '????';
   
         switch(ftype) {          switch(ftype) {
 //              case FTYPE_SMIL:                        // システム予約  //              case FTYPE_SMIL:                        // システム予約
Line 82  static int Getfiletype(FInfo *fndrinfo)  Line 82  static int Getfiletype(FInfo *fndrinfo) 
                 case '.HDI':                  case '.HDI':
                         return(FTYPE_HDI);                          return(FTYPE_HDI);
                         
                   case '.NHD':
                           return(FTYPE_NHD);
              
                   case '.HDD':
                           return(FTYPE_HDD);
              
                   case '.FDI':
                           return(FTYPE_FDI);
              
                 case 'BMP ':                  case 'BMP ':
                         return(FTYPE_BMP);                          return(FTYPE_BMP);
         }          }
Line 108  static int GetFileExt(char* filename) {  Line 117  static int GetFileExt(char* filename) { 
     else if ((!milstr_cmp(p, str_thd))) {      else if ((!milstr_cmp(p, str_thd))) {
                         ftype = FTYPE_THD;                          ftype = FTYPE_THD;
                 }                  }
       else if ((!milstr_cmp(p, str_nhd))) {
                           ftype = FTYPE_NHD;
                   }
     else if ((!milstr_cmp(p, str_hdi))) {      else if ((!milstr_cmp(p, str_hdi))) {
                         ftype = FTYPE_HDI;                          ftype = FTYPE_HDI;
                 }                  }
       else if ((!milstr_cmp(p, str_hdd))) {
                           ftype = FTYPE_HDD;
                   }
       else if ((!milstr_cmp(p, str_fdi))) {
                           ftype = FTYPE_FDI;
                   }
     else if ((!milstr_cmp(p, "xdf")) || (!milstr_cmp(p, "dup")) || (!milstr_cmp(p, "hdm"))) {      else if ((!milstr_cmp(p, "xdf")) || (!milstr_cmp(p, "dup")) || (!milstr_cmp(p, "hdm"))) {
         ftype = FTYPE_BETA;          ftype = FTYPE_BETA;
     }      }
Line 140  int file_getftype(char* filename) {  Line 158  int file_getftype(char* filename) { 
         FInfo   fndrInfo;          FInfo   fndrInfo;
     int         ftype;      int         ftype;
   
     mkstr255(fname, filename);      ftype = GetFileExt(filename);
     FSMakeFSSpec(0, 0, fname, &fss);  
     if (FSpGetFInfo(&fss, &fndrInfo) != noErr) {  
         return(FTYPE_NONE);  
     }  
     ftype = Getfiletype(&fndrInfo);  
         if (ftype == FTYPE_NONE) {          if (ftype == FTYPE_NONE) {
         ftype = GetFileExt(filename);          mkstr255(fname, filename);
           FSMakeFSSpec(0, 0, fname, &fss);
           if (FSpGetFInfo(&fss, &fndrInfo) != noErr) {
               return(FTYPE_NONE);
           }
           ftype = Getfiletype(&fndrInfo);
     }      }
         return(ftype);          return(ftype);
 }  }

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


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