Hi all,
Vladimir Dergachev <[EMAIL PROTECTED]> writes: > Also, AFAIK, the pixel type is fixed to be 32 bits in X11 > protocol. Thus, nowadays, unsigned or int is more correct than long > int, as the latter should be 64 bits on 64 bit hardware. (And it > used to be that int was 16 bits on 16 bit hardware and long int was > 32 bits on both 16 bit and 32 bit cpus). In portable software, it's the minimum number of bits that counts. That is still nominally 16 bits for "int" and 32 bits for "long". On 64 bit hardware you may waste half a word, but that's only a very minor problem for passing parameters around. Color types are usually intended as bitfields to be manipulated with binary operators & | and shifts << >>. In theory those operators are ill-defined for signed items, because architectures have different ideas about sign extension. That would be a reason why - for correctness - anybody who constructs such bitfields or extracts parts from them should use unsigned types for the input and the output of such an operation. So "unsigned long" is the strictly correct thing to use here, but "int" will almost always work. benny _______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
