hi Guys!!!
I'm not sure if this is the right forum... but please help..
Please have a look at the code.
int main(int argc, char *argv[])
{
std::cout << "Begining of the program .. " << endl;
RWBag dummy; //might have to create a dummy RWBAG to link the correct code;
std::cout << "This program cre
"Garrett D'Amore" <[EMAIL PROTECTED]> wrote:
> > - You take care about Bit-ordering (this may be different from Byte-order
> > see Plan 9 compiler...)
> >
>
> Yeah, I don't like to rely on ordering of the bits within the C
> structure. C structures are fine for bit fields used only by
On Thu, Jun 12, 2008 at 04:19:57PM +0200, Joerg Schilling wrote:
> Cdrecord uses bitfields for SCSI structures but as you see from above, you
> definitely need autoconf to get the right definition for the current compile
> platform.
Fortunately this is opensolaris-code and we are talking about
Joerg Schilling wrote:
> James Carlson <[EMAIL PROTECTED]> wrote:
>
>
>> Garrett D'Amore writes:
>>
>>> I have macros like those above, yes. (Although in my code it looks more
>>> like this:)
>>>
>>> #define BIT(x) (1UL << (x))
>>> ...
>>> #define MYMASK BIT(4)
>>>
>> I'm surprised
James Carlson <[EMAIL PROTECTED]> wrote:
> Garrett D'Amore writes:
> > I have macros like those above, yes. (Although in my code it looks more
> > like this:)
> >
> > #define BIT(x) (1UL << (x))
> > ...
> > #define MYMASK BIT(4)
>
> I'm surprised nobody's mentioned C structures with bit fields.
Garrett D'Amore writes:
> I have macros like those above, yes. (Although in my code it looks more
> like this:)
>
> #define BIT(x) (1UL << (x))
> ...
> #define MYMASK BIT(4)
I'm surprised nobody's mentioned C structures with bit fields. I've
used those to good effect on hardware in the past. (
Jason King wrote:
> I'm curious to know if anyone feels if there might be utility in
> providing macros in a header file for defining and manipulating
> bitmasks (analogous to __BIT(x), __BITS(a,b), __SHIFTIN, __SHIFTOUT,
> etc on some of the BSDs)? In some of the driver work I've done, I've
> fou