mirror of https://github.com/FDOS/kernel.git
Misc, zero terminated device names and redirector bugs fixed.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@188 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
2dca89f7ce
commit
7c122b0850
|
@ -1,3 +1,29 @@
|
||||||
|
2001 Apr 2 - Build 2023
|
||||||
|
-------- Bart Oldeman (bart.oldeman@bristol.ac.uk)
|
||||||
|
+ Fixes Bart: Volkov Commander revealed a few bugs:
|
||||||
|
-int 21/ah=55 forgot to set current psp to child psp.
|
||||||
|
-memory allocation: mem_access_mode was a signed byte, and hence 0x80 was
|
||||||
|
translated to 0xff80 and not 0x0080 when converting to a COUNT. Hence
|
||||||
|
changed it to become a UBYTE.
|
||||||
|
-An error in memmgr.c: search again in low mem for modes 0x80,81,82, not
|
||||||
|
0x40,0x41,0x42
|
||||||
|
* execrh.asm & int2f.asm: made code executable on a 8088 (no push
|
||||||
|
constant)
|
||||||
|
* entry.asm: made sure dos_crit_sect is executed when required to.
|
||||||
|
* Another redirector fix. int 2f/1122 needed DS=current psp. This caused a
|
||||||
|
bug for me: after compiling FreeCOM on a redirected drive "dir" did not
|
||||||
|
work any more.
|
||||||
|
* The nansi.sys problem: as it was, the initialisation phase of nansi
|
||||||
|
called int/ah=30, which checked control-break, which checks the console
|
||||||
|
driver, which at that point is the still not initialized nansi. This
|
||||||
|
messed up the request header passed to it. A solution I found is to link
|
||||||
|
a device into the device chain _after_ initialisation, not before.
|
||||||
|
* Redirector fix: network.c uses fmemcpy instead of fsncopy.
|
||||||
|
* Fixed INT 21/AH=6 (direct console input).
|
||||||
|
Tom:
|
||||||
|
* DE_NFILES instead of DE_FILENOTFOUND to allow Volkov Commander to browse empty
|
||||||
|
drives.
|
||||||
|
* Fixed bug wrt zero terminated device names (should be spaces terminated).
|
||||||
2001 Mar 30 - Build 2023
|
2001 Mar 30 - Build 2023
|
||||||
-------- Bart Oldeman (bart.oldeman@bristol.ac.uk)
|
-------- Bart Oldeman (bart.oldeman@bristol.ac.uk)
|
||||||
+ Fixes Tom: Kernel alloc initialises to 0. This avoids some weird errors.
|
+ Fixes Tom: Kernel alloc initialises to 0. This avoids some weird errors.
|
||||||
|
|
|
@ -40,6 +40,9 @@ static BYTE *RcsId = "$Id$";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.16 2001/04/02 23:18:30 bartoldeman
|
||||||
|
* Misc, zero terminated device names and redirector bugs fixed.
|
||||||
|
*
|
||||||
* Revision 1.15 2001/03/30 22:27:42 bartoldeman
|
* Revision 1.15 2001/03/30 22:27:42 bartoldeman
|
||||||
* Saner lastdrive handling.
|
* Saner lastdrive handling.
|
||||||
*
|
*
|
||||||
|
@ -1034,16 +1037,6 @@ INIT BOOL LoadDevice(BYTE * pLine, COUNT top, COUNT mode)
|
||||||
|
|
||||||
for ( ; ; )
|
for ( ; ; )
|
||||||
{
|
{
|
||||||
struct dhdr FAR *previous_nul_dhp;
|
|
||||||
|
|
||||||
previous_nul_dhp = nul_dev.dh_next;
|
|
||||||
|
|
||||||
next_dhp = dhp->dh_next;
|
|
||||||
|
|
||||||
/* Link in device driver and save nul_dev pointer to next */
|
|
||||||
dhp->dh_next = nul_dev.dh_next;
|
|
||||||
nul_dev.dh_next = dhp;
|
|
||||||
|
|
||||||
/* that's a nice hack >:-)
|
/* that's a nice hack >:-)
|
||||||
|
|
||||||
although we don't want HIMEM.SYS,(it's not free), other people
|
although we don't want HIMEM.SYS,(it's not free), other people
|
||||||
|
@ -1068,8 +1061,12 @@ INIT BOOL LoadDevice(BYTE * pLine, COUNT top, COUNT mode)
|
||||||
/* end of HIMEM.SYS HACK */
|
/* end of HIMEM.SYS HACK */
|
||||||
|
|
||||||
result=init_device(dhp, pTmp, mode, top);
|
result=init_device(dhp, pTmp, mode, top);
|
||||||
if(result){
|
|
||||||
nul_dev.dh_next = previous_nul_dhp; /* return orig pointer if error */
|
if(!result){
|
||||||
|
next_dhp = dhp->dh_next;
|
||||||
|
/* Link in device driver and save nul_dev pointer to next */
|
||||||
|
dhp->dh_next = nul_dev.dh_next;
|
||||||
|
nul_dev.dh_next = dhp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* multiple devices end */
|
/* multiple devices end */
|
||||||
|
|
|
@ -37,6 +37,9 @@ static BYTE *dosfnsRcsId = "$Id$";
|
||||||
* /// Added SHARE support. 2000/09/04 Ron Cemer
|
* /// Added SHARE support. 2000/09/04 Ron Cemer
|
||||||
*
|
*
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.14 2001/04/02 23:18:30 bartoldeman
|
||||||
|
* Misc, zero terminated device names and redirector bugs fixed.
|
||||||
|
*
|
||||||
* Revision 1.13 2001/03/30 22:27:42 bartoldeman
|
* Revision 1.13 2001/03/30 22:27:42 bartoldeman
|
||||||
* Saner lastdrive handling.
|
* Saner lastdrive handling.
|
||||||
*
|
*
|
||||||
|
@ -277,8 +280,8 @@ UCOUNT GenericRead(COUNT hndl, UCOUNT n, BYTE FAR * bp, COUNT FAR * err,
|
||||||
BOOL force_binary)
|
BOOL force_binary)
|
||||||
{
|
{
|
||||||
sft FAR *s;
|
sft FAR *s;
|
||||||
WORD sys_idx;
|
/* WORD sys_idx;*/
|
||||||
sfttbl FAR *sp;
|
/*sfttbl FAR *sp;*/
|
||||||
UCOUNT ReadCount;
|
UCOUNT ReadCount;
|
||||||
|
|
||||||
/* Test that the handle is valid */
|
/* Test that the handle is valid */
|
||||||
|
@ -406,8 +409,8 @@ UCOUNT DosRead(COUNT hndl, UCOUNT n, BYTE FAR * bp, COUNT FAR * err)
|
||||||
UCOUNT DosWrite(COUNT hndl, UCOUNT n, BYTE FAR * bp, COUNT FAR * err)
|
UCOUNT DosWrite(COUNT hndl, UCOUNT n, BYTE FAR * bp, COUNT FAR * err)
|
||||||
{
|
{
|
||||||
sft FAR *s;
|
sft FAR *s;
|
||||||
WORD sys_idx;
|
/* WORD sys_idx;*/
|
||||||
sfttbl FAR *sp;
|
/*sfttbl FAR *sp;*/
|
||||||
UCOUNT WriteCount;
|
UCOUNT WriteCount;
|
||||||
|
|
||||||
/* Test that the handle is valid */
|
/* Test that the handle is valid */
|
||||||
|
@ -496,7 +499,7 @@ UCOUNT DosWrite(COUNT hndl, UCOUNT n, BYTE FAR * bp, COUNT FAR * err)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
REG WORD c,
|
REG WORD /*c,*/
|
||||||
cnt = n,
|
cnt = n,
|
||||||
spaces_left = 0,
|
spaces_left = 0,
|
||||||
next_pos,
|
next_pos,
|
||||||
|
@ -703,7 +706,7 @@ static WORD get_free_hndl(void)
|
||||||
return 0xff;
|
return 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
static sft FAR *get_free_sft(WORD FAR * sft_idx)
|
sft FAR *get_free_sft(WORD FAR * sft_idx)
|
||||||
{
|
{
|
||||||
WORD sys_idx = 0;
|
WORD sys_idx = 0;
|
||||||
sfttbl FAR *sp;
|
sfttbl FAR *sp;
|
||||||
|
@ -769,8 +772,8 @@ COUNT DosCreat(BYTE FAR * fname, COUNT attrib)
|
||||||
WORD hndl, sft_idx;
|
WORD hndl, sft_idx;
|
||||||
sft FAR *sftp;
|
sft FAR *sftp;
|
||||||
struct dhdr FAR *dhp;
|
struct dhdr FAR *dhp;
|
||||||
BYTE FAR *froot;
|
/* BYTE FAR *froot;*/
|
||||||
WORD i;
|
/* WORD i;*/
|
||||||
COUNT result, drive;
|
COUNT result, drive;
|
||||||
|
|
||||||
/* get a free handle */
|
/* get a free handle */
|
||||||
|
@ -940,8 +943,8 @@ COUNT DosOpen(BYTE FAR * fname, COUNT mode)
|
||||||
WORD sft_idx;
|
WORD sft_idx;
|
||||||
sft FAR *sftp;
|
sft FAR *sftp;
|
||||||
struct dhdr FAR *dhp;
|
struct dhdr FAR *dhp;
|
||||||
BYTE FAR *froot;
|
/* BYTE FAR *froot;*/
|
||||||
WORD i;
|
/* WORD i;*/
|
||||||
COUNT drive, result;
|
COUNT drive, result;
|
||||||
|
|
||||||
/* /// Added to adjust for filenames which begin with ".\"
|
/* /// Added to adjust for filenames which begin with ".\"
|
||||||
|
@ -1193,12 +1196,13 @@ COUNT DosChangeDir(BYTE FAR * s)
|
||||||
COUNT result;
|
COUNT result;
|
||||||
BYTE FAR *p;
|
BYTE FAR *p;
|
||||||
|
|
||||||
/* don't do wildcard CHDIR --TE*/
|
/* don't do wildcard CHDIR --TE*/
|
||||||
/* although this should be handled somewhere else */
|
|
||||||
for (p = s; *p; p++)
|
for (p = s; *p; p++)
|
||||||
if (*p == '*' || *p == '?')
|
if (*p == '*' || *p == '?')
|
||||||
return DE_PATHNOTFND;
|
return DE_PATHNOTFND;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
drive = get_verify_drive(s);
|
drive = get_verify_drive(s);
|
||||||
if (drive < 0 ) {
|
if (drive < 0 ) {
|
||||||
return drive;
|
return drive;
|
||||||
|
@ -1263,7 +1267,7 @@ COUNT DosFindNext(void)
|
||||||
COUNT DosGetFtime(COUNT hndl, date FAR * dp, time FAR * tp)
|
COUNT DosGetFtime(COUNT hndl, date FAR * dp, time FAR * tp)
|
||||||
{
|
{
|
||||||
sft FAR *s;
|
sft FAR *s;
|
||||||
sfttbl FAR *sp;
|
/*sfttbl FAR *sp;*/
|
||||||
|
|
||||||
/* Test that the handle is valid */
|
/* Test that the handle is valid */
|
||||||
if (hndl < 0)
|
if (hndl < 0)
|
||||||
|
@ -1292,7 +1296,7 @@ COUNT DosGetFtime(COUNT hndl, date FAR * dp, time FAR * tp)
|
||||||
COUNT DosSetFtime(COUNT hndl, date FAR * dp, time FAR * tp)
|
COUNT DosSetFtime(COUNT hndl, date FAR * dp, time FAR * tp)
|
||||||
{
|
{
|
||||||
sft FAR *s;
|
sft FAR *s;
|
||||||
sfttbl FAR *sp;
|
/*sfttbl FAR *sp;*/
|
||||||
|
|
||||||
/* Test that the handle is valid */
|
/* Test that the handle is valid */
|
||||||
if (hndl < 0)
|
if (hndl < 0)
|
||||||
|
@ -1469,7 +1473,7 @@ COUNT DosRename(BYTE FAR * path1, BYTE FAR * path2)
|
||||||
|
|
||||||
drive1 = get_verify_drive(path1);
|
drive1 = get_verify_drive(path1);
|
||||||
result = truename(path1, PriPathName, FALSE);
|
result = truename(path1, PriPathName, FALSE);
|
||||||
if (result != SUCCESS) {
|
if (result != SUCCESS) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
drive2 = get_verify_drive(path2);
|
drive2 = get_verify_drive(path2);
|
||||||
|
@ -1575,21 +1579,22 @@ struct dhdr FAR * IsDevice(BYTE FAR * fname)
|
||||||
struct dhdr FAR *dhp;
|
struct dhdr FAR *dhp;
|
||||||
BYTE FAR *froot;
|
BYTE FAR *froot;
|
||||||
WORD i;
|
WORD i;
|
||||||
|
BYTE tmpPathName[FNAME_SIZE+1];
|
||||||
|
|
||||||
/* check for a device */
|
/* check for a device */
|
||||||
froot = get_root(fname);
|
froot = get_root(fname);
|
||||||
for (i = 0; i < FNAME_SIZE; i++)
|
for (i = 0; i < FNAME_SIZE; i++)
|
||||||
{
|
{
|
||||||
if (*froot != '\0' && *froot != '.')
|
if (*froot != '\0' && *froot != '.')
|
||||||
SecPathName[i] = *froot++;
|
tmpPathName[i] = *froot++;
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; i < FNAME_SIZE; i++)
|
for (; i < FNAME_SIZE; i++)
|
||||||
SecPathName[i] = ' ';
|
tmpPathName[i] = ' ';
|
||||||
|
|
||||||
SecPathName[i] = 0;
|
tmpPathName[i] = 0;
|
||||||
|
|
||||||
/* /// BUG!!! This is absolutely wrong. A filename of "NUL.LST" must be
|
/* /// BUG!!! This is absolutely wrong. A filename of "NUL.LST" must be
|
||||||
treated EXACTLY the same as a filename of "NUL". The existence or
|
treated EXACTLY the same as a filename of "NUL". The existence or
|
||||||
|
@ -1600,10 +1605,23 @@ struct dhdr FAR * IsDevice(BYTE FAR * fname)
|
||||||
if (*froot != '.')
|
if (*froot != '.')
|
||||||
{
|
{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (dhp = (struct dhdr FAR *)&nul_dev; dhp != (struct dhdr FAR *)-1; dhp = dhp->dh_next)
|
for (dhp = (struct dhdr FAR *)&nul_dev; dhp != (struct dhdr FAR *)-1; dhp = dhp->dh_next)
|
||||||
{
|
{
|
||||||
if (fnmatch((BYTE FAR *) SecPathName, (BYTE FAR *) dhp->dh_name, FNAME_SIZE, FALSE))
|
|
||||||
|
/* BUGFIX: MSCD000<00> should be handled like MSCD000<20> TE */
|
||||||
|
|
||||||
|
char dev_name_buff[FNAME_SIZE];
|
||||||
|
|
||||||
|
int namelen = fstrlen(dhp->dh_name);
|
||||||
|
|
||||||
|
memset(dev_name_buff, ' ', FNAME_SIZE);
|
||||||
|
|
||||||
|
fmemcpy(dev_name_buff,dhp->dh_name, min(namelen,FNAME_SIZE));
|
||||||
|
|
||||||
|
if (fnmatch((BYTE FAR *) tmpPathName, (BYTE FAR *) dev_name_buff, FNAME_SIZE, FALSE))
|
||||||
{
|
{
|
||||||
|
memcpy(SecPathName, tmpPathName, i+1);
|
||||||
return dhp;
|
return dhp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,9 @@
|
||||||
; $Id$
|
; $Id$
|
||||||
;
|
;
|
||||||
; $Log$
|
; $Log$
|
||||||
|
; Revision 1.10 2001/04/02 23:18:30 bartoldeman
|
||||||
|
; Misc, zero terminated device names and redirector bugs fixed.
|
||||||
|
;
|
||||||
; Revision 1.9 2001/03/30 19:30:06 bartoldeman
|
; Revision 1.9 2001/03/30 19:30:06 bartoldeman
|
||||||
; Misc fixes and implementation of SHELLHIGH. See history.txt for details.
|
; Misc fixes and implementation of SHELLHIGH. See history.txt for details.
|
||||||
;
|
;
|
||||||
|
@ -280,6 +283,7 @@ int21_reentry:
|
||||||
jne int21_1
|
jne int21_1
|
||||||
|
|
||||||
int21_user:
|
int21_user:
|
||||||
|
call dos_crit_sect
|
||||||
mov bp,sp
|
mov bp,sp
|
||||||
push ss
|
push ss
|
||||||
push bp
|
push bp
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
; $Id$
|
; $Id$
|
||||||
;
|
;
|
||||||
; $Log$
|
; $Log$
|
||||||
|
; Revision 1.5 2001/04/02 23:18:30 bartoldeman
|
||||||
|
; Misc, zero terminated device names and redirector bugs fixed.
|
||||||
|
;
|
||||||
; Revision 1.4 2001/03/21 02:56:25 bartoldeman
|
; Revision 1.4 2001/03/21 02:56:25 bartoldeman
|
||||||
; See history.txt for changes. Bug fixes and HMA support are the main ones.
|
; See history.txt for changes. Bug fixes and HMA support are the main ones.
|
||||||
;
|
;
|
||||||
|
@ -102,16 +105,34 @@ _execrh:
|
||||||
push es ; sometimes it get lost
|
push es ; sometimes it get lost
|
||||||
push ds
|
push ds
|
||||||
|
|
||||||
lds si,[bp+8] ; ds:si = device header
|
lds si,[bp+8] ; ds:si = device header
|
||||||
les bx,[bp+4] ; es:bx = request header
|
les bx,[bp+4] ; es:bx = request header
|
||||||
|
|
||||||
|
push ds ; needed later
|
||||||
|
push si
|
||||||
|
|
||||||
|
mov bp, execrh_ret1 ; construct return frame
|
||||||
|
push cs
|
||||||
|
push bp
|
||||||
|
|
||||||
|
push ds ; call far the strategy
|
||||||
|
push word [si+6]
|
||||||
|
|
||||||
push cs ; do this, the right way!
|
|
||||||
push word exit_execrh ; like 68k code
|
|
||||||
push ds
|
|
||||||
push word [ds:si+8] ; interrupt
|
|
||||||
push ds
|
|
||||||
push word [ds:si+6] ; strategy
|
|
||||||
retf
|
retf
|
||||||
|
execrh_ret1:
|
||||||
|
pop si ; these were saved
|
||||||
|
pop ds
|
||||||
|
|
||||||
|
mov bp, execrh_ret2 ; construct return frame
|
||||||
|
push cs
|
||||||
|
push bp
|
||||||
|
|
||||||
|
push ds ; call far the interrupt
|
||||||
|
push word [si+8]
|
||||||
|
|
||||||
|
retf
|
||||||
|
execrh_ret2:
|
||||||
|
|
||||||
exit_execrh: sti ; damm driver turn off ints
|
exit_execrh: sti ; damm driver turn off ints
|
||||||
cld ; has gone backwards
|
cld ; has gone backwards
|
||||||
pop ds
|
pop ds
|
||||||
|
|
|
@ -36,6 +36,9 @@ static BYTE *fatdirRcsId = "$Id$";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.13 2001/04/02 23:18:30 bartoldeman
|
||||||
|
* Misc, zero terminated device names and redirector bugs fixed.
|
||||||
|
*
|
||||||
* Revision 1.12 2001/03/30 22:27:42 bartoldeman
|
* Revision 1.12 2001/03/30 22:27:42 bartoldeman
|
||||||
* Saner lastdrive handling.
|
* Saner lastdrive handling.
|
||||||
*
|
*
|
||||||
|
@ -167,9 +170,9 @@ struct f_node FAR *dir_open(BYTE FAR * dirname)
|
||||||
struct f_node FAR *fnp;
|
struct f_node FAR *fnp;
|
||||||
COUNT drive;
|
COUNT drive;
|
||||||
BYTE *p;
|
BYTE *p;
|
||||||
WORD i,
|
WORD i;
|
||||||
x;
|
/*TEunused x; */
|
||||||
BYTE *s;
|
/* BYTE *s;*/
|
||||||
struct cds FAR *cdsp;
|
struct cds FAR *cdsp;
|
||||||
BYTE *pszPath = &TempCDS.cdsCurrentPath[2];
|
BYTE *pszPath = &TempCDS.cdsCurrentPath[2];
|
||||||
|
|
||||||
|
@ -209,18 +212,19 @@ struct f_node FAR *dir_open(BYTE FAR * dirname)
|
||||||
release_f_node(fnp);
|
release_f_node(fnp);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
TempCDS.cdsDpb = CDSp->cds_table[drive].cdsDpb;
|
|
||||||
|
|
||||||
cdsp = &CDSp->cds_table[drive];
|
cdsp = &CDSp->cds_table[drive];
|
||||||
|
|
||||||
|
TempCDS.cdsDpb = cdsp->cdsDpb;
|
||||||
|
|
||||||
TempCDS.cdsCurrentPath[0] = 'A' + drive;
|
TempCDS.cdsCurrentPath[0] = 'A' + drive;
|
||||||
TempCDS.cdsCurrentPath[1] = ':';
|
TempCDS.cdsCurrentPath[1] = ':';
|
||||||
TempCDS.cdsJoinOffset = 2;
|
TempCDS.cdsJoinOffset = 2;
|
||||||
|
|
||||||
x = cdsp->cdsJoinOffset;
|
i = cdsp->cdsJoinOffset;
|
||||||
|
|
||||||
/* Generate full path name */
|
/* Generate full path name */
|
||||||
ParseDosPath(dirname, (COUNT *) 0, pszPath, (BYTE FAR *) & cdsp->cdsCurrentPath[x]);
|
ParseDosPath(dirname, (COUNT *) 0, pszPath, (BYTE FAR *) & cdsp->cdsCurrentPath[i]);
|
||||||
|
|
||||||
/* for testing only for now */
|
/* for testing only for now */
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -346,8 +350,9 @@ struct f_node FAR *dir_open(BYTE FAR * dirname)
|
||||||
|
|
||||||
COUNT dir_read(REG struct f_node FAR * fnp)
|
COUNT dir_read(REG struct f_node FAR * fnp)
|
||||||
{
|
{
|
||||||
REG i;
|
/* REG i; */
|
||||||
REG j;
|
/* REG j; */
|
||||||
|
|
||||||
struct buffer FAR *bp;
|
struct buffer FAR *bp;
|
||||||
|
|
||||||
/* Directories need to point to their current offset, not for */
|
/* Directories need to point to their current offset, not for */
|
||||||
|
@ -584,7 +589,7 @@ COUNT dos_findfirst(UCOUNT attr, BYTE FAR * name)
|
||||||
REG COUNT i;
|
REG COUNT i;
|
||||||
COUNT nDrive;
|
COUNT nDrive;
|
||||||
BYTE *p;
|
BYTE *p;
|
||||||
BYTE FAR *ptr;
|
/* BYTE FAR *ptr;*/
|
||||||
|
|
||||||
static BYTE local_name[FNAME_SIZE + 1],
|
static BYTE local_name[FNAME_SIZE + 1],
|
||||||
local_ext[FEXT_SIZE + 1];
|
local_ext[FEXT_SIZE + 1];
|
||||||
|
@ -678,35 +683,26 @@ COUNT dos_findfirst(UCOUNT attr, BYTE FAR * name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!wild) {
|
if (!wild) {
|
||||||
struct dhdr FAR *dhp;
|
if (IsDevice(Name)) {
|
||||||
for (dhp = (struct dhdr FAR *)&nul_dev;
|
/* Found a matching device. */
|
||||||
dhp != (struct dhdr FAR *)-1;
|
dmp->dm_entry = 0;
|
||||||
dhp = dhp->dh_next) {
|
dmp->dm_cluster = 0;
|
||||||
if (fnmatch
|
dmp->dm_flags.f_dmod = 0;
|
||||||
((BYTE FAR *)&Name,
|
dmp->dm_flags.f_droot = 0;
|
||||||
(BYTE FAR *)dhp->dh_name,
|
dmp->dm_flags.f_dnew = 0;
|
||||||
FNAME_SIZE,
|
dmp->dm_flags.f_ddir = 0;
|
||||||
FALSE)) {
|
dmp->dm_flags.f_dfull = 0;
|
||||||
/* Found a matching device. */
|
dmp->dm_dirstart = 0;
|
||||||
dmp->dm_entry = 0;
|
dmp->dm_attr_fnd = D_DEVICE;
|
||||||
dmp->dm_cluster = 0;
|
dmp->dm_time = dos_gettime();
|
||||||
dmp->dm_flags.f_dmod = 0;
|
dmp->dm_date = dos_getdate();
|
||||||
dmp->dm_flags.f_droot = 0;
|
dmp->dm_size = 0L;
|
||||||
dmp->dm_flags.f_dnew = 0;
|
for (d = 0; ( (d < FNAME_SIZE) && (Name[d] != ' ') ); d++)
|
||||||
dmp->dm_flags.f_ddir = 0;
|
dmp->dm_name[d] = Name[d];
|
||||||
dmp->dm_flags.f_dfull = 0;
|
dmp->dm_name[d] = '\0';
|
||||||
dmp->dm_dirstart = 0;
|
return SUCCESS;
|
||||||
dmp->dm_attr_fnd = D_DEVICE;
|
|
||||||
dmp->dm_time = dos_gettime();
|
|
||||||
dmp->dm_date = dos_getdate();
|
|
||||||
dmp->dm_size = 0L;
|
|
||||||
for (d = 0; ( (d < FNAME_SIZE) && (Name[d] != ' ') ); d++)
|
|
||||||
dmp->dm_name[d] = Name[d];
|
|
||||||
dmp->dm_name[d] = '\0';
|
|
||||||
return SUCCESS;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* /// End of additions. - Ron Cemer */
|
/* /// End of additions. - Ron Cemer */
|
||||||
|
|
||||||
|
@ -779,8 +775,8 @@ COUNT dos_findnext(void)
|
||||||
REG dmatch FAR *dmp = (dmatch FAR *) dta;
|
REG dmatch FAR *dmp = (dmatch FAR *) dta;
|
||||||
REG struct f_node FAR *fnp;
|
REG struct f_node FAR *fnp;
|
||||||
BOOL found = FALSE;
|
BOOL found = FALSE;
|
||||||
BYTE FAR *p;
|
/* BYTE FAR *p;*/
|
||||||
BYTE FAR *q;
|
/* BYTE FAR *q;*/
|
||||||
COUNT nDrive;
|
COUNT nDrive;
|
||||||
|
|
||||||
/* assign our match parameters pointer. */
|
/* assign our match parameters pointer. */
|
||||||
|
@ -809,7 +805,7 @@ COUNT dos_findnext(void)
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
printf("findnext: %c %s\n",
|
printf("findnext: %c %s\n",
|
||||||
nDrive + 'A', (cdsp->cdsFlags & CDSNETWDRV)?"remote":"local");
|
nDrive + 'A', (current_ldt->cdsFlags & CDSNETWDRV)?"remote":"local");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (current_ldt->cdsFlags & CDSNETWDRV)
|
if (current_ldt->cdsFlags & CDSNETWDRV)
|
||||||
|
@ -891,7 +887,7 @@ COUNT dos_findnext(void)
|
||||||
/* return the result */
|
/* return the result */
|
||||||
release_f_node(fnp);
|
release_f_node(fnp);
|
||||||
|
|
||||||
return found ? SUCCESS : DE_FILENOTFND;
|
return found ? SUCCESS : DE_NFILES;
|
||||||
}
|
}
|
||||||
|
|
||||||
static VOID pop_dmp(dmatch FAR * dmp, struct f_node FAR * fnp)
|
static VOID pop_dmp(dmatch FAR * dmp, struct f_node FAR * fnp)
|
||||||
|
|
|
@ -36,6 +36,9 @@ static BYTE *Globals_hRcsId = "$Id$";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.10 2001/04/02 23:18:30 bartoldeman
|
||||||
|
* Misc, zero terminated device names and redirector bugs fixed.
|
||||||
|
*
|
||||||
* Revision 1.9 2001/03/30 20:11:14 bartoldeman
|
* Revision 1.9 2001/03/30 20:11:14 bartoldeman
|
||||||
* Truly got DOS=HIGH reporting for INT21/AX=0x3306 working now.
|
* Truly got DOS=HIGH reporting for INT21/AX=0x3306 working now.
|
||||||
*
|
*
|
||||||
|
@ -480,8 +483,10 @@ extern BYTE
|
||||||
extern struct dhdr
|
extern struct dhdr
|
||||||
nul_dev;
|
nul_dev;
|
||||||
extern BYTE
|
extern BYTE
|
||||||
LocalPath[PARSE_MAX + 3], /* Room for drive spec */
|
LocalPath[PARSE_MAX + 3]; /* Room for drive spec */
|
||||||
mem_access_mode, /* memory allocation scheme */
|
extern UBYTE
|
||||||
|
mem_access_mode; /* memory allocation scheme */
|
||||||
|
extern BYTE
|
||||||
ErrorMode, /* Critical error flag */
|
ErrorMode, /* Critical error flag */
|
||||||
InDOS, /* In DOS critical section */
|
InDOS, /* In DOS critical section */
|
||||||
OpenMode, /* File Open Attributes */
|
OpenMode, /* File Open Attributes */
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
; $Id$
|
; $Id$
|
||||||
;
|
;
|
||||||
; $Log$
|
; $Log$
|
||||||
|
; Revision 1.8 2001/04/02 23:18:30 bartoldeman
|
||||||
|
; Misc, zero terminated device names and redirector bugs fixed.
|
||||||
|
;
|
||||||
; Revision 1.7 2001/03/21 02:56:26 bartoldeman
|
; Revision 1.7 2001/03/21 02:56:26 bartoldeman
|
||||||
; See history.txt for changes. Bug fixes and HMA support are the main ones.
|
; See history.txt for changes. Bug fixes and HMA support are the main ones.
|
||||||
;
|
;
|
||||||
|
@ -95,6 +98,7 @@ segment HMA_TEXT
|
||||||
extern _nul_dev:wrt DGROUP
|
extern _nul_dev:wrt DGROUP
|
||||||
extern _umb_start:wrt DGROUP
|
extern _umb_start:wrt DGROUP
|
||||||
extern _UMB_top:wrt DGROUP
|
extern _UMB_top:wrt DGROUP
|
||||||
|
extern _cu_psp:wrt DGROUP
|
||||||
extern _syscall_MUX14:wrt HMA_TEXT
|
extern _syscall_MUX14:wrt HMA_TEXT
|
||||||
|
|
||||||
global reloc_call_int2f_handler
|
global reloc_call_int2f_handler
|
||||||
|
@ -210,7 +214,7 @@ int2f_skip1:
|
||||||
xor ax,ax
|
xor ax,ax
|
||||||
les di,[bp+18] ; do return data stuff
|
les di,[bp+18] ; do return data stuff
|
||||||
mov [es:di],cx
|
mov [es:di],cx
|
||||||
jmp short int2f_rfner
|
jmp int2f_rfner
|
||||||
int2f_r_2:
|
int2f_r_2:
|
||||||
cmp al,0ch ; Get Remote DPB
|
cmp al,0ch ; Get Remote DPB
|
||||||
jne short int2f_r_3
|
jne short int2f_r_3
|
||||||
|
@ -262,9 +266,15 @@ int2f_r_6:
|
||||||
xor ax,ax
|
xor ax,ax
|
||||||
jmp short int2f_rfner
|
jmp short int2f_rfner
|
||||||
int2f_r_7:
|
int2f_r_7:
|
||||||
|
cmp al,022h ; Terminate process
|
||||||
|
jne short int2f_r_8
|
||||||
|
mov ds,[_cu_psp]
|
||||||
|
call int2f_call
|
||||||
|
jmp short int2f_rfner
|
||||||
;
|
;
|
||||||
; everything else goes through here.
|
; everything else goes through here.
|
||||||
;
|
;
|
||||||
|
int2f_r_8:
|
||||||
call int2f_call
|
call int2f_call
|
||||||
jc int2f_rfner
|
jc int2f_rfner
|
||||||
xor ax,ax
|
xor ax,ax
|
||||||
|
@ -364,12 +374,13 @@ _Umb_Test
|
||||||
push es ; save driver entry point
|
push es ; save driver entry point
|
||||||
push bx
|
push bx
|
||||||
|
|
||||||
mov dx,0xffff ; go for broke!
|
|
||||||
mov ax,1000h ; get the umb's
|
|
||||||
push cs ; setup far return
|
push cs ; setup far return
|
||||||
push word umbt1
|
mov ax, umbt1
|
||||||
|
push ax
|
||||||
push es ; push the driver entry point
|
push es ; push the driver entry point
|
||||||
push bx
|
push bx
|
||||||
|
mov dx,0xffff ; go for broke!
|
||||||
|
mov ax,1000h ; get the umb's
|
||||||
retf ; Call the driver
|
retf ; Call the driver
|
||||||
umbt1:
|
umbt1:
|
||||||
;
|
;
|
||||||
|
@ -389,11 +400,12 @@ umbtc:
|
||||||
pop bx ; restore driver entry
|
pop bx ; restore driver entry
|
||||||
pop es
|
pop es
|
||||||
|
|
||||||
mov ax,1000h ; dx set with largest size
|
|
||||||
push cs
|
push cs
|
||||||
push word umbt2
|
mov ax, umbt2
|
||||||
|
push ax
|
||||||
push es
|
push es
|
||||||
push bx
|
push bx
|
||||||
|
mov ax,1000h ; dx set with largest size
|
||||||
retf
|
retf
|
||||||
umbt2:
|
umbt2:
|
||||||
cmp ax,1
|
cmp ax,1
|
||||||
|
|
|
@ -36,6 +36,9 @@ BYTE *RcsId = "$Id$";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.19 2001/04/02 23:18:30 bartoldeman
|
||||||
|
* Misc, zero terminated device names and redirector bugs fixed.
|
||||||
|
*
|
||||||
* Revision 1.18 2001/03/30 22:27:42 bartoldeman
|
* Revision 1.18 2001/03/30 22:27:42 bartoldeman
|
||||||
* Saner lastdrive handling.
|
* Saner lastdrive handling.
|
||||||
*
|
*
|
||||||
|
@ -428,13 +431,13 @@ dispatch:
|
||||||
sto(r->DL);
|
sto(r->DL);
|
||||||
else if (StdinBusy())
|
else if (StdinBusy())
|
||||||
{
|
{
|
||||||
r->AL = 0x00;
|
r->FLAGS &= ~FLG_ZERO;
|
||||||
r->FLAGS |= FLG_ZERO;
|
r->AL = _sti();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
r->FLAGS &= ~FLG_ZERO;
|
r->AL = 0x00;
|
||||||
r->AL = _sti();
|
r->FLAGS |= FLG_ZERO;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1294,6 +1297,7 @@ dispatch:
|
||||||
/* Dos Create New Psp & set p_size */
|
/* Dos Create New Psp & set p_size */
|
||||||
case 0x55:
|
case 0x55:
|
||||||
new_psp((psp FAR *) MK_FP(r->DX, 0), r->SI);
|
new_psp((psp FAR *) MK_FP(r->DX, 0), r->SI);
|
||||||
|
cu_psp = r->DX;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Dos Rename */
|
/* Dos Rename */
|
||||||
|
@ -1343,12 +1347,13 @@ dispatch:
|
||||||
switch (r->AL)
|
switch (r->AL)
|
||||||
{
|
{
|
||||||
case 0x00:
|
case 0x00:
|
||||||
r->AX = mem_access_mode;
|
r->AL = mem_access_mode;
|
||||||
|
r->AH = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x01:
|
case 0x01:
|
||||||
{
|
{
|
||||||
switch (r->BX)
|
switch (r->BL)
|
||||||
{
|
{
|
||||||
case LAST_FIT:
|
case LAST_FIT:
|
||||||
case LAST_FIT_U:
|
case LAST_FIT_U:
|
||||||
|
@ -1360,7 +1365,7 @@ dispatch:
|
||||||
case FIRST_FIT:
|
case FIRST_FIT:
|
||||||
case FIRST_FIT_U:
|
case FIRST_FIT_U:
|
||||||
case FIRST_FIT_UO:
|
case FIRST_FIT_UO:
|
||||||
mem_access_mode = r->BX;
|
mem_access_mode = r->BL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -35,6 +35,9 @@ static BYTE *memmgrRcsId = "$Id$";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.11 2001/04/02 23:18:30 bartoldeman
|
||||||
|
* Misc, zero terminated device names and redirector bugs fixed.
|
||||||
|
*
|
||||||
* Revision 1.10 2001/03/30 19:30:06 bartoldeman
|
* Revision 1.10 2001/03/30 19:30:06 bartoldeman
|
||||||
* Misc fixes and implementation of SHELLHIGH. See history.txt for details.
|
* Misc fixes and implementation of SHELLHIGH. See history.txt for details.
|
||||||
*
|
*
|
||||||
|
@ -286,9 +289,9 @@ searchAgain:
|
||||||
|
|
||||||
if (!foundSeg || !foundSeg->m_size)
|
if (!foundSeg || !foundSeg->m_size)
|
||||||
{ /* no block to fullfill the request */
|
{ /* no block to fullfill the request */
|
||||||
if((mode != LARGEST) && (mode & FIRST_FIT_UO) &&
|
if((mode != LARGEST) && (mode & FIRST_FIT_U) &&
|
||||||
uppermem_link && uppermem_root) {
|
uppermem_link && uppermem_root) {
|
||||||
mode &= !FIRST_FIT_UO;
|
mode &= ~FIRST_FIT_U;
|
||||||
goto searchAgain;
|
goto searchAgain;
|
||||||
}
|
}
|
||||||
if (asize)
|
if (asize)
|
||||||
|
@ -603,6 +606,7 @@ COUNT DosGetLargestBlock(UWORD FAR * block)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
VOID show_chain(void)
|
VOID show_chain(void)
|
||||||
{
|
{
|
||||||
mcb FAR *p, FAR *u;
|
mcb FAR *p, FAR *u;
|
||||||
|
@ -617,6 +621,7 @@ VOID show_chain(void)
|
||||||
p = nxtMCB(p);
|
p = nxtMCB(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
VOID mcb_print(mcb FAR * mcbp)
|
VOID mcb_print(mcb FAR * mcbp)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,6 +36,9 @@ static BYTE *RcsId = "$Id$";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.10 2001/04/02 23:18:30 bartoldeman
|
||||||
|
* Misc, zero terminated device names and redirector bugs fixed.
|
||||||
|
*
|
||||||
* Revision 1.9 2001/03/30 19:30:06 bartoldeman
|
* Revision 1.9 2001/03/30 19:30:06 bartoldeman
|
||||||
* Misc fixes and implementation of SHELLHIGH. See history.txt for details.
|
* Misc fixes and implementation of SHELLHIGH. See history.txt for details.
|
||||||
*
|
*
|
||||||
|
@ -144,12 +147,12 @@ COUNT Remote_find(UWORD func, BYTE FAR * name, REG dmatch FAR * dmp )
|
||||||
else
|
else
|
||||||
test = (VOID FAR *) &TempBuffer;
|
test = (VOID FAR *) &TempBuffer;
|
||||||
|
|
||||||
fsncopy(dta, (BYTE FAR *) &TempBuffer, 21);
|
fmemcpy((BYTE FAR *) &TempBuffer, dta, 21);
|
||||||
p = dta;
|
p = dta;
|
||||||
dta = (BYTE FAR *) &TempBuffer;
|
dta = (BYTE FAR *) &TempBuffer;
|
||||||
i = int2f_Remote_call(func, 0, 0, 0, test, 0, 0);
|
i = int2f_Remote_call(func, 0, 0, 0, test, 0, 0);
|
||||||
dta = p;
|
dta = p;
|
||||||
fsncopy((BYTE FAR *) &TempBuffer, dta, 21);
|
fmemcpy(dta, (BYTE FAR *) &TempBuffer, 21);
|
||||||
|
|
||||||
if (i != 0)
|
if (i != 0)
|
||||||
return i;
|
return i;
|
||||||
|
|
|
@ -31,6 +31,9 @@ static BYTE *mainRcsId = "$Id$";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.10 2001/04/02 23:18:30 bartoldeman
|
||||||
|
* Misc, zero terminated device names and redirector bugs fixed.
|
||||||
|
*
|
||||||
* Revision 1.9 2001/03/30 22:27:42 bartoldeman
|
* Revision 1.9 2001/03/30 22:27:42 bartoldeman
|
||||||
* Saner lastdrive handling.
|
* Saner lastdrive handling.
|
||||||
*
|
*
|
||||||
|
@ -113,6 +116,10 @@ static BYTE *mainRcsId = "$Id$";
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "proto.h"
|
#include "proto.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
TE-TODO: if called repeatedly by same process,
|
||||||
|
last allocation must be freed. if handle count < 20, copy back to PSP
|
||||||
|
*/
|
||||||
int SetJFTSize(UWORD nHandles)
|
int SetJFTSize(UWORD nHandles)
|
||||||
{
|
{
|
||||||
UWORD block,
|
UWORD block,
|
||||||
|
@ -236,13 +243,27 @@ COUNT get_verify_drive(char FAR *src)
|
||||||
* MSD returns \\D.\A.\????????.??? with SHSUCDX. So, this code is not
|
* MSD returns \\D.\A.\????????.??? with SHSUCDX. So, this code is not
|
||||||
* compatible MSD Func 60h.
|
* compatible MSD Func 60h.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*TE TODO:
|
||||||
|
|
||||||
|
experimenting with NUL on MSDOS 7.0 (win95)
|
||||||
|
|
||||||
|
WIN95 FREEDOS
|
||||||
|
TRUENAME NUL C:/NUL OK
|
||||||
|
TRUENAME .\NUL C:\DOS\NUL
|
||||||
|
TRUENAME ..\NUL C:\NUL
|
||||||
|
TRUENAME ..\..\NUL path not found
|
||||||
|
TRUENAME Z:NUL invalid drive (not lastdrive!!)
|
||||||
|
TRUENAME A:NUL A:/NUL OK
|
||||||
|
TRUENAME A:\NUL A:\NUL
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
COUNT truename(char FAR * src, char FAR * dest, COUNT t)
|
COUNT truename(char FAR * src, char FAR * dest, COUNT t)
|
||||||
{
|
{
|
||||||
static char buf[128] = "A:\\\0\0\0\0\0\0\0\0\0";
|
static char buf[128] = "A:\\\0\0\0\0\0\0\0\0\0";
|
||||||
/* /// Changed to FNAME_SIZE from 8 for cleanliness. - Ron Cemer */
|
|
||||||
static char Name[FNAME_SIZE];
|
|
||||||
char *bufp = buf + 3;
|
char *bufp = buf + 3;
|
||||||
COUNT i, n, rootEndPos = 2; /* renamed x to rootEndPos - Ron Cemer */
|
COUNT i, rootEndPos = 2; /* renamed x to rootEndPos - Ron Cemer */
|
||||||
struct cds FAR *cdsp;
|
struct cds FAR *cdsp;
|
||||||
struct dhdr FAR *dhp;
|
struct dhdr FAR *dhp;
|
||||||
BYTE FAR *froot;
|
BYTE FAR *froot;
|
||||||
|
@ -258,8 +279,8 @@ COUNT truename(char FAR * src, char FAR * dest, COUNT t)
|
||||||
{
|
{
|
||||||
buf[0] = (src[0] | 0x20) + 'A' - 'a';
|
buf[0] = (src[0] | 0x20) + 'A' - 'a';
|
||||||
|
|
||||||
if (buf[0] >= lastdrive + 'A')
|
if (buf[0] >= lastdrive + 'A') /* BUG:should be: drive exists */
|
||||||
return DE_PATHNOTFND;
|
return DE_INVLDDRV;
|
||||||
|
|
||||||
src += 2;
|
src += 2;
|
||||||
}
|
}
|
||||||
|
@ -282,62 +303,44 @@ COUNT truename(char FAR * src, char FAR * dest, COUNT t)
|
||||||
MSD returns X:/CON for truename con. Not X:\CON
|
MSD returns X:/CON for truename con. Not X:\CON
|
||||||
*/
|
*/
|
||||||
/* check for a device */
|
/* check for a device */
|
||||||
froot = get_root(src);
|
|
||||||
for (d = 0; d < FNAME_SIZE; d++)
|
|
||||||
{
|
|
||||||
if (*froot != '\0' && *froot != '.')
|
|
||||||
Name[d] = *froot++;
|
|
||||||
else
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (; d < FNAME_SIZE; d++)
|
if ((dhp = IsDevice(src)) != NULL)
|
||||||
Name[d] = ' ';
|
{
|
||||||
|
|
||||||
|
froot = get_root(src);
|
||||||
|
|
||||||
/* /// Bugfix: NUL.LST is the same as NUL. This is true for all
|
/* /// Bugfix: NUL.LST is the same as NUL. This is true for all
|
||||||
devices. On a device name, the extension is irrelevant
|
devices. On a device name, the extension is irrelevant
|
||||||
as long as the name matches.
|
as long as the name matches.
|
||||||
- Ron Cemer */
|
- Ron Cemer */
|
||||||
#if (0)
|
|
||||||
/* if we have an extension, can't be a device */
|
buf[2] ='/';
|
||||||
if (*froot != '.')
|
/* /// Bug: should be only copying up to first space.
|
||||||
{
|
- Ron Cemer */
|
||||||
#endif
|
|
||||||
for (dhp = (struct dhdr FAR *)&nul_dev; dhp != (struct dhdr FAR *)-1; dhp = dhp->dh_next)
|
for (d = 0; d < FNAME_SIZE && dhp->dh_name[d] != 0 && dhp->dh_name[d] != ' '; d++)
|
||||||
{
|
*bufp++ = dhp->dh_name[d];
|
||||||
if (fnmatch((BYTE FAR *) &Name, (BYTE FAR *) dhp->dh_name, FNAME_SIZE, FALSE))
|
/* /// DOS will return C:/NUL.LST if you pass NUL.LST in.
|
||||||
{
|
DOS will also return C:/NUL.??? if you pass NUL.* in.
|
||||||
buf[2] ='/';
|
Code added here to support this.
|
||||||
/* /// Bug: should be only copying up to first space.
|
- Ron Cemer */
|
||||||
- Ron Cemer
|
while ( (*froot != '.') && (*froot != '\0') ) froot++;
|
||||||
for (d = 0; d < FNAME_SIZE || Name[d] == ' '; d++) */
|
if (*froot) froot++;
|
||||||
for (d = 0; ( (d < FNAME_SIZE) && (Name[d] != ' ') ); d++)
|
if (*froot) {
|
||||||
*bufp++ = Name[d];
|
*bufp++ = '.';
|
||||||
/* /// DOS will return C:/NUL.LST if you pass NUL.LST in.
|
for (i = 0; i < FEXT_SIZE; i++) {
|
||||||
DOS will also return C:/NUL.??? if you pass NUL.* in.
|
if ( (*froot == '\0') || (*froot == '.') )
|
||||||
Code added here to support this.
|
break;
|
||||||
- Ron Cemer */
|
if (*froot == '*') {
|
||||||
while ( (*froot != '.') && (*froot != '\0') ) froot++;
|
for (; i < FEXT_SIZE; i++) *bufp++ = '?';
|
||||||
if (*froot) froot++;
|
break;
|
||||||
if (*froot) {
|
|
||||||
*bufp++ = '.';
|
|
||||||
for (i = 0; i < FEXT_SIZE; i++) {
|
|
||||||
if ( (*froot == '\0') || (*froot == '.') )
|
|
||||||
break;
|
|
||||||
if (*froot == '*') {
|
|
||||||
for (; i < FEXT_SIZE; i++) *bufp++ = '?';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
*bufp++ = *froot++;
|
|
||||||
}
|
}
|
||||||
|
*bufp++ = *froot++;
|
||||||
}
|
}
|
||||||
/* /// End of code additions. - Ron Cemer */
|
|
||||||
goto exit_tn;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#if (0)
|
/* /// End of code additions. - Ron Cemer */
|
||||||
|
goto exit_tn;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
cdsp = &CDSp->cds_table[i];
|
cdsp = &CDSp->cds_table[i];
|
||||||
current_ldt = cdsp;
|
current_ldt = cdsp;
|
||||||
|
@ -370,7 +373,7 @@ COUNT truename(char FAR * src, char FAR * dest, COUNT t)
|
||||||
else
|
else
|
||||||
src++;
|
src++;
|
||||||
|
|
||||||
move_name:
|
/*move_name:*/
|
||||||
|
|
||||||
/* /// The block inside the "#if (0) ... #endif" is
|
/* /// The block inside the "#if (0) ... #endif" is
|
||||||
seriously broken. New code added below to replace it.
|
seriously broken. New code added below to replace it.
|
||||||
|
|
Loading…
Reference in New Issue