tVideo_IOCtl_Pos pos;
pos.x = (gpVT_CurTerm->WritePos - gpVT_CurTerm->ViewPos) % gpVT_CurTerm->TextWidth;
pos.y = (gpVT_CurTerm->WritePos - gpVT_CurTerm->ViewPos) / gpVT_CurTerm->TextWidth;
- VFS_IOCtl(giVT_OutputDevHandle, VIDEO_IOCTL_SETCURSOR, &pos);
+ if( pos.x < gpVT_CurTerm->TextHeight )
+ VFS_IOCtl(giVT_OutputDevHandle, VIDEO_IOCTL_SETCURSOR, &pos);
}
if( gpVT_CurTerm->Mode == TERM_MODE_TEXT )
if(pos==__maxlen){return pos;}\
if(__s){__s[pos++]=ch;}else{pos++;}\
}while(0)
+#define GETVAL() do {\
+ if(isLongLong) val = va_arg(args, Uint64);\
+ else val = va_arg(args, unsigned int);\
+ }while(0)
/**
* \brief VArg String Number Print Formatted
*/
goto printString;
}
- // Get Argument
- val = va_arg(args, unsigned int);
-
// - Padding Side Flag
if(c == '+') {
bPadLeft = 1;
// - Minimum length
if(c == '*') { // Dynamic length
- minSize = val;
- val = va_arg(args, unsigned int);
+ minSize = va_arg(args, unsigned int);
c = *__format++;
}
else if('1' <= c && c <= '9')
{
c = *__format++;
if(c == 'l') {
- #if BITS == 32
- val |= (Uint64)va_arg(args, Uint) << 32;
- #endif
c = *__format++;
isLongLong = 1;
}
{
case 'd':
case 'i':
+ GETVAL();
if( isLongLong && val >> 63 ) {
PUTCH('-');
val = -val;
itoa(p, val, 10, minSize, pad);
goto printString;
case 'u':
+ GETVAL();
itoa(p, val, 10, minSize, pad);
goto printString;
case 'x':
+ GETVAL();
itoa(p, val, 16, minSize, pad);
goto printString;
case 'o':
+ GETVAL();
itoa(p, val, 8, minSize, pad);
goto printString;
case 'b':
+ GETVAL();
itoa(p, val, 2, minSize, pad);
goto printString;
case 'B': //Boolean
+ val = va_arg(args, unsigned int);
if(val) p = "True";
else p = "False";
goto printString;
// String - Null Terminated Array
case 's':
- p = (char*)(tVAddr)val;
+ p = va_arg(args, char*); // Get Argument
printString:
if(!p) p = "(null)";
len = strlen(p);
break;
case 'C': // Non-Null Terminated Character Array
- p = (char*)(tVAddr)val;
+ p = va_arg(args, char*);
if(!p) goto printString;
while(minSize--) PUTCH(*p++);
break;
// Single Character
case 'c':
default:
+ GETVAL();
PUTCH( (Uint8)val );
break;
}
// Sanity 1\r
if(giVesaCursorX < 0 || giVesaCursorY < 0\r
|| y*pitch + x + giVT_CharHeight*pitch > (int)gpVesaCurMode->fbSize/4) {\r
- Debug("Cursor OOB (%i,%i)", x, y);\r
+ Log_Notice("VESA", "Cursor OOB (%i,%i)", x, y);\r
giVesaCursorTimer = -1;\r
return;\r
}\r