//Emulates an ANSI compatible display subsystem void Dex32PutC(DEX32_DDL_INFO *dev, char c){ if(c == '\t') { int i; for(i = 0; i < 3; i++) Dex32PutC(dev, ' '); return; } else if(c == '\b') { if(dev->curx > 0) dev->curx--; Dex32UpdateCursor(dev, dev->cury, dev->curx); } else if(c == '\r') { dev->curx = 0; Dex32UpdateCursor(dev, dev->cury, dev->curx); } else if(c == '\n') { dev->curx = 0; Dex32NextLn(dev); } else { Dex32PutChar(dev, dev->curx, dev->cury, c, dev->attb); dev->curx++; Dex32PutChar(dev, dev->curx, dev->cury, ' ', dev->attb); if(dev->active) Dex32UpdateCursor(dev, dev->cury, dev->curx); } if(dev->curx > 79) { dev->curx = 0; Dex32NextLn(dev); } }
void putcEX(char x) { #ifdef USE_CONSOLEDDL Dex32PutC(Dex32GetProcessDevice(),x); #else if (x=='\t') //automatically expand backspace characters { int i; for (i=0;i<3;i++) outputchar(' '); } else outputchar(x); #endif };