summaryrefslogtreecommitdiffstats
path: root/test/drive_grep_proc.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 04:48:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 04:48:35 +0000
commit207df6fc406e81bfeebdff7f404bd242ff3f099f (patch)
treea1a796b056909dd0a04ffec163db9363a8757808 /test/drive_grep_proc.cc
parentReleasing progress-linux version 0.11.2-1~progress7.99u1. (diff)
downloadlnav-207df6fc406e81bfeebdff7f404bd242ff3f099f.tar.xz
lnav-207df6fc406e81bfeebdff7f404bd242ff3f099f.zip
Merging upstream version 0.12.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/drive_grep_proc.cc')
-rw-r--r--test/drive_grep_proc.cc17
1 files changed, 13 insertions, 4 deletions
diff --git a/test/drive_grep_proc.cc b/test/drive_grep_proc.cc
index 4118f43..d90cde4 100644
--- a/test/drive_grep_proc.cc
+++ b/test/drive_grep_proc.cc
@@ -89,7 +89,7 @@ public:
void grep_match(grep_proc<vis_line_t>& gp,
vis_line_t line,
int start,
- int end)
+ int end) override
{
printf("%d:%d:%d\n", (int) line, start, end);
}
@@ -98,12 +98,21 @@ public:
vis_line_t line,
int start,
int end,
- char* capture)
+ const string_fragment& capture) override
{
- fprintf(stderr, "%d(%d:%d)%s\n", (int) line, start, end, capture);
+ fprintf(stderr,
+ "%d(%d:%d)%.*s\n",
+ (int) line,
+ start,
+ end,
+ capture.length(),
+ capture.data());
}
- void grep_end(grep_proc<vis_line_t>& gp) { this->ms_finished = true; }
+ void grep_end(grep_proc<vis_line_t>& gp) override
+ {
+ this->ms_finished = true;
+ }
bool ms_finished;
};