/* @read a character from the modem line with timeout. @eat parity, XON and XOFF characters.  */
rt_int16_t zxor_read(void)
/* @read a character from the modem line with timeout. @eat parity, XON and XOFF characters.  */
rt_int16_t zxor_read(void)
{
    rt_int16_t res;
    for (;;)
    {
        if ((res = zread_line(100)) < 0)
            return res;
        switch (res &= 0177) {
        case XON:
        case XOFF:
            continue;
        case '\r':
        case '\n':
        case ZDLE:
        default:
            return res;
        }
    }
}