aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llsdutil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llcommon/llsdutil.cpp')
-rw-r--r--linden/indra/llcommon/llsdutil.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/linden/indra/llcommon/llsdutil.cpp b/linden/indra/llcommon/llsdutil.cpp
index d30afc7..85718ba 100644
--- a/linden/indra/llcommon/llsdutil.cpp
+++ b/linden/indra/llcommon/llsdutil.cpp
@@ -285,3 +285,16 @@ char* ll_print_sd(const LLSD& sd)
285 buffer[bufferSize - 1] = '\0'; 285 buffer[bufferSize - 1] = '\0';
286 return buffer; 286 return buffer;
287} 287}
288
289char* ll_pretty_print_sd(const LLSD& sd)
290{
291 const U32 bufferSize = 10 * 1024;
292 static char buffer[bufferSize];
293 std::ostringstream stream;
294 //stream.rdbuf()->pubsetbuf(buffer, bufferSize);
295 stream << LLSDOStreamer<LLSDXMLFormatter>(sd, LLSDFormatter::OPTIONS_PRETTY);
296 stream << std::ends;
297 strncpy(buffer, stream.str().c_str(), bufferSize);
298 buffer[bufferSize - 1] = '\0';
299 return buffer;
300} \ No newline at end of file