From a1fe5809a4760ed2aa64951c596156f48fca393e Mon Sep 17 00:00:00 2001 From: Giuseppe Baruffa Date: Thu, 29 Mar 2007 08:27:03 +0000 Subject: Some coding style adaptations for compiling the OPJViewer GUI under Linux. It compiles, but does not yet display images. --- OPJViewer/source/imagjp2.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'OPJViewer/source/imagjp2.cpp') diff --git a/OPJViewer/source/imagjp2.cpp b/OPJViewer/source/imagjp2.cpp index ce25bb1e..b1a23bde 100644 --- a/OPJViewer/source/imagjp2.cpp +++ b/OPJViewer/source/imagjp2.cpp @@ -86,35 +86,29 @@ IMPLEMENT_DYNAMIC_CLASS(wxJP2Handler,wxImageHandler) /* sample error callback expecting a FILE* client object */ void jp2_error_callback(const char *msg, void *client_data) { - char m_msg[MAX_MESSAGE_LEN]; int message_len = strlen(msg) - 1; if (msg[message_len] != '\n') message_len = MAX_MESSAGE_LEN; - sprintf(m_msg, "[ERROR] %.*s", message_len, msg); wxMutexGuiEnter(); - wxLogMessage(m_msg); + wxLogMessage(wxT("[ERROR] %.*s"), message_len, msg); wxMutexGuiLeave(); } /* sample warning callback expecting a FILE* client object */ void jp2_warning_callback(const char *msg, void *client_data) { - char m_msg[MAX_MESSAGE_LEN]; int message_len = strlen(msg) - 1; if (msg[message_len] != '\n') message_len = MAX_MESSAGE_LEN; - sprintf(m_msg, "[WARNING] %.*s", message_len, msg); wxMutexGuiEnter(); - wxLogMessage(m_msg); + wxLogMessage(wxT("[WARNING] %.*s"), message_len, msg); wxMutexGuiLeave(); } /* sample debug callback expecting no client object */ void jp2_info_callback(const char *msg, void *client_data) { - char m_msg[MAX_MESSAGE_LEN]; int message_len = strlen(msg) - 1; if (msg[message_len] != '\n') message_len = MAX_MESSAGE_LEN; - sprintf(m_msg, "[INFO] %.*s", message_len, msg); wxMutexGuiEnter(); - wxLogMessage(m_msg); + wxLogMessage(wxT("[INFO] %.*s"), message_len, msg); wxMutexGuiLeave(); } -- cgit v1.2.3