[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 2

tputs Subroutine

Purpose

Outputs a string with padding information.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>
#include <term.h>  
tputs(String, LinesAffected, PutcLikeSub)
char *String;
int LinesAffected;
int (*PutcLikeSub) ();

Description

The tputs subroutine outputs a string with padding information applied. String must be a terminfo string variable or the return value from tparm, tgetstr, tigetstr, or tgoto subroutines.

Parameters

LinesAffected Specifies the number of lines affected, or specifies 1 if not applicable.
PutcLikeSub Specifies a putchar-like subroutine through which the characters are passed one at a time.
String Specifies the string to which to add padding information.

Examples

  1. To output the clear screen sequence using the user-defined putchar-like subroutine my_putchar, enter:
    int_my_putchar();
    tputs(clear_screen, 1 ,my_putchar); 
  2. To output the escape sequence used to move the cursor to the coordinates x=40 , y=18 through the user-defined putchar-like subroutine my_putchar , enter:
    int_my_putchar();
    tputs(tparm(cursor_address, 18, 40), 1, my_putchar); 

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The tparm subroutine.

Curses Overview for Programming, List of Curses Subroutines, Understanding Terminals with Curses in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Contents | Glossary | Home | Search ]