From 9137826c5bc6d5e20a7b1049025269d2c92f8ea2 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 12 May 2025 21:54:01 +0900 Subject: output compile error on stderr instead of stdout --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index 9ce3e81..5555027 100644 --- a/main.c +++ b/main.c @@ -11,6 +11,7 @@ int atoi(const char*); void* calloc(size_t, size_t); void exit(int); int fclose(FILE*); +int fprintf(FILE*, const char*, ...); char* fgets(char*, int, FILE*); FILE* fopen(const char*, const char*); int getchar(void); @@ -29,7 +30,7 @@ char* strstr(const char*, const char*); #define NULL 0 void fatal_error(const char* msg) { - printf("%s\n", msg); + fprintf(stderr, "%s\n", msg); exit(1); } -- cgit v1.2.3-70-g09d2