Tera Termの個人的な作業用リポジトリ
修订版 | 46e659f640bd915ea5a88e5031dd907509fc5a26 (tree) |
---|---|
时间 | 2020-04-26 23:35:00 |
作者 | zmatsuo <zmatsuo@user...> |
Commiter | zmatsuo |
無効化した箇所を削除した
git-svn-id: svn+ssh://svn.osdn.net/svnroot/ttssh2/trunk@8746 f5f01b69-1e22-0410-acbf-894ab4bd6246
@@ -94,20 +94,6 @@ static int NTabStops; | ||
94 | 94 | |
95 | 95 | static WORD BuffLock = 0; |
96 | 96 | |
97 | -//static PCHAR CodeBuff; /* Character code buffer */ | |
98 | -//static PCHAR AttrBuff; /* Attribute buffer */ | |
99 | -//static PCHAR AttrBuff2; /* Color attr buffer */ | |
100 | -//static PCHAR AttrBuffFG; /* Foreground color attr buffer */ | |
101 | -//static PCHAR AttrBuffBG; /* Background color attr buffer */ | |
102 | -#define ATR 0 | |
103 | -#if ATR | |
104 | -static PCHAR CodeLine; | |
105 | -static PCHAR AttrLine; | |
106 | -static PCHAR AttrLine2; | |
107 | -static PCHAR AttrLineFG; | |
108 | -static PCHAR AttrLineBG; | |
109 | -static buff_char_t *CodeLineW; | |
110 | -#endif | |
111 | 97 | static buff_char_t *CodeBuffW; |
112 | 98 | static LONG LinePtr; |
113 | 99 | static LONG BufferSize; |
@@ -382,51 +368,14 @@ static BOOL ChangeBuffer(int Nx, int Ny) | ||
382 | 368 | |
383 | 369 | NewSize = (LONG)Nx * (LONG)Ny; |
384 | 370 | |
385 | -// CodeDest = NULL; | |
386 | -// AttrDest = NULL; | |
387 | -// AttrDest2 = NULL; | |
388 | -// AttrDestFG = NULL; | |
389 | -// AttrDestBG = NULL; | |
390 | 371 | CodeDestW = NULL; |
391 | - | |
392 | -#if 0 | |
393 | - CodeDest = malloc(NewSize); | |
394 | - if (CodeDest == NULL) { | |
395 | - goto allocate_error; | |
396 | - } | |
397 | -#endif | |
398 | -#if 0 | |
399 | - AttrDest = malloc(NewSize); | |
400 | - if (AttrDest == NULL) { | |
401 | - goto allocate_error; | |
402 | - } | |
403 | - AttrDest2 = malloc(NewSize); | |
404 | - if (AttrDest2 == NULL) { | |
405 | - goto allocate_error; | |
406 | - } | |
407 | -#endif | |
408 | -#if 0 | |
409 | - AttrDestFG = malloc(NewSize); | |
410 | - if (AttrDestFG == NULL) { | |
411 | - goto allocate_error; | |
412 | - } | |
413 | - AttrDestBG = malloc(NewSize); | |
414 | - if (AttrDestBG == NULL) { | |
415 | - goto allocate_error; | |
416 | - } | |
417 | -#endif | |
418 | 372 | CodeDestW = malloc(NewSize * sizeof(buff_char_t)); |
419 | 373 | if (CodeDestW == NULL) { |
420 | 374 | goto allocate_error; |
421 | 375 | } |
422 | 376 | |
423 | -// memset(&CodeDest[0], 0x20, NewSize); | |
424 | 377 | memset(&CodeDestW[0], 0, NewSize * sizeof(buff_char_t)); |
425 | 378 | memsetW(&CodeDestW[0], 0x20, AttrDefaultFG, AttrDefaultBG, AttrDefault, AttrDefault, NewSize); |
426 | -// memset(&AttrDest[0], AttrDefault, NewSize); | |
427 | -// memset(&AttrDest2[0], AttrDefault, NewSize); | |
428 | -// memset(&AttrDestFG[0], AttrDefaultFG, NewSize); | |
429 | -// memset(&AttrDestBG[0], AttrDefaultBG, NewSize); | |
430 | 379 | if ( CodeBuffW != NULL ) { |
431 | 380 | if ( NumOfColumns > Nx ) { |
432 | 381 | NxCopy = Nx; |
@@ -446,20 +395,8 @@ static BOOL ChangeBuffer(int Nx, int Ny) | ||
446 | 395 | SrcPtr = GetLinePtr(BuffEnd-NyCopy); |
447 | 396 | DestPtr = 0; |
448 | 397 | for (i = 1 ; i <= NyCopy ; i++) { |
449 | -// memcpy(&CodeDest[DestPtr],&CodeBuff[SrcPtr],NxCopy); | |
450 | 398 | memcpyW(&CodeDestW[DestPtr],&CodeBuffW[SrcPtr],NxCopy); |
451 | -// memcpy(&AttrDest[DestPtr],&AttrBuff[SrcPtr],NxCopy); | |
452 | -// memcpy(&AttrDest2[DestPtr],&AttrBuff2[SrcPtr],NxCopy); | |
453 | -// memcpy(&AttrDestFG[DestPtr],&AttrBuffFG[SrcPtr],NxCopy); | |
454 | -// memcpy(&AttrDestBG[DestPtr],&AttrBuffBG[SrcPtr],NxCopy); | |
455 | -#if 0 | |
456 | - if (AttrDest[DestPtr+NxCopy-1] & AttrKanji) { | |
457 | - CodeDest[DestPtr+NxCopy-1] = ' '; | |
458 | - AttrDest[DestPtr+NxCopy-1] ^= AttrKanji; | |
459 | - } | |
460 | -#endif | |
461 | 399 | if (CodeDestW[DestPtr+NxCopy-1].attr & AttrKanji) { |
462 | -// CodeDest[DestPtr+NxCopy-1] = ' '; | |
463 | 400 | BuffSetChar(&CodeDestW[DestPtr + NxCopy - 1], ' ', 'H'); |
464 | 401 | CodeDestW[DestPtr+NxCopy-1].attr ^= AttrKanji; |
465 | 402 | } |
@@ -491,11 +428,6 @@ static BOOL ChangeBuffer(int Nx, int Ny) | ||
491 | 428 | (SelectEnd.x > SelectStart.x)); |
492 | 429 | } |
493 | 430 | |
494 | -// CodeBuff = CodeDest; | |
495 | -// AttrBuff = AttrDest; | |
496 | -// AttrBuff2 = AttrDest2; | |
497 | -// AttrBuffFG = AttrDestFG; | |
498 | -// AttrBuffBG = AttrDestBG; | |
499 | 431 | CodeBuffW = CodeDestW; |
500 | 432 | BufferSize = NewSize; |
501 | 433 | NumOfLinesInBuff = Ny; |
@@ -513,14 +445,6 @@ static BOOL ChangeBuffer(int Nx, int Ny) | ||
513 | 445 | |
514 | 446 | LinePtr = 0; |
515 | 447 | if (LockOld>0) { |
516 | -#if ATR | |
517 | - CodeLine = CodeBuff; | |
518 | - CodeLineW = CodeBuffW; | |
519 | - AttrLine = AttrBuff; | |
520 | - AttrLine2 = AttrBuff2; | |
521 | - AttrLineFG = AttrBuffFG; | |
522 | - AttrLineBG = AttrBuffBG; | |
523 | -#endif | |
524 | 448 | } |
525 | 449 | else { |
526 | 450 | ; |
@@ -530,11 +454,6 @@ static BOOL ChangeBuffer(int Nx, int Ny) | ||
530 | 454 | return TRUE; |
531 | 455 | |
532 | 456 | allocate_error: |
533 | -// if (CodeDest) free(CodeDest); | |
534 | -// if (AttrDest) free(AttrDest); | |
535 | -// if (AttrDest2) free(AttrDest2); | |
536 | -// if (AttrDestFG) free(AttrDestFG); | |
537 | -// if (AttrDestBG) free(AttrDestBG); | |
538 | 457 | if (CodeDestW) free(CodeDestW); |
539 | 458 | return FALSE; |
540 | 459 | } |
@@ -582,14 +501,6 @@ void InitBuffer() | ||
582 | 501 | static void NewLine(int Line) |
583 | 502 | { |
584 | 503 | LinePtr = GetLinePtr(Line); |
585 | -#if ATR | |
586 | - CodeLine = &CodeBuff[LinePtr]; | |
587 | - AttrLine = &AttrBuff[LinePtr]; | |
588 | - AttrLine2 = &AttrBuff2[LinePtr]; | |
589 | - AttrLineFG = &AttrBuffFG[LinePtr]; | |
590 | - AttrLineBG = &AttrBuffBG[LinePtr]; | |
591 | - CodeLineW = &CodeBuffW[LinePtr]; | |
592 | -#endif | |
593 | 504 | } |
594 | 505 | |
595 | 506 | void LockBuffer() |
@@ -616,36 +527,10 @@ void FreeBuffer() | ||
616 | 527 | { |
617 | 528 | BuffLock = 1; |
618 | 529 | UnlockBuffer(); |
619 | -#if 0 | |
620 | - if (CodeBuff!=NULL) { | |
621 | - free(CodeBuff); | |
622 | - CodeBuff = NULL; | |
623 | - } | |
624 | -#endif | |
625 | 530 | if (CodeBuffW != NULL) { |
626 | 531 | free(CodeBuffW); |
627 | 532 | CodeBuffW = NULL; |
628 | 533 | } |
629 | -#if 0 | |
630 | - if (AttrBuff!=NULL) { | |
631 | - free(AttrBuff); | |
632 | - AttrBuff = NULL; | |
633 | - } | |
634 | - if (AttrBuff2!=NULL) { | |
635 | - free(AttrBuff2); | |
636 | - AttrBuff2 = NULL; | |
637 | - } | |
638 | -#endif | |
639 | -#if 0 | |
640 | - if (AttrBuffFG!=NULL) { | |
641 | - free(AttrBuffFG); | |
642 | - AttrBuffFG = NULL; | |
643 | - } | |
644 | - if (AttrBuffBG!=NULL) { | |
645 | - free(AttrBuffBG); | |
646 | - AttrBuffBG = NULL; | |
647 | - } | |
648 | -#endif | |
649 | 534 | } |
650 | 535 | |
651 | 536 | void BuffAllSelect() |
@@ -738,18 +623,8 @@ void BuffScroll(int Count, int Bottom) | ||
738 | 623 | if (Bottom<NumOfLines-1) { |
739 | 624 | SrcPtr = GetLinePtr(PageStart+NumOfLines-1); |
740 | 625 | for (i=NumOfLines-1; i>=Bottom+1; i--) { |
741 | -// memcpy(&(CodeBuff[DestPtr]),&(CodeBuff[SrcPtr]),NumOfColumns); | |
742 | 626 | memcpyW(&(CodeBuffW[DestPtr]),&(CodeBuffW[SrcPtr]),NumOfColumns); |
743 | -// memcpy(&(AttrBuff[DestPtr]),&(AttrBuff[SrcPtr]),NumOfColumns); | |
744 | -// memcpy(&(AttrBuff2[DestPtr]),&(AttrBuff2[SrcPtr]),NumOfColumns); | |
745 | -// memcpy(&(AttrBuffFG[DestPtr]),&(AttrBuffFG[SrcPtr]),NumOfColumns); | |
746 | -// memcpy(&(AttrBuffBG[DestPtr]),&(AttrBuffBG[SrcPtr]),NumOfColumns); | |
747 | -// memset(&(CodeBuff[SrcPtr]),0x20,NumOfColumns); | |
748 | 627 | memsetW(&(CodeBuffW[SrcPtr]),0x20,CurCharAttr.Fore, CurCharAttr.Back, AttrDefault, CurCharAttr.Attr2 & Attr2ColorMask, NumOfColumns); |
749 | -// memset(&(AttrBuff[SrcPtr]),AttrDefault,NumOfColumns); | |
750 | -// memset(&(AttrBuff2[SrcPtr]),CurCharAttr.Attr2 & Attr2ColorMask, NumOfColumns); | |
751 | -// memset(&(AttrBuffFG[SrcPtr]),CurCharAttr.Fore,NumOfColumns); | |
752 | -// memset(&(AttrBuffBG[SrcPtr]),CurCharAttr.Back,NumOfColumns); | |
753 | 628 | SrcPtr = PrevLinePtr(SrcPtr); |
754 | 629 | DestPtr = PrevLinePtr(DestPtr); |
755 | 630 | n--; |
@@ -757,12 +632,7 @@ void BuffScroll(int Count, int Bottom) | ||
757 | 632 | } |
758 | 633 | for (i = 1 ; i <= n ; i++) { |
759 | 634 | buff_char_t *b = &CodeBuffW[DestPtr]; |
760 | -// memset(&CodeBuff[DestPtr],0x20,NumOfColumns); | |
761 | 635 | memsetW(b ,0x20, CurCharAttr.Fore, CurCharAttr.Back, AttrDefault, CurCharAttr.Attr2 & Attr2ColorMask, NumOfColumns); |
762 | -// memset(&AttrBuff[DestPtr],AttrDefault,NumOfColumns); | |
763 | -// memset(&AttrBuff2[DestPtr],CurCharAttr.Attr2 & Attr2ColorMask, NumOfColumns); | |
764 | -// memset(&AttrBuffFG[DestPtr],CurCharAttr.Fore,NumOfColumns); | |
765 | -// memset(&AttrBuffBG[DestPtr],CurCharAttr.Back,NumOfColumns); | |
766 | 636 | DestPtr = PrevLinePtr(DestPtr); |
767 | 637 | } |
768 | 638 |
@@ -803,14 +673,7 @@ void BuffScroll(int Count, int Bottom) | ||
803 | 673 | // 1 カーソルが漢字の右側 |
804 | 674 | static void EraseKanji(int LR) |
805 | 675 | { |
806 | -#if !ATR | |
807 | -// PCHAR CodeLine = &CodeBuff[LinePtr]; | |
808 | -// PCHAR AttrLine = &AttrBuff[LinePtr]; | |
809 | -// PCHAR AttrLine2 = &AttrBuff2[LinePtr]; | |
810 | -// PCHAR AttrLineFG = &AttrBuffFG[LinePtr]; | |
811 | -// PCHAR AttrLineBG = &AttrBuffBG[LinePtr]; | |
812 | 676 | buff_char_t * CodeLineW = &CodeBuffW[LinePtr]; |
813 | -#endif | |
814 | 677 | |
815 | 678 | buff_char_t *p; |
816 | 679 | int bx; |
@@ -823,24 +686,14 @@ static void EraseKanji(int LR) | ||
823 | 686 | if (IsBuffFullWidth(p)) { |
824 | 687 | // 全角をつぶす |
825 | 688 | BuffSetChar(p, ' ', 'H'); |
826 | -// CodeLine[bx] = 0x20; | |
827 | 689 | p->attr = CurCharAttr.Attr; |
828 | 690 | p->attr2 = CurCharAttr.Attr2; |
829 | -// AttrLine[bx] = CurCharAttr.Attr; | |
830 | -// AttrLine2[bx] = CurCharAttr.Attr2; | |
831 | -// AttrLineFG[bx] = CurCharAttr.Fore; | |
832 | -// AttrLineBG[bx] = CurCharAttr.Back; | |
833 | 691 | p->fg = CurCharAttr.Fore; |
834 | 692 | p->bg = CurCharAttr.Back; |
835 | 693 | if (bx+1 < NumOfColumns) { |
836 | 694 | BuffSetChar(p + 1, ' ', 'H'); |
837 | -// CodeLine[bx+1] = 0x20; | |
838 | 695 | (p+1)->attr = CurCharAttr.Attr; |
839 | 696 | (p+1)->attr2 = CurCharAttr.Attr2; |
840 | -// AttrLine[bx+1] = CurCharAttr.Attr; | |
841 | -// AttrLine2[bx+1] = CurCharAttr.Attr2; | |
842 | -// AttrLineFG[bx+1] = CurCharAttr.Fore; | |
843 | -// AttrLineBG[bx+1] = CurCharAttr.Back; | |
844 | 697 | (p+1)->fg = CurCharAttr.Fore; |
845 | 698 | (p+1)->bg = CurCharAttr.Back; |
846 | 699 | } |
@@ -858,27 +711,18 @@ void EraseKanjiOnLRMargin(LONG ptr, int count) | ||
858 | 711 | for (i=0; i<count; i++) { |
859 | 712 | pos = ptr + CursorLeftM-1; |
860 | 713 | if (CursorLeftM>0 && (CodeBuffW[pos].attr & AttrKanji)) { |
861 | -// CodeBuff[pos] = 0x20; | |
862 | 714 | BuffSetChar(&CodeBuffW[pos], 0x20, 'H'); |
863 | -// AttrBuff[pos] &= ~AttrKanji; | |
864 | 715 | CodeBuffW[pos].attr &= ~AttrKanji; |
865 | 716 | pos++; |
866 | -// CodeBuff[pos] = 0x20; | |
867 | 717 | BuffSetChar(&CodeBuffW[pos], 0x20, 'H'); |
868 | -// AttrBuff[pos] &= ~AttrKanji; | |
869 | 718 | CodeBuffW[pos].attr &= ~AttrKanji; |
870 | 719 | } |
871 | 720 | pos = ptr + CursorRightM; |
872 | -// if (CursorRightM < NumOfColumns-1 && (AttrBuff[pos] & AttrKanji)) { | |
873 | 721 | if (CursorRightM < NumOfColumns-1 && (CodeBuffW[pos].attr & AttrKanji)) { |
874 | -// CodeBuff[pos] = 0x20; | |
875 | 722 | BuffSetChar(&CodeBuffW[pos], 0x20, 'H'); |
876 | -// AttrBuff[pos] &= ~AttrKanji; | |
877 | 723 | CodeBuffW[pos].attr &= ~AttrKanji; |
878 | 724 | pos++; |
879 | -// CodeBuff[pos] = 0x20; | |
880 | 725 | BuffSetChar(&CodeBuffW[pos], 0x20, 'H'); |
881 | -// AttrBuff[pos] &= ~AttrKanji; | |
882 | 726 | CodeBuffW[pos].attr &= ~AttrKanji; |
883 | 727 | } |
884 | 728 | ptr = NextLinePtr(ptr); |
@@ -889,14 +733,7 @@ void EraseKanjiOnLRMargin(LONG ptr, int count) | ||
889 | 733 | // Count: Number of characters to be inserted |
890 | 734 | void BuffInsertSpace(int Count) |
891 | 735 | { |
892 | -#if !ATR | |
893 | -// PCHAR CodeLine = &CodeBuff[LinePtr]; | |
894 | -// PCHAR AttrLine = &AttrBuff[LinePtr]; | |
895 | -// PCHAR AttrLine2 = &AttrBuff2[LinePtr]; | |
896 | -// PCHAR AttrLineFG = &AttrBuffFG[LinePtr]; | |
897 | -// PCHAR AttrLineBG = &AttrBuffBG[LinePtr]; | |
898 | 736 | buff_char_t * CodeLineW = &CodeBuffW[LinePtr]; |
899 | -#endif | |
900 | 737 | int MoveLen; |
901 | 738 | int extr = 0; |
902 | 739 | int sx; |
@@ -919,9 +756,7 @@ void BuffInsertSpace(int Count) | ||
919 | 756 | } |
920 | 757 | |
921 | 758 | if (CursorRightM < NumOfColumns - 1 && (CodeLineW[CursorRightM].attr & AttrKanji)) { |
922 | -// CodeLine[CursorRightM + 1] = 0x20; | |
923 | 759 | BuffSetChar(&CodeLineW[CursorRightM + 1], 0x20, 'H'); |
924 | -// AttrLine[CursorRightM + 1] &= ~AttrKanji; | |
925 | 760 | CodeLineW[CursorRightM + 1].attr &= ~AttrKanji; |
926 | 761 | extr++; |
927 | 762 | } |
@@ -932,26 +767,13 @@ void BuffInsertSpace(int Count) | ||
932 | 767 | MoveLen = CursorRightM + 1 - CursorX - Count; |
933 | 768 | |
934 | 769 | if (MoveLen > 0) { |
935 | -// memmove(&(CodeLine[CursorX + Count]), &(CodeLine[CursorX]), MoveLen); | |
936 | 770 | memmoveW(&(CodeLineW[CursorX + Count]), &(CodeLineW[CursorX]), MoveLen); |
937 | -// memmove(&(AttrLine[CursorX + Count]), &(AttrLine[CursorX]), MoveLen); | |
938 | -// memmove(&(AttrLine2[CursorX + Count]), &(AttrLine2[CursorX]), MoveLen); | |
939 | -// memmove(&(AttrLineFG[CursorX + Count]), &(AttrLineFG[CursorX]), MoveLen); | |
940 | -// memmove(&(AttrLineBG[CursorX + Count]), &(AttrLineBG[CursorX]), MoveLen); | |
941 | 771 | } |
942 | -// memset(&(CodeLine[CursorX]), 0x20, Count); | |
943 | 772 | memsetW(&(CodeLineW[CursorX]), 0x20, CurCharAttr.Fore, CurCharAttr.Back, AttrDefault, CurCharAttr.Attr2, Count); |
944 | -// memset(&(AttrLine[CursorX]), AttrDefault, Count); | |
945 | -// memset(&(AttrLine2[CursorX]), CurCharAttr.Attr2 & Attr2ColorMask, Count); | |
946 | -// memset(&(AttrLineFG[CursorX]), CurCharAttr.Fore, Count); | |
947 | -// memset(&(AttrLineBG[CursorX]), CurCharAttr.Back, Count); | |
948 | 773 | /* last char in current line is kanji first? */ |
949 | -// if ((AttrLine[CursorRightM] & AttrKanji) != 0) { | |
950 | 774 | if ((CodeLineW[CursorRightM].attr & AttrKanji) != 0) { |
951 | 775 | /* then delete it */ |
952 | -// CodeLine[CursorRightM] = 0x20; | |
953 | 776 | BuffSetChar(&CodeLineW[CursorRightM], 0x20, 'H'); |
954 | -// AttrLine[CursorRightM] &= ~AttrKanji; | |
955 | 777 | CodeLineW[CursorRightM].attr &= ~AttrKanji; |
956 | 778 | } |
957 | 779 | BuffUpdateRect(sx, CursorY, CursorRightM + extr, CursorY); |
@@ -975,12 +797,7 @@ void BuffEraseCurToEnd() | ||
975 | 797 | YEnd--; |
976 | 798 | } |
977 | 799 | for (i = CursorY ; i <= YEnd ; i++) { |
978 | -// memset(&(CodeBuff[TmpPtr+offset]),0x20,NumOfColumns-offset); | |
979 | 800 | memsetW(&(CodeBuffW[TmpPtr+offset]),0x20,CurCharAttr.Fore, CurCharAttr.Back, AttrDefault, CurCharAttr.Attr2 & Attr2ColorMask, NumOfColumns-offset); |
980 | -// memset(&(AttrBuff[TmpPtr+offset]),AttrDefault,NumOfColumns-offset); | |
981 | -// memset(&(AttrBuff2[TmpPtr+offset]),CurCharAttr.Attr2 & Attr2ColorMask, NumOfColumns-offset); | |
982 | -// memset(&(AttrBuffFG[TmpPtr+offset]),CurCharAttr.Fore,NumOfColumns-offset); | |
983 | -// memset(&(AttrBuffBG[TmpPtr+offset]),CurCharAttr.Back,NumOfColumns-offset); | |
984 | 801 | offset = 0; |
985 | 802 | TmpPtr = NextLinePtr(TmpPtr); |
986 | 803 | } |
@@ -1011,12 +828,7 @@ void BuffEraseHomeToCur() | ||
1011 | 828 | if (i==CursorY) { |
1012 | 829 | offset = CursorX+1; |
1013 | 830 | } |
1014 | -// memset(&(CodeBuff[TmpPtr]),0x20,offset); | |
1015 | 831 | memsetW(&(CodeBuffW[TmpPtr]),0x20, CurCharAttr.Fore, CurCharAttr.Back, AttrDefault, CurCharAttr.Attr2 & Attr2ColorMask, offset); |
1016 | -// memset(&(AttrBuff[TmpPtr]),AttrDefault,offset); | |
1017 | -// memset(&(AttrBuff2[TmpPtr]),CurCharAttr.Attr2 & Attr2ColorMask, offset); | |
1018 | -// memset(&(AttrBuffFG[TmpPtr]),CurCharAttr.Fore,offset); | |
1019 | -// memset(&(AttrBuffBG[TmpPtr]),CurCharAttr.Back,offset); | |
1020 | 832 | TmpPtr = NextLinePtr(TmpPtr); |
1021 | 833 | } |
1022 | 834 |
@@ -1046,22 +858,12 @@ void BuffInsertLines(int Count, int YEnd) | ||
1046 | 858 | DestPtr = GetLinePtr(PageStart+YEnd) + CursorLeftM; |
1047 | 859 | linelen = CursorRightM - CursorLeftM + 1; |
1048 | 860 | for (i= YEnd-Count ; i>=CursorY ; i--) { |
1049 | -// memcpy(&(CodeBuff[DestPtr]), &(CodeBuff[SrcPtr]), linelen); | |
1050 | 861 | memcpyW(&(CodeBuffW[DestPtr]), &(CodeBuffW[SrcPtr]), linelen); |
1051 | -// memcpy(&(AttrBuff[DestPtr]), &(AttrBuff[SrcPtr]), linelen); | |
1052 | -// memcpy(&(AttrBuff2[DestPtr]), &(AttrBuff2[SrcPtr]), linelen); | |
1053 | -// memcpy(&(AttrBuffFG[DestPtr]), &(AttrBuffFG[SrcPtr]), linelen); | |
1054 | -// memcpy(&(AttrBuffBG[DestPtr]), &(AttrBuffBG[SrcPtr]), linelen); | |
1055 | 862 | SrcPtr = PrevLinePtr(SrcPtr); |
1056 | 863 | DestPtr = PrevLinePtr(DestPtr); |
1057 | 864 | } |
1058 | 865 | for (i = 1 ; i <= Count ; i++) { |
1059 | -// memset(&(CodeBuff[DestPtr]), 0x20, linelen); | |
1060 | 866 | memsetW(&(CodeBuffW[DestPtr]), 0x20, CurCharAttr.Fore, CurCharAttr.Back, AttrDefault, CurCharAttr.Attr2 & Attr2ColorMask, linelen); |
1061 | -// memset(&(AttrBuff[DestPtr]), AttrDefault, linelen); | |
1062 | -// memset(&(AttrBuff2[DestPtr]), CurCharAttr.Attr2 & Attr2ColorMask, linelen); | |
1063 | -// memset(&(AttrBuffFG[DestPtr]), CurCharAttr.Fore, linelen); | |
1064 | -// memset(&(AttrBuffBG[DestPtr]), CurCharAttr.Back, linelen); | |
1065 | 867 | DestPtr = PrevLinePtr(DestPtr); |
1066 | 868 | } |
1067 | 869 |
@@ -1075,17 +877,9 @@ void BuffEraseCharsInLine(int XStart, int Count) | ||
1075 | 877 | // XStart: start position of erasing |
1076 | 878 | // Count: number of characters to be erased |
1077 | 879 | { |
1078 | -#if !ATR | |
1079 | -// PCHAR CodeLine = &CodeBuff[LinePtr]; | |
1080 | -// PCHAR AttrLine = &AttrBuff[LinePtr]; | |
1081 | -// PCHAR AttrLine2 = &AttrBuff2[LinePtr]; | |
1082 | -// PCHAR AttrLineFG = &AttrBuffFG[LinePtr]; | |
1083 | -// PCHAR AttrLineBG = &AttrBuffBG[LinePtr]; | |
1084 | 880 | buff_char_t * CodeLineW = &CodeBuffW[LinePtr]; |
1085 | -#endif | |
1086 | 881 | BOOL LineContinued=FALSE; |
1087 | 882 | |
1088 | -// if (ts.EnableContinuedLineCopy && XStart == 0 && (AttrLine[0] & AttrLineContinued)) { | |
1089 | 883 | if (ts.EnableContinuedLineCopy && XStart == 0 && (CodeLineW[0].attr & AttrLineContinued)) { |
1090 | 884 | LineContinued = TRUE; |
1091 | 885 | } |
@@ -1095,12 +889,7 @@ void BuffEraseCharsInLine(int XStart, int Count) | ||
1095 | 889 | } |
1096 | 890 | |
1097 | 891 | NewLine(PageStart+CursorY); |
1098 | -// memset(&(CodeLine[XStart]),0x20,Count); | |
1099 | 892 | memsetW(&(CodeLineW[XStart]),0x20, CurCharAttr.Fore, CurCharAttr.Back, AttrDefault, CurCharAttr.Attr2 & Attr2ColorMask, Count); |
1100 | -// memset(&(AttrLine[XStart]),AttrDefault,Count); | |
1101 | -// memset(&(AttrLine2[XStart]),CurCharAttr.Attr2 & Attr2ColorMask, Count); | |
1102 | -// memset(&(AttrLineFG[XStart]),CurCharAttr.Fore,Count); | |
1103 | -// memset(&(AttrLineBG[XStart]),CurCharAttr.Back,Count); | |
1104 | 893 | |
1105 | 894 | if (ts.EnableContinuedLineCopy) { |
1106 | 895 | if (LineContinued) { |
@@ -1108,7 +897,6 @@ void BuffEraseCharsInLine(int XStart, int Count) | ||
1108 | 897 | } |
1109 | 898 | |
1110 | 899 | if (XStart + Count >= NumOfColumns) { |
1111 | -// AttrBuff[NextLinePtr(LinePtr)] &= ~AttrLineContinued; | |
1112 | 900 | CodeBuffW[NextLinePtr(LinePtr)].attr &= ~AttrLineContinued; |
1113 | 901 | } |
1114 | 902 | } |
@@ -1138,22 +926,12 @@ void BuffDeleteLines(int Count, int YEnd) | ||
1138 | 926 | DestPtr = GetLinePtr(PageStart+CursorY) + (LONG)CursorLeftM; |
1139 | 927 | linelen = CursorRightM - CursorLeftM + 1; |
1140 | 928 | for (i=CursorY ; i<= YEnd-Count ; i++) { |
1141 | -// memcpy(&(CodeBuff[DestPtr]), &(CodeBuff[SrcPtr]), linelen); | |
1142 | 929 | memcpyW(&(CodeBuffW[DestPtr]), &(CodeBuffW[SrcPtr]), linelen); |
1143 | -// memcpy(&(AttrBuff[DestPtr]), &(AttrBuff[SrcPtr]), linelen); | |
1144 | -// memcpy(&(AttrBuff2[DestPtr]), &(AttrBuff2[SrcPtr]), linelen); | |
1145 | -// memcpy(&(AttrBuffFG[DestPtr]), &(AttrBuffFG[SrcPtr]), linelen); | |
1146 | -// memcpy(&(AttrBuffBG[DestPtr]), &(AttrBuffBG[SrcPtr]), linelen); | |
1147 | 930 | SrcPtr = NextLinePtr(SrcPtr); |
1148 | 931 | DestPtr = NextLinePtr(DestPtr); |
1149 | 932 | } |
1150 | 933 | for (i = YEnd+1-Count ; i<=YEnd ; i++) { |
1151 | -// memset(&(CodeBuff[DestPtr]), 0x20, linelen); | |
1152 | 934 | memsetW(&(CodeBuffW[DestPtr]), 0x20, CurCharAttr.Fore, CurCharAttr.Back, AttrDefault, CurCharAttr.Attr2 & Attr2ColorMask, linelen); |
1153 | -// memset(&(AttrBuff[DestPtr]), AttrDefault, linelen); | |
1154 | -// memset(&(AttrBuff2[DestPtr]), CurCharAttr.Attr2 & Attr2ColorMask, linelen); | |
1155 | -// memset(&(AttrBuffFG[DestPtr]), CurCharAttr.Fore, linelen); | |
1156 | -// memset(&(AttrBuffBG[DestPtr]), CurCharAttr.Back, linelen); | |
1157 | 935 | DestPtr = NextLinePtr(DestPtr); |
1158 | 936 | } |
1159 | 937 |
@@ -1166,14 +944,7 @@ void BuffDeleteLines(int Count, int YEnd) | ||
1166 | 944 | // Count: number of characters to be deleted |
1167 | 945 | void BuffDeleteChars(int Count) |
1168 | 946 | { |
1169 | -#if !ATR | |
1170 | -// PCHAR CodeLine = &CodeBuff[LinePtr]; | |
1171 | -// PCHAR AttrLine = &AttrBuff[LinePtr]; | |
1172 | -// PCHAR AttrLine2 = &AttrBuff2[LinePtr]; | |
1173 | -// PCHAR AttrLineFG = &AttrBuffFG[LinePtr]; | |
1174 | -// PCHAR AttrLineBG = &AttrBuffBG[LinePtr]; | |
1175 | 947 | buff_char_t * CodeLineW = &CodeBuffW[LinePtr]; |
1176 | -#endif | |
1177 | 948 | int MoveLen; |
1178 | 949 | int extr = 0; |
1179 | 950 | buff_char_t *b; |
@@ -1207,15 +978,10 @@ void BuffDeleteChars(int Count) | ||
1207 | 978 | } |
1208 | 979 | } |
1209 | 980 | |
1210 | -// if (CursorRightM < NumOfColumns - 1 && (AttrLine[CursorRightM] & AttrKanji)) { | |
1211 | 981 | if (CursorRightM < NumOfColumns - 1 && (CodeLineW[CursorRightM].attr & AttrKanji)) { |
1212 | -// CodeLine[CursorRightM] = 0x20; | |
1213 | 982 | BuffSetChar(&CodeLineW[CursorRightM], 0x20, 'H'); |
1214 | -// AttrLine[CursorRightM] &= ~AttrKanji; | |
1215 | 983 | CodeLineW[CursorRightM].attr &= ~AttrKanji; |
1216 | -// CodeLine[CursorRightM + 1] = 0x20; | |
1217 | 984 | BuffSetChar(&CodeLineW[CursorRightM + 1], 0x20, 'H'); |
1218 | -// AttrLine[CursorRightM + 1] &= ~AttrKanji; | |
1219 | 985 | CodeLineW[CursorRightM + 1].attr &= ~AttrKanji; |
1220 | 986 | extr = 1; |
1221 | 987 | } |
@@ -1223,19 +989,9 @@ void BuffDeleteChars(int Count) | ||
1223 | 989 | MoveLen = CursorRightM + 1 - CursorX - Count; |
1224 | 990 | |
1225 | 991 | if (MoveLen > 0) { |
1226 | -// memmove(&(CodeLine[CursorX]), &(CodeLine[CursorX + Count]), MoveLen); | |
1227 | 992 | memmoveW(&(CodeLineW[CursorX]), &(CodeLineW[CursorX + Count]), MoveLen); |
1228 | -// memmove(&(AttrLine[CursorX]), &(AttrLine[CursorX + Count]), MoveLen); | |
1229 | -// memmove(&(AttrLine2[CursorX]), &(AttrLine2[CursorX + Count]), MoveLen); | |
1230 | -// memmove(&(AttrLineFG[CursorX]), &(AttrLineFG[CursorX + Count]), MoveLen); | |
1231 | -// memmove(&(AttrLineBG[CursorX]), &(AttrLineBG[CursorX + Count]), MoveLen); | |
1232 | 993 | } |
1233 | -// memset(&(CodeLine[CursorX + MoveLen]), 0x20, Count); | |
1234 | 994 | memsetW(&(CodeLineW[CursorX + MoveLen]), ' ', CurCharAttr.Fore, CurCharAttr.Back, AttrDefault, CurCharAttr.Attr2 & Attr2ColorMask, Count); |
1235 | -// memset(&(AttrLine[CursorX + MoveLen]), AttrDefault, Count); | |
1236 | -// memset(&(AttrLine2[CursorX + MoveLen]), CurCharAttr.Attr2 & Attr2ColorMask, Count); | |
1237 | -// memset(&(AttrLineFG[CursorX + MoveLen]), CurCharAttr.Fore, Count); | |
1238 | -// memset(&(AttrLineBG[CursorX + MoveLen]), CurCharAttr.Back, Count); | |
1239 | 995 | |
1240 | 996 | BuffUpdateRect(CursorX, CursorY, CursorRightM + extr, CursorY); |
1241 | 997 | } |
@@ -1244,14 +1000,7 @@ void BuffDeleteChars(int Count) | ||
1244 | 1000 | // Count: number of characters to be deleted |
1245 | 1001 | void BuffEraseChars(int Count) |
1246 | 1002 | { |
1247 | -#if !ATR | |
1248 | -// PCHAR CodeLine = &CodeBuff[LinePtr]; | |
1249 | -// PCHAR AttrLine = &AttrBuff[LinePtr]; | |
1250 | -// PCHAR AttrLine2 = &AttrBuff2[LinePtr]; | |
1251 | -// PCHAR AttrLineFG = &AttrBuffFG[LinePtr]; | |
1252 | -// PCHAR AttrLineBG = &AttrBuffBG[LinePtr]; | |
1253 | 1003 | buff_char_t * CodeLineW = &CodeBuffW[LinePtr]; |
1254 | -#endif | |
1255 | 1004 | int extr = 0; |
1256 | 1005 | int sx = CursorX; |
1257 | 1006 | buff_char_t *b; |
@@ -1287,12 +1036,7 @@ void BuffEraseChars(int Count) | ||
1287 | 1036 | } |
1288 | 1037 | } |
1289 | 1038 | |
1290 | -// memset(&(CodeLine[CursorX]), 0x20, Count); | |
1291 | 1039 | memsetW(&(CodeLineW[CursorX]), 0x20, CurCharAttr.Fore, CurCharAttr.Back, AttrDefault, CurCharAttr.Attr2 & Attr2ColorMask, Count); |
1292 | -// memset(&(AttrLine[CursorX]), AttrDefault, Count); | |
1293 | -// memset(&(AttrLine2[CursorX]), CurCharAttr.Attr2 & Attr2ColorMask, Count); | |
1294 | -// memset(&(AttrLineFG[CursorX]), CurCharAttr.Fore, Count); | |
1295 | -// memset(&(AttrLineBG[CursorX]), CurCharAttr.Back, Count); | |
1296 | 1040 | |
1297 | 1041 | /* update window */ |
1298 | 1042 | DispEraseCharsInLine(sx, Count + extr); |
@@ -1306,12 +1050,7 @@ void BuffFillWithE() | ||
1306 | 1050 | |
1307 | 1051 | TmpPtr = GetLinePtr(PageStart); |
1308 | 1052 | for (i = 0 ; i <= NumOfLines-1-StatusLine ; i++) { |
1309 | -// memset(&(CodeBuff[TmpPtr]),'E',NumOfColumns); | |
1310 | 1053 | memsetW(&(CodeBuffW[TmpPtr]),'E', AttrDefaultFG, AttrDefaultBG, AttrDefault, AttrDefault, NumOfColumns); |
1311 | -// memset(&(AttrBuff[TmpPtr]),AttrDefault,NumOfColumns); | |
1312 | -// memset(&(AttrBuff2[TmpPtr]),AttrDefault,NumOfColumns); | |
1313 | -// memset(&(AttrBuffFG[TmpPtr]),AttrDefaultFG,NumOfColumns); | |
1314 | -// memset(&(AttrBuffBG[TmpPtr]),AttrDefaultBG,NumOfColumns); | |
1315 | 1054 | TmpPtr = NextLinePtr(TmpPtr); |
1316 | 1055 | } |
1317 | 1056 | BuffUpdateRect(WinOrgX,WinOrgY,WinOrgX+WinWidth-1,WinOrgY+WinHeight-1); |
@@ -1346,12 +1085,7 @@ void BuffDrawLine(TCharAttr Attr, int Direction, int C) | ||
1346 | 1085 | C = NumOfColumns-CursorX; |
1347 | 1086 | } |
1348 | 1087 | Ptr = GetLinePtr(PageStart+Y); |
1349 | -// memset(&(CodeBuff[Ptr+CursorX]),'q',C); | |
1350 | 1088 | memsetW(&(CodeBuffW[Ptr+CursorX]),'q', Attr.Fore, Attr.Back, Attr.Attr, Attr.Attr2, C); |
1351 | -// memset(&(AttrBuff[Ptr+CursorX]),Attr.Attr,C); | |
1352 | -// memset(&(AttrBuff2[Ptr+CursorX]),Attr.Attr2,C); | |
1353 | -// memset(&(AttrBuffFG[Ptr+CursorX]),Attr.Fore,C); | |
1354 | -// memset(&(AttrBuffBG[Ptr+CursorX]),Attr.Back,C); | |
1355 | 1089 | BuffUpdateRect(CursorX,Y,CursorX+C-1,Y); |
1356 | 1090 | break; |
1357 | 1091 | case 5: |
@@ -1375,12 +1109,7 @@ void BuffDrawLine(TCharAttr Attr, int Direction, int C) | ||
1375 | 1109 | C = NumOfLines-StatusLine-CursorY; |
1376 | 1110 | } |
1377 | 1111 | for (i=1; i<=C; i++) { |
1378 | -// CodeBuff[Ptr+X] = 'x'; | |
1379 | 1112 | BuffSetChar4(&CodeBuffW[Ptr+X], 'x', Attr.Fore, Attr.Back, Attr.Attr, Attr.Attr2, 'H'); |
1380 | -// AttrBuff[Ptr+X] = Attr.Attr; | |
1381 | -// AttrBuff2[Ptr+X] = Attr.Attr2; | |
1382 | -// AttrBuffFG[Ptr+X] = Attr.Fore; | |
1383 | -// AttrBuffBG[Ptr+X] = Attr.Back; | |
1384 | 1113 | Ptr = NextLinePtr(Ptr); |
1385 | 1114 | } |
1386 | 1115 | BuffUpdateRect(X,CursorY,X,CursorY+C-1); |
@@ -1410,28 +1139,13 @@ void BuffEraseBox(int XStart, int YStart, int XEnd, int YEnd) | ||
1410 | 1139 | for (i=YStart; i<=YEnd; i++) { |
1411 | 1140 | if ((XStart>0) && |
1412 | 1141 | ((CodeBuffW[Ptr+XStart-1].attr & AttrKanji) != 0)) { |
1413 | -// CodeBuff[Ptr+XStart-1] = 0x20; | |
1414 | 1142 | BuffSetChar4(&CodeBuffW[Ptr+XStart-1], 0x20, CurCharAttr.Fore, CurCharAttr.Back, CurCharAttr.Attr, CurCharAttr.Attr2, 'H'); |
1415 | -// AttrBuff[Ptr+XStart-1] = CurCharAttr.Attr; | |
1416 | -// AttrBuff2[Ptr+XStart-1] = CurCharAttr.Attr2; | |
1417 | -// AttrBuffFG[Ptr+XStart-1] = CurCharAttr.Fore; | |
1418 | -// AttrBuffBG[Ptr+XStart-1] = CurCharAttr.Back; | |
1419 | 1143 | } |
1420 | 1144 | if ((XStart+C<NumOfColumns) && |
1421 | 1145 | ((CodeBuffW[Ptr+XStart+C-1].attr & AttrKanji) != 0)) { |
1422 | -// CodeBuff[Ptr+XStart+C] = 0x20; | |
1423 | 1146 | BuffSetChar4(&CodeBuffW[Ptr+XStart+C], 0x20, CurCharAttr.Fore, CurCharAttr.Back, CurCharAttr.Attr, CurCharAttr.Attr2, 'H'); |
1424 | -// AttrBuff[Ptr+XStart+C] = CurCharAttr.Attr; | |
1425 | -// AttrBuff2[Ptr+XStart+C] = CurCharAttr.Attr2; | |
1426 | -// AttrBuffFG[Ptr+XStart+C] = CurCharAttr.Fore; | |
1427 | -// AttrBuffBG[Ptr+XStart+C] = CurCharAttr.Back; | |
1428 | 1147 | } |
1429 | -// memset(&(CodeBuff[Ptr+XStart]),0x20,C); | |
1430 | 1148 | memsetW(&(CodeBuffW[Ptr+XStart]),0x20, CurCharAttr.Fore, CurCharAttr.Back, AttrDefault, CurCharAttr.Attr2 & Attr2ColorMask, C); |
1431 | -// memset(&(AttrBuff[Ptr+XStart]),AttrDefault,C); | |
1432 | -// memset(&(AttrBuff2[Ptr+XStart]),CurCharAttr.Attr2 & Attr2ColorMask, C); | |
1433 | -// memset(&(AttrBuffFG[Ptr+XStart]),CurCharAttr.Fore,C); | |
1434 | -// memset(&(AttrBuffBG[Ptr+XStart]),CurCharAttr.Back,C); | |
1435 | 1149 | Ptr = NextLinePtr(Ptr); |
1436 | 1150 | } |
1437 | 1151 | BuffUpdateRect(XStart,YStart,XEnd,YEnd); |
@@ -1459,21 +1173,14 @@ void BuffFillBox(char ch, int XStart, int YStart, int XEnd, int YEnd) | ||
1459 | 1173 | for (i=YStart; i<=YEnd; i++) { |
1460 | 1174 | if ((XStart>0) && |
1461 | 1175 | ((CodeBuffW[Ptr+XStart-1].attr & AttrKanji) != 0)) { |
1462 | -// CodeBuff[Ptr+XStart-1] = 0x20; | |
1463 | 1176 | BuffSetChar(&CodeBuffW[Ptr + XStart - 1], 0x20, 'H'); |
1464 | 1177 | CodeBuffW[Ptr+XStart-1].attr ^= AttrKanji; |
1465 | 1178 | } |
1466 | 1179 | if ((XStart+Cols<NumOfColumns) && |
1467 | 1180 | ((CodeBuffW[Ptr+XStart+Cols-1].attr & AttrKanji) != 0)) { |
1468 | -// CodeBuff[Ptr+XStart+Cols] = 0x20; | |
1469 | 1181 | BuffSetChar(&CodeBuffW[Ptr + XStart + Cols], 0x20, 'H'); |
1470 | 1182 | } |
1471 | -// memset(&(CodeBuff[Ptr+XStart]), ch, Cols); | |
1472 | 1183 | memsetW(&(CodeBuffW[Ptr+XStart]), ch, CurCharAttr.Fore, CurCharAttr.Back, CurCharAttr.Attr, CurCharAttr.Attr2, Cols); |
1473 | -// memset(&(AttrBuff[Ptr+XStart]), CurCharAttr.Attr, Cols); | |
1474 | -// memset(&(AttrBuff2[Ptr+XStart]), CurCharAttr.Attr2, Cols); | |
1475 | -// memset(&(AttrBuffFG[Ptr+XStart]), CurCharAttr.Fore, Cols); | |
1476 | -// memset(&(AttrBuffBG[Ptr+XStart]), CurCharAttr.Back, Cols); | |
1477 | 1184 | Ptr = NextLinePtr(Ptr); |
1478 | 1185 | } |
1479 | 1186 | BuffUpdateRect(XStart, YStart, XEnd, YEnd); |
@@ -1524,12 +1231,7 @@ void BuffCopyBox( | ||
1524 | 1231 | SPtr = GetLinePtr(PageStart+SrcYStart); |
1525 | 1232 | DPtr = GetLinePtr(PageStart+DstY); |
1526 | 1233 | for (i=0; i<L; i++) { |
1527 | -// memcpy(&(CodeBuff[DPtr+DstX]), &(CodeBuff[SPtr+SrcXStart]), C); | |
1528 | 1234 | memcpyW(&(CodeBuffW[DPtr+DstX]), &(CodeBuffW[SPtr+SrcXStart]), C); |
1529 | -// memcpy(&(AttrBuff[DPtr+DstX]), &(AttrBuff[SPtr+SrcXStart]), C); | |
1530 | -// memcpy(&(AttrBuff2[DPtr+DstX]), &(AttrBuff2[SPtr+SrcXStart]), C); | |
1531 | -// memcpy(&(AttrBuffFG[DPtr+DstX]), &(AttrBuffFG[SPtr+SrcXStart]), C); | |
1532 | -// memcpy(&(AttrBuffBG[DPtr+DstX]), &(AttrBuffBG[SPtr+SrcXStart]), C); | |
1533 | 1235 | SPtr = NextLinePtr(SPtr); |
1534 | 1236 | DPtr = NextLinePtr(DPtr); |
1535 | 1237 | } |
@@ -1538,12 +1240,7 @@ void BuffCopyBox( | ||
1538 | 1240 | SPtr = GetLinePtr(PageStart+SrcYEnd); |
1539 | 1241 | DPtr = GetLinePtr(PageStart+DstY+L-1); |
1540 | 1242 | for (i=L; i>0; i--) { |
1541 | -// memcpy(&(CodeBuff[DPtr+DstX]), &(CodeBuff[SPtr+SrcXStart]), C); | |
1542 | 1243 | memcpyW(&(CodeBuffW[DPtr+DstX]), &(CodeBuffW[SPtr+SrcXStart]), C); |
1543 | -// memcpy(&(AttrBuff[DPtr+DstX]), &(AttrBuff[SPtr+SrcXStart]), C); | |
1544 | -// memcpy(&(AttrBuff2[DPtr+DstX]), &(AttrBuff2[SPtr+SrcXStart]), C); | |
1545 | -// memcpy(&(AttrBuffFG[DPtr+DstX]), &(AttrBuffFG[SPtr+SrcXStart]), C); | |
1546 | -// memcpy(&(AttrBuffBG[DPtr+DstX]), &(AttrBuffBG[SPtr+SrcXStart]), C); | |
1547 | 1244 | SPtr = PrevLinePtr(SPtr); |
1548 | 1245 | DPtr = PrevLinePtr(DPtr); |
1549 | 1246 | } |
@@ -1552,12 +1249,7 @@ void BuffCopyBox( | ||
1552 | 1249 | SPtr = GetLinePtr(PageStart+SrcYStart); |
1553 | 1250 | DPtr = GetLinePtr(PageStart+DstY); |
1554 | 1251 | for (i=0; i<L; i++) { |
1555 | -// memmove(&(CodeBuff[DPtr+DstX]), &(CodeBuff[SPtr+SrcXStart]), C); | |
1556 | 1252 | memmoveW(&(CodeBuffW[DPtr+DstX]), &(CodeBuffW[SPtr+SrcXStart]), C); |
1557 | -// memmove(&(AttrBuff[DPtr+DstX]), &(AttrBuff[SPtr+SrcXStart]), C); | |
1558 | -// memmove(&(AttrBuff2[DPtr+DstX]), &(AttrBuff2[SPtr+SrcXStart]), C); | |
1559 | -// memmove(&(AttrBuffFG[DPtr+DstX]), &(AttrBuffFG[SPtr+SrcXStart]), C); | |
1560 | -// memmove(&(AttrBuffBG[DPtr+DstX]), &(AttrBuffBG[SPtr+SrcXStart]), C); | |
1561 | 1253 | SPtr = NextLinePtr(SPtr); |
1562 | 1254 | DPtr = NextLinePtr(DPtr); |
1563 | 1255 | } |
@@ -1588,24 +1280,18 @@ void BuffChangeAttrBox(int XStart, int YStart, int XEnd, int YEnd, PCharAttr att | ||
1588 | 1280 | if (XStart>0 && (CodeBuffW[j].attr & AttrKanji)) { |
1589 | 1281 | CodeBuffW[j].attr = (CodeBuffW[j].attr & ~mask->Attr) | attr->Attr; |
1590 | 1282 | CodeBuffW[j].attr2 = (CodeBuffW[j].attr2 & ~mask->Attr2) | attr->Attr2; |
1591 | -// if (mask->Attr2 & Attr2Fore) { AttrBuffFG[j] = attr->Fore; } | |
1592 | -// if (mask->Attr2 & Attr2Back) { AttrBuffBG[j] = attr->Back; } | |
1593 | 1283 | if (mask->Attr2 & Attr2Fore) { CodeBuffW[j].fg = attr->Fore; } |
1594 | 1284 | if (mask->Attr2 & Attr2Back) { CodeBuffW[j].bg = attr->Back; } |
1595 | 1285 | } |
1596 | 1286 | while (++j < Ptr+XStart+C) { |
1597 | 1287 | CodeBuffW[j].attr = (CodeBuffW[j].attr & ~mask->Attr) | attr->Attr; |
1598 | 1288 | CodeBuffW[j].attr2 = (CodeBuffW[j].attr2 & ~mask->Attr2) | attr->Attr2; |
1599 | -// if (mask->Attr2 & Attr2Fore) { AttrBuffFG[j] = attr->Fore; } | |
1600 | -// if (mask->Attr2 & Attr2Back) { AttrBuffBG[j] = attr->Back; } | |
1601 | 1289 | if (mask->Attr2 & Attr2Fore) { CodeBuffW[j].fg = attr->Fore; } |
1602 | 1290 | if (mask->Attr2 & Attr2Back) { CodeBuffW[j].bg = attr->Back; } |
1603 | 1291 | } |
1604 | 1292 | if (XStart+C<NumOfColumns && (CodeBuffW[j-1].attr & AttrKanji)) { |
1605 | 1293 | CodeBuffW[j].attr = (CodeBuffW[j].attr & ~mask->Attr) | attr->Attr; |
1606 | 1294 | CodeBuffW[j].attr2 = (CodeBuffW[j].attr2 & ~mask->Attr2) | attr->Attr2; |
1607 | -// if (mask->Attr2 & Attr2Fore) { AttrBuffFG[j] = attr->Fore; } | |
1608 | -// if (mask->Attr2 & Attr2Back) { AttrBuffBG[j] = attr->Back; } | |
1609 | 1295 | if (mask->Attr2 & Attr2Fore) { CodeBuffW[j].fg = attr->Fore; } |
1610 | 1296 | if (mask->Attr2 & Attr2Back) { CodeBuffW[j].bg = attr->Back; } |
1611 | 1297 | } |
@@ -1655,24 +1341,18 @@ void BuffChangeAttrStream(int XStart, int YStart, int XEnd, int YEnd, PCharAttr | ||
1655 | 1341 | if (XStart > 0 && (CodeBuffW[i].attr & AttrKanji)) { |
1656 | 1342 | CodeBuffW[i].attr = CodeBuffW[i].attr & ~mask->Attr | attr->Attr; |
1657 | 1343 | CodeBuffW[i].attr2 = CodeBuffW[i].attr2 & ~mask->Attr2 | attr->Attr2; |
1658 | -// if (mask->Attr2 & Attr2Fore) { AttrBuffFG[i] = attr->Fore; } | |
1659 | -// if (mask->Attr2 & Attr2Back) { AttrBuffBG[i] = attr->Back; } | |
1660 | 1344 | if (mask->Attr2 & Attr2Fore) { CodeBuffW[i].fg = attr->Fore; } |
1661 | 1345 | if (mask->Attr2 & Attr2Back) { CodeBuffW[i].bg = attr->Back; } |
1662 | 1346 | } |
1663 | 1347 | while (++i < endp) { |
1664 | 1348 | CodeBuffW[i].attr = CodeBuffW[i].attr & ~mask->Attr | attr->Attr; |
1665 | 1349 | CodeBuffW[i].attr2 = CodeBuffW[i].attr2 & ~mask->Attr2 | attr->Attr2; |
1666 | -// if (mask->Attr2 & Attr2Fore) { AttrBuffFG[i] = attr->Fore; } | |
1667 | -// if (mask->Attr2 & Attr2Back) { AttrBuffBG[i] = attr->Back; } | |
1668 | 1350 | if (mask->Attr2 & Attr2Fore) { CodeBuffW[i].fg = attr->Fore; } |
1669 | 1351 | if (mask->Attr2 & Attr2Back) { CodeBuffW[i].bg = attr->Back; } |
1670 | 1352 | } |
1671 | 1353 | if (XEnd < NumOfColumns-1 && (CodeBuffW[i-1].attr & AttrKanji)) { |
1672 | 1354 | CodeBuffW[i].attr = CodeBuffW[i].attr & ~mask->Attr | attr->Attr; |
1673 | 1355 | CodeBuffW[i].attr2 = CodeBuffW[i].attr2 & ~mask->Attr2 | attr->Attr2; |
1674 | -// if (mask->Attr2 & Attr2Fore) { AttrBuffFG[i] = attr->Fore; } | |
1675 | -// if (mask->Attr2 & Attr2Back) { AttrBuffBG[i] = attr->Back; } | |
1676 | 1356 | if (mask->Attr2 & Attr2Fore) { CodeBuffW[i].fg = attr->Fore; } |
1677 | 1357 | if (mask->Attr2 & Attr2Back) { CodeBuffW[i].bg = attr->Back; } |
1678 | 1358 | } |
@@ -1684,16 +1364,12 @@ void BuffChangeAttrStream(int XStart, int YStart, int XEnd, int YEnd, PCharAttr | ||
1684 | 1364 | if (XStart > 0 && (CodeBuffW[i].attr & AttrKanji)) { |
1685 | 1365 | CodeBuffW[i].attr = CodeBuffW[i].attr & ~mask->Attr | attr->Attr; |
1686 | 1366 | CodeBuffW[i].attr2 = CodeBuffW[i].attr2 & ~mask->Attr2 | attr->Attr2; |
1687 | -// if (mask->Attr2 & Attr2Fore) { AttrBuffFG[i] = attr->Fore; } | |
1688 | -// if (mask->Attr2 & Attr2Back) { AttrBuffBG[i] = attr->Back; } | |
1689 | 1367 | if (mask->Attr2 & Attr2Fore) { CodeBuffW[i].fg = attr->Fore; } |
1690 | 1368 | if (mask->Attr2 & Attr2Back) { CodeBuffW[i].bg = attr->Back; } |
1691 | 1369 | } |
1692 | 1370 | while (++i < endp) { |
1693 | 1371 | CodeBuffW[i].attr = CodeBuffW[i].attr & ~mask->Attr | attr->Attr; |
1694 | 1372 | CodeBuffW[i].attr2 = CodeBuffW[i].attr2 & ~mask->Attr2 | attr->Attr2; |
1695 | -// if (mask->Attr2 & Attr2Fore) { AttrBuffFG[i] = attr->Fore; } | |
1696 | -// if (mask->Attr2 & Attr2Back) { AttrBuffBG[i] = attr->Back; } | |
1697 | 1373 | if (mask->Attr2 & Attr2Fore) { CodeBuffW[i].fg = attr->Fore; } |
1698 | 1374 | if (mask->Attr2 & Attr2Back) { CodeBuffW[i].bg = attr->Back; } |
1699 | 1375 | } |
@@ -1706,8 +1382,6 @@ void BuffChangeAttrStream(int XStart, int YStart, int XEnd, int YEnd, PCharAttr | ||
1706 | 1382 | while (i < endp) { |
1707 | 1383 | CodeBuffW[i].attr = CodeBuffW[i].attr & ~mask->Attr | attr->Attr; |
1708 | 1384 | CodeBuffW[i].attr2 = CodeBuffW[i].attr2 & ~mask->Attr2 | attr->Attr2; |
1709 | -// if (mask->Attr2 & Attr2Fore) { AttrBuffFG[i] = attr->Fore; } | |
1710 | -// if (mask->Attr2 & Attr2Back) { AttrBuffBG[i] = attr->Back; } | |
1711 | 1385 | if (mask->Attr2 & Attr2Fore) { CodeBuffW[i].fg = attr->Fore; } |
1712 | 1386 | if (mask->Attr2 & Attr2Back) { CodeBuffW[i].bg = attr->Back; } |
1713 | 1387 | i++; |
@@ -1721,8 +1395,6 @@ void BuffChangeAttrStream(int XStart, int YStart, int XEnd, int YEnd, PCharAttr | ||
1721 | 1395 | while (i < endp) { |
1722 | 1396 | CodeBuffW[i].attr = CodeBuffW[i].attr & ~mask->Attr | attr->Attr; |
1723 | 1397 | CodeBuffW[i].attr2 = CodeBuffW[i].attr2 & ~mask->Attr2 | attr->Attr2; |
1724 | -// if (mask->Attr2 & Attr2Fore) { AttrBuffFG[i] = attr->Fore; } | |
1725 | -// if (mask->Attr2 & Attr2Back) { AttrBuffBG[i] = attr->Back; } | |
1726 | 1398 | if (mask->Attr2 & Attr2Fore) { CodeBuffW[i].fg = attr->Fore; } |
1727 | 1399 | if (mask->Attr2 & Attr2Back) { CodeBuffW[i].bg = attr->Back; } |
1728 | 1400 | i++; |
@@ -1730,8 +1402,6 @@ void BuffChangeAttrStream(int XStart, int YStart, int XEnd, int YEnd, PCharAttr | ||
1730 | 1402 | if (XEnd < NumOfColumns-1 && (CodeBuffW[i-1].attr & AttrKanji)) { |
1731 | 1403 | CodeBuffW[i].attr = CodeBuffW[i].attr & ~mask->Attr | attr->Attr; |
1732 | 1404 | CodeBuffW[i].attr2 = CodeBuffW[i].attr2 & ~mask->Attr2 | attr->Attr2; |
1733 | -// if (mask->Attr2 & Attr2Fore) { AttrBuffFG[i] = attr->Fore; } | |
1734 | -// if (mask->Attr2 & Attr2Back) { AttrBuffBG[i] = attr->Back; } | |
1735 | 1405 | if (mask->Attr2 & Attr2Fore) { CodeBuffW[i].fg = attr->Fore; } |
1736 | 1406 | if (mask->Attr2 & Attr2Back) { CodeBuffW[i].bg = attr->Back; } |
1737 | 1407 | } |
@@ -2410,8 +2080,6 @@ void BuffPrint(BOOL ScrollRegion) | ||
2410 | 2080 | while (i <= IEnd) { |
2411 | 2081 | CurAttr.Attr = CodeBuffW[TmpPtr+i].attr & ~ AttrKanji; |
2412 | 2082 | CurAttr.Attr2 = CodeBuffW[TmpPtr+i].attr2; |
2413 | -// CurAttr.Fore = AttrBuffFG[TmpPtr+i]; | |
2414 | -// CurAttr.Back = AttrBuffBG[TmpPtr+i]; | |
2415 | 2083 | CurAttr.Fore = CodeBuffW[TmpPtr+i].fg; |
2416 | 2084 | CurAttr.Back = CodeBuffW[TmpPtr+i].bg; |
2417 | 2085 |
@@ -2419,8 +2087,6 @@ void BuffPrint(BOOL ScrollRegion) | ||
2419 | 2087 | while ((i+count <= IEnd) && |
2420 | 2088 | (CurAttr.Attr == (CodeBuffW[TmpPtr+i+count].attr & ~ AttrKanji)) && |
2421 | 2089 | (CurAttr.Attr2 == CodeBuffW[TmpPtr+i+count].attr2) && |
2422 | -// (CurAttr.Fore == AttrBuffFG[TmpPtr+i+count]) && | |
2423 | -// (CurAttr.Back == AttrBuffBG[TmpPtr+i+count]) || | |
2424 | 2090 | (CurAttr.Fore == CodeBuffW[TmpPtr+i].fg) && |
2425 | 2091 | (CurAttr.Back == CodeBuffW[TmpPtr+i].bg) || |
2426 | 2092 | (i+count<NumOfColumns) && |
@@ -2523,231 +2189,6 @@ static BOOL isURLchar(unsigned int u32) | ||
2523 | 2189 | return url_char[u32] == 0 ? FALSE : TRUE; |
2524 | 2190 | } |
2525 | 2191 | |
2526 | -#if 0 | |
2527 | -static void markURL(int x) | |
2528 | -{ | |
2529 | -#if !ATR | |
2530 | - buff_char_t *CodeLineW = &CodeBuffW[LinePtr]; | |
2531 | -// PCHAR CodeLine = &CodeBuff[LinePtr]; | |
2532 | -// PCHAR AttrLine = &AttrBuff[LinePtr]; | |
2533 | -// PCHAR AttrLine2 = &AttrBuff2[LinePtr]; | |
2534 | -// PCHAR AttrLineFG = &AttrBuffFG[LinePtr]; | |
2535 | -// PCHAR AttrLineBG = &AttrBuffBG[LinePtr]; | |
2536 | -#endif | |
2537 | - LONG PrevCharPtr; | |
2538 | -// CHAR PrevCharAttr; | |
2539 | -// CHAR PrevCharCode; | |
2540 | - | |
2541 | - // RFC3986(Uniform Resource Identifier (URI): Generic Syntax)に準拠する | |
2542 | - // by sakura editor 1.5.2.1: etc_uty.cpp | |
2543 | - static const char url_char[] = { | |
2544 | - /* +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F */ | |
2545 | - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* +00: */ | |
2546 | - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* +10: */ | |
2547 | - 0, -1, 0, -1, -1, -1, -1, 0, 0, 0, 0, -1, -1, -1, -1, -1, /* +20: " !"#$%&'()*+,-./" */ | |
2548 | - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, -1, /* +30: "0123456789:;<=>?" */ | |
2549 | - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* +40: "@ABCDEFGHIJKLMNO" */ | |
2550 | - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, 0, -1, /* +50: "PQRSTUVWXYZ[\]^_" */ | |
2551 | - 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* +60: "`abcdefghijklmno" */ | |
2552 | - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, -1, 0, /* +70: "pqrstuvwxyz{|}~ " */ | |
2553 | - /* 0 : not url char | |
2554 | - * -1 : url char | |
2555 | - * other: url head char --> url_table array number + 1 | |
2556 | - */ | |
2557 | - }; | |
2558 | - static wchar_t *prefix[] = { | |
2559 | - L"https://", | |
2560 | - L"http://", | |
2561 | - L"sftp://", | |
2562 | - L"tftp://", | |
2563 | - L"news://", | |
2564 | - L"ftp://", | |
2565 | - L"mms://", | |
2566 | - NULL | |
2567 | - }; | |
2568 | - unsigned char ch = CodeLineW[x].u32; | |
2569 | - | |
2570 | - if (ts.EnableClickableUrl == FALSE && | |
2571 | - (ts.ColorFlag & CF_URLCOLOR) == 0) | |
2572 | - return; | |
2573 | - | |
2574 | - // 直前の行から連結しているか。 | |
2575 | - if (x == 0) { | |
2576 | - buff_char_t *PrevCodeBufW; | |
2577 | - PrevCharPtr = PrevLinePtr(LinePtr) + NumOfColumns-1; | |
2578 | -// PrevCharCode = CodeBuff[PrevCharPtr]; | |
2579 | - //PrevCharAttr = AttrBuff[PrevCharPtr]; | |
2580 | - PrevCodeBufW = &CodeBuffW[PrevCharPtr]; | |
2581 | - if ((PrevCodeBufW[0].attr & AttrURL) && !(PrevCodeBufW[0].attr&(AttrKanji|AttrSpecial)) && !(ch & 0x80) && url_char[ch]) { | |
2582 | - if ((CodeLineW[0].attr & AttrLineContinued) || (ts.JoinSplitURL && | |
2583 | - (PrevCodeBufW[0].u32 == ts.JoinSplitURLIgnoreEOLChar || ts.JoinSplitURLIgnoreEOLChar == '\0' ))) { | |
2584 | - CodeLineW[0].attr |= AttrURL; | |
2585 | - } | |
2586 | - } | |
2587 | - return; | |
2588 | - } | |
2589 | - | |
2590 | - if ((x-1>=0) && (CodeLineW[x-1].attr & AttrURL) && | |
2591 | - !(CodeLineW[x].attr & (AttrKanji|AttrSpecial)) && | |
2592 | - ((!(ch & 0x80) && url_char[ch]) || (x == NumOfColumns - 1 && ch == ts.JoinSplitURLIgnoreEOLChar))) { | |
2593 | - CodeLineW[x].attr |= AttrURL; | |
2594 | - return; | |
2595 | - } | |
2596 | - | |
2597 | - if (x >= 2 && CodeLineW[x - 2].u32 == ':' && CodeLineW[x - 1].u32 == '/' && CodeLineW[x - 0].u32 == ':') { | |
2598 | - RECT rc; | |
2599 | - int CaretX, CaretY; | |
2600 | - wchar_t **p = prefix; | |
2601 | - | |
2602 | - while (*p) { | |
2603 | - size_t len = wcslen(*p) - 1; | |
2604 | - if ((x-len>=0) && !strncmp(&CodeLine[x-len], *p, len)) { | |
2605 | - size_t i; | |
2606 | - for (i = 0; i <= len; i++) { | |
2607 | - CodeLineW[x-i].attr |= AttrURL; | |
2608 | - } | |
2609 | - break; | |
2610 | - } | |
2611 | - p++; | |
2612 | - } | |
2613 | - | |
2614 | - /* ハイパーリンクの色属性変更は、すでに画面へ出力後に、バッファを遡って URL 属性を | |
2615 | - * 付け直すというロジックであるため、色が正しく描画されない場合がある。 | |
2616 | - * 少々強引だが、ハイパーリンクを発見したタイミングで、その行に再描画指示を出すことで、 | |
2617 | - * リアルタイムな色描画を実現する。 | |
2618 | - * (2009.8.26 yutaka) | |
2619 | - */ | |
2620 | - CaretX = (0-WinOrgX)*FontWidth; | |
2621 | - CaretY = (CursorY-WinOrgY)*FontHeight; | |
2622 | - rc.left = CaretX; | |
2623 | - rc.top = CaretY; | |
2624 | - rc.right = CaretX + NumOfColumns * FontWidth; | |
2625 | - rc.bottom = CaretY + FontHeight; | |
2626 | - InvalidateRect(HVTWin, &rc, FALSE); | |
2627 | - } | |
2628 | -} | |
2629 | -#endif | |
2630 | - | |
2631 | -#if !UNICODE_INTERNAL_BUFF | |
2632 | -void BuffPutKanji(WORD w, TCharAttr Attr, BOOL Insert) | |
2633 | -// Put a kanji character in the buffer at the current position | |
2634 | -// b: character | |
2635 | -// Attr: attributes | |
2636 | -// Insert: Insert flag | |
2637 | -{ | |
2638 | -#if !ATR | |
2639 | - PCHAR CodeLine = &CodeBuff[LinePtr]; | |
2640 | -// PCHAR AttrLine = &AttrBuff[LinePtr]; | |
2641 | -// PCHAR AttrLine2 = &AttrBuff2[LinePtr]; | |
2642 | -// PCHAR AttrLineFG = &AttrBuffFG[LinePtr]; | |
2643 | -// PCHAR AttrLineBG = &AttrBuffBG[LinePtr]; | |
2644 | - buff_char_t * CodeLineW = &CodeBuffW[LinePtr]; | |
2645 | -#endif | |
2646 | - int XStart, LineEnd, MoveLen; | |
2647 | - int extr = 0; | |
2648 | - | |
2649 | - if (ts.EnableContinuedLineCopy && CursorX == 0 && (CodeLineW[0].attr & AttrLineContinued)) { | |
2650 | - Attr.Attr |= AttrLineContinued; | |
2651 | - } | |
2652 | - | |
2653 | - EraseKanji(1); /* if cursor is on right half of a kanji, erase the kanji */ | |
2654 | - | |
2655 | - if (Insert) { | |
2656 | - if (CursorX > CursorRightM) | |
2657 | - LineEnd = NumOfColumns - 1; | |
2658 | - else | |
2659 | - LineEnd = CursorRightM; | |
2660 | - | |
2661 | - if (LineEnd < NumOfColumns - 1 && (CodeLineW[LineEnd].attr & AttrKanji)) { | |
2662 | - CodeLine[LineEnd] = 0x20; | |
2663 | - CodeLineW[LineEnd].attr &= ~AttrKanji; | |
2664 | - CodeLine[LineEnd+1] = 0x20; | |
2665 | - CodeLineW[LineEnd+1].attr &= ~AttrKanji; | |
2666 | - extr = 1; | |
2667 | - } | |
2668 | - | |
2669 | - MoveLen = LineEnd - CursorX - 1; | |
2670 | - if (MoveLen > 0) { | |
2671 | - memmove(&CodeLine[CursorX+2], &CodeLine[CursorX], MoveLen); | |
2672 | -// memmove(&AttrLine[CursorX+2], &AttrLine[CursorX], MoveLen); | |
2673 | -// memmove(&AttrLine2[CursorX+2], &AttrLine2[CursorX], MoveLen); | |
2674 | -// memmove(&AttrLineFG[CursorX+2], &AttrLineFG[CursorX], MoveLen); | |
2675 | -// memmove(&AttrLineBG[CursorX+2], &AttrLineBG[CursorX], MoveLen); | |
2676 | - memmoveW(&CodeLineW[CursorX+2], &CodeLineW[CursorX], MoveLen); | |
2677 | - } | |
2678 | - | |
2679 | - CodeLine[CursorX] = HIBYTE(w); | |
2680 | - CodeLineW[CursorX].attr = Attr.Attr | AttrKanji; /* DBCS first byte */ | |
2681 | - CodeLineW[CursorX].attr2 = Attr.Attr2; | |
2682 | -// AttrLineFG[CursorX] = Attr.Fore; | |
2683 | -// AttrLineBG[CursorX] = Attr.Back; | |
2684 | - CodeLineW[CursorX].fg = Attr.Fore; | |
2685 | - CodeLineW[CursorX].bg = Attr.Back; | |
2686 | - if (CursorX < LineEnd) { | |
2687 | - CodeLine[CursorX+1] = LOBYTE(w); | |
2688 | - CodeLineW[CursorX+1].attr = Attr.Attr; | |
2689 | - CodeLineW[CursorX+1].attr2 = Attr.Attr2; | |
2690 | -// AttrLineFG[CursorX+1] = Attr.Fore; | |
2691 | -// AttrLineBG[CursorX+1] = Attr.Back; | |
2692 | - CodeLineW[CursorX+1].fg = Attr.Fore; | |
2693 | - CodeLineW[CursorX+1].bg = Attr.Back; | |
2694 | - } | |
2695 | - /* begin - ishizaki */ | |
2696 | - markURL(CursorX); | |
2697 | - markURL(CursorX+1); | |
2698 | - /* end - ishizaki */ | |
2699 | - | |
2700 | - /* last char in current line is kanji first? */ | |
2701 | - if ((CodeLineW[LineEnd].attr & AttrKanji) != 0) { | |
2702 | - /* then delete it */ | |
2703 | - CodeLine[LineEnd] = 0x20; | |
2704 | - CodeLineW[LineEnd].attr = CurCharAttr.Attr; | |
2705 | - CodeLineW[LineEnd].attr2 = CurCharAttr.Attr2; | |
2706 | -// AttrLineFG[LineEnd] = CurCharAttr.Fore; | |
2707 | -// AttrLineBG[LineEnd] = CurCharAttr.Back; | |
2708 | - CodeLineW[LineEnd].fg = Attr.Fore; | |
2709 | - CodeLineW[LineEnd].bg = Attr.Back; | |
2710 | - } | |
2711 | - | |
2712 | - if (StrChangeCount==0) { | |
2713 | - XStart = CursorX; | |
2714 | - } | |
2715 | - else { | |
2716 | - XStart = StrChangeStart; | |
2717 | - } | |
2718 | - StrChangeCount = 0; | |
2719 | - BuffUpdateRect(XStart, CursorY, LineEnd+extr, CursorY); | |
2720 | - } | |
2721 | - else { | |
2722 | - CodeLine[CursorX] = HIBYTE(w); | |
2723 | - CodeLineW[CursorX].attr = Attr.Attr | AttrKanji; /* DBCS first byte */ | |
2724 | - CodeLineW[CursorX].attr2 = Attr.Attr2; | |
2725 | -// AttrLineFG[CursorX] = Attr.Fore; | |
2726 | -// AttrLineBG[CursorX] = Attr.Back; | |
2727 | - CodeLineW[CursorX].fg = Attr.Fore; | |
2728 | - CodeLineW[CursorX].bg = Attr.Back; | |
2729 | - if (CursorX < NumOfColumns-1) { | |
2730 | - CodeLine[CursorX+1] = LOBYTE(w); | |
2731 | - CodeLineW[CursorX+1].attr = Attr.Attr; | |
2732 | - CodeLineW[CursorX+1].attr2 = Attr.Attr2; | |
2733 | -// AttrLineFG[CursorX+1] = Attr.Fore; | |
2734 | -// AttrLineBG[CursorX+1] = Attr.Back; | |
2735 | - CodeLineW[CursorX+1].fg = Attr.Fore; | |
2736 | - CodeLineW[CursorX+1].bg = Attr.Back; | |
2737 | - } | |
2738 | - /* begin - ishizaki */ | |
2739 | - markURL(CursorX); | |
2740 | - markURL(CursorX+1); | |
2741 | - /* end - ishizaki */ | |
2742 | - | |
2743 | - if (StrChangeCount==0) { | |
2744 | - StrChangeStart = CursorX; | |
2745 | - } | |
2746 | - StrChangeCount = StrChangeCount + 2; | |
2747 | - } | |
2748 | -} | |
2749 | -#endif | |
2750 | - | |
2751 | 2192 | static BOOL BuffIsHalfWidthFromPropery(char width_property) |
2752 | 2193 | { |
2753 | 2194 | switch (width_property) { |
@@ -3000,13 +2441,7 @@ static void mark_url_line_w(int cur_x, int cur_y) | ||
3000 | 2441 | */ |
3001 | 2442 | static void mark_url_w(int cur_x, int cur_y) |
3002 | 2443 | { |
3003 | -#if !ATR | |
3004 | -// PCHAR AttrLine = &AttrBuff[LinePtr]; | |
3005 | -// PCHAR AttrLine2 = &AttrBuff2[LinePtr]; | |
3006 | -// PCHAR AttrLineFG = &AttrBuffFG[LinePtr]; | |
3007 | -// PCHAR AttrLineBG = &AttrBuffBG[LinePtr]; | |
3008 | 2444 | buff_char_t * CodeLineW = &CodeBuffW[LinePtr]; |
3009 | -#endif | |
3010 | 2445 | buff_char_t *b = &CodeLineW[cur_x]; |
3011 | 2446 | const char32_t u32 = b->u32; |
3012 | 2447 | int x = cur_x; |
@@ -3290,14 +2725,7 @@ static unsigned short ConvertACPChar(const buff_char_t *b) | ||
3290 | 2725 | */ |
3291 | 2726 | int BuffPutUnicode(unsigned int u32, TCharAttr Attr, BOOL Insert) |
3292 | 2727 | { |
3293 | -#if !ATR | |
3294 | -// PCHAR CodeLine = &CodeBuff[LinePtr]; | |
3295 | -// PCHAR AttrLine = &AttrBuff[LinePtr]; | |
3296 | -// PCHAR AttrLine2 = &AttrBuff2[LinePtr]; | |
3297 | -// PCHAR AttrLineFG = &AttrBuffFG[LinePtr]; | |
3298 | -// PCHAR AttrLineBG = &AttrBuffBG[LinePtr]; | |
3299 | 2728 | buff_char_t * CodeLineW = &CodeBuffW[LinePtr]; |
3300 | -#endif | |
3301 | 2729 | int move_x = 0; |
3302 | 2730 | static BOOL show_str_change = FALSE; |
3303 | 2731 | buff_char_t *p; |
@@ -3306,33 +2734,6 @@ int BuffPutUnicode(unsigned int u32, TCharAttr Attr, BOOL Insert) | ||
3306 | 2734 | assert(Attr.Attr == (Attr.AttrEx & 0xff)); |
3307 | 2735 | |
3308 | 2736 | #if 0 |
3309 | - BYTE b1, b2; | |
3310 | - // TODO 入力文字を CP932 に変換しておく、廃止予定 | |
3311 | - if (u32 < 0x80) { | |
3312 | - b1 = (BYTE)u32; | |
3313 | - b2 = 0; | |
3314 | - } | |
3315 | - else { | |
3316 | - char mbchar[2]; | |
3317 | - size_t ret = UTF32ToCP932(u32, mbchar, 2); | |
3318 | - if (ret == 0) { | |
3319 | - b1 = '?'; | |
3320 | - b2 = 0; | |
3321 | - ret = 1; | |
3322 | - } | |
3323 | - else if (ret == 1) { | |
3324 | - b1 = mbchar[0]; | |
3325 | - b2 = 0; | |
3326 | - } | |
3327 | - else { // ret == 2 | |
3328 | - b1 = mbchar[0]; | |
3329 | - b2 = mbchar[1]; | |
3330 | - ret = 2; | |
3331 | - } | |
3332 | - } | |
3333 | -#endif | |
3334 | - | |
3335 | -#if 0 | |
3336 | 2737 | OutputDebugPrintfW(L"BuffPutUnicode(U+%06x,(%d,%d)\n", u32, CursorX, CursorY); |
3337 | 2738 | #endif |
3338 | 2739 |
@@ -3463,7 +2864,6 @@ int BuffPutUnicode(unsigned int u32, TCharAttr Attr, BOOL Insert) | ||
3463 | 2864 | |
3464 | 2865 | // 一番最後の文字が全角の場合、 |
3465 | 2866 | if (LineEnd <= NumOfColumns - 1 && (CodeLineW[LineEnd - 1].attr & AttrKanji)) { |
3466 | -// CodeLine[LineEnd - 1] = 0x20; | |
3467 | 2867 | BuffSetChar(&CodeLineW[LineEnd - 1], 0x20, 'H'); |
3468 | 2868 | CodeLineW[LineEnd].attr &= ~AttrKanji; |
3469 | 2869 | // CodeLine[LineEnd+1] = 0x20; |
@@ -3474,44 +2874,26 @@ int BuffPutUnicode(unsigned int u32, TCharAttr Attr, BOOL Insert) | ||
3474 | 2874 | if (!half_width) { |
3475 | 2875 | MoveLen = LineEnd - CursorX - 1; |
3476 | 2876 | if (MoveLen > 0) { |
3477 | -// memmove(&CodeLine[CursorX + 2], &CodeLine[CursorX], MoveLen); | |
3478 | 2877 | memmoveW(&(CodeLineW[CursorX + 2]), &(CodeLineW[CursorX]), MoveLen); |
3479 | -// memmove(&AttrLine[CursorX + 2], &AttrLine[CursorX], MoveLen); | |
3480 | -// memmove(&AttrLine2[CursorX + 2], &AttrLine2[CursorX], MoveLen); | |
3481 | -// memmove(&AttrLineFG[CursorX + 2], &AttrLineFG[CursorX], MoveLen); | |
3482 | -// memmove(&AttrLineBG[CursorX + 2], &AttrLineBG[CursorX], MoveLen); | |
3483 | 2878 | } |
3484 | 2879 | } |
3485 | 2880 | else { |
3486 | 2881 | MoveLen = LineEnd - CursorX; |
3487 | 2882 | if (MoveLen > 0) { |
3488 | -// memmove(&CodeLine[CursorX + 1], &CodeLine[CursorX], MoveLen); | |
3489 | 2883 | memmoveW(&(CodeLineW[CursorX + 1]), &(CodeLineW[CursorX]), MoveLen); |
3490 | -// memmove(&AttrLine[CursorX + 1], &AttrLine[CursorX], MoveLen); | |
3491 | -// memmove(&AttrLine2[CursorX + 1], &AttrLine2[CursorX], MoveLen); | |
3492 | -// memmove(&AttrLineFG[CursorX + 1], &AttrLineFG[CursorX], MoveLen); | |
3493 | -// memmove(&AttrLineBG[CursorX + 1], &AttrLineBG[CursorX], MoveLen); | |
3494 | 2884 | } |
3495 | 2885 | } |
3496 | 2886 | |
3497 | -//TODO CodeLine[CursorX] = b1; | |
3498 | 2887 | BuffSetChar2(&CodeLineW[CursorX], u32, width_property, half_width, emoji); |
3499 | 2888 | CodeLineW[CursorX].attr = Attr.Attr; |
3500 | 2889 | CodeLineW[CursorX].attr2 = Attr.Attr2; |
3501 | -// AttrLine[CursorX] = Attr.Attr; | |
3502 | -// AttrLine2[CursorX] = Attr.Attr2; | |
3503 | -// AttrLineFG[CursorX] = Attr.Fore; | |
3504 | -// AttrLineBG[CursorX] = Attr.Back; | |
3505 | 2890 | CodeLineW[CursorX].fg = Attr.Fore; |
3506 | 2891 | CodeLineW[CursorX].bg = Attr.Back; |
3507 | 2892 | if (!half_width && CursorX < LineEnd) { |
3508 | -// CodeLine[CursorX + 1] = 0; | |
3509 | 2893 | BuffSetChar(&CodeLineW[CursorX + 1], 0, 'H'); |
3510 | 2894 | CodeLineW[CursorX + 1].Padding = TRUE; |
3511 | 2895 | CodeLineW[CursorX + 1].attr = Attr.Attr; |
3512 | 2896 | CodeLineW[CursorX + 1].attr2 = Attr.Attr2; |
3513 | -// AttrLineFG[CursorX + 1] = Attr.Fore; | |
3514 | -// AttrLineBG[CursorX + 1] = Attr.Back; | |
3515 | 2897 | CodeLineW[CursorX + 1].fg = Attr.Fore; |
3516 | 2898 | CodeLineW[CursorX + 1].bg = Attr.Back; |
3517 | 2899 | } |
@@ -3525,12 +2907,9 @@ int BuffPutUnicode(unsigned int u32, TCharAttr Attr, BOOL Insert) | ||
3525 | 2907 | /* last char in current line is kanji first? */ |
3526 | 2908 | if ((CodeLineW[LineEnd].attr & AttrKanji) != 0) { |
3527 | 2909 | /* then delete it */ |
3528 | -// CodeLine[LineEnd] = 0x20; | |
3529 | 2910 | BuffSetChar(&CodeLineW[LineEnd], 0x20, 'H'); |
3530 | 2911 | CodeLineW[LineEnd].attr = CurCharAttr.Attr; |
3531 | 2912 | CodeLineW[LineEnd].attr2 = CurCharAttr.Attr2; |
3532 | -// AttrLineFG[LineEnd] = CurCharAttr.Fore; | |
3533 | -// AttrLineBG[LineEnd] = CurCharAttr.Back; | |
3534 | 2913 | CodeLineW[LineEnd].fg = CurCharAttr.Fore; |
3535 | 2914 | CodeLineW[LineEnd].bg = CurCharAttr.Back; |
3536 | 2915 | } |
@@ -3552,8 +2931,6 @@ int BuffPutUnicode(unsigned int u32, TCharAttr Attr, BOOL Insert) | ||
3552 | 2931 | p->Padding = TRUE; |
3553 | 2932 | CodeLineW[CursorX].attr = Attr.Attr; |
3554 | 2933 | CodeLineW[CursorX].attr2 = Attr.Attr2; |
3555 | -// AttrLineFG[CursorX] = Attr.Fore; | |
3556 | -// AttrLineBG[CursorX] = Attr.Back; | |
3557 | 2934 | CodeLineW[CursorX].fg = Attr.Fore; |
3558 | 2935 | CodeLineW[CursorX].bg = Attr.Back; |
3559 | 2936 | move_x = 1; |
@@ -3574,7 +2951,6 @@ int BuffPutUnicode(unsigned int u32, TCharAttr Attr, BOOL Insert) | ||
3574 | 2951 | } |
3575 | 2952 | } |
3576 | 2953 | |
3577 | -// TODO CodeLine[CursorX] = b1; | |
3578 | 2954 | BuffSetChar2(&CodeLineW[CursorX], u32, width_property, half_width, emoji); |
3579 | 2955 | if (half_width) { |
3580 | 2956 | CodeLineW[CursorX].attr = Attr.Attr; |
@@ -3584,8 +2960,6 @@ int BuffPutUnicode(unsigned int u32, TCharAttr Attr, BOOL Insert) | ||
3584 | 2960 | CodeLineW[CursorX].attr = Attr.Attr | AttrKanji; |
3585 | 2961 | } |
3586 | 2962 | CodeLineW[CursorX].attr2 = Attr.Attr2; |
3587 | -// AttrLineFG[CursorX] = Attr.Fore; | |
3588 | -// AttrLineBG[CursorX] = Attr.Back; | |
3589 | 2963 | CodeLineW[CursorX].fg = Attr.Fore; |
3590 | 2964 | CodeLineW[CursorX].bg = Attr.Back; |
3591 | 2965 |
@@ -3595,11 +2969,8 @@ int BuffPutUnicode(unsigned int u32, TCharAttr Attr, BOOL Insert) | ||
3595 | 2969 | buff_char_t *p = &CodeLineW[CursorX + 1]; |
3596 | 2970 | BuffSetChar(p, 0, 'H'); |
3597 | 2971 | p->Padding = TRUE; |
3598 | -// TODO CodeLine[CursorX + 1] = b2; | |
3599 | 2972 | CodeLineW[CursorX + 1].attr = 0; |
3600 | 2973 | CodeLineW[CursorX + 1].attr2 = 0; |
3601 | -// AttrLineFG[CursorX + 1] = 0; | |
3602 | -// AttrLineBG[CursorX + 1] = 0; | |
3603 | 2974 | CodeLineW[CursorX + 1].fg = 0; |
3604 | 2975 | CodeLineW[CursorX + 1].bg = 0; |
3605 | 2976 | } |
@@ -3625,15 +2996,6 @@ int BuffPutUnicode(unsigned int u32, TCharAttr Attr, BOOL Insert) | ||
3625 | 2996 | |
3626 | 2997 | // URLの検出 |
3627 | 2998 | mark_url_w(CursorX, CursorY); |
3628 | - | |
3629 | -#if 0 | |
3630 | - { | |
3631 | - char ba[128]; | |
3632 | - memcpy(ba, &CodeLine[0], _countof(ba)-1); | |
3633 | - ba[127] = 0; | |
3634 | - OutputDebugPrintf("A '%s'\n", ba); | |
3635 | - } | |
3636 | -#endif | |
3637 | 2999 | } |
3638 | 3000 | } |
3639 | 3001 |
@@ -3641,15 +3003,6 @@ int BuffPutUnicode(unsigned int u32, TCharAttr Attr, BOOL Insert) | ||
3641 | 3003 | OutputDebugPrintf("StrChangeStart,Count %d,%d\n", StrChangeStart, StrChangeCount); |
3642 | 3004 | } |
3643 | 3005 | |
3644 | -#if 0 | |
3645 | - { | |
3646 | - wchar_t *wcs; | |
3647 | - p = &CodeLineW[CursorX]; | |
3648 | - wcs = GetWCS(p); | |
3649 | - OutputDebugPrintf("BuffPutUnicode '%s' leave\n",wcs); | |
3650 | - free(wcs); | |
3651 | - } | |
3652 | -#endif | |
3653 | 3006 | return move_x; |
3654 | 3007 | } |
3655 | 3008 |
@@ -3745,8 +3098,6 @@ static void BuffDrawLineI(int DrawX, int DrawY, int SY, int IStart, int IEnd) | ||
3745 | 3098 | } |
3746 | 3099 | CurAttr.Attr = CodeBuffW[ptr].attr & ~ AttrKanji; |
3747 | 3100 | CurAttr.Attr2 = CodeBuffW[ptr].attr2; |
3748 | -// CurAttr.Fore = AttrBuffFG[ptr]; | |
3749 | -// CurAttr.Back = AttrBuffBG[ptr]; | |
3750 | 3101 | CurAttr.Fore = CodeBuffW[ptr].fg; |
3751 | 3102 | CurAttr.Back = CodeBuffW[ptr].bg; |
3752 | 3103 | CurAttrEmoji = b->Emoji; |
@@ -3763,8 +3114,6 @@ static void BuffDrawLineI(int DrawX, int DrawY, int SY, int IStart, int IEnd) | ||
3763 | 3114 | TCharAttr TempAttr; |
3764 | 3115 | TempAttr.Attr = CodeBuffW[TmpPtr+istart+count].attr & ~ AttrKanji; |
3765 | 3116 | TempAttr.Attr2 = CodeBuffW[TmpPtr+istart+count].attr2; |
3766 | -// TempAttr.Fore = AttrBuffFG[TmpPtr+istart+count]; | |
3767 | -// TempAttr.Back = AttrBuffBG[TmpPtr+istart+count]; | |
3768 | 3117 | TempAttr.Fore = CodeBuffW[TmpPtr + istart + count].fg; |
3769 | 3118 | TempAttr.Back = CodeBuffW[TmpPtr + istart + count].bg; |
3770 | 3119 | if (b->u32 != 0 && |
@@ -3862,12 +3211,10 @@ void BuffUpdateRect | ||
3862 | 3211 | // XEnd: x position of the lower-right corner (last character) |
3863 | 3212 | // YEnd: y position |
3864 | 3213 | { |
3865 | -// int i; | |
3866 | 3214 | int j; |
3867 | 3215 | int IStart, IEnd; |
3868 | 3216 | int X, Y; |
3869 | 3217 | LONG TmpPtr; |
3870 | -// TCharAttr TempAttr; | |
3871 | 3218 | BOOL TempSel, Caret; |
3872 | 3219 | |
3873 | 3220 | if (XStart >= WinOrgX+WinWidth) { |
@@ -3903,7 +3250,6 @@ void BuffUpdateRect | ||
3903 | 3250 | XEnd - XStart + 1, YEnd - YStart + 1); |
3904 | 3251 | #endif |
3905 | 3252 | |
3906 | -// TempAttr = DefCharAttr; | |
3907 | 3253 | TempSel = FALSE; |
3908 | 3254 | |
3909 | 3255 | Caret = IsCaretOn(); |
@@ -3923,7 +3269,6 @@ void BuffUpdateRect | ||
3923 | 3269 | |
3924 | 3270 | X = (IStart-WinOrgX)*FontWidth; |
3925 | 3271 | |
3926 | -// i = IStart; | |
3927 | 3272 | BuffDrawLineI(X, Y, j, IStart, IEnd); |
3928 | 3273 | Y = Y + FontHeight; |
3929 | 3274 | TmpPtr = NextLinePtr(TmpPtr); |
@@ -3983,13 +3328,7 @@ void MoveRight() | ||
3983 | 3328 | |
3984 | 3329 | void BuffSetCaretWidth() |
3985 | 3330 | { |
3986 | -#if !ATR | |
3987 | 3331 | buff_char_t *CodeLineW = &CodeBuffW[LinePtr]; |
3988 | -// PCHAR AttrLine = &AttrBuff[LinePtr]; | |
3989 | -// PCHAR AttrLine2 = &AttrBuff2[LinePtr]; | |
3990 | -// PCHAR AttrLineFG = &AttrBuffFG[LinePtr]; | |
3991 | -// PCHAR AttrLineBG = &AttrBuffBG[LinePtr]; | |
3992 | -#endif | |
3993 | 3332 | BOOL DW; |
3994 | 3333 | |
3995 | 3334 | /* check whether cursor on a DBCS character */ |
@@ -4017,20 +3356,10 @@ void ScrollUp1Line() | ||
4017 | 3356 | DestPtr = GetLinePtr(PageStart+CursorBottom) + CursorLeftM; |
4018 | 3357 | for (i = CursorBottom-1 ; i >= CursorTop ; i--) { |
4019 | 3358 | SrcPtr = PrevLinePtr(DestPtr); |
4020 | -// memcpy(&(CodeBuff[DestPtr]), &(CodeBuff[SrcPtr]), linelen); | |
4021 | 3359 | memcpyW(&(CodeBuffW[DestPtr]), &(CodeBuffW[SrcPtr]), linelen); |
4022 | -// memcpy(&(AttrBuff[DestPtr]), &(AttrBuff[SrcPtr]), linelen); | |
4023 | -// memcpy(&(AttrBuff2[DestPtr]), &(AttrBuff2[SrcPtr]), linelen); | |
4024 | -// memcpy(&(AttrBuffFG[DestPtr]), &(AttrBuffFG[SrcPtr]), linelen); | |
4025 | -// memcpy(&(AttrBuffBG[DestPtr]), &(AttrBuffBG[SrcPtr]), linelen); | |
4026 | 3360 | DestPtr = SrcPtr; |
4027 | 3361 | } |
4028 | -// memset(&(CodeBuff[SrcPtr]), 0x20, linelen); | |
4029 | 3362 | memsetW(&(CodeBuffW[SrcPtr]), 0x20, CurCharAttr.Fore, CurCharAttr.Back, AttrDefault, CurCharAttr.Attr2 & Attr2ColorMask, linelen); |
4030 | -// memset(&(AttrBuff[SrcPtr]), AttrDefault, linelen); | |
4031 | -// memset(&(AttrBuff2[SrcPtr]), CurCharAttr.Attr2 & Attr2ColorMask, linelen); | |
4032 | -// memset(&(AttrBuffFG[SrcPtr]), CurCharAttr.Fore, linelen); | |
4033 | -// memset(&(AttrBuffBG[SrcPtr]), CurCharAttr.Back, linelen); | |
4034 | 3363 | |
4035 | 3364 | if (CursorLeftM > 0 || CursorRightM < NumOfColumns-1) |
4036 | 3365 | BuffUpdateRect(CursorLeftM-extl, CursorTop, CursorRightM+extr, CursorBottom); |
@@ -4090,12 +3419,7 @@ void BuffScrollNLines(int n) | ||
4090 | 3419 | if (n<CursorBottom-CursorTop+1) { |
4091 | 3420 | SrcPtr = GetLinePtr(PageStart+CursorTop+n) + (LONG)CursorLeftM; |
4092 | 3421 | for (i = CursorTop+n ; i<=CursorBottom ; i++) { |
4093 | -// memmove(&(CodeBuff[DestPtr]), &(CodeBuff[SrcPtr]), linelen); | |
4094 | 3422 | memmoveW(&(CodeBuffW[DestPtr]), &(CodeBuffW[SrcPtr]), linelen); |
4095 | -// memmove(&(AttrBuff[DestPtr]), &(AttrBuff[SrcPtr]), linelen); | |
4096 | -// memmove(&(AttrBuff2[DestPtr]), &(AttrBuff2[SrcPtr]), linelen); | |
4097 | -// memmove(&(AttrBuffFG[DestPtr]), &(AttrBuffFG[SrcPtr]), linelen); | |
4098 | -// memmove(&(AttrBuffBG[DestPtr]), &(AttrBuffBG[SrcPtr]), linelen); | |
4099 | 3423 | SrcPtr = NextLinePtr(SrcPtr); |
4100 | 3424 | DestPtr = NextLinePtr(DestPtr); |
4101 | 3425 | } |
@@ -4104,12 +3428,7 @@ void BuffScrollNLines(int n) | ||
4104 | 3428 | n = CursorBottom-CursorTop+1; |
4105 | 3429 | } |
4106 | 3430 | for (i = CursorBottom+1-n ; i<=CursorBottom; i++) { |
4107 | -// memset(&(CodeBuff[DestPtr]), 0x20, linelen); | |
4108 | 3431 | memsetW(&(CodeBuffW[DestPtr]), 0x20, CurCharAttr.Fore, CurCharAttr.Back, AttrDefault, CurCharAttr.Attr2 & Attr2ColorMask, linelen); |
4109 | -// memset(&(AttrBuff[DestPtr]), AttrDefault, linelen); | |
4110 | -// memset(&(AttrBuff2[DestPtr]), CurCharAttr.Attr2 & Attr2ColorMask, linelen); | |
4111 | -// memset(&(AttrBuffFG[DestPtr]), CurCharAttr.Fore, linelen); | |
4112 | -// memset(&(AttrBuffBG[DestPtr]), CurCharAttr.Back, linelen); | |
4113 | 3432 | DestPtr = NextLinePtr(DestPtr); |
4114 | 3433 | } |
4115 | 3434 | if (CursorLeftM > 0 || CursorRightM < NumOfColumns-1) |
@@ -4153,12 +3472,7 @@ void BuffRegionScrollUpNLines(int n) { | ||
4153 | 3472 | if (n < CursorBottom - CursorTop + 1) { |
4154 | 3473 | SrcPtr = GetLinePtr(PageStart+CursorTop+n) + CursorLeftM; |
4155 | 3474 | for (i = CursorTop+n ; i<=CursorBottom ; i++) { |
4156 | -// memmove(&(CodeBuff[DestPtr]), &(CodeBuff[SrcPtr]), linelen); | |
4157 | 3475 | memmoveW(&(CodeBuffW[DestPtr]), &(CodeBuffW[SrcPtr]), linelen); |
4158 | -// memmove(&(AttrBuff[DestPtr]), &(AttrBuff[SrcPtr]), linelen); | |
4159 | -// memmove(&(AttrBuff2[DestPtr]), &(AttrBuff2[SrcPtr]), linelen); | |
4160 | -// memmove(&(AttrBuffFG[DestPtr]), &(AttrBuffFG[SrcPtr]), linelen); | |
4161 | -// memmove(&(AttrBuffBG[DestPtr]), &(AttrBuffBG[SrcPtr]), linelen); | |
4162 | 3476 | SrcPtr = NextLinePtr(SrcPtr); |
4163 | 3477 | DestPtr = NextLinePtr(DestPtr); |
4164 | 3478 | } |
@@ -4167,12 +3481,7 @@ void BuffRegionScrollUpNLines(int n) { | ||
4167 | 3481 | n = CursorBottom - CursorTop + 1; |
4168 | 3482 | } |
4169 | 3483 | for (i = CursorBottom+1-n ; i<=CursorBottom; i++) { |
4170 | -// memset(&(CodeBuff[DestPtr]), 0x20, linelen); | |
4171 | 3484 | memsetW(&(CodeBuffW[DestPtr]), 0x20, CurCharAttr.Fore, CurCharAttr.Back, AttrDefault, CurCharAttr.Attr2 & Attr2ColorMask, linelen); |
4172 | -// memset(&(AttrBuff[DestPtr]), AttrDefault, linelen); | |
4173 | -// memset(&(AttrBuff2[DestPtr]), CurCharAttr.Attr2 & Attr2ColorMask, linelen); | |
4174 | -// memset(&(AttrBuffFG[DestPtr]), CurCharAttr.Fore, linelen); | |
4175 | -// memset(&(AttrBuffBG[DestPtr]), CurCharAttr.Back, linelen); | |
4176 | 3485 | DestPtr = NextLinePtr(DestPtr); |
4177 | 3486 | } |
4178 | 3487 |
@@ -4207,12 +3516,7 @@ void BuffRegionScrollDownNLines(int n) { | ||
4207 | 3516 | if (n < CursorBottom - CursorTop + 1) { |
4208 | 3517 | SrcPtr = GetLinePtr(PageStart+CursorBottom-n) + CursorLeftM; |
4209 | 3518 | for (i=CursorBottom-n ; i>=CursorTop ; i--) { |
4210 | -// memmove(&(CodeBuff[DestPtr]), &(CodeBuff[SrcPtr]), linelen); | |
4211 | 3519 | memmoveW(&(CodeBuffW[DestPtr]), &(CodeBuffW[SrcPtr]), linelen); |
4212 | -// memmove(&(AttrBuff[DestPtr]), &(AttrBuff[SrcPtr]), linelen); | |
4213 | -// memmove(&(AttrBuff2[DestPtr]), &(AttrBuff2[SrcPtr]), linelen); | |
4214 | -// memmove(&(AttrBuffFG[DestPtr]), &(AttrBuffFG[SrcPtr]), linelen); | |
4215 | -// memmove(&(AttrBuffBG[DestPtr]), &(AttrBuffBG[SrcPtr]), linelen); | |
4216 | 3520 | SrcPtr = PrevLinePtr(SrcPtr); |
4217 | 3521 | DestPtr = PrevLinePtr(DestPtr); |
4218 | 3522 | } |
@@ -4221,12 +3525,7 @@ void BuffRegionScrollDownNLines(int n) { | ||
4221 | 3525 | n = CursorBottom - CursorTop + 1; |
4222 | 3526 | } |
4223 | 3527 | for (i = CursorTop+n-1; i>=CursorTop; i--) { |
4224 | -// memset(&(CodeBuff[DestPtr]), 0x20, linelen); | |
4225 | 3528 | memsetW(&(CodeBuffW[DestPtr]), 0x20, CurCharAttr.Fore, CurCharAttr.Back, AttrDefault, CurCharAttr.Attr2 & Attr2ColorMask, linelen); |
4226 | -// memset(&(AttrBuff[DestPtr]), AttrDefault, linelen); | |
4227 | -// memset(&(AttrBuff2[DestPtr]), CurCharAttr.Attr2 & Attr2ColorMask, linelen); | |
4228 | -// memset(&(AttrBuffFG[DestPtr]), CurCharAttr.Fore, linelen); | |
4229 | -// memset(&(AttrBuffBG[DestPtr]), CurCharAttr.Back, linelen); | |
4230 | 3529 | DestPtr = PrevLinePtr(DestPtr); |
4231 | 3530 | } |
4232 | 3531 |
@@ -5255,12 +4554,7 @@ void ClearBuffer() | ||
5255 | 4554 | Selected = FALSE; |
5256 | 4555 | |
5257 | 4556 | NewLine(0); |
5258 | -// memset(&CodeBuff[0],0x20,BufferSize); | |
5259 | 4557 | memsetW(&CodeBuffW[0],0x20, CurCharAttr.Fore, CurCharAttr.Back, AttrDefault, CurCharAttr.Attr2 & Attr2ColorMask, BufferSize); |
5260 | -// memset(&AttrBuff[0],AttrDefault,BufferSize); | |
5261 | -// memset(&AttrBuff2[0],CurCharAttr.Attr2 & Attr2ColorMask, BufferSize); | |
5262 | -// memset(&AttrBuffFG[0],CurCharAttr.Fore,BufferSize); | |
5263 | -// memset(&AttrBuffBG[0],CurCharAttr.Back,BufferSize); | |
5264 | 4558 | |
5265 | 4559 | /* Home position */ |
5266 | 4560 | CursorX = 0; |
@@ -5464,13 +4758,7 @@ void ShowStatusLine(int Show) | ||
5464 | 4758 | |
5465 | 4759 | void BuffLineContinued(BOOL mode) |
5466 | 4760 | { |
5467 | -#if !ATR | |
5468 | 4761 | buff_char_t* CodeLineW = &CodeBuffW[LinePtr]; |
5469 | -// PCHAR AttrLine = &AttrBuff[LinePtr]; | |
5470 | -// PCHAR AttrLine2 = &AttrBuff2[LinePtr]; | |
5471 | -// PCHAR AttrLineFG = &AttrBuffFG[LinePtr]; | |
5472 | -// PCHAR AttrLineBG = &AttrBuffBG[LinePtr]; | |
5473 | -#endif | |
5474 | 4762 | if (ts.EnableContinuedLineCopy) { |
5475 | 4763 | if (mode) { |
5476 | 4764 | CodeLineW[0].attr |= AttrLineContinued; |
@@ -5515,12 +4803,7 @@ void BuffSaveScreen() | ||
5515 | 4803 | DestPtr = 0; |
5516 | 4804 | |
5517 | 4805 | for (i=0; i<NumOfLines; i++) { |
5518 | -// memcpy(&CodeDest[DestPtr], &CodeBuff[SrcPtr], NumOfColumns); | |
5519 | 4806 | memcpyW(&CodeDestW[DestPtr], &CodeBuffW[SrcPtr], NumOfColumns); |
5520 | -// memcpy(&AttrDest[DestPtr], &AttrBuff[SrcPtr], NumOfColumns); | |
5521 | -// memcpy(&AttrDest2[DestPtr], &AttrBuff2[SrcPtr], NumOfColumns); | |
5522 | -// memcpy(&AttrDestFG[DestPtr], &AttrBuffFG[SrcPtr], NumOfColumns); | |
5523 | -// memcpy(&AttrDestBG[DestPtr], &AttrBuffBG[SrcPtr], NumOfColumns); | |
5524 | 4807 | SrcPtr = NextLinePtr(SrcPtr); |
5525 | 4808 | DestPtr += NumOfColumns; |
5526 | 4809 | } |
@@ -5570,14 +4853,8 @@ void BuffRestoreScreen() | ||
5570 | 4853 | DestPtr = GetLinePtr(PageStart); |
5571 | 4854 | |
5572 | 4855 | for (i=0; i<CopyY; i++) { |
5573 | -// memcpy(&CodeBuff[DestPtr], &CodeSrc[SrcPtr], CopyX); | |
5574 | 4856 | memcpyW(&CodeBuffW[DestPtr], &CodeSrcW[SrcPtr], CopyX); |
5575 | -// memcpy(&AttrBuff[DestPtr], &AttrSrc[SrcPtr], CopyX); | |
5576 | -// memcpy(&AttrBuff2[DestPtr], &AttrSrc2[SrcPtr], CopyX); | |
5577 | -// memcpy(&AttrBuffFG[DestPtr], &AttrSrcFG[SrcPtr], CopyX); | |
5578 | -// memcpy(&AttrBuffBG[DestPtr], &AttrSrcBG[SrcPtr], CopyX); | |
5579 | 4857 | if (CodeBuffW[DestPtr+CopyX-1].attr & AttrKanji) { |
5580 | -// CodeBuff[DestPtr+CopyX-1] = ' '; | |
5581 | 4858 | BuffSetChar(&CodeBuffW[DestPtr+CopyX-1], 0x20, 'H'); |
5582 | 4859 | CodeBuffW[DestPtr+CopyX-1].attr ^= AttrKanji; |
5583 | 4860 | } |
@@ -5604,13 +4881,7 @@ void BuffDiscardSavedScreen() | ||
5604 | 4881 | void BuffSelectedEraseCurToEnd() |
5605 | 4882 | // Erase characters from cursor to the end of screen |
5606 | 4883 | { |
5607 | -#if !ATR | |
5608 | 4884 | buff_char_t* CodeLineW = &CodeBuffW[LinePtr]; |
5609 | -// PCHAR AttrLine = &AttrBuff[LinePtr]; | |
5610 | -// PCHAR AttrLine2 = &AttrBuff2[LinePtr]; | |
5611 | -// PCHAR AttrLineFG = &AttrBuffFG[LinePtr]; | |
5612 | -// PCHAR AttrLineBG = &AttrBuffBG[LinePtr]; | |
5613 | -#endif | |
5614 | 4885 | LONG TmpPtr; |
5615 | 4886 | int offset; |
5616 | 4887 | int i, j, YEnd; |
@@ -5630,7 +4901,6 @@ void BuffSelectedEraseCurToEnd() | ||
5630 | 4901 | for (i = CursorY ; i <= YEnd ; i++) { |
5631 | 4902 | for (j = TmpPtr + offset; j < TmpPtr + NumOfColumns - offset; j++) { |
5632 | 4903 | if (!(CodeLineW[j].attr2 & Attr2Protect)) { |
5633 | -// CodeBuff[j] = 0x20; | |
5634 | 4904 | BuffSetChar(&CodeBuffW[j], 0x20, 'H'); |
5635 | 4905 | CodeLineW[j].attr &= AttrSgrMask; |
5636 | 4906 | } |
@@ -5645,13 +4915,7 @@ void BuffSelectedEraseCurToEnd() | ||
5645 | 4915 | void BuffSelectedEraseHomeToCur() |
5646 | 4916 | // Erase characters from home to cursor |
5647 | 4917 | { |
5648 | -#if !ATR | |
5649 | 4918 | buff_char_t* CodeLineW = &CodeBuffW[LinePtr]; |
5650 | - // PCHAR AttrLine = &AttrBuff[LinePtr]; | |
5651 | -// PCHAR AttrLine2 = &AttrBuff2[LinePtr]; | |
5652 | -// PCHAR AttrLineFG = &AttrBuffFG[LinePtr]; | |
5653 | -// PCHAR AttrLineBG = &AttrBuffBG[LinePtr]; | |
5654 | -#endif | |
5655 | 4919 | LONG TmpPtr; |
5656 | 4920 | int offset; |
5657 | 4921 | int i, j, YHome; |
@@ -5676,7 +4940,6 @@ void BuffSelectedEraseHomeToCur() | ||
5676 | 4940 | } |
5677 | 4941 | for (j = TmpPtr; j < TmpPtr + offset; j++) { |
5678 | 4942 | if (!(CodeLineW[j].attr2 & Attr2Protect)) { |
5679 | -// CodeBuff[j] = 0x20; | |
5680 | 4943 | BuffSetChar(&CodeBuffW[j], 0x20, 'H'); |
5681 | 4944 | CodeBuffW[j].attr &= AttrSgrMask; |
5682 | 4945 | } |
@@ -5716,20 +4979,17 @@ void BuffSelectiveEraseBox(int XStart, int YStart, int XEnd, int YEnd) | ||
5716 | 4979 | if ((XStart>0) && |
5717 | 4980 | ((CodeBuffW[Ptr+XStart-1].attr & AttrKanji) != 0) && |
5718 | 4981 | ((CodeBuffW[Ptr+XStart-1].attr2 & Attr2Protect) == 0)) { |
5719 | -// CodeBuff[Ptr+XStart-1] = 0x20; | |
5720 | 4982 | BuffSetChar(&CodeBuffW[Ptr+XStart-1], 0x20, 'H'); |
5721 | 4983 | CodeBuffW[Ptr+XStart-1].attr &= AttrSgrMask; |
5722 | 4984 | } |
5723 | 4985 | if ((XStart+C<NumOfColumns) && |
5724 | 4986 | ((CodeBuffW[Ptr+XStart+C-1].attr & AttrKanji) != 0) && |
5725 | 4987 | ((CodeBuffW[Ptr+XStart+C-1].attr2 & Attr2Protect) == 0)) { |
5726 | -// CodeBuff[Ptr+XStart+C] = 0x20; | |
5727 | 4988 | BuffSetChar(&CodeBuffW[Ptr+XStart+C], 0x20, 'H'); |
5728 | 4989 | CodeBuffW[Ptr+XStart+C].attr &= AttrSgrMask; |
5729 | 4990 | } |
5730 | 4991 | for (j=Ptr+XStart; j<Ptr+XStart+C; j++) { |
5731 | 4992 | if (!(CodeBuffW[j].attr2 & Attr2Protect)) { |
5732 | -// CodeBuff[j] = 0x20; | |
5733 | 4993 | BuffSetChar(&CodeBuffW[j], 0x20, 'H'); |
5734 | 4994 | CodeBuffW[j].attr &= AttrSgrMask; |
5735 | 4995 | } |
@@ -5744,14 +5004,7 @@ void BuffSelectedEraseCharsInLine(int XStart, int Count) | ||
5744 | 5004 | // XStart: start position of erasing |
5745 | 5005 | // Count: number of characters to be erased |
5746 | 5006 | { |
5747 | -#if !ATR | |
5748 | -// PCHAR CodeLine = &CodeBuff[LinePtr]; | |
5749 | -// PCHAR AttrLine = &AttrBuff[LinePtr]; | |
5750 | -// PCHAR AttrLine2 = &AttrBuff2[LinePtr]; | |
5751 | -// PCHAR AttrLineFG = &AttrBuffFG[LinePtr]; | |
5752 | -// PCHAR AttrLineBG = &AttrBuffBG[LinePtr]; | |
5753 | 5007 | buff_char_t * CodeLineW = &CodeBuffW[LinePtr]; |
5754 | -#endif | |
5755 | 5008 | int i; |
5756 | 5009 | BOOL LineContinued=FALSE; |
5757 | 5010 |
@@ -5768,7 +5021,6 @@ void BuffSelectedEraseCharsInLine(int XStart, int Count) | ||
5768 | 5021 | NewLine(PageStart+CursorY); |
5769 | 5022 | for (i=XStart; i < XStart + Count; i++) { |
5770 | 5023 | if (!(CodeLineW[i].attr2 & Attr2Protect)) { |
5771 | -// CodeLine[i] = 0x20; | |
5772 | 5024 | BuffSetChar(&CodeLineW[i], 0x20, 'H'); |
5773 | 5025 | CodeLineW[i].attr &= AttrSgrMask; |
5774 | 5026 | } |
@@ -5800,39 +5052,25 @@ void BuffScrollLeft(int count) | ||
5800 | 5052 | Ptr = LPtr + CursorLeftM; |
5801 | 5053 | |
5802 | 5054 | if (CodeBuffW[LPtr+CursorRightM].attr & AttrKanji) { |
5803 | -// CodeBuff[LPtr+CursorRightM] = 0x20; | |
5804 | 5055 | BuffSetChar(&CodeBuffW[LPtr+CursorRightM], 0x20, 'H'); |
5805 | 5056 | CodeBuffW[LPtr+CursorRightM].attr &= ~AttrKanji; |
5806 | 5057 | if (CursorRightM < NumOfColumns-1) { |
5807 | -// CodeBuff[LPtr+CursorRightM+1] = 0x20; | |
5808 | 5058 | BuffSetChar(&CodeBuffW[LPtr+CursorRightM+1], 0x20, 'H'); |
5809 | 5059 | } |
5810 | 5060 | } |
5811 | 5061 | |
5812 | 5062 | if (CodeBuffW[Ptr+count-1].attr & AttrKanji) { |
5813 | -// CodeBuff[Ptr+count] = 0x20; | |
5814 | 5063 | BuffSetChar(&CodeBuffW[Ptr+count], 0x20, 'H'); |
5815 | 5064 | } |
5816 | 5065 | |
5817 | 5066 | if (CursorLeftM > 0 && CodeBuffW[Ptr-1].attr & AttrKanji) { |
5818 | -// CodeBuff[Ptr-1] = 0x20; | |
5819 | 5067 | BuffSetChar(&CodeBuffW[Ptr-1], 0x20, 'H'); |
5820 | 5068 | CodeBuffW[Ptr-1].attr &= ~AttrKanji; |
5821 | 5069 | } |
5822 | 5070 | |
5823 | -// memmove(&(CodeBuff[Ptr]), &(CodeBuff[Ptr+count]), MoveLen); | |
5824 | 5071 | memmoveW(&(CodeBuffW[Ptr]), &(CodeBuffW[Ptr+count]), MoveLen); |
5825 | -// memmove(&(AttrBuff[Ptr]), &(AttrBuff[Ptr+count]), MoveLen); | |
5826 | -// memmove(&(AttrBuff2[Ptr]), &(AttrBuff2[Ptr+count]), MoveLen); | |
5827 | -// memmove(&(AttrBuffFG[Ptr]), &(AttrBuffFG[Ptr+count]), MoveLen); | |
5828 | -// memmove(&(AttrBuffBG[Ptr]), &(AttrBuffBG[Ptr+count]), MoveLen); | |
5829 | 5072 | |
5830 | -// memset(&(CodeBuff[Ptr+MoveLen]), 0x20, count); | |
5831 | 5073 | memsetW(&(CodeBuffW[Ptr+MoveLen]), 0x20, CurCharAttr.Fore, CurCharAttr.Back, AttrDefault, CurCharAttr.Attr2 & Attr2ColorMask, count); |
5832 | -// memset(&(AttrBuff[Ptr+MoveLen]), AttrDefault, count); | |
5833 | -// memset(&(AttrBuff2[Ptr+MoveLen]), CurCharAttr.Attr2 & Attr2ColorMask, count); | |
5834 | -// memset(&(AttrBuffFG[Ptr+MoveLen]), CurCharAttr.Fore, count); | |
5835 | -// memset(&(AttrBuffBG[Ptr+MoveLen]), CurCharAttr.Back, count); | |
5836 | 5074 | |
5837 | 5075 | LPtr = NextLinePtr(LPtr); |
5838 | 5076 | } |
@@ -5853,34 +5091,20 @@ void BuffScrollRight(int count) | ||
5853 | 5091 | Ptr = LPtr + CursorLeftM; |
5854 | 5092 | |
5855 | 5093 | if (CursorRightM < NumOfColumns-1 && CodeBuffW[LPtr+CursorRightM].attr & AttrKanji) { |
5856 | -// CodeBuff[LPtr+CursorRightM+1] = 0x20; | |
5857 | 5094 | BuffSetChar(&CodeBuffW[LPtr+CursorRightM+1], 0x20, 'H'); |
5858 | 5095 | } |
5859 | 5096 | |
5860 | 5097 | if (CursorLeftM > 0 && CodeBuffW[Ptr-1].attr & AttrKanji) { |
5861 | -// CodeBuff[Ptr-1] = 0x20; | |
5862 | 5098 | BuffSetChar(&CodeBuffW[Ptr-1], 0x20, 'H'); |
5863 | 5099 | CodeBuffW[Ptr-1].attr &= ~AttrKanji; |
5864 | -// CodeBuff[Ptr] = 0x20; | |
5865 | 5100 | BuffSetChar(&CodeBuffW[Ptr], 0x20, 'H'); |
5866 | 5101 | } |
5867 | 5102 | |
5868 | -// memmove(&(CodeBuff[Ptr+count]), &(CodeBuff[Ptr]), MoveLen); | |
5869 | 5103 | memmoveW(&(CodeBuffW[Ptr+count]), &(CodeBuffW[Ptr]), MoveLen); |
5870 | -// memmove(&(AttrBuff[Ptr+count]), &(AttrBuff[Ptr]), MoveLen); | |
5871 | -// memmove(&(AttrBuff2[Ptr+count]), &(AttrBuff2[Ptr]), MoveLen); | |
5872 | -// memmove(&(AttrBuffFG[Ptr+count]), &(AttrBuffFG[Ptr]), MoveLen); | |
5873 | -// memmove(&(AttrBuffBG[Ptr+count]), &(AttrBuffBG[Ptr]), MoveLen); | |
5874 | 5104 | |
5875 | -// memset(&(CodeBuff[Ptr]), 0x20, count); | |
5876 | 5105 | memsetW(&(CodeBuffW[Ptr]), 0x20, CurCharAttr.Fore, CurCharAttr.Back, AttrDefault, CurCharAttr.Attr2 & Attr2ColorMask, count); |
5877 | -// memset(&(AttrBuff[Ptr]), AttrDefault, count); | |
5878 | -// memset(&(AttrBuff2[Ptr]), CurCharAttr.Attr2 & Attr2ColorMask, count); | |
5879 | -// memset(&(AttrBuffFG[Ptr]), CurCharAttr.Fore, count); | |
5880 | -// memset(&(AttrBuffBG[Ptr]), CurCharAttr.Back, count); | |
5881 | 5106 | |
5882 | 5107 | if (CodeBuffW[LPtr+CursorRightM].attr & AttrKanji) { |
5883 | -// CodeBuff[LPtr+CursorRightM] = 0x20; | |
5884 | 5108 | BuffSetChar(&CodeBuffW[LPtr+CursorRightM], 0x20, 'H'); |
5885 | 5109 | CodeBuffW[LPtr+CursorRightM].attr &= ~AttrKanji; |
5886 | 5110 | } |
@@ -6120,7 +5344,7 @@ wchar_t *BuffGetCharInfo(int Xw, int Yw) | ||
6120 | 5344 | L"Half %s\n" |
6121 | 5345 | L"Padding %s\n", |
6122 | 5346 | b->fg, b->bg, |
6123 | - width_property, b->WidthProperty, | |
5347 | + width_property, b->WidthProperty, | |
6124 | 5348 | (b->HalfWidth ? L"TRUE" : L"FALSE"), |
6125 | 5349 | (b->Padding ? L"TRUE" : L"FALSE")); |
6126 | 5350 |
@@ -6182,7 +5406,6 @@ wchar_t *BuffGetCharInfo(int Xw, int Yw) | ||
6182 | 5406 | |
6183 | 5407 | UnlockBuffer(); |
6184 | 5408 | |
6185 | - | |
6186 | 5409 | str_ptr = NULL; |
6187 | 5410 | awcscat(&str_ptr, pos_str); |
6188 | 5411 | awcscat(&str_ptr, attr_str); |
@@ -6201,8 +5424,6 @@ void BuffSetCursorCharAttr(int x, int y, TCharAttr Attr) | ||
6201 | 5424 | const LONG TmpPtr = GetLinePtr(PageStart+y); |
6202 | 5425 | CodeBuffW[TmpPtr + x].attr = Attr.Attr; |
6203 | 5426 | CodeBuffW[TmpPtr + x].attr2 = Attr.Attr2; |
6204 | -// AttrBuffFG[TmpPtr + x] = Attr.Fore; | |
6205 | -// AttrBuffBG[TmpPtr + x] = Attr.Back; | |
6206 | 5427 | CodeBuffW[TmpPtr + x].fg = Attr.Fore; |
6207 | 5428 | CodeBuffW[TmpPtr + x].bg = Attr.Back; |
6208 | 5429 | } |
@@ -6213,8 +5434,6 @@ TCharAttr BuffGetCursorCharAttr(int x, int y) | ||
6213 | 5434 | TCharAttr Attr; |
6214 | 5435 | Attr.Attr = CodeBuffW[TmpPtr + x].attr; |
6215 | 5436 | Attr.Attr2 = CodeBuffW[TmpPtr + x].attr2; |
6216 | -// Attr.Fore = AttrBuffFG[TmpPtr + x]; | |
6217 | -// Attr.Back =AttrBuffBG[TmpPtr + x]; | |
6218 | 5437 | Attr.Fore = CodeBuffW[TmpPtr + x].fg; |
6219 | 5438 | Attr.Back = CodeBuffW[TmpPtr + x].bg; |
6220 | 5439 |