mirror of
https://github.com/postgres/postgres.git
synced 2025-08-24 09:27:52 +03:00
Massive commit to run PGINDENT on all *.c and *.h files.
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* bit.c--
|
||||
* Standard bit array code.
|
||||
* Standard bit array code.
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/lib/Attic/bit.c,v 1.4 1996/11/06 08:27:09 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/lib/Attic/bit.c,v 1.5 1997/09/07 04:41:54 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -22,27 +22,26 @@
|
||||
|
||||
void
|
||||
BitArraySetBit(BitArray bitArray, BitIndex bitIndex)
|
||||
{
|
||||
bitArray[bitIndex/BitsPerByte]
|
||||
{
|
||||
bitArray[bitIndex / BitsPerByte]
|
||||
|= (1 << (BitsPerByte - (bitIndex % BitsPerByte) - 1));
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
BitArrayClearBit(BitArray bitArray, BitIndex bitIndex)
|
||||
{
|
||||
bitArray[bitIndex/BitsPerByte]
|
||||
bitArray[bitIndex / BitsPerByte]
|
||||
&= ~(1 << (BitsPerByte - (bitIndex % BitsPerByte) - 1));
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
bool
|
||||
BitArrayBitIsSet(BitArray bitArray, BitIndex bitIndex)
|
||||
{
|
||||
return( (bool) (((bitArray[bitIndex / BitsPerByte] &
|
||||
(1 << (BitsPerByte - (bitIndex % BitsPerByte)
|
||||
- 1)
|
||||
)
|
||||
) != 0 ) ? 1 : 0) );
|
||||
{
|
||||
return ((bool) (((bitArray[bitIndex / BitsPerByte] &
|
||||
(1 << (BitsPerByte - (bitIndex % BitsPerByte)
|
||||
- 1)
|
||||
)
|
||||
) != 0) ? 1 : 0));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user