Kernel/PTYs - Added block on user write when server is full
[tpg/acess2.git] / KernelLand / Kernel / drv / vterm_termbuf.c
index 525f1a4..ee54385 100644 (file)
@@ -21,14 +21,11 @@ void VT_int_PutString(tVTerm *Term, const Uint8 *Buffer, Uint Count)
        for( i = 0; i < Count; i++ )
        {
                // Handle escape sequences
-               if( Buffer[i] == 0x1B && Count - i > 1 )
+               int ret = VT_int_ParseEscape(Term, (const char*)&Buffer[i], Count-i);
+               if( ret > 0 )
                {
-                       int ret = VT_int_ParseEscape(Term, (const char*)&Buffer[i+1], Count-(i+1));
-                       if( ret > 0 )
-                       {
-                               i += ret;
-                               continue;
-                       }
+                       i += ret-1;
+                       continue;
                }
                
                // Fast check for non UTF-8
@@ -291,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;
@@ -305,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 ;
@@ -365,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)",

UCC git Repository :: git.ucc.asn.au