/* Copyright 2012 Andreas Biegert This file is part of the CS-BLAST package. The CS-BLAST package is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. The CS-BLAST package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include #include #include #include "cs.h" // Prints a fatal error message and ends the program. extern "C" void CS_Fatal(const char* file, int line, const char* format, ...) { fprintf(stderr, "\n\n#\n# Fatal error in %s, line %d\n# ", file, line); va_list arguments; va_start(arguments, format); vfprintf(stderr, format, arguments); va_end(arguments); fprintf(stderr, "\n#\n\n"); abort(); }