Skip to content

v0.3.3

Choose a tag to compare

@davidesantangelo davidesantangelo released this 02 Apr 13:52
· 97 commits to main since this release

This release introduces line printing with highlighting and fixes the build process for tests.

Added

  • Implemented line printing functionality, similar to grep's default behavior.
    • Matching lines are now printed by default (unless -c is used).
    • Output includes filename prefixes for file searches.
    • Matched text within lines is highlighted using ANSI colors when outputting to a TTY. Color is automatically disabled when using -c.
  • Added a new example demonstrating line printing output to README.md.

Fixed

  • Corrected the make test target in the Makefile to ensure proper dependencies, compilation flags (-DTESTING), and linking for the test executable.

Changed

  • Limitation: Line printing (when -c is not specified) now forces single-threaded execution for file searches to ensure correct output ordering and highlighting. A warning is issued if -t is used in this mode. Multi-threaded line printing may be implemented in a future release.
  • Updated version number to 0.3.3 in Makefile, README.md, and source code comments/headers.

Internal

  • Refactored all core search algorithms (Boyer-Moore-Horspool, KMP, Rabin-Karp, Regex, SIMD fallbacks) to optionally track detailed match positions (start and end offsets) using a match_result_t structure. This was necessary to enable line printing and highlighting.
  • Adapted the test suite (test/) to use compatibility wrappers, allowing existing tests to function correctly despite changes to internal search function signatures.