comparison trunk/src/Support/Common.cc @ 268:e14c70d1b171

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