TIOCSSIZE, TIOCSWINSZ

Set the size of a character device

Synopsis:

#include <sys/ioctl.h>

#define TIOCSSIZE       TIOCSWINSZ
#define TIOCSWINSZ      _IOW('t', 103, struct winsize)  /* set window size */

Arguments to ioctl():

Argument Value
fd A file descriptor that you obtained by opening the device
request TIOCSWINSZ
Additional argument A pointer to a struct winsize

Description:

This command sets the size of a character device (also known as the window size). It's also implemented as the DCMD_CHR_SETSIZE devctl() command.

Note: This command is for internal use, and you shouldn't use it directly. Instead use the tcsetsize() cover function.

Input:

None.

Output:

The winsize structure is defined in <sys/ioctl.h> as follows:

struct winsize {
        unsigned short  ws_row;
        unsigned short  ws_col; 
        unsigned short  ws_xpixel;
        unsigned short  ws_ypixel; 
};

See also:

DCMD_CHR_SETSIZE, TIOCGSIZE, TIOCGWINSZ

ioctl() in the QNX Neutrino C Library Reference