aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-04 18:38:39 +0000
committer_ov4 <ov4@ov4.org>2026-10-04 18:38:39 +0000
commitd97297934dd57e033325abaa2d9e41f389b08f75 (patch)
treeb9c51263fc084df1357b0fd84204f334a1f99409 /include
parentf60cb6c7b365d1a9f18153b1d2fd0cfe5df754e4 (diff)
prepare for pipe
Diffstat (limited to 'include')
-rw-r--r--include/eval.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/include/eval.h b/include/eval.h
index 00f466a..c93d346 100644
--- a/include/eval.h
+++ b/include/eval.h
@@ -5,9 +5,22 @@
namespace ov4
{
+
+struct T_pipe
+{
+ enum class T_pipe_type
+ {
+ NOT_PIPE,
+ WRITE_PIPE,
+ READ_PIPE,
+ };
+ T_pipe_type pipe_type = NOT_PIPE;
+ int fd = -1;
+} T_pipe_not_pipe;
+
int eval_exe(const std::string &s, bool is_async);
-int eval_exe(const std::string &s, bool is_async, const T_lexer *lexer_instance, size_t i);
-int eval_tree_cd(size_t i, const T_lexer &lexer_instance, bool inside_subshell);
+int eval_exe(const std::string &s, bool is_async, const T_lexer *lexer_instance, size_t i, const T_pipe &pi = T_pipe_not_pipe);
+int eval_tree_cd(size_t i, const T_lexer &lexer_instance, bool inside_subshell, T_pipe pi = T_pipe_not_pipe);
void eval(char *cmdline);
void eval_err(int err);