From: Martin Zaun Date: October 6 2010 6:15am Subject: bzr commit into mysql-5.1-telco-7.1 branch (martin.zaun:3861) List-Archive: http://lists.mysql.com/commits/120046 Message-Id: <201010060615.o966FKCS003018@rcsinet15.oracle.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2046107214==" --===============2046107214== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #At file:///Users/mz/mysql/ndb-7.1-opt64/ based on revid:martin.zaun@stripped 3861 Martin Zaun 2010-10-05 crund - minor cleanup for easier code sharing with TWS removed: storage/ndb/test/crund/martins_little_helpers/src/utils/Properties.cpp modified: storage/ndb/test/crund/martins_little_helpers/src/utils/Makefile storage/ndb/test/crund/martins_little_helpers/src/utils/Properties.hpp === modified file 'storage/ndb/test/crund/martins_little_helpers/src/utils/Makefile' --- a/storage/ndb/test/crund/martins_little_helpers/src/utils/Makefile 2010-10-01 04:10:21 +0000 +++ b/storage/ndb/test/crund/martins_little_helpers/src/utils/Makefile 2010-10-06 06:15:04 +0000 @@ -89,7 +89,6 @@ utils_HrtStopwatch.h: $(API_PKG_PATH)/Hr $(COMPILE.javah) utils.HrtStopwatch libutils.a: libutils.a(hrt_utils.o hrt_stopwatch.o hrt_gstopwatch.o) \ - libutils.a(Properties.o) \ libutils.a(utils_HrtStopwatch.o) libutils.so: libutils.a === removed file 'storage/ndb/test/crund/martins_little_helpers/src/utils/Properties.cpp' --- a/storage/ndb/test/crund/martins_little_helpers/src/utils/Properties.cpp 2010-02-14 05:05:31 +0000 +++ b/storage/ndb/test/crund/martins_little_helpers/src/utils/Properties.cpp 1970-01-01 00:00:00 +0000 @@ -1,438 +0,0 @@ -/* - * Properties.cpp - * - */ - -#include "Properties.hpp" - -#include -#include -#include - -using std::istream; -using std::ostream; -using std::ifstream; -using std::ofstream; -using std::cout; -using std::wcout; -using std::endl; -using std::wstring; -using std::streambuf; -using std::stringbuf; - -using utils::Properties; - -// --------------------------------------------------------------------------- - -inline bool -Properties::isWS(int c) -{ - switch (c) { - case 0x09: // '\t' HT - case 0x0c: // '\f' FF - case 0x20: // ' ' SPACE - return true; - } - return false; -} - -inline bool -Properties::isNL(int c) -{ - switch (c) { - case 0x0a: // '\n' LF - case 0x0d: // '\r' CR - return true; - } - return false; -} - -inline bool -Properties::isComment(int c) -{ - switch (c) { - case 0x21: // '!' - case 0x23: // '#' - return true; - } - return false; -} - -inline bool -Properties::isAssign(int c) -{ - switch (c) { - case 0x3a: // ':' - case 0x3d: // '=' - return true; - } - return false; -} - -inline bool -Properties::isKeyTerminator(int c) -{ - return isWS(c) || isAssign(c) || isNL(c); -} - -inline bool -Properties::isEsc(int c) -{ - switch (c) { - case 0x5c: // '\\' - return true; - } - return false; -} - -inline void -Properties::skipWS(streambuf& ib) -{ - int c; - while ((c = ib.snextc()) != EOF && isWS(c)); -} - -inline void -Properties::skipComment(streambuf& ib) -{ - int c; - // comments cannot have escaped line terminators - while ((c = ib.snextc()) != EOF && !isNL(c)); - ib.sbumpc(); -} - -inline void -Properties::readIgnored(streambuf& ib) -{ - int c; - while ((c = ib.sgetc()) != EOF) { - if (isWS(c)) { - skipWS(ib); - c = ib.sgetc(); - } - if (isNL(c)) { - ib.sbumpc(); - continue; - } - if (isComment(c)) { - ib.sbumpc(); - skipComment(ib); - continue; - } - return; - } -} - -inline void -Properties::readEsc(wstring& s, streambuf& ib) -{ - int c = ib.sgetc(); - switch (c) { - case EOF: - return; - case 0x0a: // '\n' LF - case 0x0d: // '\r' CR - // escaped EOL (CR, LF, CRLF) - if ((c = ib.snextc()) != 0x0a) // '\n' LF - ib.sungetc(); - skipWS(ib); - return; - case 0x6e: // 'n' - // LF ("newline") char escape - c = 0x0a; // '\n' - break; - case 0x72: // 'r' - // CR ("return") char escape - c = 0x0d; // '\r' - break; - case 0x75: { // 'u' - // unicode escape - c = ib.sbumpc(); - // store input characters in case not an escape sequence - wstring raw; - raw += c; // silently drop backslash by general rule - unsigned int d = 0; - for (int i = 0; i < 4; i++) { - d <<= 4; - c = ib.sbumpc(); - raw += static_cast(c); // exlicit cast preferred - switch (c) { - case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: - case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: - // '0'..'9' - d += c - 0x30; // - '0' - break; - case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: - // 'A'..'F' - d += 10 + c - 0x41; // - 'A' - break; - case 0x61: case 0x62: case 0x63: case 0x64: case 0x65: case 0x66: - // 'a'..'f' - d += 10 + c - 0x61; // - 'a' - break; - case EOF: - default: - // not a unicode escape sequence, write the raw char sequence - s += static_cast(c); // exlicit cast preferred - return; - } - } - s += static_cast(d); // exlicit cast preferred - return; - } - default: - // unrecognized escape no error, silently drop preceding backslash - break; - } - s += static_cast(c); // exlicit cast preferred - ib.sbumpc(); -} - -inline void -Properties::readKey(wstring& s, streambuf& ib) -{ - int c; - while ((c = ib.sgetc()) != EOF) { - if (isKeyTerminator(c)) { - if (isNL(c)) { - return; - } - if (isWS(c)) { - skipWS(ib); - c = ib.sgetc(); - } - if (isAssign(c)) { - skipWS(ib); - } - return; - } - - ib.sbumpc(); - if (isEsc(c)) { - readEsc(s, ib); - } else { - s += static_cast(c); // exlicit cast preferred - } - } -} - -inline void -Properties::readValue(wstring& s, streambuf& ib) -{ - int c; - while ((c = ib.sgetc()) != EOF) { - ib.sbumpc(); - if (isNL(c)) { - return; - } - - if (isEsc(c)) { - readEsc(s, ib); - } else { - s += static_cast(c); // exlicit cast preferred - } - } -} - -inline bool -Properties::isPrintableAscii(wchar_t c) -{ - return (L'\x20' <= c && c <= L'\x7e'); -} - -inline void -Properties::writeAsciiEsc(streambuf& os, wchar_t c) -{ - assert (L'\x20' <= c && c <= L'\x7e'); - char d; - switch (c) { - case L'\t': // HT - d = '\x74'; // 't' - break; - case L'\n': // LF - d = '\x6e'; // 'n' - break; - case L'\f': // FF - d = '\x66'; // 'f' - break; - case L'\r': // CR - d = '\x72'; // 'r' - break; - case L' ': // SPACE - case L'!': - case L'#': - case L':': - case L'=': - case L'\\': - d = static_cast(c); // exlicit cast preferred - break; - default: - // write the raw character - int n = os.sputc(static_cast(c)); // explicit cast preferred - assert (n != EOF); // XXX handle error - (void)n; - return; - } - int n = os.sputc('\x5c'); // '\\' - assert (n != EOF); // XXX handle error - n = os.sputc(d); - assert (n != EOF); // XXX handle error -} - -inline void -Properties::writeUnicodeEsc(streambuf& os, wchar_t c) -{ - assert (c < L'\x20' || L'\x7e' < c); - - // subsequent code depends upon a UCS-2 (UTF-16) or UTF-32 - // encoding of wide characters - const int w = sizeof(wchar_t); - assert (w == 2 || w == 4); - assert (CHAR_BIT == 8); - - // write unicode escape sequence as "\\unnnn" or "\Unnnnnnnn" - int n = os.sputc('\x5c'); // '\\' - assert (n != EOF); // XXX handle error - n = os.sputc(w == 2 ? '\x75' : '\x55'); // 'u' : 'U' - assert (n != EOF); // XXX handle error - static const char ascii[] = { '\x30', '\x31', '\x32', '\x33', - '\x34', '\x35', '\x36', '\x37', - '\x38', '\x39', '\x41', '\x42', - '\x43', '\x44', '\x45', '\x46' }; // '0'..'F' - for (unsigned int i = w * 8 - 4; i >= 0; i -= 4) { - n = os.sputc(ascii[(c>>i) & 0xF]); - assert (n != EOF); // XXX handle error - } -} - -inline void -Properties::writeKey(streambuf& os, const wstring& s) -{ - for (wstring::const_iterator i = s.begin(); i != s.end(); ++i) { - const wchar_t c = *i; - if (isPrintableAscii(c)) - writeAsciiEsc(os, c); - else - writeUnicodeEsc(os, c); - } -} - -inline void -Properties::writeValue(streambuf& os, const wstring& s) -{ - wstring::const_iterator i = s.begin(); - for (; i != s.end() && *i == L'\x20'; ++i) { // L' ' SPACE - // write leading spaces escaped - writeAsciiEsc(os, *i); - } - for (; i != s.end(); ++i) { - const wchar_t c = *i; - if (c == L'\x20') { // L' ' SPACE - // write embedded or tailing spaces unescaped - int n = os.sputc('\x20'); // ' ' SPACE - assert (n != EOF); // XXX handle error - (void)n; - } else if (isPrintableAscii(c)) { - writeAsciiEsc(os, c); - } else { - writeUnicodeEsc(os, c); - } - } -} - -//--------------------------------------------------------------------------- - -void -Properties::load(const char* filename) -{ - assert (filename); - ifstream ifs; - ifs.open(filename); - assert (ifs.good()); // XXX handle error - assert (!ifs.bad()); // XXX handle error - load(ifs); - ifs.close(); -} - -void -Properties::load(istream& is) -{ - streambuf* ib = is.rdbuf(); - assert (ib != NULL); // XXX handle error - load(*ib); -} - -void -Properties::load(streambuf& ib) -{ - while (ib.sgetc() != EOF) { - readIgnored(ib); - if (ib.sgetc() == EOF) - return; - - // parse property - wstring k; - readKey(k, ib); - wstring v; - readValue(v, ib); - //wcout << "('" << k << "', '" << v << "')" << endl; - (*this)[k] = v; // YYY - //this->operator[](k) = v; - } -} - -void -Properties::store(const char* filename, const wstring* header) const -{ - assert (filename); - ofstream ofs; - ofs.open(filename); - assert (ofs.good()); // XXX handle error - assert (!ofs.bad()); // XXX handle error - store(ofs, header); - ofs.close(); -} - -void -Properties::store(ostream& os, const wstring* header) const -{ - streambuf* ob = os.rdbuf(); - assert (ob != NULL); // XXX handle error - store(*ob, header); -} - -void -Properties::store(streambuf& os, const wstring* header) const -{ - // subsequent code for writing the header, keys and values - // depends upon UCS-2 (UTF-16) or UTF-32 character encoding - const int w = sizeof(wchar_t); - assert (w == 2 || w == 4); - assert (CHAR_BIT == 8); - assert (L'!' == '\x21'); - assert (L'A' == '\x41'); - assert (L'a' == '\x61'); - assert (L'~' == '\x7e'); - (void)w; - - if (header != NULL) { - int n = os.sputc('\x23'); // '#' - assert (n != EOF); // XXX handle error - writeKey(os, *header); - n = os.sputc('\x0a'); // '\n' - assert (n != EOF); // XXX handle error - } - - for (const_iterator i = begin(); i != end(); ++i) { - const wstring& key = i->first; - const wstring& value = i->second; - writeKey(os, key); - int n = os.sputc('\x3d'); // '=' - assert (n != EOF); // XXX handle error - writeValue(os, value); - n = os.sputc('\x0a'); // '\n' - assert (n != EOF); // XXX handle error - } -} - -// --------------------------------------------------------------------------- === modified file 'storage/ndb/test/crund/martins_little_helpers/src/utils/Properties.hpp' --- a/storage/ndb/test/crund/martins_little_helpers/src/utils/Properties.hpp 2010-02-14 05:05:31 +0000 +++ b/storage/ndb/test/crund/martins_little_helpers/src/utils/Properties.hpp 2010-10-06 06:15:04 +0000 @@ -8,15 +8,23 @@ #include #include +#include #include +#include +#include +#include +#include +#include +#include namespace utils { using std::map; using std::wstring; +using std::ios_base; using std::istream; -using std::streambuf; using std::ostream; +using std::streambuf; /** * The Properties class is a specialized map container that stores @@ -61,13 +69,15 @@ public: * Reads properties from the file and adds them to this * property table. */ - void load(const char* filename); + void load(const char* filename) + throw (ios_base::failure); /** * Reads properties from the input stream and adds them to this * property table. */ - void load(istream& is); + void load(istream& is) + throw (ios_base::failure); /** * Reads properties from the input byte buffer and adds them to this @@ -78,17 +88,20 @@ public: * so, all non-ISO 8859-1 characters of the key and value strings * need to be expressed as an escape sequence. */ - void load(streambuf& ib); + void load(streambuf& ib) + throw (ios_base::failure); /** * Writes this property table to the file. */ - void store(const char* filename, const wstring* header = NULL) const; + void store(const char* filename, const wstring* header = NULL) const + throw (ios_base::failure); /** * Writes this property table to the output stream. */ - void store(ostream& os, const wstring* header = NULL) const; + void store(ostream& os, const wstring* header = NULL) const + throw (ios_base::failure); /** * Writes this property table to the output byte buffer. @@ -102,7 +115,8 @@ public: * header string, and a line separator are first written to the output * stream. Thus, the header can serve as an identifying comment. */ - void store(streambuf& ob, const wstring* header = NULL) const; + void store(streambuf& ob, const wstring* header = NULL) const + throw (ios_base::failure); protected: static bool isWS(int c); @@ -122,6 +136,7 @@ protected: static void writeUnicodeEsc(streambuf& os, wchar_t c); static void writeKey(streambuf& os, const wstring& s); static void writeValue(streambuf& os, const wstring& s); + static void writeChar(streambuf& os, char c); }; inline istream& @@ -138,6 +153,440 @@ operator<<(ostream& s, const Properties& return s; } +// --------------------------------------------------------------------------- +// Properties Implementation +// --------------------------------------------------------------------------- + +using std::cout; +using std::wcout; +using std::endl; +using std::ifstream; +using std::ofstream; +using std::streambuf; +using std::stringbuf; + +// --------------------------------------------------------------------------- + +inline bool +Properties::isWS(int c) +{ + switch (c) { + case 0x09: // '\t' HT + case 0x0c: // '\f' FF + case 0x20: // ' ' SPACE + return true; + } + return false; +} + +inline bool +Properties::isNL(int c) +{ + switch (c) { + case 0x0a: // '\n' LF + case 0x0d: // '\r' CR + return true; + } + return false; +} + +inline bool +Properties::isComment(int c) +{ + switch (c) { + case 0x21: // '!' + case 0x23: // '#' + return true; + } + return false; +} + +inline bool +Properties::isAssign(int c) +{ + switch (c) { + case 0x3a: // ':' + case 0x3d: // '=' + return true; + } + return false; +} + +inline bool +Properties::isKeyTerminator(int c) +{ + return isWS(c) || isAssign(c) || isNL(c); +} + +inline bool +Properties::isEsc(int c) +{ + switch (c) { + case 0x5c: // '\\' + return true; + } + return false; +} + +inline void +Properties::skipWS(streambuf& ib) +{ + int c; + while ((c = ib.snextc()) != EOF && isWS(c)); +} + +inline void +Properties::skipComment(streambuf& ib) +{ + int c; + // comments cannot have escaped line terminators + while ((c = ib.snextc()) != EOF && !isNL(c)); + ib.sbumpc(); +} + +inline void +Properties::readIgnored(streambuf& ib) +{ + int c; + while ((c = ib.sgetc()) != EOF) { + if (isWS(c)) { + skipWS(ib); + c = ib.sgetc(); + } + if (isNL(c)) { + ib.sbumpc(); + continue; + } + if (isComment(c)) { + ib.sbumpc(); + skipComment(ib); + continue; + } + return; + } +} + +inline void +Properties::readEsc(wstring& s, streambuf& ib) +{ + int c = ib.sgetc(); + switch (c) { + case EOF: + return; + case 0x0a: // '\n' LF + case 0x0d: // '\r' CR + // escaped EOL (CR, LF, CRLF) + if ((c = ib.snextc()) != 0x0a) // '\n' LF + ib.sungetc(); + skipWS(ib); + return; + case 0x6e: // 'n' + // LF ("newline") char escape + c = 0x0a; // '\n' + break; + case 0x72: // 'r' + // CR ("return") char escape + c = 0x0d; // '\r' + break; + case 0x75: { // 'u' + // unicode escape + c = ib.sbumpc(); + // store input characters in case not an escape sequence + wstring raw; + raw += c; // silently drop backslash by general rule + unsigned int d = 0; + for (int i = 0; i < 4; i++) { + d <<= 4; + c = ib.sbumpc(); + raw += static_cast(c); // exlicit cast preferred + switch (c) { + case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: + case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: + // '0'..'9' + d += c - 0x30; // - '0' + break; + case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: + // 'A'..'F' + d += 10 + c - 0x41; // - 'A' + break; + case 0x61: case 0x62: case 0x63: case 0x64: case 0x65: case 0x66: + // 'a'..'f' + d += 10 + c - 0x61; // - 'a' + break; + case EOF: + default: + // not a unicode escape sequence, write the raw char sequence + s += static_cast(c); // exlicit cast preferred + return; + } + } + s += static_cast(d); // exlicit cast preferred + return; + } + default: + // unrecognized escape no error, silently drop preceding backslash + break; + } + s += static_cast(c); // exlicit cast preferred + ib.sbumpc(); +} + +inline void +Properties::readKey(wstring& s, streambuf& ib) +{ + int c; + while ((c = ib.sgetc()) != EOF) { + if (isKeyTerminator(c)) { + if (isNL(c)) { + return; + } + if (isWS(c)) { + skipWS(ib); + c = ib.sgetc(); + } + if (isAssign(c)) { + skipWS(ib); + } + return; + } + + ib.sbumpc(); + if (isEsc(c)) { + readEsc(s, ib); + } else { + s += static_cast(c); // exlicit cast preferred + } + } +} + +inline void +Properties::readValue(wstring& s, streambuf& ib) +{ + int c; + while ((c = ib.sgetc()) != EOF) { + ib.sbumpc(); + if (isNL(c)) { + return; + } + + if (isEsc(c)) { + readEsc(s, ib); + } else { + s += static_cast(c); // exlicit cast preferred + } + } +} + +inline bool +Properties::isPrintableAscii(wchar_t c) +{ + return (L'\x20' <= c && c <= L'\x7e'); +} + +inline void +Properties::writeChar(streambuf& os, char c) +{ + int n = os.sputc(c); + if (n == EOF) + throw ios_base::failure("Error writing to streambuf"); +} + +inline void +Properties::writeAsciiEsc(streambuf& os, wchar_t c) +{ + assert(L'\x20' <= c && c <= L'\x7e'); + char d; + switch (c) { + case L'\t': // HT + d = '\x74'; // 't' + break; + case L'\n': // LF + d = '\x6e'; // 'n' + break; + case L'\f': // FF + d = '\x66'; // 'f' + break; + case L'\r': // CR + d = '\x72'; // 'r' + break; + case L' ': // SPACE + case L'!': + case L'#': + case L':': + case L'=': + case L'\\': + d = static_cast(c); // exlicit cast preferred + break; + default: + // write the raw character + writeChar(os, static_cast(c)); // explicit cast preferred + return; + } + writeChar(os, '\x5c'); // '\\' + writeChar(os, d); +} + +inline void +Properties::writeUnicodeEsc(streambuf& os, wchar_t c) +{ + assert(c < L'\x20' || L'\x7e' < c); + + // subsequent code depends upon a UCS-2 (UTF-16) or UTF-32 + // encoding of wide characters + const int w = sizeof(wchar_t); + assert(w == 2 || w == 4); + assert(CHAR_BIT == 8); + + // write unicode escape sequence as "\\unnnn" or "\Unnnnnnnn" + writeChar(os, '\x5c'); // '\\' + writeChar(os, w == 2 ? '\x75' : '\x55'); // 'u' : 'U' + static const char ascii[] = { '\x30', '\x31', '\x32', '\x33', + '\x34', '\x35', '\x36', '\x37', + '\x38', '\x39', '\x41', '\x42', + '\x43', '\x44', '\x45', '\x46' }; // '0'..'F' + for (unsigned int i = w * 8 - 4; i >= 0; i -= 4) { + writeChar(os, ascii[(c>>i) & 0xF]); + } +} + +inline void +Properties::writeKey(streambuf& os, const wstring& s) +{ + for (wstring::const_iterator i = s.begin(); i != s.end(); ++i) { + const wchar_t c = *i; + if (isPrintableAscii(c)) + writeAsciiEsc(os, c); + else + writeUnicodeEsc(os, c); + } +} + +inline void +Properties::writeValue(streambuf& os, const wstring& s) +{ + wstring::const_iterator i = s.begin(); + for (; i != s.end() && *i == L'\x20'; ++i) { // L' ' SPACE + // write leading spaces escaped + writeAsciiEsc(os, *i); + } + for (; i != s.end(); ++i) { + const wchar_t c = *i; + if (c == L'\x20') { // L' ' SPACE + // write embedded or tailing spaces unescaped + writeChar(os, '\x20'); // ' ' SPACE + } else if (isPrintableAscii(c)) { + writeAsciiEsc(os, c); + } else { + writeUnicodeEsc(os, c); + } + } +} + +// --------------------------------------------------------------------------- + +inline void +Properties::load(const char* filename) + throw (ios_base::failure) +{ + assert(filename); + ifstream ifs; + ifs.exceptions(ifstream::failbit | ifstream::badbit); + ifs.open(filename); + assert(!ifs.bad()); // thrown ios_base::failure + load(ifs); + ifs.close(); +} + +inline void +Properties::load(istream& is) + throw (ios_base::failure) +{ + istream::iostate exceptions = is.exceptions(); // backup + is.exceptions(istream::failbit | istream::badbit); + streambuf* ib = is.rdbuf(); + assert(ib != NULL); // thrown ios_base::failure + load(*ib); + is.exceptions(exceptions); // restore +} + +inline void +Properties::load(streambuf& ib) + throw (ios_base::failure) +{ + while (ib.sgetc() != EOF) { + readIgnored(ib); + if (ib.sgetc() == EOF) + return; + + // parse property + wstring k; + readKey(k, ib); + wstring v; + readValue(v, ib); + //wcout << "('" << k << "', '" << v << "')" << endl; + (*this)[k] = v; // YYY + //this->operator[](k) = v; + } +} + +inline void +Properties::store(const char* filename, const wstring* header) const + throw (ios_base::failure) +{ + assert(filename); + ofstream ofs; + ofs.exceptions(ifstream::failbit | ifstream::badbit); + ofs.open(filename); + assert(!ofs.bad()); + store(ofs, header); + ofs.close(); +} + +inline void +Properties::store(ostream& os, const wstring* header) const + throw (ios_base::failure) +{ + ostream::iostate exceptions = os.exceptions(); // backup + os.exceptions(istream::failbit | istream::badbit); + streambuf* ob = os.rdbuf(); + assert(ob != NULL); // thrown ios_base::failure + store(*ob, header); + os.exceptions(exceptions); // restore +} + +inline void +Properties::store(streambuf& os, const wstring* header) const + throw (ios_base::failure) +{ + // subsequent code for writing the header, keys and values + // depends upon UCS-2 (UTF-16) or UTF-32 character encoding + const int w = sizeof(wchar_t); + assert(w == 2 || w == 4); + assert(CHAR_BIT == 8); + assert(L'!' == '\x21'); + assert(L'A' == '\x41'); + assert(L'a' == '\x61'); + assert(L'~' == '\x7e'); + (void)w; + + if (header != NULL) { + writeChar(os, '\x23'); // '#' + writeKey(os, *header); + writeChar(os, '\x0a'); // '\n' + } + + for (const_iterator i = begin(); i != end(); ++i) { + const wstring& key = i->first; + const wstring& value = i->second; + writeKey(os, key); + writeChar(os, '\x3d'); // '=' + writeValue(os, value); + writeChar(os, '\x0a'); // '\n' + } +} + +// --------------------------------------------------------------------------- + } // utils #endif // Properties_hpp --===============2046107214== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/martin.zaun@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: martin.zaun@stripped # target_branch: file:///Users/mz/mysql/ndb-7.1-opt64/ # testament_sha1: 97b7c7245a1054961a20e58917ce7167a50ffc8e # timestamp: 2010-10-05 23:15:18 -0700 # base_revision_id: martin.zaun@stripped\ # 431upumcvshncq1u # # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWZa9DKwAC6j/gGRUAAF5//// ++/fvr////9gEPxn3XKWg6G3FzJ21HQQEw61tJNgBoaGtsBoSAqgIwkkp5FPJ6pp4KME9TSMCekN NoINPSMgBoBpo0ASppkTTTTQ1GiT1ANTaTTanqZMjIMgbUYCNGjQaBxoaBo0yNNGmQGJggABoDQG mQGBMgSakQSZU8NU8JptCNATTTCNGTEaA0aANAAHGhoGjTI00aZAYmCAAGgNAaZAYEyBIkEAImTE DQJk0TBT0TT00p7VMelHqPU8po0D1NPKZfewJAWSAHd6D/Vi9HP2ZddTJ+N+aORMxAOesZ+ls/8b kpGIK+bwyumreL4e4FSzo+3VYdrPG/q4KhaR9dfaWhaxnBcteOMwgn7dZV1kV1Uhf1piozgRh6ID z7clXSyc7MOt+ebsHQ1MN02KR0Uqz2V49EQpJKpJsS4fabkExgxNE/i9U/yKhUauwhNluEIiGaUh zgwlCk7JxFsTCwL1DKD4MbytV/M4qXaza2OEubipn6ktJARESsJmRNsn1S81M4nBjjhV2AK52vaU bayAW4hDe2IGxtJS9mSQhJicUZAgIkJA4gy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