isatty Function

Test whether a file descriptor refers to a terminal

Attention: This interface function is implemented only by MPLAB XC32 C compilers.

Include

<unistd.h>

Prototype

int isatty(int fd);

Argument

fd
file descriptor to be tested

Return Value

Returns 1 if fd is an open file descriptor referring to a terminal; otherwise 0 is returned, and errno is set to indicate the error. Suitable values may be EBADF or ENOTTY.

Remarks

This function is implemented as a stub that must be completed to suite the application.

The isatty() function tests whether fd is an open file descriptor referring to a terminal.

Source File

isatty.c