diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-05-17 18:06:13 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-05-18 15:07:02 +0200 |
| commit | 826be3072ad3ce475ea39d80e5a6606a896d98c2 (patch) | |
| tree | 3e93b11649540e37877ccbfd6881f1bc748862ce /vis.h | |
| parent | 39b306f235f3faebb047c7cda82746781b9ea2f2 (diff) | |
| download | vis-826be3072ad3ce475ea39d80e5a6606a896d98c2.tar.gz vis-826be3072ad3ce475ea39d80e5a6606a896d98c2.tar.xz | |
vis: introduce vis_pipe_collect utility function
Diffstat (limited to 'vis.h')
| -rw-r--r-- | vis.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -422,6 +422,11 @@ int vis_pipe(Vis *vis, Filerange *range, const char *argv[], void *stdout_context, ssize_t (*read_stdout)(void *stdout_context, char *data, size_t len), void *stderr_context, ssize_t (*read_stderr)(void *stderr_context, char *data, size_t len)); +/* pipe a range to an external application, return its exit status and store + * everything that is written to stdout/stderr in the gitven char pointers + * which have to be free(3)-ed by the caller */ +int vis_pipe_collect(Vis *vis, Filerange *range, const char *argv[], char **out, char **err); + /* given the start of a key, returns a pointer to the start of the one immediately * following as will be processed by the input system. skips over special keys * such as <Enter> as well as pseudo keys registered via vis_action_register. */ |
