aboutsummaryrefslogtreecommitdiff
path: root/vis.h
diff options
context:
space:
mode:
Diffstat (limited to 'vis.h')
-rw-r--r--vis.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/vis.h b/vis.h
index ab7eade..0b819a9 100644
--- a/vis.h
+++ b/vis.h
@@ -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. */