1 | /* |
---|
2 | * Estonian ID card plugin for web browsers |
---|
3 | * |
---|
4 | * Copyright (C) 2010-2011 Codeborne <info@codeborne.com> |
---|
5 | * |
---|
6 | * This 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.1 of the License, or (at your option) any later version. |
---|
10 | * |
---|
11 | * This software 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 | |
---|
22 | #ifndef __ESTEID_LOG__ |
---|
23 | #define __ESTEID_LOG__ |
---|
24 | |
---|
25 | #include "esteid_map.h" |
---|
26 | |
---|
27 | #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
---|
28 | #define EstEID_log(...) EstEID_log_real(__func__, __FILE__, __LINE__, __VA_ARGS__) |
---|
29 | #define EstEID_logMap(map) EstEID_logMap_real(__func__, __FILE__, __LINE__, map) |
---|
30 | #elif (defined(__GNUC__) && __GNUC__ >= 3) || defined(_WIN32) |
---|
31 | #define EstEID_log(...) EstEID_log_real(__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__) |
---|
32 | //#ifndef WIN_IE |
---|
33 | #define EstEID_logMap(map) EstEID_logMap_real(__FUNCTION__, __FILE__, __LINE__, map) |
---|
34 | //#endif |
---|
35 | #else |
---|
36 | #define EstEID_log(...) EstEID_log_real(NULL, NULL, -1, ...) |
---|
37 | #define EstEID_logMap(map) EstEID_logMap_real(NULL, NULL, -1, map) |
---|
38 | #endif |
---|
39 | |
---|
40 | void EstEID_log_real(const char *func, const char *file, int line, const char *message, ...); |
---|
41 | |
---|
42 | //#ifndef WIN_IE |
---|
43 | void EstEID_logMap_real(const char *func, const char *file, int line, EstEID_Map map); |
---|
44 | //#endif |
---|
45 | |
---|
46 | #define LOG_LOCATION EstEID_log(""); |
---|
47 | |
---|
48 | #endif |
---|