/* * * io.c - part of Danovitsch Webcam * * Copyright (C) 2001, 2003 by Daan Vreeken * * Published under the terms of the GNU Public License 2.0 * (or any later version) * */ #include #include #include "io.h" #include "general.h" #ifdef Debug #undef Debug #endif void ExitFatal(char *Txt, ...) { va_list List; va_start(List,Txt); printf("Fatal: "); vprintf(Txt,List); printf("\n"); va_end(List); exit(0); } void Error(char *Txt, ...) { va_list List; va_start(List,Txt); fprintf(stderr,"Error: "); vfprintf(stderr,Txt,List); fprintf(stderr,"\n"); va_end(List); } void Debug(int Level, char *Txt, ...) { #ifdef DebugLevel va_list List; if (Level