X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Fdrv%2Fvterm_termbuf.c;h=e03302a1bf62aa6462007ca22cd3541a6b90912d;hb=1c388a6c77f8f04b269051d0e089eaab9e45b391;hp=7c2965660ebd5ef6b2c9c6f8e7babc1860e0ca86;hpb=d0b4559f2936f6d9f06be0f7c3c51527a480ec0d;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/drv/vterm_termbuf.c b/KernelLand/Kernel/drv/vterm_termbuf.c index 7c296566..e03302a1 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); }