Remove unused code. OK ?
--
Alexandr Shadchin
Index: mouse_protocols.c
===================================================================
RCS file: /cvs/src/usr.sbin/wsmoused/mouse_protocols.c,v
retrieving revision 1.13
diff -u -p -r1.13 mouse_protocols.c
--- mouse_protocols.c 5 Jun 2009 03:37:10 -0000 1.13
+++ mouse_protocols.c 14 May 2014 13:34:14 -0000
@@ -194,24 +194,6 @@ SetMouseSpeed(int old, int new, unsigned
mouse.portname, strerror(errno));
return;
}
- /* this will query the initial baudrate only once */
- if (mouse.old_baudrate < 0) {
- switch (cfgetispeed(&tty)) {
- case B9600:
- mouse.old_baudrate = 9600;
- break;
- case B4800:
- mouse.old_baudrate = 4800;
- break;
- case B2400:
- mouse.old_baudrate = 2400;
- break;
- case B1200:
- default:
- mouse.old_baudrate = 1200;
- break;
- }
- }
tty.c_iflag = IGNBRK | IGNPAR;
tty.c_oflag = 0;
tty.c_lflag = 0;
Index: wsmoused.c
===================================================================
RCS file: /cvs/src/usr.sbin/wsmoused/wsmoused.c,v
retrieving revision 1.29
diff -u -p -r1.29 wsmoused.c
--- wsmoused.c 24 Nov 2013 01:06:19 -0000 1.29
+++ wsmoused.c 14 May 2014 13:34:14 -0000
@@ -90,7 +90,6 @@ mouse_t mouse = {
.ttyname = NULL,
.proto = P_UNKNOWN,
.baudrate = 1200,
- .old_baudrate = 1200,
.rate = MOUSE_RATE_UNKNOWN,
.resolution = MOUSE_RES_UNKNOWN,
.zmap = 0,
Index: wsmoused.h
===================================================================
RCS file: /cvs/src/usr.sbin/wsmoused/wsmoused.h,v
retrieving revision 1.8
diff -u -p -r1.8 wsmoused.h
--- wsmoused.h 21 Jun 2009 16:13:18 -0000 1.8
+++ wsmoused.h 14 May 2014 13:34:14 -0000
@@ -99,7 +99,6 @@ typedef struct mouse_s {
char *ttyname; /* wsdisplay control tty device */
int proto; /* MOUSE_PROTO_XXX */
int baudrate;
- int old_baudrate;
unsigned char rate; /* report rate */
unsigned int resolution; /* MOUSE_RES_XXX or a positive number */
int zmap; /* MOUSE_{X|Y}AXIS or a button number */