summaryrefslogtreecommitdiff
path: root/user/lib/printf.c
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-04-21 16:45:28 -0400
committerFreya Murphy <freya@freyacat.org>2025-04-21 16:45:33 -0400
commitceb9471fed96f907e37a6ba031825c31167a8ff4 (patch)
treed98392e420b4541a6ba926ff4d8b3ebe85734580 /user/lib/printf.c
parentupdate linker scripts (diff)
downloadcomus-ceb9471fed96f907e37a6ba031825c31167a8ff4.tar.gz
comus-ceb9471fed96f907e37a6ba031825c31167a8ff4.tar.bz2
comus-ceb9471fed96f907e37a6ba031825c31167a8ff4.zip
update userland to compile
Diffstat (limited to 'user/lib/printf.c')
-rw-r--r--user/lib/printf.c40
1 files changed, 1 insertions, 39 deletions
diff --git a/user/lib/printf.c b/user/lib/printf.c
index 65d7f0f..e6abd09 100644
--- a/user/lib/printf.c
+++ b/user/lib/printf.c
@@ -7,6 +7,7 @@
#include <stdarg.h>
#define PRINTF_NUMERIC_BUF_LEN 50
+#define PRINTF_BUFFER_LEN 256
typedef union {
unsigned long long int u;
@@ -620,42 +621,3 @@ int vfprintf(FILE *stream, const char *format, va_list args)
do_printf(&ctx, args);
return ctx.written_len;
}
-
-int putchar(int c)
-{
- return putc(c, stdout);
-}
-
-int putc(int c, FILE *stream)
-{
- return fputc(c, stream);
-}
-
-int fputc(int c, FILE *stream)
-{
- // TODO: a
- return c;
-}
-
-int puts(const char *str)
-{
- int res;
- res = fputs(str, stdout);
- if (res == EOF)
- return res;
- res = fputc('\n', stdout);
- if (res == EOF)
- return res;
- return 0;
-}
-
-int fputs(const char *str, FILE *stream)
-{
- int res;
- while (*str) {
- res = fputc(*str++, stream);
- if (res == EOF)
- return res;
- }
- return 0;
-}