aboutsummaryrefslogtreecommitdiffstats
path: root/io/fputs.c
diff options
context:
space:
mode:
Diffstat (limited to 'io/fputs.c')
-rw-r--r--io/fputs.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/io/fputs.c b/io/fputs.c
new file mode 100644
index 0000000..f121253
--- /dev/null
+++ b/io/fputs.c
@@ -0,0 +1,11 @@
+#include "io.h"
+#include <errno.h>
+
+int fputs(char const *restrict string, FILE *restrict stream)
+{
+
+ for (size_t i = 0; string[i]; ++i) {
+ if(_fputc_wrap(string[i], stream)==_eof_wrap){return _eof_wrap;};
+ }
+ return 0;
+}