#include "config.h" #include #include #include #include "logerr.h" void vlogerr( const char *const file, const char *const function, const int lineno, FILE *restrict stream, const char *restrict format, ... ) { if (fprintf(stream, "%s:%s:%d: ", file, function, lineno) < 0) { perror(__FILE__ ":vlogerr(): fprintf() < 0"); } va_list args; va_start(args, format); if (vfprintf(stream, format, args) < 0) { perror(__FILE__ ":vlogerr(): vfprintf() < 0"); } va_end(args); if (fprintf(stream, "\n") < 0) { perror(__FILE__ ":vlogerr(): fprintf() < 0"); } return; }