/* Copyright (C) Magna Carta Software, Inc. 1990, 1991. All Rights Reserved C COMMUNICATIONS TOOLKIT */ #include /* C_GETC_ -- read a byte from the designated serial port. Echo it to the screen if the port variable p->rx_echo is TRUE. Returns: the byte read. NOTE: If no byte is ready, this function waits for one! (Use c_waitc() to avoid an infinite timeout). */ short c_getc_(COMM_PORT *p) { short ch; while ((*p->rxstat)(p) == FALSE); ch = ((*p->c_read)(p)); if (isrxecholocal(p)) (*p->con_out)(p, ch); return(ch); }