Repository navigation
v0.3.3
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
-cis 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.
- Matching lines are now printed by default (unless
- Added a new example demonstrating line printing output to
README.md.
Fixed
- Corrected the
make testtarget in the Makefile to ensure proper dependencies, compilation flags (-DTESTING), and linking for the test executable.
Changed
- Limitation: Line printing (when
-cis not specified) now forces single-threaded execution for file searches to ensure correct output ordering and highlighting. A warning is issued if-tis used in this mode. Multi-threaded line printing may be implemented in a future release. - Updated version number to
0.3.3in 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_tstructure. 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.