Skip to content

tinyxxd 1.2.0

Choose a tag to compare

@xyproto xyproto released this 01 Feb 12:02
· 662 commits to main since this release

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.