Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jan 2003 11:48:47 -0500 (EST)
From:      Elliot Dierksen <elliot@alfred.oau.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   misc/46758: moused enhancements
Message-ID:  <200301041648.h04Gmlxw028641@alfred.oau.org>

next in thread | raw e-mail | index | archive | help

>Number:         46758
>Category:       misc
>Synopsis:       moused enhancements
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 04 08:50:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Elliot Dierksen
>Release:        FreeBSD 4.7-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD alfred.oau.org 4.7-RELEASE-p2 FreeBSD 4.7-RELEASE-p2 #20: Sat Nov 16 04:42:06 EST 2002 root@alfred.oau.org:/usr/obj/usr/src/sys/AMD-MP i386


	
>Description:
	I would like to add an option to the "-i" function of moused to number
	of button available on the mouse.
>How-To-Repeat:
	N/A
>Fix:

*** moused.c	Sat Jan  4 11:41:57 2003
--- /usr/src/usr.sbin/moused/moused.c	Sat Apr 20 04:26:50 2002
***************
*** 104,111 ****
  #define ID_IF		2
  #define ID_TYPE 	4
  #define ID_MODEL	8
! #define ID_BUTTONS	16
! #define ID_ALL		(ID_PORT | ID_IF | ID_TYPE | ID_MODEL | ID_BUTTONS)
  
  #define debug(fmt,args...) \
  	if (debug&&nodaemon) warnx(fmt, ##args)
--- 104,110 ----
  #define ID_IF		2
  #define ID_TYPE 	4
  #define ID_MODEL	8
! #define ID_ALL		(ID_PORT | ID_IF | ID_TYPE | ID_MODEL)
  
  #define debug(fmt,args...) \
  	if (debug&&nodaemon) warnx(fmt, ##args)
***************
*** 568,575 ****
  	        identify = ID_TYPE;
  	    else if (strcmp(optarg, "model") == 0)
  	        identify = ID_MODEL;
- 	    else if (strcmp(optarg, "buttons") == 0)
- 	        identify = ID_BUTTONS;
  	    else {
  	        warnx("invalid argument `%s'", optarg);
  	        usage();
--- 567,572 ----
***************
*** 783,792 ****
  	    /* print some information */
              if (identify != ID_NONE) {
  		if (identify == ID_ALL)
!                     printf("%s %s %s %s %d\n", 
  		        rodent.portname, r_if(rodent.hw.iftype),
! 		        r_name(rodent.rtype), r_model(rodent.hw.model),
! 		        rodent.hw.buttons);
  		else if (identify & ID_PORT)
  		    printf("%s\n", rodent.portname);
  		else if (identify & ID_IF)
--- 780,788 ----
  	    /* print some information */
              if (identify != ID_NONE) {
  		if (identify == ID_ALL)
!                     printf("%s %s %s %s\n", 
  		        rodent.portname, r_if(rodent.hw.iftype),
! 		        r_name(rodent.rtype), r_model(rodent.hw.model));
  		else if (identify & ID_PORT)
  		    printf("%s\n", rodent.portname);
  		else if (identify & ID_IF)
***************
*** 795,808 ****
  		    printf("%s\n", r_name(rodent.rtype));
  		else if (identify & ID_MODEL)
  		    printf("%s\n", r_model(rodent.hw.model));
- 		else if (identify & ID_BUTTONS)
- 		    printf("%d\n", rodent.hw.buttons);
  		exit(0);
  	    } else {
!                 debug("port: %s  interface: %s  type: %s  model: %s  buttons: %d", 
  		    rodent.portname, r_if(rodent.hw.iftype),
! 		    r_name(rodent.rtype), r_model(rodent.hw.model),
! 			rodent.hw.buttons);
  	    }
  
  	    if (rodent.mfd == -1) {
--- 791,801 ----
  		    printf("%s\n", r_name(rodent.rtype));
  		else if (identify & ID_MODEL)
  		    printf("%s\n", r_model(rodent.hw.model));
  		exit(0);
  	    } else {
!                 debug("port: %s  interface: %s  type: %s  model: %s", 
  		    rodent.portname, r_if(rodent.hw.iftype),
! 		    r_name(rodent.rtype), r_model(rodent.hw.model));
  	    }
  
  	    if (rodent.mfd == -1) {
***************
*** 1022,1028 ****
  	"usage: moused [-DRcdfs] [-I file] [-F rate] [-r resolution] [-S baudrate]",
  	"              [-a X [,Y]] [-C threshold] [-m N=M] [-w N] [-z N]",
  	"              [-t <mousetype>] [-3 [-E timeout]] -p <port>",
! 	"       moused [-d] -i <port|if|type|model|buttons|all> -p <port>");
      exit(1);
  }
  
--- 1015,1021 ----
  	"usage: moused [-DRcdfs] [-I file] [-F rate] [-r resolution] [-S baudrate]",
  	"              [-a X [,Y]] [-C threshold] [-m N=M] [-w N] [-z N]",
  	"              [-t <mousetype>] [-3 [-E timeout]] -p <port>",
! 	"       moused [-d] -i <port|if|type|model|all> -p <port>");
      exit(1);
  }
  


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301041648.h04Gmlxw028641>