summaryrefslogtreecommitdiffstats
path: root/src/std.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/std.c')
-rw-r--r--src/std.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/std.c b/src/std.c
new file mode 100644
index 0000000..b0cc8a9
--- /dev/null
+++ b/src/std.c
@@ -0,0 +1,18 @@
+#include <stdlib.h>
+#include <assert.h>
+#include <string.h>
+
+#include "std.h"
+
+struct stream* stream_std(const char *args) {
+ struct stream *s;
+
+ s = malloc(sizeof(struct stream));
+ assert(s);
+ memset(s, 0, sizeof(struct stream));
+
+ s->input_fd = 0;
+ s->output_fd = 1;
+
+ return s;
+}