Hi!

17-Июн-2006 03:23 [EMAIL PROTECTED] (Blair Campbell) wrote to
[EMAIL PROTECTED]:

BC>     /* Probe for root directory */
BC>     if(*fnam && fnam[1] == ':'
BC>      && (!fnam[2] || (fnam[2] == '\\' && !fnam[3]))) {
BC>             /* Root spec or drive letter only */

     This should be more readable (question of taste, though):

if (fnam [0] && fnam [1] == ':' &&
    (fnam [2] == '\0' ||                        /* "A:"         */
     fnam [2] == '\\' && fnam [3] == '\0')) {   /* "A:\"        */

BC>         if(( r.r_flags & 1 ) ? r.r_ax : 0) {

     This is identical to (more effective and readable):

if ((r.r_flags & 1) && r.r_ax) {

Though, I suggest, that there is bug in logic (or this is result of unsmart
inlining of some function), because AX always should be nonzero in case of
CF=1. This, this code should reduced to:

if (r.r_flags & 1) {

BC>     if( ( r.r_flags & 1 ) ? r.r_ax : 0) {

     Same as above.


_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to