tinyxxd

Drop-in replacement and standalone version of the hex dump utility that comes with ViM

OTHER License

Stars
19
Committers
5

Bot releases are visible (Hide)

tinyxxd - tinyxxd 1.3.5 Latest Release

Published by xyproto about 2 months ago

  • Dual license tinyxxd under both GPL-2.0-only and MIT (closes #7, thanks @philiptaron, @emilazy, @Ordoviz and @oliverkwebb)
tinyxxd - tinyxxd 1.3.4

Published by xyproto about 2 months ago

  • Update benchmark scripts.
  • Update CI configuration.
  • Update documentation.
  • Add an initial man page (ref #6, thanks @philiptaron).
  • Add AUTHORS.md (ref #7, thanks @philiptaron and @emilazy).
  • Updated README.md (ref #8, thanks @philiptaron).
tinyxxd - tinyxxd 1.3.3

Published by xyproto 5 months ago

  • Use the address senitizer for unit tests + add tests b49cca53833b3f336a5744b88b89ae1d1bbec13c (thanks @Ordoviz)
  • Add tests to the Makefile 3c48309e7de6e44e5262353c9316c322466946c0 (thanks @Ordoviz)
  • Add asterisks to output in autoskip mode (-a), 2204d75eede6ff3b9628202780dbde6f04054a33 (thanks @Ordoviz)
  • Fix bss buffer overflows 8c5cb0f431173ade03b89e779195e146e3eeef86 (thanks @Ordoviz)
  • Fix -a -E -R always behaving incorrectly 27df9896ae95cc8200e80a70cfb5cbacb3d2a577 (thanks @Ordoviz)
  • Use EXIT_FAILURE instead of 1.
  • Update documentation.
tinyxxd - tinyxxd 1.3.2

Published by xyproto 6 months ago

  • Some refactoring.
  • Re-order some if/elseif/else blocks based on the most used execution paths.
  • Declare and initialize buffers in the main function + remove a #define.
  • Add 1 to LLEN only once.
  • Remove the last remaining #define by replacing it with an enum.
  • Add a COLS enum instead of passing it in as an argument to several functions.
  • Add (void) to a function signature so that the program also compiles on macOS.
  • Various changes to benchmarks and tests.
  • Update documentation.
tinyxxd - tinyxxd 1.3.1

Published by xyproto 8 months ago

  • Mark three functions as static inline.
  • Make adjustments to the default CFLAGS in the Makefile.
  • Update the CI configuration and the CI badge in README.md.
tinyxxd - tinyxxd 1.3.0

Published by xyproto 8 months ago

Performance

  • Let colors enabled and ASCII (as opposed to EBCDIC) be the "happy path" that the code is optimized for.
  • Do not check hextype in multiple locations. Check it once in main and then call the right function.
  • Refactor several if-expressions and switches.
  • Mark several functions as inline.
  • Use const for several of the function arguments and variables.
  • Identify performance bottlenecks using Valgrind and kcachegrind.

Code quality

  • Use implicit checks for NULL and 0. (thanks @oliverkwebb).
  • Add missing (void) arguments (thanks @oliverkwebb).
  • Output usage information without using snprintf (thanks @oliverkwebb).
  • Introduce a fflush_or_die and a fflush_fseek_and_putc function.
  • Use an enum for the terminal colors.
  • Use setColor and clearColor instead of colorPrologue and colorEpilogue.
  • Let the ignore variable be a bool instead of an int.
  • Remove unused variables and function arguments.
  • Let a few variables be local instead of global.
  • Rename some functions.

Tooling

  • Add a profile target to the Makefile.
  • Add a benchmark script for Python 3 named bench.py that confirms that the performance is mostly IO-bound, and also outputs a couple of graphs by using gnuplot.
  • Add GitHub action configuration for benchmarking, generating Markdown and graphs and committing the results to the main branch.
  • Move the functionality of the release.sh script into the Makefile, and remove the script.
  • Add support for fuzzing by running make fuzz, by using afl-gcc and afl-fuzz.
tinyxxd - tinyxxd 1.2.0

Published by xyproto 9 months ago

TinyXXD 1.2.0

main.c

  • Remove an unused function call (ref #1, thanks @Harazi).
  • Use a switch instead of if/else in get_ascii_char and get_ebcdic_char .
  • Rename pname to program_name, fpi to input_file and fpo to output_file .
  • Let output_file be global, and use char literals instead of numbers (ref #2, thanks @oliverkwebb).
  • Let the input_file be global.
  • Let the variables COL and LLEN be defines instead of constexpr, to support versions of C before C23.
  • Use booleans instead of ints, whenever possible.
  • Remove the perror_exit function, but let the error_exit have the same functionality if no message is passed in.
  • Define lower_hex_digits and upper_hex_digits separately, rather than having an index number change to indicate lower or upper digits.
  • Call fprintf once when the --help flag is passed in, instead of once per line of output.
  • Remove the conditionalCapitalize function, and move the check for if hex digits should be capitalized outside of the for-loops where it is used.
  • Add an uppercase_hex boolean, for if the -u flag is passed in, and move the check outside of the loops where it is used.

Makefile

  • Add tests.
  • Add a fmt target to the Makefile that calls clang-format and formats the source code.
  • Add -finline-functions to the default flags, and remove the inline keyword from all function declarations.
  • Let make clean also remove *.o.
  • Support macOS.

Various

  • Specifically support C11.
  • Format the source code with clang-format and the WebKit style.
  • Add CI configuration for both Arch Linux and macOS.
  • Update documentation.
tinyxxd - tinyxxd 1.1.0

Published by xyproto 9 months ago

  • Minor changes and performance improvements.
  • New logo.
tinyxxd - tinyxxd 1.0.0

Published by xyproto 9 months ago

  • Create a standalone, GPL2-licensed, better performing, C18 version of the xxd utility that comes with ViM.