Diff for /np2/generic/hostdrv.c between versions 1.3 and 1.4

version 1.3, 2004/01/09 07:27:15 version 1.4, 2004/01/10 17:24:01
Line 22 Line 22
 #define ROOTPATH_SIZE           (sizeof(ROOTPATH_NAME) - 1)  #define ROOTPATH_SIZE           (sizeof(ROOTPATH_NAME) - 1)
   
 static const char ROOTPATH[ROOTPATH_SIZE] = ROOTPATH_NAME;  static const char ROOTPATH[ROOTPATH_SIZE] = ROOTPATH_NAME;
 static const HDRVDIR hdd_volume = {"_HOSTDRIVE_", 0, 0x08};  static const HDRVDIR hdd_volume = {"_HOSTDRIVE_", 0, 0, 0x08, {0}, {0}};
 static const HDRVDIR hdd_owner  = {".          ", 0, 0x10};  static const HDRVDIR hdd_owner  = {".          ", 0, 0, 0x10, {0}, {0}};
 static const HDRVDIR hdd_parent = {"..         ", 0, 0x10};  static const HDRVDIR hdd_parent = {"..         ", 0, 0, 0x10, {0}, {0}};
   
   
 //      see int2159-BX0000  //      see int2159-BX0000
Line 171  static void store_dir(INTRST is, const H Line 171  static void store_dir(INTRST is, const H
   
         DIRREC  dirrec;          DIRREC  dirrec;
         UINT8   attr;          UINT8   attr;
           UINT16  reg;
   
         // SDA内のDIRRECにセット          // SDA内のDIRRECにセット
         dirrec = is->dirrec_ptr;          dirrec = is->dirrec_ptr;
Line 180  static void store_dir(INTRST is, const H Line 181  static void store_dir(INTRST is, const H
                 attr |= 0x01;                  attr |= 0x01;
         }          }
         dirrec->file_attr = attr;          dirrec->file_attr = attr;
         STOREINTELDWORD(dirrec->file_time, 0);          // di->datetime          reg = 0;
         STOREINTELDWORD(dirrec->start_sector, ((UINT32)-1));          if (di->caps & FLICAPS_TIME) {
                   reg |= (di->time.hour & 0x1f) << 11;
                   reg |= (di->time.minute & 0x3f) << 5;
                   reg |= (di->time.second & 0x3e) >> 1;
           }
           STOREINTELWORD(dirrec->file_time, reg);
           reg = 0;
           if (di->caps & FLICAPS_DATE) {
                   reg |= ((di->date.year - 1980) & 0x7f) << 9;
                   reg |= (di->date.month & 0x0f) << 5;
                   reg |= di->date.day & 0x1f;
           }
           STOREINTELWORD(dirrec->file_date, reg);
           STOREINTELWORD(dirrec->start_sector, ((UINT16)-1));
         STOREINTELDWORD(dirrec->file_size, di->size);          STOREINTELDWORD(dirrec->file_size, di->size);
 }  }
   
 static void fill_sft(INTRST is, SFTREC sft, UINT num, HDRVDIR *di) {  static void fill_sft(INTRST is, SFTREC sft, UINT num, HDRVDIR *di) {
   
         UINT8   attr;          UINT8   attr;
           UINT16  reg;
   
         attr = di->attr;          attr = di->attr;
         if (!IS_PERMITWRITE) {          if (!IS_PERMITWRITE) {
Line 195  static void fill_sft(INTRST is, SFTREC s Line 210  static void fill_sft(INTRST is, SFTREC s
         }          }
         sft->file_attr = attr;          sft->file_attr = attr;
         STOREINTELWORD(sft->start_sector, (UINT16)num);          STOREINTELWORD(sft->start_sector, (UINT16)num);
         STOREINTELDWORD(sft->file_time, 0);                                     // di->datetime  
           reg = 0;
           if (di->caps & FLICAPS_TIME) {
                   reg |= (di->time.hour & 0x1f) << 11;
                   reg |= (di->time.minute & 0x3f) << 5;
                   reg |= (di->time.second & 0x3e) >> 1;
           }
           STOREINTELWORD(sft->file_time, reg);
           reg = 0;
           if (di->caps & FLICAPS_DATE) {
                   reg |= ((di->date.year - 1980) & 0x7f) << 9;
                   reg |= (di->date.month & 0x0f) << 5;
                   reg |= di->date.day & 0x1f;
           }
           STOREINTELWORD(sft->file_date, reg);
         STOREINTELDWORD(sft->file_size, di->size);          STOREINTELDWORD(sft->file_size, di->size);
         STOREINTELWORD(sft->dir_sector, (UINT16)-1);          STOREINTELWORD(sft->dir_sector, (UINT16)-1);
         sft->dir_entry_no = (UINT8)-1;          sft->dir_entry_no = (UINT8)-1;
Line 679  static void get_fileattr(INTRST intrst)  Line 708  static void get_fileattr(INTRST intrst) 
                 return;                  return;
         }          }
   
           TRACEOUT(("get_fileattr: ->%s", intrst->fcbname_ptr));
         if ((is_wildcards(intrst->fcbname_ptr)) ||          if ((is_wildcards(intrst->fcbname_ptr)) ||
                 (hostdrvs_getrealpath(&hdp, intrst->filename_ptr) != SUCCESS)) {                  (hostdrvs_getrealpath(&hdp, intrst->filename_ptr) != SUCCESS)) {
                 fail(intrst, ERR_FILENOTFOUND);                  fail(intrst, ERR_FILENOTFOUND);
                 return;                  return;
         }          }
           TRACEOUT(("get_fileattr: %s - %x", hdp.path, hdp.di.attr));
         ax = hdp.di.attr & 0x37;          ax = hdp.di.attr & 0x37;
         if (!IS_PERMITWRITE) {          if (!IS_PERMITWRITE) {
                 ax |= 0x01;                  ax |= 0x01;
Line 747  static void open_file(INTRST intrst) { Line 778  static void open_file(INTRST intrst) {
         }          }
         fetch_sft(intrst, &sft);          fetch_sft(intrst, &sft);
   
           TRACEOUT(("open_file: %s %d", hdp.path, sft.open_mode[0] & 7));
         if ((is_wildcards(intrst->fcbname_ptr)) ||          if ((is_wildcards(intrst->fcbname_ptr)) ||
                 (hostdrvs_getrealpath(&hdp, intrst->filename_ptr) != SUCCESS) ||                  (hostdrvs_getrealpath(&hdp, intrst->filename_ptr) != SUCCESS) ||
                 (hdp.di.attr & 0x10)) {                  (hdp.di.attr & 0x10)) {

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


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