On Mar 12, 2007, at 5:11 PM, Neely Grady-W30566 wrote:
The problem I run into is the bitmask will need to be shifted
depending on where in the byte the interesting bits are. Is there a
way to shift the bitmasks in the hf_ struct?
No. The bitmask for any given hf_ structure is a constant.
However, there can be more than one hf_ structure for a given field
name, with different bit masks.
BTW, how do you plan to handle a field that straddles a byte
boundary? You can't do that with a 1-byte field, even if the field
has fewer than 8 bits.