6. Hexdump
The hexdump(3m) module provides useful debugging functions for printing the contents of memory in standard hex dump format.
6.1. Hexdump functions
The hexdump function
Synopsis
#include <mba/hexdump.h>
void hexdump(FILE *stream, const void *src, size_t n, size_t width);
Description
Print n bytes of memory at src to stream in human readable "hex dump" format that is width columns wide.
000b0: 0c ff 75 e8 e8 9f d5 ff |..u.....|
000b8: ff 8b 45 f0 2b 45 10 c1 |..E.+E..|
000c0: f8 02 8d 65 f4 5b 5e 5f |...e.[^_|
The mbstoax function
Synopsis
#include <mba/hexdump.h>
const char *mbstoax(const char *src, size_t sn, int wn);
Description
Return a printable string that flattens all multibyte sequences into a series of XX hexadecimal codes.
Copyright 2002 Michael B. Allen <mballen@erols.com>