[Midnightbsd-cvs] src [10385] trunk/usr.sbin/moused/moused.c: update moused.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Jun 3 19:31:24 EDT 2018


Revision: 10385
          http://svnweb.midnightbsd.org/src/?rev=10385
Author:   laffer1
Date:     2018-06-03 19:31:23 -0400 (Sun, 03 Jun 2018)
Log Message:
-----------
update moused.

Modified Paths:
--------------
    trunk/usr.sbin/moused/Makefile
    trunk/usr.sbin/moused/moused.8
    trunk/usr.sbin/moused/moused.c

Property Changed:
----------------
    trunk/usr.sbin/moused/moused.8

Modified: trunk/usr.sbin/moused/Makefile
===================================================================
--- trunk/usr.sbin/moused/Makefile	2018-06-03 23:29:05 UTC (rev 10384)
+++ trunk/usr.sbin/moused/Makefile	2018-06-03 23:31:23 UTC (rev 10385)
@@ -1,4 +1,5 @@
 # $MidnightBSD$
+# $FreeBSD: stable/10/usr.sbin/moused/Makefile 201390 2010-01-02 11:07:44Z ed $
 
 PROG=	moused
 MAN=	moused.8

Modified: trunk/usr.sbin/moused/moused.8
===================================================================
--- trunk/usr.sbin/moused/moused.8	2018-06-03 23:29:05 UTC (rev 10384)
+++ trunk/usr.sbin/moused/moused.8	2018-06-03 23:31:23 UTC (rev 10385)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
 .\" Copyright (c) 1996
 .\"	Mike Pritchard <mpp at FreeBSD.org>.  All rights reserved.
 .\"
@@ -28,7 +29,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/usr.sbin/moused/moused.8 244040 2012-12-08 22:16:36Z eadler $
 .\"
 .Dd May 15, 2008
 .Dt MOUSED 8
@@ -296,7 +297,7 @@
 .Bl -tag -compact -width modelxxx
 .It Ar port
 Port (device file) name, i.e.\&
-.Pa /dev/cuad0 ,
+.Pa /dev/cuau0 ,
 .Pa /dev/mse0
 and
 .Pa /dev/psm0 .
@@ -564,7 +565,7 @@
 mouse can be attached.
 Many people often assign the first, built-in
 serial port
-.Pa /dev/cuad0
+.Pa /dev/cuau0
 to the mouse.
 You can attach multiple USB mice to your system or to your USB hub.
 They are accessible as
@@ -731,16 +732,16 @@
 UNIX-domain stream socket for X10 MouseRemote events
 .El
 .Sh EXAMPLES
-.Dl "moused -p /dev/cuad0 -i type"
+.Dl "moused -p /dev/cuau0 -i type"
 .Pp
 Let the
 .Nm
 utility determine the protocol type of the mouse at the serial port
-.Pa /dev/cuad0 .
+.Pa /dev/cuau0 .
 If successful, the command will print the type, otherwise it will say
 .Dq Li unknown .
 .Bd -literal -offset indent
-moused -p /dev/cuad0
+moused -p /dev/cuau0
 vidcontrol -m on
 .Ed
 .Pp


Property changes on: trunk/usr.sbin/moused/moused.8
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.sbin/moused/moused.c
===================================================================
--- trunk/usr.sbin/moused/moused.c	2018-06-03 23:29:05 UTC (rev 10384)
+++ trunk/usr.sbin/moused/moused.c	2018-06-03 23:31:23 UTC (rev 10385)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /**
  ** Copyright (c) 1995 Michael Smith, All rights reserved.
  **
@@ -45,7 +46,7 @@
  **/
 
 #include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.sbin/moused/moused.c 248478 2013-03-18 23:22:47Z jkim $");
 
 #include <sys/param.h>
 #include <sys/consio.h>
@@ -174,14 +175,14 @@
 
 /* global variables */
 
-int	debug = 0;
-int	nodaemon = FALSE;
-int	background = FALSE;
-int	paused = FALSE;
-int	identify = ID_NONE;
-int	extioctl = FALSE;
-const char *pidfile = "/var/run/moused.pid";
-struct pidfh *pfh;
+static int	debug = 0;
+static int	nodaemon = FALSE;
+static int	background = FALSE;
+static int	paused = FALSE;
+static int	identify = ID_NONE;
+static int	extioctl = FALSE;
+static const char *pidfile = "/var/run/moused.pid";
+static struct pidfh *pfh;
 
 #define SCROLL_NOTSCROLLING	0
 #define SCROLL_PREPARE		1
@@ -1013,7 +1014,7 @@
 {
     struct mouse_info mouse;
     mousestatus_t action0;		/* original mouse action */
-    mousestatus_t action;		/* interrim buffer */
+    mousestatus_t action;		/* interim buffer */
     mousestatus_t action2;		/* mapped action */
     struct timeval timeout;
     fd_set fds;
@@ -2266,7 +2267,7 @@
 	    act->button |= ((pBuf[0] & MOUSE_PS2_TAP)) ? 0 : MOUSE_BUTTON4DOWN;
 	    break;
 	case MOUSE_MODEL_NETSCROLL:
-	    /* three addtional bytes encode buttons and wheel events */
+	    /* three additional bytes encode buttons and wheel events */
 	    act->button |= (pBuf[3] & MOUSE_PS2_BUTTON3DOWN)
 		? MOUSE_BUTTON4DOWN : 0;
 	    act->button |= (pBuf[3] & MOUSE_PS2_BUTTON1DOWN)
@@ -3230,7 +3231,7 @@
     static int buf[5];
     static int buflen = 0, b_prev = 0 , x_prev = -1, y_prev = -1;
     static k_status status = S_IDLE;
-    static struct timespec old, now;
+    static struct timespec now;
 
     int x, y;
 
@@ -3268,7 +3269,6 @@
 	x_prev = x;
 	y_prev = y;
     }
-    old = now;
     act->dx = x - x_prev;
     act->dy = y - y_prev;
     if (act->dx || act->dy)



More information about the Midnightbsd-cvs mailing list