aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llimagej2coj/llimagej2coj.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2009-04-30 13:04:20 -0500
committerJacek Antonelli2009-04-30 13:07:16 -0500
commitca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch)
tree8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/llimagej2coj/llimagej2coj.cpp
parentSecond Life viewer sources 1.22.11 (diff)
downloadmeta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz
Second Life viewer sources 1.23.0-RC
Diffstat (limited to '')
-rw-r--r--linden/indra/llimagej2coj/llimagej2coj.cpp25
1 files changed, 21 insertions, 4 deletions
diff --git a/linden/indra/llimagej2coj/llimagej2coj.cpp b/linden/indra/llimagej2coj/llimagej2coj.cpp
index 5afac0e..be6b6c8 100644
--- a/linden/indra/llimagej2coj/llimagej2coj.cpp
+++ b/linden/indra/llimagej2coj/llimagej2coj.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -57,26 +58,42 @@ void fallbackDestroyLLImageJ2CImpl(LLImageJ2CImpl* impl)
57 impl = NULL; 58 impl = NULL;
58} 59}
59 60
61// Return string from message, eliminating final \n if present
62static std::string chomp(const char* msg)
63{
64 // stomp trailing \n
65 std::string message = msg;
66 if (!message.empty())
67 {
68 size_t last = message.size() - 1;
69 if (message[last] == '\n')
70 {
71 message.resize( last );
72 }
73 }
74 return message;
75}
76
60/** 77/**
61sample error callback expecting a LLFILE* client object 78sample error callback expecting a LLFILE* client object
62*/ 79*/
63void error_callback(const char* msg, void*) 80void error_callback(const char* msg, void*)
64{ 81{
65 lldebugs << "LLImageJ2CImpl error_callback: " << msg << llendl; 82 lldebugs << "LLImageJ2COJ: " << chomp(msg) << llendl;
66} 83}
67/** 84/**
68sample warning callback expecting a LLFILE* client object 85sample warning callback expecting a LLFILE* client object
69*/ 86*/
70void warning_callback(const char* msg, void*) 87void warning_callback(const char* msg, void*)
71{ 88{
72 lldebugs << "LLImageJ2CImpl warning_callback: " << msg << llendl; 89 lldebugs << "LLImageJ2COJ: " << chomp(msg) << llendl;
73} 90}
74/** 91/**
75sample debug callback expecting no client object 92sample debug callback expecting no client object
76*/ 93*/
77void info_callback(const char* msg, void*) 94void info_callback(const char* msg, void*)
78{ 95{
79 lldebugs << "LLImageJ2CImpl info_callback: " << msg << llendl; 96 lldebugs << "LLImageJ2COJ: " << chomp(msg) << llendl;
80} 97}
81 98
82 99