I am using the following conditional statement to read from standard input.
if ((n = read(0,buf,sizeof(buf))) != 0)
When inputting data fro
just type >1 instead of !=0
>1
!=0
the only false positives are single character responses followed by an interrupt (EOF)