home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre3.z / postgre3 / src / lib / H / tmp / bit.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-27  |  1.3 KB  |  83 lines

  1. /*
  2.  * bit.h --
  3.  *    Standard bit array definitions.
  4.  *
  5.  * Identification:
  6.  *    $Header: /private/postgres/src/lib/H/tmp/RCS/bit.h,v 1.5 1990/08/17 08:54:35 cimarron Exp $
  7.  */
  8.  
  9. #ifndef    BitIncluded    /* Include this file only once. */
  10. #define BitIncluded    1
  11.  
  12. #include "tmp/c.h"
  13.  
  14. typedef bits8    *BitArray;
  15. typedef uint32    BitIndex;
  16.  
  17. #define BitsPerByte    8
  18.  
  19. /*
  20.  * NumberOfBitsPerByte --
  21.  *    Returns the number of bits per byte.
  22.  */
  23. int
  24. NumberOfBitsPerByte ARGS((
  25.     void
  26. ));
  27.  
  28. /*
  29.  * BitArraySetBit --
  30.  *    Sets (to 1) the value of a bit in a bit array.
  31.  */
  32. void
  33. BitArraySetBit ARGS((
  34.     BitArray    bitArray,
  35.     BitIndex    bitIndex
  36. ));
  37.  
  38. /*
  39.  * BitArrayClearBit --
  40.  *    Clears (to 0) the value of a bit in a bit array.
  41.  */
  42. void
  43. BitArrayClearBit ARGS((
  44.     BitArray    bitArray,
  45.     BitIndex    bitIndex
  46. ));
  47.  
  48. /*
  49.  * BitArrayBitIsSet --
  50.  *    True iff the bit is set (1) in a bit array.
  51.  */
  52. bool
  53. BitArrayBitIsSet ARGS((
  54.     BitArray    bitArray,
  55.     BitIndex    bitIndex
  56. ));
  57.  
  58. /*
  59.  * BitArrayCopy --
  60.  *    Copys the contents of one bit array into another.
  61.  */
  62. void
  63. BitArrayCopy ARGS((
  64.     BitArray    fromBitArray,
  65.     BitArray    toBitArray,
  66.     BitIndex    fromBitIndex,
  67.     BitIndex    toBitIndex,
  68.     BitIndex    numberOfBits
  69. ));
  70.  
  71. /*
  72.  * BitArrayZero --
  73.  *    Zeros the contents of a bit array.
  74.  */
  75. void
  76. BitArrayZero ARGS((
  77.     BitArray    bitArray,
  78.     BitIndex    bitIndex,
  79.     BitIndex    numberOfBits
  80. ));
  81.  
  82. #endif    /* !defined(BitIncluded) */
  83.