diff options
author | Marc Laukien <marc@zeroc.com> | 2001-09-22 06:16:45 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-09-22 06:16:45 +0000 |
commit | 85eb3be99ea80398312271e04b32882a1f391088 (patch) | |
tree | f7c2781cd342b2113e032464be05f8adf047fb0a /cpp/src/Slice/OutputUtil.cpp | |
parent | many changes (diff) | |
download | ice-85eb3be99ea80398312271e04b32882a1f391088.tar.bz2 ice-85eb3be99ea80398312271e04b32882a1f391088.tar.xz ice-85eb3be99ea80398312271e04b32882a1f391088.zip |
many changes
Diffstat (limited to 'cpp/src/Slice/OutputUtil.cpp')
-rw-r--r-- | cpp/src/Slice/OutputUtil.cpp | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/cpp/src/Slice/OutputUtil.cpp b/cpp/src/Slice/OutputUtil.cpp index c27c0ae9349..36436a93413 100644 --- a/cpp/src/Slice/OutputUtil.cpp +++ b/cpp/src/Slice/OutputUtil.cpp @@ -61,10 +61,14 @@ Slice::Output::print(const char* s) { for (unsigned int i = 0; i < strlen(s); ++i) { - if (s[i] == '\n') - _pos = 0; - else - ++_pos; + if (s[i] == '\n') + { + _pos = 0; + } + else + { + ++_pos; + } } _out << s; @@ -74,7 +78,6 @@ void Slice::Output::inc() { _indent += _indentSize; - _separator = true; } void @@ -82,7 +85,6 @@ Slice::Output::dec() { assert(_indent >= _indentSize); _indent -= _indentSize; - _separator = true; } void @@ -171,11 +173,11 @@ Slice::Output::nl() void Slice::Output::sb() -{
- if (_blockStart.length())
+{ + if (_blockStart.length()) { nl(); - _out << _blockStart;
+ _out << _blockStart; } ++_pos; inc(); @@ -186,10 +188,10 @@ void Slice::Output::eb() { dec(); - if (_blockEnd.length())
- {
+ if (_blockEnd.length()) + { nl(); - _out << _blockEnd;
+ _out << _blockEnd; } --_pos; } @@ -198,7 +200,9 @@ void Slice::Output::sp() { if (_separator) + { _out << '\n'; + } } bool |