summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/putchar.c2
-rw-r--r--util/putchar.h32
-rw-r--r--util/puts.c3
3 files changed, 37 insertions, 0 deletions
diff --git a/util/putchar.c b/util/putchar.c
index e349d208..6f8e18ea 100644
--- a/util/putchar.c
+++ b/util/putchar.c
@@ -21,6 +21,8 @@
* Author: Bryan Ford, University of Utah CSL
*/
+#include <device/cons.h>
+
int putchar(int c)
{
cnputc(c);
diff --git a/util/putchar.h b/util/putchar.h
new file mode 100644
index 00000000..2e65bd56
--- /dev/null
+++ b/util/putchar.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2008 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Author: Barry deFreese.
+ */
+/*
+ * Simple putchar implementation header.
+ *
+ */
+
+#ifndef _PUTCHAR_H_
+#define _PUTCHAR_H_
+
+#include <mach/std_types.h>
+
+extern int putchar(int c);
+
+#endif /* _PUTCHAR_H_ */
diff --git a/util/puts.c b/util/puts.c
index c0eec03e..0bd72e98 100644
--- a/util/puts.c
+++ b/util/puts.c
@@ -21,6 +21,9 @@
* Author: Bryan Ford, University of Utah CSL
*/
+#include <device/cons.h>
+#include <util/putchar.h>
+
/* Simple puts() implementation that just uses putchar().
Note that our libc's printf() is implemented
in terms of only puts() and putchar(), so that's all we need. */