newterm(3cur)
Name
newterm − open new terminal
Syntax
#include <stdio.h>
#include <cursesX.h>
SCREEN ∗newterm(type, outfd, infd)
char ∗type;
FILE ∗outfd, ∗infd;
Description
Programs using more than one terminal should call the newterm routine for each terminal instead of initscr. The routine newterm should be called ONCE for each terminal.
The newterm routine returns a variable of type SCREEN ∗ which should be saved as a reference to that terminal. There are three arguments. The first argument type, is the type of the terminal to be used in place of TERM. The second argument, outfd, is a file pointer for output to the terminal. The third argument, infd, is a file pointer for input from the terminal. The program must also call the endwin routine for each terminal, after each terminal has finished running a curses application.
Return Values
On success the newterm function returns a pointer to the new SCREEN structure created. On failure the function returns a null pointer.