clr32bitmap.c 736 B

12345678910111213141516171819202122232425262728293031
  1. /*====================================================================*
  2. *
  3. * void clr32bitmap (uint32_t * map, unsigned bit);
  4. *
  5. * flags.h
  6. *
  7. * clear the given bit in an 32-bit flagword array; macro _bits ()
  8. * is defined in flags.h;
  9. *
  10. * Motley Tools by Charles Maier;
  11. * Copyright (c) 2001-2006 by Charles Maier Associates;
  12. * Licensed under the Internet Software Consortium License;
  13. *
  14. *--------------------------------------------------------------------*/
  15. #ifndef CLR32BITMAP_SOURCE
  16. #define CLR32BITMAP_SOURCE
  17. #include "../tools/flags.h"
  18. #include "../tools/endian.h"
  19. void clr32bitmap (uint32_t * map, unsigned bit)
  20. {
  21. map [bit / _bits (* map)] &= ~ HTOLE32 (1 << (bit % _bits (* map)));
  22. return;
  23. }
  24. #endif