diff options
author | Jacek Antonelli | 2008-08-15 23:44:58 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:58 -0500 |
commit | 089fc07d207c71ce1401e72f09c31ad8c45872e2 (patch) | |
tree | 0028955add042c6f45b47a7b774adeeac9c592cb /linden/indra/llcommon/llsdutil.cpp | |
parent | Second Life viewer sources 1.16.0.5 (diff) | |
download | meta-impy-089fc07d207c71ce1401e72f09c31ad8c45872e2.zip meta-impy-089fc07d207c71ce1401e72f09c31ad8c45872e2.tar.gz meta-impy-089fc07d207c71ce1401e72f09c31ad8c45872e2.tar.bz2 meta-impy-089fc07d207c71ce1401e72f09c31ad8c45872e2.tar.xz |
Second Life viewer sources 1.17.0.12
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llcommon/llsdutil.cpp | 13 |
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 | |||
289 | char* 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 | ||