some of Arkady's suggestions (simplify logic), add comments

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/branches/UNSTABLE@1105 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Kenneth J Davis 2005-01-30 19:32:09 +00:00
parent aa82e451e8
commit bae20d0533
3 changed files with 13 additions and 12 deletions

View File

@ -17,11 +17,13 @@ if "%BASE%" == "" goto clearset
:-----------------------------------------------------------------------
if not "%BINPATH%" == "" goto skip_binpath
set BINPATH=%BASE%\bin
if "%COMPILER%" == "TC" set BINPATH=%BASE%
if "%COMPILER%" == "WATCOM" set BINPATH=%BASE%\binw
if "%COMPILER%" == "WATCOM" if "%OS%" == "Windows_NT" set BINPATH=%BASE%\binnt
if "%COMPILER%-%OS%" == "WATCOM-Windows_NT" set BINPATH=%BASE%\binnt
:skip_binpath
echo Path to compiler programs (binaries) is %BINPATH%
:-----------------------------------------------------------------------
@ -32,7 +34,8 @@ set OLDPATH=%PATH%
set PATH=%BINPATH%;%PATH%
:- MSC searches libraries only through LIB variable.
if "%COMPILER%" == "MSC" set LIB=%MSC_BASE%\lib
:- If already set then assume preset to include MSC's lib
if "%COMPILER%%LIB%" == "MSC" set LIB=%MSC_BASE%\lib
:-----------------------------------------------------------------------

View File

@ -595,15 +595,13 @@ void DosDefinePartition(struct DriveParamS *driveParam,
pddt->ddt_defbpb.bpb_nheads = driveParam->chs.Head;
pddt->ddt_defbpb.bpb_nsecs = driveParam->chs.Sector;
pddt->ddt_defbpb.bpb_hidden = pEntry->RelSect;
if (pEntry->NumSect > 0xffff)
pddt->ddt_defbpb.bpb_nsize = 0;
pddt->ddt_defbpb.bpb_huge = pEntry->NumSect;
if (pEntry->NumSect <= 0xffff)
{
pddt->ddt_defbpb.bpb_nsize = 0;
pddt->ddt_defbpb.bpb_huge = pEntry->NumSect;
}
else
{
pddt->ddt_defbpb.bpb_nsize = (UWORD) (pEntry->NumSect);
pddt->ddt_defbpb.bpb_huge = 0;
pddt->ddt_defbpb.bpb_nsize = loword (pEntry->NumSect);
pddt->ddt_defbpb.bpb_huge = 0; /* may still be set on Win95 */
}
/* sectors per cluster, sectors per FAT etc. */

View File

@ -252,7 +252,7 @@ int int21_fat32(lregs *r)
if (ISFAT32(dpb))
{
if ((dpb->dpb_xfsinfosec == 0xffff
&& (nfreeclst != 0 || cluster != 0))
&& (nfreeclst || cluster))
|| nfreeclst > dpb->dpb_xsize
|| cluster > dpb->dpb_xsize)
{
@ -1962,7 +1962,7 @@ VOID ASMCFUNC int2F_12_handler(struct int2f12regs r)
omitting the NUL device TE */
r.BX = FP_SEG(nul_dev.dh_next);
r.AX = FP_OFF(nul_dev.dh_next);
/* fall through only to re-use break */
case 0x2e: /* GET or SET error table addresse - ignored
called by MS debug with DS != DOSDS, printf
doesn't work!! */