Diff for /np2/macos9/macossub.cpp between versions 1.1 and 1.3

version 1.1, 2003/10/23 07:20:43 version 1.3, 2004/01/09 04:36:02
Line 20  UINT32 macos_gettick(void) { Line 20  UINT32 macos_gettick(void) {
         UnsignedWide current;          UnsignedWide current;
   
         Microseconds(&current);          Microseconds(&current);
         return((UINT32)(current.lo / 1000));          return((UINT32)((current.hi * 4294967) + (current.lo / 1000)));
 }  }
   
   
Line 73  static void char2str(char *dst, int size Line 73  static void char2str(char *dst, int size
         CFRelease(cfsr);          CFRelease(cfsr);
 }  }
   
 void *file_list1st(const char *dir, FLDATA *fl) {  void *file_list1st(const char *dir, FLINFO *fli) {
   
         void            *ret;          void            *ret;
         Str255          fname;          Str255          fname;
Line 93  void *file_list1st(const char *dir, FLDA Line 93  void *file_list1st(const char *dir, FLDA
         }          }
         ((FLHDL)ret)->eoff = FALSE;          ((FLHDL)ret)->eoff = FALSE;
         ((FLHDL)ret)->fsi = fsi;          ((FLHDL)ret)->fsi = fsi;
         if (file_listnext(ret, fl) == SUCCESS) {          if (file_listnext(ret, fli) == SUCCESS) {
                 return(ret);                  return(ret);
         }          }
   
Line 104  ff1_err1: Line 104  ff1_err1:
         return(NULL);          return(NULL);
 }  }
   
 BOOL file_listnext(void *hdl, FLDATA *fl) {  BOOL file_listnext(void *hdl, FLINFO *fli) {
   
         FLHDL           flhdl;          FLHDL           flhdl;
         ItemCount       count;          ItemCount       count;
Line 127  BOOL file_listnext(void *hdl, FLDATA *fl Line 127  BOOL file_listnext(void *hdl, FLDATA *fl
                 flhdl->eoff = TRUE;                  flhdl->eoff = TRUE;
                 goto ffn_err;                  goto ffn_err;
         }          }
         if (fl) {          if (fli) {
                 char2str(fl->path, sizeof(fl->path),                  char2str(fli->path, sizeof(fli->path),
                                                                 flhdl->name.unicode, flhdl->name.length);                                                                  flhdl->name.unicode, flhdl->name.length);
                 fl->size = (UINT32)flhdl->fsci.dataLogicalSize;                  fli->size = (UINT32)flhdl->fsci.dataLogicalSize;
                 if (flhdl->fsci.nodeFlags & kFSNodeIsDirectoryMask) {                  if (flhdl->fsci.nodeFlags & kFSNodeIsDirectoryMask) {
                         fl->attr = FILEATTR_DIRECTORY;                          fli->attr = FILEATTR_DIRECTORY;
                 }                  }
                 else {                  else {
                         fl->attr = FILEATTR_ARCHIVE;                          fli->attr = FILEATTR_ARCHIVE;
                 }                  }
         }          }
         return(SUCCESS);          return(SUCCESS);
Line 161  typedef struct { Line 161  typedef struct {
         long            tagid;          long            tagid;
 } _FLHDL, *FLHDL;  } _FLHDL, *FLHDL;
   
 void *file_list1st(const char *dir, FLDATA *fl) {  void *file_list1st(const char *dir, FLINFO *fli) {
   
         Str255  fname;          Str255  fname;
         FSSpec  fss;          FSSpec  fss;
Line 193  void *file_list1st(const char *dir, FLDA Line 193  void *file_list1st(const char *dir, FLDA
         }          }
         ret->eoff = FALSE;          ret->eoff = FALSE;
         ret->index = 1;          ret->index = 1;
         if (file_listnext((void *)ret, fl) == SUCCESS) {          if (file_listnext((void *)ret, fli) == SUCCESS) {
                 return((void *)ret);                  return((void *)ret);
         }          }
   
Line 204  ff1_err1: Line 204  ff1_err1:
         return(NULL);          return(NULL);
 }  }
   
 BOOL file_listnext(void *hdl, FLDATA *fl) {  BOOL file_listnext(void *hdl, FLINFO *fli) {
   
         FLHDL   flhdl;          FLHDL   flhdl;
         Str255  fname;          Str255  fname;
Line 223  BOOL file_listnext(void *hdl, FLDATA *fl Line 223  BOOL file_listnext(void *hdl, FLDATA *fl
                 goto ffn_err;                  goto ffn_err;
         }          }
         flhdl->index++;          flhdl->index++;
         if (fl) {          if (fli) {
                 mkcstr(fl->path, sizeof(fl->path), fname);                  mkcstr(fli->path, sizeof(fli->path), fname);
                 fl->size = 0;                  fli->size = 0;
                 if (flhdl->pb.hFileInfo.ioFlAttrib & 0x10) {                  if (flhdl->pb.hFileInfo.ioFlAttrib & 0x10) {
                         fl->attr = FILEATTR_DIRECTORY;                          fli->attr = FILEATTR_DIRECTORY;
                 }                  }
                 else {                  else {
                         fl->attr = FILEATTR_ARCHIVE;                          fli->attr = FILEATTR_ARCHIVE;
                 }                  }
         }          }
         return(SUCCESS);          return(SUCCESS);

Removed from v.1.1  
changed lines
  Added in v.1.3


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