Get the size of a character device
#include <termios.h> int tcgetsize( int filedes, int* prows, int* pcols );
- A file descriptor that's associated with the device whose size you want to get.
- prows, pcols
- NULL, or pointers to locations where the function can store the number of rows and columns.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The tcgetsize() function gets the size of the character device associated with filedes and stores the number of rows and columns in prows and pcols if they're not NULL.
- An error occurred ( errno is set).
- The filedes argument isn't associated with a controlling terminal.
- The filedes argument isn't a valid file descriptor.
- The file associated with filedes isn't a terminal.
Last modified: 2014-06-24