mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-22 05:14:30 +02:00
Merge pop_dmp optimization from the unstable kernel.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1428 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
d519f3db40
commit
288a2f396b
@ -982,14 +982,20 @@ COUNT DosChangeDir(BYTE FAR * s)
|
|||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC VOID pop_dmp(dmatch FAR * dmp)
|
STATIC int pop_dmp(int rc, dmatch FAR * dmp)
|
||||||
{
|
{
|
||||||
|
dta = dmp;
|
||||||
|
if (rc == SUCCESS)
|
||||||
|
{
|
||||||
|
fmemcpy(dta, &sda_tmp_dm, 21);
|
||||||
dmp->dm_attr_fnd = (BYTE) SearchDir.dir_attrib;
|
dmp->dm_attr_fnd = (BYTE) SearchDir.dir_attrib;
|
||||||
dmp->dm_time = SearchDir.dir_time;
|
dmp->dm_time = SearchDir.dir_time;
|
||||||
dmp->dm_date = SearchDir.dir_date;
|
dmp->dm_date = SearchDir.dir_date;
|
||||||
dmp->dm_size = (LONG) SearchDir.dir_size;
|
dmp->dm_size = (LONG) SearchDir.dir_size;
|
||||||
ConvertName83ToNameSZ(dmp->dm_name, (BYTE FAR *) SearchDir.dir_name);
|
ConvertName83ToNameSZ(dmp->dm_name, (BYTE FAR *) SearchDir.dir_name);
|
||||||
}
|
}
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
COUNT DosFindFirst(UCOUNT attr, BYTE FAR * name)
|
COUNT DosFindFirst(UCOUNT attr, BYTE FAR * name)
|
||||||
{
|
{
|
||||||
@ -1039,13 +1045,7 @@ COUNT DosFindFirst(UCOUNT attr, BYTE FAR * name)
|
|||||||
else
|
else
|
||||||
rc = dos_findfirst(attr, PriPathName);
|
rc = dos_findfirst(attr, PriPathName);
|
||||||
|
|
||||||
dta = dmp;
|
return pop_dmp(rc, dmp);
|
||||||
if (rc == SUCCESS)
|
|
||||||
{
|
|
||||||
fmemcpy(dta, &sda_tmp_dm, 21);
|
|
||||||
pop_dmp(dmp);
|
|
||||||
}
|
|
||||||
return rc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
COUNT DosFindNext(void)
|
COUNT DosFindNext(void)
|
||||||
@ -1083,13 +1083,7 @@ COUNT DosFindNext(void)
|
|||||||
rc = (sda_tmp_dm.dm_drive & 0x80) ?
|
rc = (sda_tmp_dm.dm_drive & 0x80) ?
|
||||||
network_redirector_fp(REM_FINDNEXT, &sda_tmp_dm) : dos_findnext();
|
network_redirector_fp(REM_FINDNEXT, &sda_tmp_dm) : dos_findnext();
|
||||||
|
|
||||||
dta = dmp;
|
return pop_dmp(rc, dmp);
|
||||||
if (rc == SUCCESS)
|
|
||||||
{
|
|
||||||
fmemcpy(dmp, &sda_tmp_dm, 21);
|
|
||||||
pop_dmp(dmp);
|
|
||||||
}
|
|
||||||
return rc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
COUNT DosGetFtime(COUNT hndl, date * dp, time * tp)
|
COUNT DosGetFtime(COUNT hndl, date * dp, time * tp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user