Hi!

23-Май-2004 21:50 [EMAIL PROTECTED] (Bart Oldeman) wrote to
[EMAIL PROTECTED]:

>>   /* DELETED (0x5) || EXT_DELETED (0xe5) ? */
>>   if ((UBYTE)(name[0] & ~0xE0) == DELETED)

     Ops, mistype. Should be:

   if ((UBYTE)((0x20 + name[0]) & ~0x20) == DELETED)
----------------^^^^^^^

See: for 0x05 we get 0x25, for 0xe5 we get 0x05 (or 0x105 with extension
byte to word, but in given case this is unimportant). These results differs
only in one bit (which is masked) and no other input value may give same
result.

BO> Your code is much harder to understand

     Just slightly more arithmetics. For some begginers harder to read ?:
instead if/else or even ++ instead +1, but this not stops you from using
these constructions?




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id│66&op=click
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to