home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / C / WINCLIP / BSTRING.H < prev    next >
Text File  |  1993-12-01  |  844b  |  34 lines

  1. /***   BSTRING.H  ***/
  2. /* Written By P.A. McKenzie
  3.  * The C Window Library
  4.  * Copyright (C) 1990   All Rights Reserved
  5. */
  6.  
  7. #ifndef BIT_STRING_DEF
  8. #define BIT_STRING_DEF
  9. #undef  PROTO_DEF
  10. #include "proto.h"
  11.  
  12. typedef struct
  13. {
  14.   unsigned char *bit_string;
  15.   unsigned nbits;
  16. } BITSTRING;
  17.  
  18. #define clear_bits(b,s,e)      set_clear_bits((b),(s),(e),0)
  19. #define set_bits(b,s,e)        set_clear_bits((b),(s),(e),1)
  20.  
  21. #if __cplusplus
  22.   extern "C" {
  23. #endif
  24. int          create_bit_string P((BITSTRING *, unsigned));
  25. void         free_bit_string P((BITSTRING *));
  26. void         set_clear_bits P((BITSTRING *, unsigned, unsigned, int));
  27. unsigned     get_bits_set P((BITSTRING *));
  28. int          test_bit P((BITSTRING *, unsigned));
  29. unsigned     get_first_bit_set P((BITSTRING *, unsigned));
  30. #if __cplusplus
  31.   }
  32. #endif
  33. #endif
  34.