== DEPENDENCIES ==

None, except that the Lua module requires headers from Lua 5.1, Lua 5.2, or
LuaJIT.

The source is mostly C99 compliant. The library uses POSIX _setjmp/_longjmp
instead of C99 setjmp/longjmp. The command-line utility uses POSIX
getopt(3).

The Makefile requires GNU Make, however, so it can introspect the
compilation environment. (GNU Make, Solaris Make, and the various BSD Make
implementations all support shell command expansion in macros differently.)


== BUILDING ==

There are three build targets defined in the included Makefile, but no
install targets, yet.

o hexdump - Command-line utility substantially like BSD hexdump(1). main()
        is built with -DHEXDUMP_MAIN.

o libhexdump.so - Dynamic library.

o hexdump.so - Lua module. The Lua interfaces are built with
        -DHEXDUMP_LUALIB.

There's no reason you couldn't just plop hexdump.c and hexdump.h into your
own project, and that's how I use the library. Neither of the two source
files will ever be split up.


== USAGE ==

See hexdump.h for some documentation. The most concise example of usage of
the C API can be found in hxdL_apply() in hexdump.c. Just ignore the parts
where the context object is cached. Also see main().


== EXTENSIONS ==

o Explicit byte order support. By default the native byte order is used when
  loading multibyte words. Currently only big-endian and little-endian is
  supported, however.

o 3-octet-word conversions. BSD hexdump(1) only supports loading of 1-, 2-,
  and 4-octet words. In the future I'd also like to support up to 16-octet
  words, which would help debug more complex protocols, like some Microsoft
  protocols which are fond of such objects as 16-byte, little-endian UUIDs.
  Maybe binary words, too.


== BUGS ==

o No floating point support. In particular, no %E, %e, %f, %G, or %g
  conversions.

o No %_A[dox] conversions. %_a[dox] works fine, however.

o No implicit looping of trailing units to consume the remainder of
  a block. Instead of

  	"%08.8_ax  " 8/1 "%02x " "  " 8/1 "%02x "
  	"  |" "%_p" "|\n"

  you must write

  	"%08.8_ax  " 8/1 "%02x " "  " 8/1 "%02x "
  	"  |" 16 "%_p" "|\n"

  Note the additional loop specification, "16", in the second format block.

o Unlike hexdump(1), runs of identical blocks are not skipped by default.
  There's no configuration option to change this, yet, either.

o No locale support for %_c and %_p, although I consider this a feature.
  For equivalent hexdump(1) output you need to do `env LANG=C hexdump ...`.

