aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.c
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-05-12 21:54:01 +0900
committernsfisis <nsfisis@gmail.com>2025-05-12 21:54:01 +0900
commit9137826c5bc6d5e20a7b1049025269d2c92f8ea2 (patch)
tree9854b3d692058e32f910fc3e108df93fca5fd234 /main.c
parent8057c2e8a3fc03f7771c5d09db0a2b3568dc57d2 (diff)
downloadducc-9137826c5bc6d5e20a7b1049025269d2c92f8ea2.tar.gz
ducc-9137826c5bc6d5e20a7b1049025269d2c92f8ea2.tar.zst
ducc-9137826c5bc6d5e20a7b1049025269d2c92f8ea2.zip
output compile error on stderr instead of stdout
Diffstat (limited to 'main.c')
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
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);
}