diff --git a/kernel/chario.c b/kernel/chario.c index dd84f57..53eba67 100644 --- a/kernel/chario.c +++ b/kernel/chario.c @@ -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) diff --git a/kernel/dosfns.c b/kernel/dosfns.c index ef864c6..c694fc8 100644 --- a/kernel/dosfns.c +++ b/kernel/dosfns.c @@ -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; diff --git a/kernel/fcbfns.c b/kernel/fcbfns.c index 29820f6..cdf2b91 100644 --- a/kernel/fcbfns.c +++ b/kernel/fcbfns.c @@ -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; diff --git a/kernel/newstuff.c b/kernel/newstuff.c index bcaa893..f9b1741 100644 --- a/kernel/newstuff.c +++ b/kernel/newstuff.c @@ -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;