Add print_human_readable_size() function.
[pintos-anon] / src / lib / stdio.h
index b351dd16a5cf09cf7451dd56b8498a5c9c34aaf8..dc6ec3595d15243b841dcbf06360fb8bb9e34aaa 100644 (file)
@@ -2,9 +2,10 @@
 #define __LIB_STDIO_H
 
 #include <debug.h>
+#include <stdarg.h>
 #include <stdbool.h>
 #include <stddef.h>
-#include <stdarg.h>
+#include <stdint.h>
 
 /* Predefined file handles. */
 #define STDIN_FILENO 0
@@ -19,11 +20,15 @@ int putchar (int);
 int puts (const char *);
 
 /* Nonstandard functions. */
-#ifndef KERNEL
+#ifdef KERNEL
+void putbuf (const char *, size_t);
+#endif
+#ifdef USER
 int hprintf (int, const char *, ...) PRINTF_FORMAT (2, 3);
 int vhprintf (int, const char *, va_list) PRINTF_FORMAT (2, 0);
 #endif
-void hex_dump (const void *, size_t size, bool ascii);
+void hex_dump (uintptr_t ofs, const void *, size_t size, bool ascii);
+void print_human_readable_size (uint64_t size);
 
 /* Internal functions. */
 void __vprintf (const char *format, va_list args,