From 1bc9fd5fe14a60db861fb317f731a5e27e857bf3 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 28 Mar 2021 21:04:48 +0200 Subject: extract: add extract_finish_wide(), and optionally skip stripping trailing empty cells extract_finish() returns the extracted text in UTF-8, while extract_finish_wide() returns the extracted text in Unicode. This patch also adds a new argument to extract_finish{,_wide}, that when set to true, skips stripping trailing empty cells. --- extract.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'extract.h') diff --git a/extract.h b/extract.h index 0b3693d2..879461cf 100644 --- a/extract.h +++ b/extract.h @@ -2,6 +2,7 @@ #include #include +#include #include "terminal.h" @@ -14,4 +15,8 @@ bool extract_one( int col, void *context); bool extract_finish( - struct extraction_context *context, char **text, size_t *len); + struct extraction_context *context, bool strip_trailing_empty, + char **text, size_t *len); +bool extract_finish_wide( + struct extraction_context *context, bool strip_trailing_empty, + wchar_t **text, size_t *len); -- cgit v1.3