[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]
Source code Questions
Hi Folks,
I am currently working on a java port for rdesktop which is a pita in
its own right anyway. Although the c-source is very easy to read and
comprehend if you have read the standard documents beforehand i am know
stuck in mcs.h:
Lines 44 ff.
in_uint8(s, len); //read length
if (len & 0x80) { // if len = 0x80?
len &= ~0x80; // len=0?
*length = 0;
while (len--) //?
next_be(s, *length); //?
} else
If i understand it correctly then it is first checked wether len=128
(0x80 Hex) because len & 0x80 is only true if len=0x80.
len &=~0x80 is the same as len=0 because a and (not a) is always false
so 0x80&~0x80=00000000.
But I do not understand how the rest of the statement should work.
Could someone please clarify what while(len--) next_be(s, *length);
should do?
Thanks
Christian