// // output char // PCHAR TextCharOut(__in PCHAR Buffer) { if(DbcsLangId) return static_cast<PCHAR>(static_cast<PVOID>(TextGrCharOut(static_cast<PUCHAR>(static_cast<PVOID>(Buffer))))); return static_cast<PCHAR>(static_cast<PVOID>(TextTmCharOut(static_cast<PUCHAR>(static_cast<PVOID>(Buffer))))); }
VOID TextTmStringOut( IN PUCHAR String ) { PUCHAR p = String; while(*p) { p = TextTmCharOut(p); } }
PUCHAR TextCharOut( IN PUCHAR pc ) { if(DbcsLangId) { return(TextGrCharOut(pc)); } else { return(TextTmCharOut(pc)); } }
VOID pTextCharOut( IN UCHAR c ) { if(DbcsLangId) { // // Single-byte only // TextGrCharOut(&c); } else { TextTmCharOut(&c); } }
PUCHAR TextTmCharOut( PUCHAR pc ) /*++ Routine Description: Writes a character on the display at the current position. Newlines and tabs are interpreted and acted upon. Arguments: c - pointer to character to write Returns: Pointer to next char in string --*/ { unsigned u; UCHAR c; UCHAR temp; c = *pc; switch (c) { case '\n': if(TextRow == (VIDEO_ROWS-1)) { TextTmScrollDisplay(); TextSetCursorPosition(0,TextRow); } else { TextSetCursorPosition(0,TextRow+1); } break; case '\r': // // ignore // break; case '\t': temp = ' '; u = 8 - (TextColumn % 8); while(u--) { TextTmCharOut(&temp); } TextSetCursorPosition(TextColumn+u,TextRow); break; default : *Vp++ = c; *Vp++ = TextCurrentAttribute; TextSetCursorPosition(TextColumn+1,TextRow); } return(pc+1); }