sift_utils.cc 356 B

12345678910111213141516171819
  1. #include "sift_utils.h"
  2. #include "sift_format.h"
  3. #include <cstdio>
  4. void Sift::hexdump(const void * __data, uint32_t size)
  5. {
  6. unsigned char *data = (unsigned char *)__data;
  7. printf("(%d) ", size);
  8. for(unsigned int i = 0; i < size; ++i)
  9. {
  10. if (data[i])
  11. printf("%02x ", data[i]);
  12. else
  13. printf(".. ");
  14. }
  15. printf("\n");
  16. }