// error.c // Řešení IJC-DU1, příklad a), 22.3.2024 // Autor: Roman Nečas, FIT // Přeloženo: gcc 13.2.1 #include "error.h" #include #include #include void warning(const char *fmt, ...) { va_list args; va_start(args, fmt); fprintf(stderr, "Warning: "); vfprintf(stderr, fmt, args); va_end(args); } void error_exit(const char *fmt, ...) { va_list args; va_start(args, fmt); fprintf(stderr, "Error: "); vfprintf(stderr, fmt, args); va_end(args); exit(1); }