RawSpeed
fast raw decoding library
Loading...
Searching...
No Matches
Common.cpp
Go to the documentation of this file.
1
/*
2
RawSpeed - RAW file decoder.
3
4
Copyright (C) 2009-2014 Klaus Post
5
6
This library is free software; you can redistribute it and/or
7
modify it under the terms of the GNU Lesser General Public
8
License as published by the Free Software Foundation; either
9
version 2 of the License, or (at your option) any later version.
10
11
This library 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 GNU
14
Lesser General Public License for more details.
15
16
You should have received a copy of the GNU Lesser General Public
17
License along with this library; if not, write to the Free Software
18
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
21
#include "
common/Common.h
"
22
#include <cstdarg>
23
#include <cstdio>
24
25
// #define _DEBUG
26
27
namespace
rawspeed
{
28
29
#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && !defined(_DEBUG)
30
31
void
writeLog
(
DEBUG_PRIO
priority,
const
char
* format, ...) {
32
// When fuzzing, any output is really undesirable.
33
}
34
35
#else
36
37
void
writeLog
(
DEBUG_PRIO
priority,
const
char
* format, ...) {
38
#ifndef _DEBUG
39
if
(priority <
DEBUG_PRIO::INFO
)
40
#endif
// _DEBUG
41
fprintf(stdout,
"%s"
,
"RawSpeed:"
);
42
43
va_list args;
44
va_start
(args, format);
45
46
#ifndef _DEBUG
47
if
(priority <
DEBUG_PRIO::INFO
)
48
#endif
// _DEBUG
49
vfprintf(stdout, format, args);
50
51
va_end
(args);
52
53
#ifndef _DEBUG
54
if
(priority <
DEBUG_PRIO::INFO
)
55
#endif
// _DEBUG
56
fprintf(stdout,
"%s"
,
"\n"
);
57
}
58
59
#endif
60
61
}
// namespace rawspeed
rawspeed
Definition
CoalescingOutputIteratorBenchmark.cpp:35
rawspeed::va_start
va_start(val, fmt)
rawspeed::DEBUG_PRIO
DEBUG_PRIO
Definition
Common.h:45
rawspeed::DEBUG_PRIO::INFO
@ INFO
Definition
Common.h:48
rawspeed::va_end
va_end(val)
rawspeed::writeLog
void writeLog(DEBUG_PRIO priority, const char *format,...)
Definition
Common.cpp:37
Common.h
librawspeed
common
Common.cpp
Generated by
1.15.0