equal
deleted
inserted
replaced
73 for (char ch; std::cin.read(&ch, 1).good() && ch != SEPARATOR;) s.put(ch); |
73 for (char ch; std::cin.read(&ch, 1).good() && ch != SEPARATOR;) s.put(ch); |
74 return convertor.from_bytes(s.str()); |
74 return convertor.from_bytes(s.str()); |
75 } |
75 } |
76 |
76 |
77 void writeString(std::wstring s) { |
77 void writeString(std::wstring s) { |
|
78 // if the value contains a null byte 0x00, it will be trimmed (passing 0x00 through would break the protocol) |
78 std::cout << convertor.to_bytes(s.c_str()); |
79 std::cout << convertor.to_bytes(s.c_str()); |
79 std::cout.put(SEPARATOR); |
80 std::cout.put(SEPARATOR); |
80 if (std::cout.bad()) throw std::runtime_error("Unable to write to sub-process."); |
81 if (std::cout.bad()) throw std::runtime_error("Unable to write to sub-process."); |
81 } |
82 } |
82 |
83 |