--- ./src/dos/drive_physfs.cpp.orig 2015-01-25 08:51:05.573082100 +0100 +++ ./src/dos/drive_physfs.cpp 2017-02-12 23:33:04.972086247 +0100 @@ -57,7 +57,7 @@ bool prepareWrite(); bool Close(); Bit16u GetInformation(void); - bool UpdateDateTimeFromHost(void); + bool UpdateDateTimeFromHost(void); private: PHYSFS_file * fhandle; enum { READ,WRITE } last_action; @@ -94,7 +94,7 @@ /* Test if file exists, don't add to dirCache then */ bool existing_file=PHYSFS_exists(newname); - + char *slash = strrchr(newname,'/'); if (slash && slash != newname) { char file[CROSS_LEN]; @@ -131,7 +131,7 @@ normalize(newname,basedir); PHYSFS_file * hand; - + if (!PHYSFS_exists(newname)) return false; if ((flags&0xf) == OPEN_READ) { hand = PHYSFS_openRead(newname); @@ -141,7 +141,7 @@ hand = PHYSFS_openRead(newname); } - if (!hand) { + if (!hand) { if((flags&0xf) != OPEN_READ) { PHYSFS_file *hmm = PHYSFS_openRead(newname); if (hmm) { @@ -151,7 +151,7 @@ } return false; } - + *file=new physfsFile(name,hand,0x202,newname,false); (*file)->flags=flags; //for the inheritance flag and maybe check for others. return true; @@ -182,7 +182,7 @@ char end[2]={CROSS_FILESPLIT,0}; if (tempDir[strlen(tempDir)-1]!=CROSS_FILESPLIT) strcat(tempDir,end); - + Bit16u id; if (!dirCache.FindFirst(tempDir,id)) { @@ -191,7 +191,7 @@ } strcpy(srchInfo[id].srch_dir,tempDir); dta.SetDirID(id); - + Bit8u sAttr; dta.GetSearchParams(sAttr,tempDir); @@ -203,7 +203,7 @@ } dta.SetResult(dirCache.GetLabel(),0,0,0,DOS_ATTR_VOLUME); return true; - } else if ((sAttr & DOS_ATTR_VOLUME) && (*_dir == 0) && !fcb_findfirst) { + } else if ((sAttr & DOS_ATTR_VOLUME) && (*_dir == 0) && !fcb_findfirst) { //should check for a valid leading directory instead of 0 //exists==true if the volume label matches the searchmask and the path is valid if ( strcmp(dirCache.GetLabel(), "") == 0 ) { @@ -228,7 +228,7 @@ Bit8u find_attr; dta.GetSearchParams(srch_attr,srch_pattern); - + Bitu id = dta.GetDirID(); again: @@ -242,17 +242,17 @@ if(strlen(dir_ent)tm_year+1900),(Bit16u)(time->tm_mon+1),(Bit16u)time->tm_mday); find_time=DOS_PackTime((Bit16u)time->tm_hour,(Bit16u)time->tm_min,(Bit16u)time->tm_sec); } else { - find_time=6; + find_time=6; find_date=4; } dta.SetResult(find_name,find_size,find_date,find_time,find_attr); @@ -332,7 +332,7 @@ CROSS_FILENAME(newold); dirCache.ExpandName(newold); normalize(newold,basedir); - + char newnew[CROSS_LEN]; strcpy(newnew,basedir); strcat(newnew,newname); @@ -415,7 +415,7 @@ char myname[CROSS_LEN]; strcpy(myname,name); normalize(myname,basedir); - if (!PHYSFS_isDirectory(myname)) return false; + if (!PHYSFS_isDirectory(myname)) return NULL; struct opendirinfo *oinfo = (struct opendirinfo *)malloc(sizeof(struct opendirinfo)); oinfo->files = PHYSFS_enumerateFiles(myname); @@ -476,7 +476,7 @@ strcpy(newname,startdir); } - CROSS_FILENAME(newname); + CROSS_FILENAME(newname); if (!physfs_used) { PHYSFS_init(""); PHYSFS_permitSymbolicLinks(1); @@ -510,7 +510,7 @@ PHYSFS_setWriteDir(oldwrite); } if (oldwrite) free((char *)oldwrite); - + strcpy(basedir,lastdir); allocation.bytes_sector=_bytes_sector; @@ -599,7 +599,7 @@ } if (!PHYSFS_seek(fhandle,mypos)) { - // Out of file range, pretend everythings ok + // Out of file range, pretend everythings ok // and move file pointer top end of file... ?! (Black Thorne) PHYSFS_seek(fhandle,PHYSFS_fileLength(fhandle)); }; @@ -682,7 +682,7 @@ Bit16u physfsFile::GetInformation(void) { return info; } - + physfsFile::physfsFile(const char* _name, PHYSFS_file * handle,Bit16u devinfo, const char* physname, bool write) { fhandle=handle;