DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

putp(3curses)


putp -- output commands to the terminal

Synopsis

cc [options] file -lcurses
#include <term.h>

int putp(const char *str);

int tputs(const char *str, int affcnt, int (*putfunc)(int));

Description

These functions output commands contained in the terminfo database to the terminal.

The putp(3curses) function is equivalent to tputs(str, 1, putchar). The output of putp(3curses) always goes to stdout, not to the fildes specified in setupterm(3curses).

The tputs(3curses) function outputs str to the terminal. The str argument must be a terminfo string variable or the return value from tgetstr(3curses), tgoto(3curses), tigetstr(3curses) or tparm(3curses). The affcnt argument is the number of lines affected, or 1 if not applicable. If the terminfo database indicates that the terminal in use requires padding after any command in the generated string, tputs(3curses) inserts pad characters into the string that is sent to the terminal, at positions indicated by the terminfo database. The tputs(3curses) function outputs each character of the generated string by calling the user-supplied function putfunc (see below).

The user-supplied function putfunc (specified as an argument to tputs(3curses)) is either putchar(3S) or some other function with the same prototype. The tputs(3curses) function ignores the return value of putfunc.

Return value

Upon successful completion, these functions return OK. Otherwise, they return ERR.

Errors

No errors are defined.

Usage

Changing the terminal attributes using these functions may cause the renditions of characters within a curses window to be altered on some terminals.

After use of any of these functions, the model Curses maintains of the state of the terminal might not match the actual state of the terminal. The application should touch and refresh the window before resuming conventional use of Curses.

Standards Conformance

The Single UNIX Specification, Version 2; The Open Group.

References

doupdate(3curses), is_linetouched(3curses), putchar(3S), tgetent(3curses), tigetflag(3curses), term(4)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004