/*
* ci_io.c - Primitive OF based IO function for libclite.
*
- * Copyright (c) 1998-2000 Apple Computer, Inc.
+ * Copyright (c) 1998-2002 Apple Computer, Inc.
*
* DRI: Josh de Cesare
*/
#include <sl_words.h>
#include <libclite.h>
-void putchar(int ch)
+int putchar(int ch)
{
- if ((ch == '\r') || (ch == '\n')) CallMethod_0_0(SLWordsIH, "slw_cr");
- else CallMethod_1_0(SLWordsIH, "slw_emit", ch);
+ if ((ch == '\r') || (ch == '\n')) CallMethod(0, 0, SLWordsIH, "slw_cr");
+ else CallMethod(1, 0, SLWordsIH, "slw_emit", ch);
+
+ return ch;
+}
+
+int puts(const char *str)
+{
+ while (*str != '\0')
+ putchar(*str++);
+
+ putchar('\n');
+
+ return 0;
}