diff options
| author | Tristan Riehs <tristan.riehs@inria.fr> | 2026-07-05 18:31:01 +0200 |
|---|---|---|
| committer | Tristan Riehs <tristan.riehs@inria.fr> | 2026-07-05 18:31:16 +0200 |
| commit | 9b4d346d7d5831a2db2da9335509bd93b69e0840 (patch) | |
| tree | 710ba2b6a286efa941052242e4f7b8d5253be993 /src/system.h | |
| parent | 430bca8a0f166df268e2fa8fb207286640bd0602 (diff) | |
Outline of "ftag tag edit"
Some things are not finished yet, such as the handling of non-utf8
characters in SQL strings.
Diffstat (limited to 'src/system.h')
| -rw-r--r-- | src/system.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 |
