aboutsummaryrefslogtreecommitdiff
path: root/files.c
AgeCommit message (Collapse)Author
2021-09-25Bugfix for empty files and cleanup since memchr is doing good workBruce Hill
2021-09-24Removed file_err() and file_printf() in favor of just inlining some ofBruce Hill
the error assertion code. Also eliminated most of the spoof_file() calls in favor of just using command line arguments directly.
2021-09-23WIPBruce Hill
2021-09-23Moved type defs into their own files instead of types.hBruce Hill
2021-09-21Moving cache logic into match, cleaner next_match() API, and slightlyBruce Hill
less tightly coupled UTF8 API
2021-09-07Shortening \033[0m -> \033[mBruce Hill
2021-08-28Style change: added cino=:0 (i.e. case statements on same indentation asBruce Hill
switch). Also fixed issue where $$ would fail to match with trailing newline on file
2021-08-06Improved, cleaner/faster/more flexible return value checksBruce Hill
2021-08-01File refactor for cleaner cleanup with allocated/mmapped storage, also aBruce Hill
bit of general cleanup
2021-08-01Moved caching code onto the file, which fixed an issue with file slicingBruce Hill
having stale cache values.
2021-07-30xfree() -> delete()Bruce Hill
2021-07-30Cleaner checking of stdlib negative returnsBruce Hill
2021-07-30Improved error checkingBruce Hill
2021-07-30Ergonomic improvement: xcalloc -> new(), xrealloc -> grow()Bruce Hill
2021-07-29Tweaks and optimizationsBruce Hill
2021-07-15Bugfix for NULL bytes in textBruce Hill
2021-05-31Fix compiler warning nitsBruce Hill
2021-05-21Tweaks to line-specific searchBruce Hill
2021-05-20Renamed file_t.contents -> file_t.start, added file_t.memory forBruce Hill
canonical tracking of memory for mmap, simplified json printing, and added support for initiating searches on a specific line (and/or column).
2021-05-10Bugfix for error printingBruce Hill
2021-03-15Fix for being unable to match patterns on zero-length files (or at theBruce Hill
end of a file)
2021-03-03Fix for permissions/ownership getting screwed up with inplace modifyingBruce Hill
of files. With the new change, temporary files are no longer created on the filesystem and the file is entirely modified inplace (with an in-memory copy kept on hand for matching).
2021-01-26Removed check() and replaced with err()/errx()Bruce Hill
2021-01-19Simplified code by disallowing escapes in strings and splittingBruce Hill
stringpatterns into chunks (so unescaped versions don't need to be created)
2021-01-18Finally got around to implementing binary search for line numbersBruce Hill
2021-01-18Removed dead code for interning files (no longer needed since temp fileBruce Hill
change)
2021-01-18More boolsBruce Hill
2021-01-18A few more pedantic cleanupsBruce Hill
2021-01-18More static analyzer cleanupBruce Hill
2021-01-18More static analyzer cleanup, including switching to use bools whereBruce Hill
appropriate and EXIT_SUCESS/EXIT_FAILURE
2021-01-18Checking more return values (per static analyzer)Bruce Hill
2021-01-18Static analysis part 1Bruce Hill
2021-01-18Hacky fix for tabs misaligning error printingBruce Hill
2021-01-18Fixed error printing codeBruce Hill
2021-01-17Updated commentBruce Hill
2021-01-17Fixed two bugs: mmapped files weren't getting closed, and filenames withBruce Hill
%s-style formatting strings caused issues.
2021-01-15Sorting importsBruce Hill
2021-01-15Renaming files: printing->print, file_loader->filesBruce Hill