Compared files  

Left
C:\SDK\wxWidgets-2.6.2\contrib\src\stc\scintilla\src\CellBuffer.cxx
Last modified2005-03-21 12:17:52.000 +0100
Size28.1 Kb (1125 Lines)
EncodingLatin 1 - ANSI (CP1252) default
Right
C:\SDK\wxWidgets-2.6.3\contrib\src\stc\scintilla\src\CellBuffer.cxx
Last modified2006-03-16 13:07:02.000 +0100
Size28.1 Kb (1121 Lines)
EncodingLatin 1 - ANSI (CP1252) default


   Comparison Statistics  

Detailed Statistics

All Changes
 BlocksLines
Unchanged161103
Inserted34
Deleted17
Ignored00
Changed1129



   Comparison Details  

253 skipped lines
254 254         linesData[i] = linesData[i + 1];
255 255     }
256 256     if (levels) {
257         // Level information merges back onto previous line 257         // Move up following lines but merge header flag from this line
258         int posAbove = pos - 1; 258         // to line before to avoid a temporary disappearence causing expansion.
259         if (posAbove < 0)  
260         posAbove = 0; 259         int firstHeader = levels[pos] & SC_FOLDLEVELHEADERFLAG;
261         for (int j = posAbove; j < lines; j++) { 260         for (int j = pos; j < lines; j++) {
262 261         levels[j] = levels[j + 1];
263 262         }
  263         if (pos > 0)
  264         levels[pos-1] |= firstHeader;
264 265     }
265 266     lines--;
266 267 }
197 skipped lines
464 465         } else if (currentAction == savePoint) {
465 466         currentAction++;
466 467         } else if ((at == insertAction) &&
467                    (position != (actPrevious.position + actPrevious.lenData*2))) { 468                    (position != (actPrevious.position + actPrevious.lenData))) {
468 469         // Insertions must be immediately after to coalesce
469 470         currentAction++;
470 471         } else if (!actions[currentAction].mayCoalesce) {
1 skipped line
472 473         currentAction++;
473 474         } else if (at == removeAction) {
474 475         if ((lengthData == 1) || (lengthData == 2)){
475         if ((position + lengthData * 2) == actPrevious.position) { 476         if ((position + lengthData) == actPrevious.position) {
476 477         ; // Backspace -> OK
477 478         } else if (position == actPrevious.position) {
478 479         ; // Delete -> OK
245 skipped lines
724 725         for (int i = 0; i < insertLength / 2; i++) {
725 726         data[i] = s[i * 2];
726 727         }
727         uh.AppendAction(insertAction, position, data, insertLength / 2); 728         uh.AppendAction(insertAction, position / 2, data, insertLength / 2);
728 729         }
729 730  
730 731         BasicInsertString(position, s, insertLength);
1 skipped line
732 733     return data;
733 734 }
734 735  
735 void CellBuffer::InsertCharStyle(int position, char ch, char style) {  
736     char s[2];  
737     s[0] = ch;  
738     s[1] = style;  
739     InsertString(position*2, s, 2);  
740 }  
741    
742 736 bool CellBuffer::SetStyleAt(int position, char style, char mask) {
743 737     style &= mask;
744 738     char curVal = ByteAt(position * 2 + 1);
23 skipped lines
768 762  
769 763 const char *CellBuffer::DeleteChars(int position, int deleteLength) {
770 764     // InsertString and DeleteChars are the bottleneck though which all changes occur
  765     PLATFORM_ASSERT(deleteLength > 0);
771 766     char *data = 0;
772 767     if (!readOnly) {
773 768         if (collectingUndo) {
2 skipped lines
776 771         for (int i = 0; i < deleteLength / 2; i++) {
777 772         data[i] = ByteAt(position + i * 2);
778 773         }
779         uh.AppendAction(removeAction, position, data, deleteLength / 2); 774         uh.AppendAction(removeAction, position / 2, data, deleteLength / 2);
780 775         }
781 776  
782 777         BasicDeleteChars(position, deleteLength);
91 skipped lines
874 869     //Platform::DebugPrintf("Inserting at %d for %d\n", position, insertLength);
875 870     if (insertLength == 0)
876 871         return ;
  872     PLATFORM_ASSERT(insertLength > 0);
877 873     RoomFor(insertLength);
878 874     GapTo(position);
879 875  
148 skipped lines
1028 1024 }
1029 1025  
1030 1026 bool CellBuffer::CanUndo() {
1031     return (!readOnly) && (uh.CanUndo()); 1027     return uh.CanUndo();
1032 1028 }
1033 1029  
1034 1030 int CellBuffer::StartUndo() {
7 skipped lines
1042 1038 void CellBuffer::PerformUndoStep() {
1043 1039     const Action &actionStep = uh.GetUndoStep();
1044 1040     if (actionStep.at == insertAction) {
1045         BasicDeleteChars(actionStep.position, actionStep.lenData*2); 1041         BasicDeleteChars(actionStep.position*2, actionStep.lenData*2);
1046 1042     } else if (actionStep.at == removeAction) {
1047 1043         char *styledData = new char[actionStep.lenData * 2];
1048 1044         for (int i = 0; i < actionStep.lenData; i++) {
1049 1045         styledData[i*2] = actionStep.data[i];
1050 1046         styledData[i*2 + 1] = 0;
1051 1047         }
1052         BasicInsertString(actionStep.position, styledData, actionStep.lenData*2); 1048         BasicInsertString(actionStep.position*2, styledData, actionStep.lenData*2);
1053 1049         delete []styledData;
1054 1050     }
1055 1051     uh.CompletedUndoStep();
1056 1052 }
1057 1053  
1058 1054 bool CellBuffer::CanRedo() {
1059     return (!readOnly) && (uh.CanRedo()); 1055     return uh.CanRedo();
1060 1056 }
1061 1057  
1062 1058 int CellBuffer::StartRedo() {
12 skipped lines
1075 1071         styledData[i*2] = actionStep.data[i];
1076 1072         styledData[i*2 + 1] = 0;
1077 1073         }
1078         BasicInsertString(actionStep.position, styledData, actionStep.lenData*2); 1074         BasicInsertString(actionStep.position*2, styledData, actionStep.lenData*2);
1079 1075         delete []styledData;
1080 1076     } else if (actionStep.at == removeAction) {
1081         BasicDeleteChars(actionStep.position, actionStep.lenData*2); 1077         BasicDeleteChars(actionStep.position*2, actionStep.lenData*2);
1082 1078     }
1083 1079     uh.CompletedRedoStep();
1084 1080 }
41 skipped lines

   Text comparison Options  

Syntax colouring language used: C / C++
Match character case: yes.
Match line endings: no.
Match spaces

At start of lines: yes,
In middle of lines: yes,
At end of lines: yes.
Blank lines as empty lines: no.
Activate comparison algorithm
At word level: yes,
At character level: no.


   Legend  

Unchanged lineExample of unchanged line
Modified lineExample of modified line
Added lineExample of added line
Removed lineExample of removed line
Ignored lineExample of ignored line

This report has been generated by Ellié Computing Merge on 2006-09-07 15:48:14.001 +0200.
© 2005-2006 Ellié Computing http://www.elliecomputing.com. All rights reserved.