Lines Matching full:mfd

394     int mfd;			/* mouse file descriptor */
421 .mfd = -1,
869 rodent.mfd = open(rodent.portname, O_RDWR | O_NONBLOCK);
870 if (rodent.mfd == -1)
874 close(rodent.mfd);
875 rodent.mfd = -1;
899 if (rodent.mfd == -1) {
914 if (rodent.mfd != -1)
915 close(rodent.mfd);
918 rodent.mfd = rodent.cfd = -1;
1051 FD_SET(rodent.mfd, &fds);
1087 if (read(rodent.mfd, &b, 1) == -1) {
1470 ioctl(rodent.mfd, MOUSE_SETLEVEL, &rodent.level);
1471 rodent.level = (ioctl(rodent.mfd, MOUSE_GETLEVEL, &level) == 0) ? level : 0;
1481 ioctl(rodent.mfd, MOUSE_GETHWINFO, &rodent.hw);
1490 if (ioctl(rodent.mfd, MOUSE_GETMODE, &rodent.mode) == 0) {
1642 write(rodent.mfd, "S", 1);
1646 if (rodent.rate <= 0) write(rodent.mfd, "O", 1);
1647 else if (rodent.rate <= 15) write(rodent.mfd, "J", 1);
1648 else if (rodent.rate <= 27) write(rodent.mfd, "K", 1);
1649 else if (rodent.rate <= 42) write(rodent.mfd, "L", 1);
1650 else if (rodent.rate <= 60) write(rodent.mfd, "R", 1);
1651 else if (rodent.rate <= 85) write(rodent.mfd, "M", 1);
1652 else if (rodent.rate <= 125) write(rodent.mfd, "Q", 1);
1653 else write(rodent.mfd, "N", 1);
1659 write(rodent.mfd, "*X", 2);
1673 write(rodent.mfd, "z8", 2); /* Set Parity = "NONE" */
1675 write(rodent.mfd, "zb", 2); /* Set Format = "Binary" */
1677 write(rodent.mfd, "@", 1); /* Set Report Mode = "Stream" */
1679 write(rodent.mfd, "R", 1); /* Set Output Rate = "45 rps" */
1681 write(rodent.mfd, "I\x20", 2); /* Set Incrememtal Mode "20" */
1683 write(rodent.mfd, "E", 1); /* Set Data Type = "Relative */
1697 write(rodent.mfd, &c, 1);
1700 write(rodent.mfd, "\021", 1); /* Resume DATA output */
1708 ioctl(rodent.mfd, TIOCFLUSH, &i);
1711 write(rodent.mfd, s, 1);
1713 FD_SET(rodent.mfd, &fds);
1716 read(rodent.mfd, &c, 1);
1729 ioctl(rodent.mfd, TIOCMBIC, &i);
1733 ioctl(rodent.mfd, TIOCMBIC, &i);
1747 ioctl(rodent.mfd, MOUSE_SETMODE, &rodent.mode);
1757 tcsendbreak(rodent.mfd, 0); /* send break for 400 msec */
1759 ioctl(rodent.mfd, TIOCFLUSH, &i);
1762 FD_SET(rodent.mfd, &fds);
1765 read(rodent.mfd, &c, 1);
1772 tcsendbreak(rodent.mfd, 0); /* send break for 400 msec again */
1775 FD_SET(rodent.mfd, &fds);
1778 read(rodent.mfd, &c, 1);
1784 ioctl(rodent.mfd, TIOCFLUSH, &i);
2655 if (tcgetattr(rodent.mfd, &tty) < 0)
2688 if (tcsetattr(rodent.mfd, TCSADRAIN, &tty) < 0)
2721 if (write(rodent.mfd, c, 2) != 2)
2729 if (tcsetattr(rodent.mfd, TCSADRAIN, &tty) < 0)
2771 ioctl(rodent.mfd, TIOCMGET, &i);
2774 ioctl(rodent.mfd, TIOCMSET, &i);
2783 ioctl(rodent.mfd, TIOCMGET, &i);
2791 ioctl(rodent.mfd, TIOCMBIC, &i);
2794 ioctl(rodent.mfd, TIOCMBIS, &i);
2799 ioctl(rodent.mfd, TIOCFLUSH, &i);
2801 ioctl(rodent.mfd, TIOCMBIS, &i);
2805 FD_SET(rodent.mfd, &fds);
2815 ioctl(rodent.mfd, TIOCMBIC, &i);
2820 ioctl(rodent.mfd, TIOCFLUSH, &i);
2822 ioctl(rodent.mfd, TIOCMBIS, &i);
2826 FD_SET(rodent.mfd, &fds);
2849 ioctl(rodent.mfd, TIOCMGET, &i);
2852 ioctl(rodent.mfd, TIOCMSET, &i);
2859 ioctl(rodent.mfd, TIOCFLUSH, &i);
2861 ioctl(rodent.mfd, TIOCMBIS, &i);
2865 FD_SET(rodent.mfd, &fds);
2893 ioctl(rodent.mfd, TIOCMBIS, &i);
2901 while (read(rodent.mfd, &c, 1) == 1) {
2921 FD_SET(rodent.mfd, &fds);
2927 read(rodent.mfd, &buf[i], 1);