BPUTCHAR(3L)

NAME
bputchar - 630 MTG debugging putchar function

SYNOPSIS
void bputchar (c)
char c;

DESCRIPTION
Bputchar is syntactically equivalent to the UNIX standard I/O putchar function. It can be called by downloaded application programs who want to display characters but do not want them displayed in their window. When first called, the bottom third of the 630 MTG's screen is cleared. All characters to be printed are displayed in this area as if it was a window. This will corrupt any windows already in this area. Therefore, this routine is only useful for debugging.

How characters are eventually displayed on a user's terminal when using the UNIX putchar function is affected by the UNIX host stty(1) settings and the user's terminal characteristics. Since bputchar displays directly onto the 630 MTG screen, it makes assumptions about desired stty settings. In general, bputchar does as little processing of the output stream as practical.

The following are the only control characters processed by bputchar. All other characters will be displayed as ASCII characters:

\r  Carriage Return. Move the current point to the left edge of the screen.

\n  Newline. Move the current point down one line and to the left edge of the window. Scroll the display area if necessary.

\t  Horizontal tab. Tab characters are expanded to spaces with tab stops at every eighth space.

EXAMPLE

If a programmer wanted a record of every character it sends to the printer, he can replace every call to psendchar with dpsendchar shown below.

    int psendchar();
    int
    dpsendchar(c)
    char c;
    {
    	int retval;
    	retval = psendchar(c);
    	if(retval)
    		bputchar(c);
    	return(retval);
    }

SEE ALSO
lputchar(3L), printf(3L), psendchar(3R).
putc(3S) in the UNIX System V Programmer's Reference Manual.