USHORT __pascal VIOGETANSI(USHORT * Ansi, const HVIO Handle) { return VioGetAnsi(Ansi, Handle); }
void display_comment(char *cmt) #endif { unsigned char c; #if SFX_LEVEL>=ARJSFXV int is_ansi=0; #endif #if TARGET==OS2 USHORT af; #endif #if SFX_LEVEL>=ARJ if(new_stderr==new_stdout) return; #endif #if TARGET==OS2 fflush(stdout); VioGetAnsi(&af, 0); VioSetAnsi(ANSI_ON, 0); #endif while((c=*(cmt++))!='\0') { #if SFX_LEVEL>=ARJSFXV if(c==ANSI_ESC) is_ansi=1; #endif #if SFX_LEVEL>=ARJSFXV&&!defined(DIRECT_TO_ANSI) if(is_ansi) { display_ansi(c); if(c==LF) display_ansi(CR); } else { #endif /* Substitute non-printable control characters with "?"'s */ #ifndef DIRECT_TO_ANSI if(c<' '&&c!=TAB&&c!=LF&&c!=CR) c=UNDISP_CHAR; #endif #if SFX_LEVEL>=ARJSFXV nputc((int)c); #else fputc((int)c, stdout); #endif #if SFX_LEVEL>=ARJ if(c==LF) { lines_scrolled++; if(lines_scrolled>=lines_per_page-1) { lines_scrolled=0; if(!yes_on_all_queries&&prompt_for_more&&is_tty(stdout)) { if(!pause()) return; } } } #endif #if SFX_LEVEL>=ARJSFXV&&!defined(DIRECT_TO_ANSI) } #endif } #if SFX_LEVEL>=ARJSFXV if(is_ansi) { #ifdef DIRECT_TO_ANSI printf("\x1B[0m\n"); #else display_ansi(LF); #endif } #endif #if TARGET==OS2 VioSetAnsi(af, 0); #endif }