Hex.c 510 B

123456789101112131415
  1. /* -*- mode:c; c-file-style:"k&r"; c-basic-offset: 4; tab-width:4; indent-tabs-mode:nil; mode:auto-fill; fill-column:78; -*- */
  2. /* vim: set ts=4 sw=4 et tw=78 fo=cqt wm=0: */
  3. #include "pal.h"
  4. #include "pal_debug.h"
  5. #include "api.h"
  6. #include "hex.h"
  7. int main() {
  8. char x[] = {0xde, 0xad, 0xbe, 0xef};
  9. char y[] = {0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd};
  10. pal_printf("Hex test 1 is %s\n", alloca_bytes2hexstr(x));
  11. pal_printf("Hex test 2 is %s\n", alloca_bytes2hexstr(y));
  12. return 0;
  13. }