summaryrefslogtreecommitdiff
path: root/user/lib/printf.c
diff options
context:
space:
mode:
authorIan McFarlane <i.mcfarlane2002@gmail.com>2025-04-22 14:51:47 -0400
committerIan McFarlane <i.mcfarlane2002@gmail.com>2025-04-22 14:51:47 -0400
commit325e2ea9aef0723645b86bdc773f02293747c495 (patch)
tree2d844c3e30a27eaf463fed851620221f3ad7d540 /user/lib/printf.c
parenttry to find mcfg (diff)
parentforce rebuild on header change (diff)
downloadcomus-325e2ea9aef0723645b86bdc773f02293747c495.tar.gz
comus-325e2ea9aef0723645b86bdc773f02293747c495.tar.bz2
comus-325e2ea9aef0723645b86bdc773f02293747c495.zip
Merge branch 'main' into pciepcie
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;
-}