home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_11_11 / allison / bits.h < prev    next >
C/C++ Source or Header  |  1993-09-01  |  645b  |  28 lines

  1. LISTING 6 - Bits Object Interface
  2. /* bits.h:    Large bit sets */
  3.  
  4. #ifndef BITS_H
  5. #define BITS_H
  6.  
  7. #include <stdio.h>
  8.  
  9. typedef struct bits Bits;
  10.  
  11. Bits * bits_create(size_t nbits);
  12. unsigned bits_to_uint(Bits *);
  13. Bits * bits_from_uint(Bits *, unsigned);
  14. Bits * bits_set(Bits *, size_t bit);
  15. Bits * bits_set_all(Bits *);
  16. Bits * bits_reset(Bits *, size_t bit);
  17. Bits * bits_reset_all(Bits *);
  18. Bits * bits_toggle(Bits *, size_t bit);
  19. Bits * bits_toggle_all(Bits *);
  20. int bits_test(Bits *, size_t bit);
  21. int bits_any(Bits *);
  22. size_t bits_count(Bits *);
  23. Bits * bits_put(Bits *, FILE *);
  24. Bits * bits_get(Bits *, FILE *);
  25. void bits_destroy(Bits *);
  26.  
  27. #endif
  28.