made date and time of virtual files more consistent.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@807
This commit is contained in:
parent
065ef2207e
commit
cf27af6f8b
1 changed files with 10 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2002 The DOSBox Team
|
||||
* Copyright (C) 2002-2003 The DOSBox Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -30,6 +30,8 @@ struct VFILE_Block {
|
|||
const char * name;
|
||||
Bit8u * data;
|
||||
Bit32u size;
|
||||
Bit16u date;
|
||||
Bit16u time;
|
||||
VFILE_Block * next;
|
||||
};
|
||||
|
||||
|
@ -41,6 +43,8 @@ void VFILE_Register(const char * name,Bit8u * data,Bit32u size) {
|
|||
new_file->name=name;
|
||||
new_file->data=data;
|
||||
new_file->size=size;
|
||||
new_file->date=DOS_PackDate(2002,10,1);
|
||||
new_file->time=DOS_PackTime(12,34,56);
|
||||
new_file->next=first_file;
|
||||
first_file=new_file;
|
||||
}
|
||||
|
@ -65,6 +69,8 @@ Virtual_File::Virtual_File(Bit8u * in_data,Bit32u in_size) {
|
|||
file_size=in_size;
|
||||
file_data=in_data;
|
||||
file_pos=0;
|
||||
date=DOS_PackDate(2002,10,1);
|
||||
time=DOS_PackTime(12,34,56);
|
||||
}
|
||||
|
||||
bool Virtual_File::Read(Bit8u * data,Bit16u * size) {
|
||||
|
@ -159,8 +165,8 @@ bool Virtual_Drive::FileStat(const char* name, FileStat_Block * const stat_block
|
|||
if (strcasecmp(name,cur_file->name)==0) {
|
||||
stat_block->attr=DOS_ATTR_ARCHIVE;
|
||||
stat_block->size=cur_file->size;
|
||||
stat_block->date=DOS_PackDate(2002,0,0);
|
||||
stat_block->time=DOS_PackTime(12,12,12);
|
||||
stat_block->date=DOS_PackDate(2002,10,1);
|
||||
stat_block->time=DOS_PackTime(12,34,56);
|
||||
return true;
|
||||
}
|
||||
cur_file=cur_file->next;
|
||||
|
@ -187,7 +193,7 @@ bool Virtual_Drive::FindNext(DOS_DTA & dta) {
|
|||
dta.GetSearchParams(attr,pattern);
|
||||
while (search_file) {
|
||||
if (WildFileCmp(search_file->name,pattern)) {
|
||||
dta.SetResult(search_file->name,search_file->size,6,2,DOS_ATTR_ARCHIVE);
|
||||
dta.SetResult(search_file->name,search_file->size,search_file->date,search_file->time,DOS_ATTR_ARCHIVE);
|
||||
search_file=search_file->next;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue