X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Fdrv%2Fvterm_termbuf.c;h=ee543858408c7d5634bfc3524877bef953096046;hb=878381a37febeb0033d9c1c4ee8262517b9e74aa;hp=7c2965660ebd5ef6b2c9c6f8e7babc1860e0ca86;hpb=f61ceab9841c9dabb0b0747c44107da68f75fde8;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/drv/vterm_termbuf.c b/KernelLand/Kernel/drv/vterm_termbuf.c index 7c296566..ee543858 100644 --- a/KernelLand/Kernel/drv/vterm_termbuf.c +++ b/KernelLand/Kernel/drv/vterm_termbuf.c @@ -15,17 +15,16 @@ */ void VT_int_PutString(tVTerm *Term, const Uint8 *Buffer, Uint Count) { - Uint32 val; int i; // Iterate for( i = 0; i < Count; i++ ) { // Handle escape sequences - if( Buffer[i] == 0x1B ) + int ret = VT_int_ParseEscape(Term, (const char*)&Buffer[i], Count-i); + if( ret > 0 ) { - i ++; - i += VT_int_ParseEscape(Term, (const char*)&Buffer[i]) - 1; + i += ret-1; continue; } @@ -33,6 +32,7 @@ void VT_int_PutString(tVTerm *Term, const Uint8 *Buffer, Uint Count) if( Buffer[i] < 128 ) // Plain ASCII VT_int_PutChar(Term, Buffer[i]); else { // UTF-8 + Uint32 val; i += ReadUTF8(&Buffer[i], &val) - 1; VT_int_PutChar(Term, val); } @@ -288,7 +288,7 @@ void VT_int_ClearLine(tVTerm *Term, int Num) * \param NewWidth New framebuffer width * \param NewHeight New framebuffer height */ -void VT_int_ChangeMode(tVTerm *Term, int NewMode, int NewWidth, int NewHeight) +void VT_int_Resize(tVTerm *Term, int NewWidth, int NewHeight) { int oldW = Term->Width; int oldTW = Term->TextWidth; @@ -302,8 +302,6 @@ void VT_int_ChangeMode(tVTerm *Term, int NewMode, int NewWidth, int NewHeight) if(NewWidth > giVT_RealWidth) NewWidth = giVT_RealWidth; if(NewHeight > giVT_RealHeight) NewHeight = giVT_RealHeight; - Term->Mode = NewMode; - // Fast exit if no resolution change if(NewWidth == Term->Width && NewHeight == Term->Height) return ; @@ -362,7 +360,7 @@ void VT_int_ChangeMode(tVTerm *Term, int NewMode, int NewWidth, int NewHeight) // Debug #if 0 - switch(NewMode) + switch(Term->Mode) { case TERM_MODE_TEXT: Log_Log("VTerm", "Set VT %p to text mode (%ix%i)",