Date: Wed, 3 Feb 1999 21:42:52 -0500 (EST) From: Daniel Reed To: djgpp AT delorie DOT com Subject: Re: Re[2]: what is wrong with this? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Wed, 3 Feb 1999, Daniel Reed wrote: ) On Wed, 3 Feb 1999, anarko wrote: ) ) RBIT(c,b) resets bit 'b' in char c ) To turn the b bit in byte c off, use: ) #define RBIT(c,b) ((c) &= ~(b)) Okay, I'm dumb. In my RBIT(), you specify the bit to turn off via its value, not by its position. #define RBIT(c,b) ((c) &= ~(1 << b)) should turn off bits by position. ) To turn the b bit in byte c on, use: ) #define SBIT(c,b) ((c) |= (b)) #define SBIT(c,b) ((c) |= (1 << b)) -- Daniel Reed I personally think we developed language because of our deep inner need to complain. -- Jane Wagner