diff options
Diffstat (limited to 'src/Document.cxx')
-rw-r--r-- | src/Document.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index da07b6b73..8a825650a 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -1112,17 +1112,17 @@ void Document::Indent(bool forwards, int lineBottom, int lineTop) { // Convert line endings for a piece of text to a particular mode. // Stop at len or when a NUL is found. // Caller must delete the returned pointer. -char *Document::TransformLineEnds(int *pLenOut, const char *s, size_t len, int eolMode) { +char *Document::TransformLineEnds(int *pLenOut, const char *s, size_t len, int eolModeWanted) { char *dest = new char[2 * len + 1]; const char *sptr = s; char *dptr = dest; for (size_t i = 0; (i < len) && (*sptr != '\0'); i++) { if (*sptr == '\n' || *sptr == '\r') { - if (eolMode == SC_EOL_CR) { + if (eolModeWanted == SC_EOL_CR) { *dptr++ = '\r'; - } else if (eolMode == SC_EOL_LF) { + } else if (eolModeWanted == SC_EOL_LF) { *dptr++ = '\n'; - } else { // eolMode == SC_EOL_CRLF + } else { // eolModeWanted == SC_EOL_CRLF *dptr++ = '\r'; *dptr++ = '\n'; } |