--- a/kerneltest/e32test/usb/t_usb_device/include/general.h Tue Jul 06 15:50:07 2010 +0300
+++ b/kerneltest/e32test/usb/t_usb_device/include/general.h Wed Aug 18 11:08:29 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1997-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of the License "Eclipse Public License v1.0"
@@ -143,50 +143,71 @@
#define TUSB_PRINT(string) \
do { \
- iConsole->Printf(_L(string)); \
- iConsole->Printf(_L("\n")); \
+ if (iConsole) \
+ { \
+ iConsole->Printf(_L(string)); \
+ iConsole->Printf(_L("\n")); \
+ } \
RDebug::Print(_L(string)); \
} while (0)
#define TUSB_PRINT1(string, a) \
do { \
- iConsole->Printf(_L(string), (a)); \
- iConsole->Printf(_L("\n")); \
+ if (iConsole) \
+ { \
+ iConsole->Printf(_L(string), (a)); \
+ iConsole->Printf(_L("\n")); \
+ } \
RDebug::Print(_L(string), (a)); \
} while (0)
#define TUSB_PRINT2(string, a, b) \
do { \
- iConsole->Printf(_L(string), (a), (b)); \
- iConsole->Printf(_L("\n")); \
+ if (iConsole) \
+ { \
+ iConsole->Printf(_L(string), (a), (b)); \
+ iConsole->Printf(_L("\n")); \
+ } \
RDebug::Print(_L(string), (a), (b)); \
} while (0)
#define TUSB_PRINT3(string, a, b, c) \
do { \
- iConsole->Printf(_L(string), (a), (b), (c)); \
- iConsole->Printf(_L("\n")); \
+ if (iConsole) \
+ { \
+ iConsole->Printf(_L(string), (a), (b), (c)); \
+ iConsole->Printf(_L("\n")); \
+ } \
RDebug::Print(_L(string), (a), (b), (c)); \
} while (0)
#define TUSB_PRINT4(string, a, b, c, d) \
do { \
- iConsole->Printf(_L(string), (a), (b), (c), (d)); \
- iConsole->Printf(_L("\n")); \
+ if (iConsole) \
+ { \
+ iConsole->Printf(_L(string), (a), (b), (c), (d)); \
+ iConsole->Printf(_L("\n")); \
+ } \
RDebug::Print(_L(string), (a), (b), (c), (d)); \
} while (0)
#define TUSB_PRINT5(string, a, b, c, d, e) \
do { \
- iConsole->Printf(_L(string), (a), (b), (c), (d), (e)); \
- iConsole->Printf(_L("\n")); \
+ if (iConsole) \
+ { \
+ iConsole->Printf(_L(string), (a), (b), (c), (d), (e)); \
+ iConsole->Printf(_L("\n")); \
+ } \
RDebug::Print(_L(string), (a), (b), (c), (d), (e)); \
} while (0)
#define TUSB_PRINT6(string, a, b, c, d, e, f) \
do { \
- iConsole->Printf(_L(string), (a), (b), (c), (d), (e), (f)); \
- iConsole->Printf(_L("\n")); \
+ if (iConsole) \
+ { \
+ iConsole->Printf(_L(string), (a), (b), (c), (d), (e), (f)); \
+ iConsole->Printf(_L("\n")); \
+ } \
RDebug::Print(_L(string), (a), (b), (c), (d), (e), (f)); \
} while (0)
@@ -242,8 +263,11 @@
do { \
if (gVerbose) \
{ \
- aConsole->Printf(_L(string)); \
- aConsole->Printf(_L("\n")); \
+ if (iConsole) \
+ { \
+ aConsole->Printf(_L(string)); \
+ aConsole->Printf(_L("\n")); \
+ } \
RDebug::Print(_L(string)); \
} \
} while (0)