From 9386c1f2519abd8b4351fc97419c41182389a1f6 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Tue, 9 Jul 2024 23:41:48 +0530 Subject: util/vpopen: support for reading stderr --- include/util.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/util.h') diff --git a/include/util.h b/include/util.h index 7c15354..1ffe148 100644 --- a/include/util.h +++ b/include/util.h @@ -13,7 +13,13 @@ (cur) = (next); \ } +typedef enum { + VPOPEN_STDERR, + VPOPEN_STDOUT +} vpopen_t; + +int vpopen(FILE **stream, const char *file, char *const argv[], vpopen_t type); + int json_streaming_read(FILE *stream, cJSON **json); -int vpopen(FILE **stream, const char *file, char *const argv[]); int atob(const char *s); int run(const char *file, char *argv[]); -- cgit v1.2.3