newterm(3) — Subroutines
Digital
NAME
newterm − open new terminal
SYNOPSIS
#include <stdio.h>
#include <curses.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 only 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.