| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/ostreams.h" | 5 #include "src/ostreams.h" |
| 6 | 6 |
| 7 #if V8_OS_WIN | 7 #if V8_OS_WIN |
| 8 #if _MSC_VER < 1900 | 8 #if _MSC_VER < 1900 |
| 9 #define snprintf sprintf_s | 9 #define snprintf sprintf_s |
| 10 #endif | 10 #endif |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 | 65 |
| 66 std::ostream& operator<<(std::ostream& os, const AsReversiblyEscapedUC16& c) { | 66 std::ostream& operator<<(std::ostream& os, const AsReversiblyEscapedUC16& c) { |
| 67 return PrintUC16(os, c.value, IsOK); | 67 return PrintUC16(os, c.value, IsOK); |
| 68 } | 68 } |
| 69 | 69 |
| 70 | 70 |
| 71 std::ostream& operator<<(std::ostream& os, const AsEscapedUC16ForJSON& c) { | 71 std::ostream& operator<<(std::ostream& os, const AsEscapedUC16ForJSON& c) { |
| 72 if (c.value == '\n') return os << "\\n"; | 72 if (c.value == '\n') return os << "\\n"; |
| 73 if (c.value == '\r') return os << "\\r"; | 73 if (c.value == '\r') return os << "\\r"; |
| 74 if (c.value == '\t') return os << "\\t"; |
| 74 if (c.value == '\"') return os << "\\\""; | 75 if (c.value == '\"') return os << "\\\""; |
| 75 return PrintUC16(os, c.value, IsOK); | 76 return PrintUC16(os, c.value, IsOK); |
| 76 } | 77 } |
| 77 | 78 |
| 78 | 79 |
| 79 std::ostream& operator<<(std::ostream& os, const AsUC16& c) { | 80 std::ostream& operator<<(std::ostream& os, const AsUC16& c) { |
| 80 return PrintUC16(os, c.value, IsPrint); | 81 return PrintUC16(os, c.value, IsPrint); |
| 81 } | 82 } |
| 82 | 83 |
| 83 } // namespace internal | 84 } // namespace internal |
| 84 } // namespace v8 | 85 } // namespace v8 |
| OLD | NEW |