annotate src/Support/Common.cc @ 0:582cbe817f2c

- Initial add of support code and modules. Not everything is working yet.
author tomwalters
date Fri, 12 Feb 2010 12:31:23 +0000
parents
children 8c859ef1fb75
rev   line source
tomwalters@0 1 // Copyright 2006-2010, Thomas Walters, Willem van Engen
tomwalters@0 2 //
tomwalters@0 3 // AIM-C: A C++ implementation of the Auditory Image Model
tomwalters@0 4 // http://www.acousticscale.org/AIMC
tomwalters@0 5 //
tomwalters@0 6 // This program is free software: you can redistribute it and/or modify
tomwalters@0 7 // it under the terms of the GNU General Public License as published by
tomwalters@0 8 // the Free Software Foundation, either version 3 of the License, or
tomwalters@0 9 // (at your option) any later version.
tomwalters@0 10 //
tomwalters@0 11 // This program is distributed in the hope that it will be useful,
tomwalters@0 12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
tomwalters@0 13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
tomwalters@0 14 // GNU General Public License for more details.
tomwalters@0 15 //
tomwalters@0 16 // You should have received a copy of the GNU General Public License
tomwalters@0 17 // along with this program. If not, see <http://www.gnu.org/licenses/>.
tomwalters@0 18
tomwalters@0 19 #include "Support/Common.h"
tomwalters@0 20
tomwalters@0 21 namespace aimc {
tomwalters@0 22 void LOG_ERROR(const char *sFmt, ...) {
tomwalters@0 23 va_list args;
tomwalters@0 24 va_start(args, sFmt);
tomwalters@0 25 vfprintf(stderr, sFmt, args);
tomwalters@0 26 fprintf(stderr, "\n");
tomwalters@0 27 va_end(args);
tomwalters@0 28 }
tomwalters@0 29
tomwalters@0 30 void LOG_INFO(const char *sFmt, ...) {
tomwalters@0 31 va_list args;
tomwalters@0 32 va_start(args, sFmt);
tomwalters@0 33 // Just print message to console (will be lost on windows with gui)
tomwalters@0 34 vprintf(sFmt, args);
tomwalters@0 35 printf("\n");
tomwalters@0 36 va_end(args);
tomwalters@0 37 }
tomwalters@0 38 } // namespace aimc