summaryrefslogtreecommitdiff
path: root/kern/printf.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-04-29 21:52:54 +0200
committerRichard Braun <rbraun@sceen.net>2017-04-29 21:52:54 +0200
commitd78a948f0a1d8b7b3385944c736d7cffd8ca67a7 (patch)
tree73f5b4b37b73311d768670f1838688dd4505d47a /kern/printf.h
parent6ba94ce79c8477758dd440d3563ffd4dd88883df (diff)
kern/printk: rename to printf
The printk functions are close enough to the printf ones to bear the same names.
Diffstat (limited to 'kern/printf.h')
-rw-r--r--kern/printf.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/kern/printf.h b/kern/printf.h
new file mode 100644
index 00000000..efaf2f9c
--- /dev/null
+++ b/kern/printf.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2010 Richard Braun.
+ *
+ * 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ * Formatted output functions.
+ *
+ * The printf() and vprintf() functions internally use a statically
+ * allocated buffer. They won't produce output larger than 1 KiB. They can
+ * be used safely in any context.
+ *
+ * See the sprintf module for information about the supported formats.
+ */
+
+#ifndef _KERN_PRINTK_H
+#define _KERN_PRINTK_H
+
+#include <stdarg.h>
+
+#include <kern/macros.h>
+
+int printf(const char *format, ...) __format_printf(1, 2);
+int vprintf(const char *format, va_list ap) __format_printf(1, 0);
+void printf_setup(void);
+
+#endif /* _KERN_PRINTK_H */