hexio.h 405 B

12345678910111213141516
  1. #include "bit_array.h"
  2. #ifndef HEX_IO_H
  3. #define HEX_IO_H
  4. #define HEXCHUNKSZ 32
  5. #define HEXCHARSZ 8
  6. #define CHUNK_MASK ((1ULL << HEXCHUNKSZ) - 1)
  7. #define HOW_MANY(x, y) (((x) + (y) - 1) / (y))
  8. #ifndef MAX
  9. #define MAX(x,y) ((x) > (y) ? (x) : (y))
  10. #endif
  11. int bitmask_scnprintf(char *buf, size_t buflen, const BIT_ARRAY *bmp);
  12. int bitmask_parse_user(const char *buf, size_t buflen, BIT_ARRAY *bmp);
  13. #endif