summaryrefslogtreecommitdiff
path: root/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'printf.c')
-rw-r--r--printf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/printf.c b/printf.c
index 0d42236..10e743a 100644
--- a/printf.c
+++ b/printf.c
@@ -1,5 +1,6 @@
-#include "user.h"
#include "types.h"
+#include "stat.h"
+#include "user.h"
static void
putc(int fd, char c)
@@ -63,6 +64,9 @@ printf(int fd, char *fmt, ...)
putc(fd, *s);
s++;
}
+ } else if(c == 'c'){
+ putc(fd, *ap);
+ ap++;
} else if(c == '%'){
putc(fd, c);
} else {