diff --git a/libs/libc/src/stdio.cpp b/libs/libc/src/stdio.cpp index 49a726b7..6ead35d4 100644 --- a/libs/libc/src/stdio.cpp +++ b/libs/libc/src/stdio.cpp @@ -15,12 +15,14 @@ extern "C" if (putchar('\n') < 0) return -1; return nwritten + 1; } + int fputs(const char* s, FILE* stream) { int result = (int)fwrite(s, strlen(s), 1, stream); if (ferror(stream)) return -1; return result; } + int fputc(int c, FILE* stream) { char chr = (char)c; @@ -28,14 +30,17 @@ extern "C" if (ferror(stream)) { return -1; } return c; } + int putc(int c, FILE* stream) { return fputc(c, stream); } + int putchar(int c) { return fputc(c, stdout); } + void perror(const char* s) { int savederr = @@ -43,6 +48,7 @@ extern "C" if (s && *s) { fprintf(stderr, "%s: ", s); } fprintf(stderr, "%s\n", strerror(savederr)); } + int remove(const char*) { NOT_IMPLEMENTED("remove");