DCMD_CHR_ISCHARS

Determine the number of characters waiting to be read

Synopsis:

#include <sys/dcmd_chr.h>

#define DCMD_CHR_ISCHARS    __DIOF('f', 127, unsigned)   /* FIONREAD */

Arguments to devctl():

Argument Value
filedes A file descriptor that you obtained by opening the device.
dcmd DCMD_CHR_ISCHARS
dev_data_ptr A pointer to an unsigned
n_bytes sizeof(unsigned)
dev_info_ptr NULL

Description:

This command determine the number of characters waiting to be read. It's also implemented as the FIONREAD ioctl() command.

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

Input:

None.

Output:

The number of characters.

See also:

DCMD_CHR_OSCHARS, FIONREAD

devctl(), tcischars() in the QNX Neutrino C Library Reference