Hi Arkady! Your patch is MUCH too long.

> This is my (first) try to bugfix wrong INT21/1B, INT21/1C and INT21/36.
> Sorry, tom, but there more than 1-2 lines of diff, and I doubt that this
> diff may be (noticeably) reduced.

> - bugfix: DosGetFree(): *navc was accessed (read and write) without checking
>   if navc!=NULL; instead "navc!=NULL" was used "*nc!=0xffff".
> - bugfix: FatGetDrvData(): was changed UWORD *spc, but INT21/1B and INT21/1C
>   should change only AL, not AX.
> ? FatGetDrvData(): when get_dpb()==NULL, as value for media ID was used
>   high byte of *spc (sectors_per_cluster), but it always zero.
> - static Dmatch moved nearer to FcbFindFirstNext() and added comment from tom.
> - bugfix: INT21/1B, INT21/1C: FatGetDrvData() now called with &lr.AL, not AX.

I am trying to summarize it:

- you moved rg[4] more towards inside (optimizes better)
- you did something with dpbp
- you removed UWORD * spc argument from DosGetFree everywhere
- you replaced (navc != NULL) by (navc) everywhere

> +  spc = dpbp->dpb_clsmask + 1;
... you replaced access to *spc by access to spc everywhere, as it no longer
is accessed through a pointer argument to DosGetFree. Instead, you made it
the return value of DosGetFree, I think, and -1 now means FALSE everywhere.

> -  if (*nc != 0xffff)
> -    *navc = (COUNT) dos_free(dpbp);
> +  if (navc)
> +    *navc = (UWORD) dos_free(dpbp);
That really fixes something I think.

In fcbfns.c, in FatGetDrvData, you changed:
> -      mdb = *spc >> 8;
> +    static UBYTE mdb = 0;

In calling FatGetDrvData the return value is no longer p = ... but it now
is UBYTE FAR *p = ... which looks like a real change, possibly useful ;-).

> -        p = FatGetDrvData(lr.DL, &lr.AX, &lr.CX, &lr.DX);
> +      UBYTE FAR *p = FatGetDrvData(lr.DL, &lr.AL, &lr.CX, &lr.DX);

> -      DosGetFree(lr.DL, &lr.AX, &lr.BX, &lr.CX, &lr.DX);
> +      lr.AX = DosGetFree(lr.DL, &lr.BX, &lr.CX, &lr.DX);

You also moved get_cds1() to some completely different location and
changed some argument types and names, e.g.
FatGetDrvData UWORD * spc got replaced by UBYTE * pspc.


And of course you changed formatting, e.g. merging several consecutive
"if" into one, using only a bare minimum of parentheses, which probably
means that the formatting change does not improve readability.

So what got actually fixed? I think the *spc handling in several aspects
and the (*nc != 0xffff) which you replaced by (navc), or in other words by
(navc != NULL). Not sure if the movement pointered argument -> return value
actually means a fix, too.

May I summarize the most important part of the fix as:
> -  if (*nc != 0xffff)
> +  if (navc)
...!?

> Sorry, tom, but there more than 1-2 lines of diff, and I doubt that this
> diff may be (noticeably) reduced.
I doubt that you did try to keep the diff short AT ALL.

Eric


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to