#include <dlog.h>
-#define LOG_COLOR_RED "\033[0;31m"
-#define LOG_COLOR_GREEN "\033[0;32m"
-#define LOG_COLOR_BROWN "\033[0;33m"
-#define LOG_COLOR_BLUE "\033[0;34m"
-#define LOG_COLOR_PURPLE "\033[0;35m"
-#define LOG_COLOR_CYAN "\033[0;36m"
+#define LOG_COLOR_RED "\033[0;31m"
+#define LOG_COLOR_GREEN "\033[0;32m"
+#define LOG_COLOR_BROWN "\033[0;33m"
+#define LOG_COLOR_BLUE "\033[0;34m"
+#define LOG_COLOR_PURPLE "\033[0;35m"
+#define LOG_COLOR_CYAN "\033[0;36m"
#define LOG_COLOR_LIGHTBLUE "\033[0;37m"
-#define LOG_COLOR_END "\033[0;m"
+#define LOG_COLOR_END "\033[0;m"
-#define DEBUG_MSG_PRINT_BUFFER(buffer,length) \
+#define DEBUG_MSG_PRINT_BUFFER(buffer, length) \
do {\
int i = 0;\
LOGE(LOG_COLOR_BLUE"BUFFER =>"LOG_COLOR_END);\
- for(; i < length; i++)\
- {\
- LOGE(LOG_COLOR_BLUE" [0x%x] "LOG_COLOR_END,buffer[i]);\
- }\
+ for (; i < length; i++)\
+ LOGE(LOG_COLOR_BLUE" [0x%x] "LOG_COLOR_END, buffer[i]);\
LOGE(LOG_COLOR_BLUE""LOG_COLOR_END);\
-}while(0)
+} while (0)
-#define DEBUG_MSG_PRINT_BUFFER_CHAR(buffer,length) \
+#define DEBUG_MSG_PRINT_BUFFER_CHAR(buffer, length) \
do {\
int i = 0;\
LOGE(LOG_COLOR_BLUE"BUFFER =>"LOG_COLOR_END);\
- for(; i < length; i++)\
- {\
- LOGE(LOG_COLOR_BLUE" [%c] "LOG_COLOR_END,buffer[i]);\
- }\
+ for (; i < length; i++)\
+ LOGE(LOG_COLOR_BLUE" [%c] "LOG_COLOR_END, buffer[i]);\
LOGE(LOG_COLOR_BLUE""LOG_COLOR_END);\
-}while(0)
+} while (0)
-#define DEBUG_MSG(format,args...) \
+#define DEBUG_MSG(format, args...) \
do {\
LOGE(LOG_COLOR_CYAN" "format""LOG_COLOR_END, ##args);\
-}while(0)
+} while (0)
-#define DEBUG_ERR_MSG(format,args...) \
+#define DEBUG_ERR_MSG(format, args...) \
do {\
LOGE(LOG_COLOR_RED" "format""LOG_COLOR_END, ##args);\
-}while(0)
+} while (0)
#define DEBUG_EMUL_BEGIN() \
- do\
- {\
- LOGE(LOG_COLOR_CYAN" BEGIN >>>>"LOG_COLOR_END); \
- } while( 0 )
+do {\
+ LOGE(LOG_COLOR_CYAN" BEGIN >>>>"LOG_COLOR_END);\
+} while (0)
#define DEBUG_EMUL_END() \
- do\
- {\
- LOGE(LOG_COLOR_CYAN" END >>>>"LOG_COLOR_END); \
- } \
- while( 0 )
+do {\
+ LOGE(LOG_COLOR_CYAN" END >>>>"LOG_COLOR_END);\
+} while (0)
#define PROFILING(str) \
-do{ \
+do {\
struct timeval mytime;\
char buf[128]; = {0};\
memset(buf, 0x00, 128);\
gettimeofday(&mytime, NULL);\
char time_string[128] = {0,};\
sprintf(time_string, "%d.%4d", mytime.tv_sec, mytime.tv_usec);\
- LOGE(str); \
+ LOGE(str);\
LOGE("\t time = [%s]", time_string);\
-}while(0)
+} while (0)
#endif