crblib/lbitio.c
/*
 *  FlushWrite sticks remaining bits into BitArray
 *  must be called before writing BitArray
 *  returns length of array to write
 *
 */
FlushWrite sticks remaining bits into BitArray
must be called before writing BitArray
returns length of array to write
FlushWrite sticks remaining bits into BitArray must be called before writing BitArray returns length of array to write
long LBitIO_FlushWrite(struct LBitIOInfo * BII)
{
BII->BitBuffer <<= BII->BitsToGo;
while ( BII->BitsToGo < 32 )
	{
	*BII->BitArrayPtr++ = BII->BitBuffer>>24;
	BII->BitBuffer <<= 8;
	BII->BitsToGo += 8;
	}
BII->BitsToGo = 32;
BII->BitBuffer = 0;
return( (long)( BII->BitArrayPtr - BII->BitArray ) );
}
long LBitIO_FlushWrite ( struct LBitIOInfo * BII ) { BII -> BitBuffer <<= BII -> BitsToGo ; while ( BII -> BitsToGo < 32 ) { * BII -> BitArrayPtr ++ = BII -> BitBuffer >> 24 ; BII -> BitBuffer <<= 8 ; BII -> BitsToGo += 8 ; } BII -> BitsToGo = 32 ; BII -> BitBuffer = 0 ; return ( ( long ) ( BII -> BitArrayPtr - BII -> BitArray ) ) ; }
FlushWrite sticks remaining bits into BitArray
  must be called before writing BitArray
  returns length of array to write
FlushWrite sticks remaining bits into BitArray must be called before writing BitArray returns length of array to write
/* keep going, if you like */