/* Copyright (C) Magna Carta Software, Inc. 1990, 1991. All Rights Reserved. C COMMUNICATIONS TOOLKIT DUMBTERM.C -- Video driver for dumb terminal output. */ #include #if !defined(__NDPC__) #include #endif #include #include #include #define WBUF 256 /* length of line buffer for screen writing */ /* CONOUTC -- Outputs the character 'c' to the screen using the designated screen addressing method. */ short conoutc(COMM_PORT *p, short c) { p = p; /* nuke compiler warning */ #if !(defined(CTC) || defined(CTF)) fputc(c, stdout); return(fflush(stdout)); #else fputchar(c); #endif } /* CONOUTS -- Outputs the string s to the screen using the designated screen addressing method. */ void conouts(char *s) { while (*s) conoutc(NULL, *s++); } #if !(defined(CTC) || defined(CTF)) /* CONOUTF -- A windows version of printf. Format the string "fs" and write it to the specified window at the cursor location. */ void CDECL_ conoutf(char *fs,...) { char sbuf[WBUF]; va_list argptr; va_start(argptr,fs); vsprintf(sbuf,fs,argptr); va_end(argptr); conouts(sbuf); } #endif