initialize output end of line
| 665 | |
| 666 | // initialize output end of line |
| 667 | void ASConsole::initializeOutputEOL(LineEndFormat lineEndFormat) |
| 668 | { |
| 669 | assert(lineEndFormat == LINEEND_DEFAULT |
| 670 | || lineEndFormat == LINEEND_WINDOWS |
| 671 | || lineEndFormat == LINEEND_LINUX |
| 672 | || lineEndFormat == LINEEND_MACOLD); |
| 673 | |
| 674 | outputEOL[0] = '\0'; // current line end |
| 675 | prevEOL[0] = '\0'; // previous line end |
| 676 | lineEndsMixed = false; // output has mixed line ends, LINEEND_DEFAULT only |
| 677 | |
| 678 | if (lineEndFormat == LINEEND_WINDOWS) |
| 679 | strcpy(outputEOL, "\r\n"); |
| 680 | else if (lineEndFormat == LINEEND_LINUX) |
| 681 | strcpy(outputEOL, "\n"); |
| 682 | else if (lineEndFormat == LINEEND_MACOLD) |
| 683 | strcpy(outputEOL, "\r"); |
| 684 | else |
| 685 | outputEOL[0] = '\0'; |
| 686 | } |
| 687 | |
| 688 | |
| 689 | FileEncoding ASConsole::readFile(const string &fileName_, stringstream &in) const |
nothing calls this directly
no outgoing calls
no test coverage detected