------------------------------------------------------------------------------
| 56 | |
| 57 | //------------------------------------------------------------------------------ |
| 58 | void vtkWin32ProcessOutputWindow::DisplayText(const char* text) |
| 59 | { |
| 60 | std::lock_guard<std::mutex> lock(vtkWin32ProcessOutputWindowMutex); |
| 61 | // Display the text if the pipe has not been broken. |
| 62 | if (!this->Broken && text) |
| 63 | { |
| 64 | const char* begin = text; |
| 65 | while (const char* end = strchr(begin, '\n')) |
| 66 | { |
| 67 | this->Write(begin, end - begin); |
| 68 | this->Write("\r\n", 2); |
| 69 | begin = end + 1; |
| 70 | } |
| 71 | this->Write(begin, strlen(begin)); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | //------------------------------------------------------------------------------ |
| 76 | int vtkWin32ProcessOutputWindow::Initialize() |