#define COLOR_END "\033[0;m"
#if defined(CAL_IPC_SERVER)
-#define IPC_ROLE COLOR_BLUE"[SERVER]"COLOR_END
+#define IPC_ROLE COLOR_BLUE "[SERVER]" COLOR_END
#elif defined(CAL_IPC_CLIENT)
-#define IPC_ROLE COLOR_BROWN"[CLIENT]"COLOR_END
+#define IPC_ROLE COLOR_BROWN "[CLIENT]" COLOR_END
#else
-#define IPC_ROLE COLOR_GREEN"[LIB]"COLOR_END
+#define IPC_ROLE COLOR_GREEN "[LIB]" COLOR_END
#endif
#ifdef CAL_DEBUGGING
- #define INFO(fmt, arg...) SLOGI(IPC_ROLE" " fmt, ##arg)
- #define ERR(fmt, arg...) SLOGE(IPC_ROLE" " fmt, ##arg)
- #define DBG(fmt, arg...) SLOGD(IPC_ROLE" " fmt, ##arg)
- #define WARN(fmt, arg...) SLOGD(IPC_ROLE" " fmt, ##arg)
- #define VERBOSE(fmt, arg...) SLOGV(IPC_ROLE" " fmt, ##arg)
+ #define INFO(fmt, arg...) SLOGI(IPC_ROLE fmt, ##arg)
+ #define ERR(fmt, arg...) SLOGE(IPC_ROLE fmt, ##arg)
+ #define DBG(fmt, arg...) SLOGD(IPC_ROLE fmt, ##arg)
+ #define WARN(fmt, arg...) SLOGD(IPC_ROLE fmt, ##arg)
+ #define VERBOSE(fmt, arg...) SLOGV(IPC_ROLE fmt, ##arg)
#else /* CAL_DEBUGGING */
#define INFO(fmt, arg...)
#define ERR(fmt, arg...)
#endif /* CAL_DEBUGGING */
#define SEC_INFO(fmt, arg...) SECURE_LOGI(fmt, ##arg)
-#define SEC_ERR(fmt, arg...) SECURE_LOGE(fmt, ##arg)
-#define SEC_DBG(fmt, arg...) SECURE_LOGD(fmt, ##arg)
-#define SECURE(fmt, arg...) SECURE_LOGD(fmt, ##arg)
+#define SEC_ERR(fmt, arg...) SECURE_LOGE(fmt, ##arg)
+#define SEC_DBG(fmt, arg...) SECURE_LOGD(fmt, ##arg)
+#define SECURE(fmt, arg...) SECURE_LOGD(fmt, ##arg)
#define CAL_FN_CALL() DBG(">>>>>>>> called")
#define CAL_FN_END() DBG("<<<<<<<< ended")
#define CAL_START_TIMESTAMP struct timeval timeval_s = {0}; \
struct timeval timeval_e = {0}; \
struct timeval timeval_d = {0}; \
- DBG(COLOR_PURPLE">>>>>"COLOR_END); \
+ DBG(COLOR_PURPLE ">>>>>" COLOR_END); \
gettimeofday(&timeval_s, NULL);
#define CAL_PRINT_TIMESTAMP gettimeofday(&timeval_e, NULL); \
timersub(&timeval_e, &timeval_s, &timeval_d); \
timeval_s = timeval_e; \
- DBG(COLOR_PURPLE"<<<<< (%03d.%03dsec)"COLOR_END, timeval_d.tv_sec % 1000, timeval_d.tv_usec/1000);
+ DBG(COLOR_PURPLE "<<<<< (%03d.%03dsec)" COLOR_END, timeval_d.tv_sec % 1000, timeval_d.tv_usec/1000);
#define CAL_PROFILE
#ifdef CAL_PROFILE
break;
case CALENDAR_TIME_LOCALTIME:
- DBG("Before "CAL_DATETIME_FORMAT_YYYYMMDDTHHMMSS, caltime->time.date.year, caltime->time.date.month, caltime->time.date.mday,
+ DBG("Before" CAL_DATETIME_FORMAT_YYYYMMDDTHHMMSS, caltime->time.date.year, caltime->time.date.month, caltime->time.date.mday,
caltime->time.date.hour, caltime->time.date.minute, caltime->time.date.second);
ucal_setDateTime(ucal, caltime->time.date.year, caltime->time.date.month - 1, caltime->time.date.mday,
caltime->time.date.minute = ucal_get(ucal, UCAL_MINUTE, &status);
caltime->time.date.second = ucal_get(ucal, UCAL_SECOND, &status);
- DBG("After "CAL_DATETIME_FORMAT_YYYYMMDDTHHMMSS, caltime->time.date.year, caltime->time.date.month, caltime->time.date.mday,
+ DBG("After" CAL_DATETIME_FORMAT_YYYYMMDDTHHMMSS, caltime->time.date.year, caltime->time.date.month, caltime->time.date.mday,
caltime->time.date.hour, caltime->time.date.minute, caltime->time.date.second);
break;
}