From e4f0b986b904700fe3c9a8279fb20238305d0177 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sun, 25 Aug 2002 04:19:45 +0000 Subject: [PATCH] Comment out a debug printf git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/stc/scintilla/src/Editor.cxx | 38 ++++++++++++------------ src/stc/scintilla/src/Editor.cxx | 38 ++++++++++++------------ 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/contrib/src/stc/scintilla/src/Editor.cxx b/contrib/src/stc/scintilla/src/Editor.cxx index fd8a2d719c..554751123d 100644 --- a/contrib/src/stc/scintilla/src/Editor.cxx +++ b/contrib/src/stc/scintilla/src/Editor.cxx @@ -91,7 +91,7 @@ void LineLayout::SetLineStart(int line, int start) { if ((line >= lenLineStarts) && (line != 0)) { int newMaxLines = line + 20; int *newLineStarts = new int[newMaxLines]; - if (!newLineStarts) + if (!newLineStarts) return; for (int i=0; iLineStart(lineNumber); int posLineEnd = pdoc->LineStart(lineNumber + 1); int lineCaret = pdoc->LineFromPosition(currentPos); - return llc.Retrieve(lineNumber, lineCaret, + return llc.Retrieve(lineNumber, lineCaret, posLineEnd - posLineStart, pdoc->GetStyleClock(), LinesOnScreen() + 1, pdoc->LinesTotal()); } @@ -1332,7 +1332,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou } else { ll->edgeColumn = -1; } - + int posLineEnd = pdoc->LineStart(line + 1); Font &ctrlCharsFont = vstyle.styles[STYLE_CONTROLCHAR].font; char styleByte = 0; @@ -1361,7 +1361,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou ll->chars[numCharsInLine] = 0; // Also triggers processing in the loops as this is a control character ll->styles[numCharsInLine] = styleByte; // For eolFilled ll->indicators[numCharsInLine] = 0; - + // Layout the line, determining the position of each character, // with an extra element at the end for the end of the line. int startseg = 0; // Start of the current segment, in char. number @@ -1369,7 +1369,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou ll->positions[0] = 0; unsigned int tabWidth = vstyle.spaceWidth * pdoc->tabInChars; bool lastSegItalics = false; - + for (int charInLine = 0; charInLine < numCharsInLine; charInLine++) { if ((ll->styles[charInLine] != ll->styles[charInLine + 1]) || IsControlCharacter(ll->chars[charInLine]) || IsControlCharacter(ll->chars[charInLine + 1])) { @@ -1830,7 +1830,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { //Platform::DebugPrintf("Abandoning paint\n"); if (wrapState != eWrapNone) { if (paintAbandonedByStyling) { - // Styling has spilled over a line end, such as occurs by starting a multiline + // Styling has spilled over a line end, such as occurs by starting a multiline // comment. The width of subsequent text may have changed, so rewrap. NeedWrapping(cs.DocFromDisplay(topLine)); } @@ -1898,7 +1898,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { ll->selEnd = -1; ll->containsCaret = false; } - + PRectangle rcLine = rcClient; rcLine.top = ypos; rcLine.bottom = ypos + vs.lineHeight; @@ -1907,11 +1907,11 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { // Highlight the current braces if any ll->SetBracesHighlight(rangeLine, braces, static_cast(bracesMatchStyle), highlightGuideColumn * vs.spaceWidth); - + // Draw the line DrawLine(surface, vs, lineDoc, visibleLine, xStart, rcLine, ll, subLine); //durPaint += et.Duration(true); - + // Restore the precvious styles for the brace highlights in case layout is in cache. ll->RestoreBracesHighlight(rangeLine, braces); @@ -1930,7 +1930,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); } } - + // Draw the Caret if (lineDoc == lineCaret) { int offset = Platform::Minimum(posCaret - rangeLine.start, ll->maxLineLength); @@ -1969,7 +1969,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { } } } - + if (bufferedDraw) { Point from(vs.fixedColumnWidth, 0); PRectangle rcCopyArea(vs.fixedColumnWidth, yposScreen, @@ -1978,7 +1978,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { } //durCopy += et.Duration(true); } - + if (!bufferedDraw) { ypos += vs.lineHeight; } @@ -2006,7 +2006,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { } } //Platform::DebugPrintf( - //"Layout:%9.6g Paint:%9.6g Ratio:%9.6g Copy:%9.6g Total:%9.6g\n", + //"Layout:%9.6g Paint:%9.6g Ratio:%9.6g Copy:%9.6g Total:%9.6g\n", //durLayout, durPaint, durLayout / durPaint, durCopy, etWhole.Duration()); NotifyPainted(); } @@ -2228,7 +2228,7 @@ void Editor::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) { SetLastXChosen(); if (treatAsDBCS) { - NotifyChar((static_cast(s[0]) << 8) | + NotifyChar((static_cast(s[0]) << 8) | static_cast(s[1])); } else { int byte = static_cast(s[0]); diff --git a/src/stc/scintilla/src/Editor.cxx b/src/stc/scintilla/src/Editor.cxx index fd8a2d719c..554751123d 100644 --- a/src/stc/scintilla/src/Editor.cxx +++ b/src/stc/scintilla/src/Editor.cxx @@ -91,7 +91,7 @@ void LineLayout::SetLineStart(int line, int start) { if ((line >= lenLineStarts) && (line != 0)) { int newMaxLines = line + 20; int *newLineStarts = new int[newMaxLines]; - if (!newLineStarts) + if (!newLineStarts) return; for (int i=0; iLineStart(lineNumber); int posLineEnd = pdoc->LineStart(lineNumber + 1); int lineCaret = pdoc->LineFromPosition(currentPos); - return llc.Retrieve(lineNumber, lineCaret, + return llc.Retrieve(lineNumber, lineCaret, posLineEnd - posLineStart, pdoc->GetStyleClock(), LinesOnScreen() + 1, pdoc->LinesTotal()); } @@ -1332,7 +1332,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou } else { ll->edgeColumn = -1; } - + int posLineEnd = pdoc->LineStart(line + 1); Font &ctrlCharsFont = vstyle.styles[STYLE_CONTROLCHAR].font; char styleByte = 0; @@ -1361,7 +1361,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou ll->chars[numCharsInLine] = 0; // Also triggers processing in the loops as this is a control character ll->styles[numCharsInLine] = styleByte; // For eolFilled ll->indicators[numCharsInLine] = 0; - + // Layout the line, determining the position of each character, // with an extra element at the end for the end of the line. int startseg = 0; // Start of the current segment, in char. number @@ -1369,7 +1369,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou ll->positions[0] = 0; unsigned int tabWidth = vstyle.spaceWidth * pdoc->tabInChars; bool lastSegItalics = false; - + for (int charInLine = 0; charInLine < numCharsInLine; charInLine++) { if ((ll->styles[charInLine] != ll->styles[charInLine + 1]) || IsControlCharacter(ll->chars[charInLine]) || IsControlCharacter(ll->chars[charInLine + 1])) { @@ -1830,7 +1830,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { //Platform::DebugPrintf("Abandoning paint\n"); if (wrapState != eWrapNone) { if (paintAbandonedByStyling) { - // Styling has spilled over a line end, such as occurs by starting a multiline + // Styling has spilled over a line end, such as occurs by starting a multiline // comment. The width of subsequent text may have changed, so rewrap. NeedWrapping(cs.DocFromDisplay(topLine)); } @@ -1898,7 +1898,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { ll->selEnd = -1; ll->containsCaret = false; } - + PRectangle rcLine = rcClient; rcLine.top = ypos; rcLine.bottom = ypos + vs.lineHeight; @@ -1907,11 +1907,11 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { // Highlight the current braces if any ll->SetBracesHighlight(rangeLine, braces, static_cast(bracesMatchStyle), highlightGuideColumn * vs.spaceWidth); - + // Draw the line DrawLine(surface, vs, lineDoc, visibleLine, xStart, rcLine, ll, subLine); //durPaint += et.Duration(true); - + // Restore the precvious styles for the brace highlights in case layout is in cache. ll->RestoreBracesHighlight(rangeLine, braces); @@ -1930,7 +1930,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); } } - + // Draw the Caret if (lineDoc == lineCaret) { int offset = Platform::Minimum(posCaret - rangeLine.start, ll->maxLineLength); @@ -1969,7 +1969,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { } } } - + if (bufferedDraw) { Point from(vs.fixedColumnWidth, 0); PRectangle rcCopyArea(vs.fixedColumnWidth, yposScreen, @@ -1978,7 +1978,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { } //durCopy += et.Duration(true); } - + if (!bufferedDraw) { ypos += vs.lineHeight; } @@ -2006,7 +2006,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { } } //Platform::DebugPrintf( - //"Layout:%9.6g Paint:%9.6g Ratio:%9.6g Copy:%9.6g Total:%9.6g\n", + //"Layout:%9.6g Paint:%9.6g Ratio:%9.6g Copy:%9.6g Total:%9.6g\n", //durLayout, durPaint, durLayout / durPaint, durCopy, etWhole.Duration()); NotifyPainted(); } @@ -2228,7 +2228,7 @@ void Editor::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) { SetLastXChosen(); if (treatAsDBCS) { - NotifyChar((static_cast(s[0]) << 8) | + NotifyChar((static_cast(s[0]) << 8) | static_cast(s[1])); } else { int byte = static_cast(s[0]); -- 2.45.2