From 9b4d346d7d5831a2db2da9335509bd93b69e0840 Mon Sep 17 00:00:00 2001 From: Tristan Riehs Date: Sun, 5 Jul 2026 18:31:01 +0200 Subject: Outline of "ftag tag edit" Some things are not finished yet, such as the handling of non-utf8 characters in SQL strings. --- src/system.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/system.h') diff --git a/src/system.h b/src/system.h index 1045153..abc7c7f 100644 --- a/src/system.h +++ b/src/system.h @@ -31,4 +31,12 @@ void copy_file_with_encryption(const char *in, const char *out, enum encrypt enc * is non-zero, exit, else return -1. Return 0 on success. */ int ftag_execvp(char *const *cmd, int can_exit); +/* Create a temporary file containing INITIAL_CONTENT and open the editor to + * edit it, then return the edited string. */ +char *edit(const char *initial_content); + +/* Get the content of the open file FD as a heap-allocated string. The offset of + * FD is set to zero as a side effect. */ +char *file_to_string(int fd); + #endif -- cgit v1.2.3