| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium 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 "tools/gn/standard_out.h" | 5 #include "tools/gn/standard_out.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 break; | 88 break; |
| 89 case DECORATION_YELLOW: | 89 case DECORATION_YELLOW: |
| 90 ::SetConsoleTextAttribute(hstdout, | 90 ::SetConsoleTextAttribute(hstdout, |
| 91 FOREGROUND_RED | FOREGROUND_GREEN); | 91 FOREGROUND_RED | FOREGROUND_GREEN); |
| 92 break; | 92 break; |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 | 95 |
| 96 DWORD written = 0; | 96 DWORD written = 0; |
| 97 ::WriteFile(hstdout, output.c_str(), static_cast<DWORD>(output.size()), | 97 ::WriteFile(hstdout, output.c_str(), static_cast<DWORD>(output.size()), |
| 98 &written, NULL); | 98 &written, nullptr); |
| 99 | 99 |
| 100 if (is_console) | 100 if (is_console) |
| 101 ::SetConsoleTextAttribute(hstdout, default_attributes); | 101 ::SetConsoleTextAttribute(hstdout, default_attributes); |
| 102 } | 102 } |
| 103 | 103 |
| 104 #else | 104 #else |
| 105 | 105 |
| 106 void OutputString(const std::string& output, TextDecoration dec) { | 106 void OutputString(const std::string& output, TextDecoration dec) { |
| 107 EnsureInitialized(); | 107 EnsureInitialized(); |
| 108 if (is_console) { | 108 if (is_console) { |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 break; | 186 break; |
| 187 } else if (line[char_i] != ' ') { | 187 } else if (line[char_i] != ' ') { |
| 188 break; | 188 break; |
| 189 } | 189 } |
| 190 } | 190 } |
| 191 | 191 |
| 192 OutputString(line + "\n", dec); | 192 OutputString(line + "\n", dec); |
| 193 } | 193 } |
| 194 } | 194 } |
| 195 | 195 |
| OLD | NEW |