On 6/20/06, Arkady V.Belousov <[EMAIL PROTECTED]> wrote: > Hi! > > 19-Июн-2006 01:37 [EMAIL PROTECTED] (Blair Campbell) wrote to > [EMAIL PROTECTED]: > > BC> +++ lfnfuncs.c 19 Jun 2006 01:37:06 -0000 1.3 > BC> - if( _CFLAG || _AX == 0x7100 ) > BC> + if( _CFLAG || ( buf->lfnax = _AX ) == 0x7100 ) > BC> return( findfirst( path, ( struct ffblk * )buf, attr ) ); > BC> - buf->lfnax = _AX; /* The find handle for findnext */ > > Don't know why this (assigning _AX to .lfnax) is need, but should note, > that new code isn't identical to previous code. With previous code:
lfnfindnext needs the lfn find handle (from AX) to continue a search. lfnfindclose needs the handle to close a search. findfirst (from the TC clib) doesn't need a find handle from AX, and will just overwrite that with whatever goes in the 'reserved for dos' block. In any case, it just seems like a more compact way of making sure that buf->lfnax gets the proper value. > > 1. in case of "_CFLAG || _AX == 0x7100", .lfnax returned untouched, > 2. else (below "if") .lfnax receives value of _AX. > > With new code: > > 1. if "_CFLAG" - .lfnax retrned untouched. > 2. if not "_CFLAG", then .lfnax receives _AX both for return and below "if". > > Ie., difference is that if CF is set, but AX=0x7100, then returned now > modified .lfnax. And vice versa: if CF is set, then returned (as previously) > not modified .lfnax. > > > _______________________________________________ > Freedos-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/freedos-devel > -- Fall is my favorite season in Los Angeles, watching the birds change color and fall from the trees. David Letterman (1947 - ) See ya _______________________________________________ Freedos-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freedos-devel
