summaryrefslogtreecommitdiff
path: root/klibc/klibc/fputs.c
diff options
context:
space:
mode:
Diffstat (limited to 'klibc/klibc/fputs.c')
-rw-r--r--klibc/klibc/fputs.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/klibc/klibc/fputs.c b/klibc/klibc/fputs.c
new file mode 100644
index 0000000000..4b68f96886
--- /dev/null
+++ b/klibc/klibc/fputs.c
@@ -0,0 +1,15 @@
+/*
+ * fputs.c
+ *
+ * This isn't quite fputs() in the stdio sense, since we don't
+ * have stdio, but it takes a file descriptor argument instead
+ * of the FILE *.
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+int fputs(const char *s, FILE *file)
+{
+ return _fwrite(s, strlen(s), file);
+}