aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-18 09:42:45 +0000
committer_ov4 <ov4@ov4.org>2026-10-18 09:42:45 +0000
commitc8479ceff6aea37def538c902324c68930947f21 (patch)
tree815cbb6043da08495c51e5ad30c7238c6f5573be /include
parent53784946192225525a269423a3bdf65d1e9ea326 (diff)
add self pipe, and non-block-input
Diffstat (limited to 'include')
-rw-r--r--include/error.h3
-rw-r--r--include/pipe.h9
-rw-r--r--include/util/non_block_input.h8
3 files changed, 20 insertions, 0 deletions
diff --git a/include/error.h b/include/error.h
index 50ca23e..ec0bffe 100644
--- a/include/error.h
+++ b/include/error.h
@@ -26,6 +26,9 @@ enum class error_code
FILE_OFLAG_ERROR,
FILE_POINTER_FAIL_TO_OPEN,
+ // pipe
+ FAIL_TO_OPEN_PIPE,
+
};
class T_error : public std::runtime_error {
diff --git a/include/pipe.h b/include/pipe.h
new file mode 100644
index 0000000..e7d7b67
--- /dev/null
+++ b/include/pipe.h
@@ -0,0 +1,9 @@
+#pragma once
+
+
+namespace ov4
+{
+
+inline int self_pipe_fd[2] = {-1, -1};
+
+} \ No newline at end of file
diff --git a/include/util/non_block_input.h b/include/util/non_block_input.h
new file mode 100644
index 0000000..f5937a7
--- /dev/null
+++ b/include/util/non_block_input.h
@@ -0,0 +1,8 @@
+#pragma once
+
+namespace pv4
+{
+
+int non_block_read_char(char *c, int *src = nullptr);
+
+} \ No newline at end of file