X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fnfc_debug_private.h;h=ade279f1e7cd84913cc802b2b95b1ebdc502c94f;hb=refs%2Fheads%2Ftizen_6.0;hp=022504b4ddc161e77de99b5a1a4a97ca428b4678;hpb=757fcb84129acb368d4a5af484c5f61f02674d1b;p=platform%2Fadaptation%2Femulator%2Fnfc-plugin-emul.git diff --git a/src/nfc_debug_private.h b/src/nfc_debug_private.h old mode 100755 new mode 100644 index 022504b..ade279f --- a/src/nfc_debug_private.h +++ b/src/nfc_debug_private.h @@ -29,71 +29,64 @@ #include -#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