summaryrefslogtreecommitdiff
path: root/include/io/std.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-06-26 22:51:27 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-07-08 19:17:35 +0200
commit359d71e90050a8b83f7bc7d2ecd4ff29c477cc22 (patch)
treedf2b7a585b78e6776446d4ca9be62a22db27f0a7 /include/io/std.h
parent2087cc237cd0fe1ed29ebf891648bacb46f4833b (diff)
Cleanup: rename libfstream to libio, split headers
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/io/std.h')
-rw-r--r--include/io/std.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/include/io/std.h b/include/io/std.h
new file mode 100644
index 0000000..805bebd
--- /dev/null
+++ b/include/io/std.h
@@ -0,0 +1,39 @@
+/* SPDX-License-Identifier: GPL-3.0-or-later */
+/*
+ * std.h
+ *
+ * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
+ */
+#ifndef IO_STD_H
+#define IO_STD_H
+
+#include "io/istream.h"
+#include "io/ostream.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Create an input stream that reads from standard input.
+ *
+ * @memberof istream_t
+ *
+ * @return A pointer to an input stream on success, NULL on failure.
+ */
+SQFS_INTERNAL istream_t *istream_open_stdin(void);
+
+/**
+ * @brief Create an output stream that writes to standard output.
+ *
+ * @memberof ostream_t
+ *
+ * @return A pointer to an output stream on success, NULL on failure.
+ */
+SQFS_INTERNAL ostream_t *ostream_open_stdout(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IO_STD_H */