--- src/term.c.orig Sat Jan 25 00:03:58 1997 +++ src/term.c Wed Jan 24 00:08:14 2001 @@ -33,7 +33,13 @@ #include <termio.h> #elif defined(__FreeBSD__) #include <termios.h> -#include <machine/console.h> +#include <osreldate.h> +#if __FreeBSD_version >= 410000 +# include <sys/consio.h> +# include <sys/kbio.h> +#else +# include <machine/console.h> +#endif #define termio termios #endif #include <signal.h> @@ -201,11 +207,14 @@ } if (FD_ISSET(0, &readFds)) { i = read(0, buff, BUFSIZ); +#if defined(__FreeBSD__) + i = cons25tovt100(buff, i, BUFSIZ); +#endif if (i > 0) write(masterPty, buff, i); PollCursor(TRUE); } if (FD_ISSET(sockFd, &readFds)) SocketInterface(sockFd); - if (mInfo.has_mouse) { + if (mInfo.has_mouse && mouseFd > 0) { if (FD_ISSET(mouseFd, &readFds) && con.active) { i = read(mouseFd, buff, BUFSIZ); if (i > 0) MouseGetPacket(buff, i);