added chars_in_buffer and poll routines to ldisc