/////////////////////////////////////////////////////////////////////////////// // Date: Thu Oct 25 03:14:46 CDT 2007 // Author: John Quigley // Revision: $Id$ // // The White Programming Language // Copyright (C) 2007 John Quigley // // This program 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. // // This program 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 "core/util.h" void _vprintline(const char *file, int line, const char *pre, const char *fmt, va_list ap) { printf("%s", pre); vprintf(fmt, ap); printf(" (%s:%d)\n", file, line); fflush(stdout); } void _printline(const char *file, int line, const char *pre, const char *fmt, ...) { va_list ap; va_start(ap, fmt); _vprintline(file, line, fmt, pre, ap); va_end(ap); } void _Logger_log(const char *file, const int line, const char *pre, const char *fmt, ...) { #ifdef DEBUG_WHITE va_list ap; va_start(ap, fmt); _vprintline(file, line, pre, fmt, ap); va_end(ap); #endif } // EOF