Truename, get free space and ctrl-break fixes.

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@280 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2001-08-20 20:32:15 +00:00
parent c468cb5112
commit b447c6c0be
4 changed files with 33 additions and 15 deletions

View File

@ -36,6 +36,9 @@ static BYTE *charioRcsId = "$Id$";
/*
* $Log$
* Revision 1.12 2001/08/20 20:32:15 bartoldeman
* Truename, get free space and ctrl-break fixes.
*
* Revision 1.11 2001/08/19 12:58:36 bartoldeman
* Time and date fixes, Ctrl-S/P, findfirst/next, FCBs, buffers, tsr unloading
*
@ -293,7 +296,10 @@ VOID con_hold(void)
c = con_read();
}
if (c == CTL_C)
{
con_read();
handle_break();
}
}
UCOUNT _sti(BOOL check_break)

View File

@ -37,6 +37,9 @@ static BYTE *dosfnsRcsId = "$Id$";
* /// Added SHARE support. 2000/09/04 Ron Cemer
*
* $Log$
* Revision 1.25 2001/08/20 20:32:15 bartoldeman
* Truename, get free space and ctrl-break fixes.
*
* Revision 1.24 2001/08/19 12:58:36 bartoldeman
* Time and date fixes, Ctrl-S/P, findfirst/next, FCBs, buffers, tsr unloading
*
@ -1144,7 +1147,7 @@ VOID DosGetFree(UBYTE drive, COUNT FAR * spc, COUNT FAR * navc, COUNT FAR * bps,
return;
/* get the data vailable from dpb */
*nc = dpbp->dpb_size;
*nc = dpbp->dpb_size - 1;
*spc = dpbp->dpb_clsmask + 1;
*bps = dpbp->dpb_secsize;

View File

@ -35,6 +35,9 @@ static BYTE *RcsId = "$Id$";
/*
* $Log$
* Revision 1.17 2001/08/20 20:32:15 bartoldeman
* Truename, get free space and ctrl-break fixes.
*
* Revision 1.16 2001/08/19 12:58:36 bartoldeman
* Time and date fixes, Ctrl-S/P, findfirst/next, FCBs, buffers, tsr unloading
*
@ -209,7 +212,7 @@ VOID FatGetDrvData(UCOUNT drive, COUNT FAR * spc, COUNT FAR * bps,
}
/* get the data vailable from dpb */
*nc = dpbp->dpb_size;
*nc = dpbp->dpb_size - 1;
*spc = dpbp->dpb_clsmask + 1;
*bps = dpbp->dpb_secsize;

View File

@ -31,6 +31,9 @@ static BYTE *mainRcsId = "$Id$";
/*
* $Log$
* Revision 1.13 2001/08/20 20:32:15 bartoldeman
* Truename, get free space and ctrl-break fixes.
*
* Revision 1.12 2001/07/28 18:13:06 bartoldeman
* Fixes for FORMAT+SYS, FATFS, get current dir, kernel init memory situation.
*
@ -277,23 +280,13 @@ COUNT truename(char FAR * src, char FAR * dest, COUNT t)
if (src[1] == ':')
src += 2;
/* /// Added to adjust for filenames which begin with ".\"
The problem was manifesting itself in the inability
to run an program whose filename (without the extension)
was longer than six characters and the PATH variable
contained ".", unless you explicitly specified the full
path to the executable file.
Jun 11, 2000 - rbc */
/* /// Changed to "while" from "if". - Ron Cemer */
while ( (src[0] == '.') && (src[1] == '\\') ) src += 2;
/*
Code repoff from dosfns.c
MSD returns X:/CON for truename con. Not X:\CON
*/
/* check for a device */
if ((dhp = IsDevice(src)) != NULL)
if ((*src != '.') && (*src != '\\') && (*src != '/') && ((dhp = IsDevice(src)) != NULL))
{
froot = get_root(src);
@ -331,6 +324,16 @@ COUNT truename(char FAR * src, char FAR * dest, COUNT t)
goto exit_tn;
}
/* /// Added to adjust for filenames which begin with ".\"
* The problem was manifesting itself in the inability
* to run an program whose filename (without the extension)
* was longer than six characters and the PATH variable
* contained ".", unless you explicitly specified the full
* path to the executable file.
* Jun 11, 2000 - rbc */
/* /// Changed to "while" from "if". - Ron Cemer */
while ( (src[0] == '.') && (src[1] == '\\') ) src += 2;
current_ldt = &CDSp->cds_table[i];
/* Always give the redirector a chance to rewrite the filename */
@ -495,11 +498,14 @@ COUNT truename(char FAR * src, char FAR * dest, COUNT t)
&& (*bufp != '/')
&& (*bufp != '\\') )
bufp--;
}
} else {
/* .. in root dir illegal */
return DE_PATHNOTFND;
}
} else {
/* New segment. If any wildcards in previous
segment(s), this is an invalid path. */
if (gotAnyWildcards) return DE_PATHNOTFND;
if (gotAnyWildcards || src[0]=='.') return DE_PATHNOTFND;
/* Append current path segment to result. */
*(bufp++) = '\\';
if (bufp >= bufend) break;