59c5470ade
Tweak default visibility settings
2024-05-28 01:56:13 -04:00
8041d3047c
Bugfix for slash-normalization in filenames
2024-02-04 21:04:43 -05:00
6235f81a3f
Slightly normalize file paths to strip //
2023-08-26 17:55:26 -04:00
372eb2647f
Added a column getter
2022-11-03 12:55:01 -04:00
17c90ebe52
Bugfix for empty files and cleanup since memchr is doing good work
2021-09-25 01:32:31 -07:00
b00fc15125
Removed file_err() and file_printf() in favor of just inlining some of
...
the error assertion code. Also eliminated most of the spoof_file() calls
in favor of just using command line arguments directly.
2021-09-24 23:49:22 -07:00
04eb92153f
WIP
2021-09-23 17:31:21 -07:00
8e1e6572fe
Moved type defs into their own files instead of types.h
2021-09-23 15:15:48 -07:00
90c3c13a02
Moving cache logic into match, cleaner next_match() API, and slightly
...
less tightly coupled UTF8 API
2021-09-21 18:45:43 -07:00
393778ffab
Shortening \033[0m -> \033[m
2021-09-07 13:39:11 -07:00
f8860c385e
Style change: added cino=:0 (i.e. case statements on same indentation as
...
switch). Also fixed issue where $$ would fail to match with trailing
newline on file
2021-08-28 16:05:30 -07:00
ac2e8f5a15
Improved, cleaner/faster/more flexible return value checks
2021-08-06 17:52:20 -07:00
860a03d29c
File refactor for cleaner cleanup with allocated/mmapped storage, also a
...
bit of general cleanup
2021-08-01 16:06:10 -07:00
0b2de4721f
Moved caching code onto the file, which fixed an issue with file slicing
...
having stale cache values.
2021-08-01 15:36:53 -07:00
18e8a131f5
xfree() -> delete()
2021-07-30 15:06:04 -07:00
3e63da180b
Cleaner checking of stdlib negative returns
2021-07-30 15:03:21 -07:00
33a63bb8d9
Improved error checking
2021-07-30 14:54:28 -07:00
3445982b16
Ergonomic improvement: xcalloc -> new(), xrealloc -> grow()
2021-07-30 14:44:00 -07:00
bc813df3d7
Tweaks and optimizations
2021-07-29 12:45:37 -07:00
26b683ca74
Bugfix for NULL bytes in text
2021-07-15 21:19:34 -07:00
a67a257044
Fix compiler warning nits
2021-05-31 12:56:49 -07:00
cd719c1477
Tweaks to line-specific search
2021-05-21 00:22:05 -07:00
219f62ed3f
Renamed file_t.contents -> file_t.start, added file_t.memory for
...
canonical tracking of memory for mmap, simplified json printing,
and added support for initiating searches on a specific line (and/or
column).
2021-05-20 18:31:28 -07:00
529ff8fb4f
Bugfix for error printing
2021-05-10 21:40:44 -07:00
f1499c9a63
Fix for being unable to match patterns on zero-length files (or at the
...
end of a file)
2021-03-15 18:29:04 -07:00
ced0004c87
Fix for permissions/ownership getting screwed up with inplace modifying
...
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-03-03 17:24:23 -08:00
de0fec8fcb
Removed check() and replaced with err()/errx()
2021-01-26 17:54:23 -08:00
16c401fbbb
Simplified code by disallowing escapes in strings and splitting
...
stringpatterns into chunks (so unescaped versions don't need to be
created)
2021-01-19 21:35:34 -08:00
b8bb6c25ec
Finally got around to implementing binary search for line numbers
2021-01-18 15:24:10 -08:00
ac51181f34
Removed dead code for interning files (no longer needed since temp file
...
change)
2021-01-18 13:06:25 -08:00
97cf726442
More bools
2021-01-18 11:53:37 -08:00
0b0e99bfac
A few more pedantic cleanups
2021-01-18 11:28:39 -08:00
46f1747947
More static analyzer cleanup
2021-01-18 10:47:20 -08:00
eece8c8556
More static analyzer cleanup, including switching to use bools where
...
appropriate and EXIT_SUCESS/EXIT_FAILURE
2021-01-18 10:30:17 -08:00
7f0c3804dc
Checking more return values (per static analyzer)
2021-01-18 09:52:35 -08:00
3ededef53d
Static analysis part 1
2021-01-18 09:15:25 -08:00
2615a3b9f2
Hacky fix for tabs misaligning error printing
2021-01-18 00:32:39 -08:00
dfdc7bf94a
Fixed error printing code
2021-01-18 00:14:01 -08:00
f92dc5514d
Updated comment
2021-01-17 18:13:00 -08:00
c6dd967c70
Fixed two bugs: mmapped files weren't getting closed, and filenames with
...
%s-style formatting strings caused issues.
2021-01-17 18:06:00 -08:00
a2f30332cc
Sorting imports
2021-01-15 19:44:16 -08:00
77b33d6a3c
Renaming files: printing->print, file_loader->files
2021-01-15 19:27:25 -08:00