From f7ed50328af7b6a5151f86126a3491a768a7d1ff Mon Sep 17 00:00:00 2001 From: Quinn Stephens Date: Fri, 6 Jun 2025 13:21:54 -0400 Subject: usr: libc: Add stdio read routines Added fread(), fgetc(), getc(), and getchar() Signed-off-by: Quinn Stephens Signed-off-by: Ian Moffett --- lib/libc/include/stdio.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/libc/include/stdio.h') diff --git a/lib/libc/include/stdio.h b/lib/libc/include/stdio.h index b3bf8df..cdb9c14 100644 --- a/lib/libc/include/stdio.h +++ b/lib/libc/include/stdio.h @@ -68,14 +68,19 @@ extern FILE *stdout; extern FILE *stderr; #define putc(c, stream) fputc((c), (stream)) +#define getc(stream) fgetc((stream)) __BEGIN_DECLS +size_t fread(void *__restrict ptr, size_t size, size_t n, FILE *__restrict stream); size_t fwrite(const void *__restrict ptr, size_t size, size_t n, FILE *__restrict stream); int fputc(int c, FILE *stream); int putchar(int c); +int fgetc(FILE *stream); +int getchar(void); + #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L int fputs(const char *__restrict s, FILE *__restrict stream); #else -- cgit v1.2.3