Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > bf57df0185c22fe21edffdd46b135cec > files > 1

imwheel-1.0.0-0.20070707.1mdv2008.0.src.rpm

--- imwheel-1.0.0pre12/util.c.pix	2006-09-01 14:28:41.000000000 +0200
+++ imwheel-1.0.0pre12/util.c	2006-09-01 15:29:00.000000000 +0200
@@ -287,6 +287,9 @@
 			case 'X':
 				displayName=strdup(optarg);
 				break;
+			case 'F':
+				rcfile=strdup(optarg);
+				break;
 			case 'W':
 				useFifo=True;
 				if(optarg)
@@ -785,9 +788,9 @@
 
 /*----------------------------------------------------------------------------*/
 
-struct WinAction *getRC()
+struct WinAction *getRC(void)
 {
-	char fname[2][1024]={"","/etc/X11/imwheel/imwheelrc"}, line[1024], *p, *q, winid[1024];
+	char fname[2][1024]={"",""}, line[1024], *p, *q, winid[1024];
 	int fi,i;
 	struct WinAction *newwa=NULL;
 	FILE *f=NULL;
@@ -797,6 +800,7 @@
 	home=gethome(RCFILE);
 	if(home)
 		sprintf(fname[0],"%s%s",home,RCFILE);
+	strncpy(fname[1], rcfile, 1024);
 	num_wa=0;
 	for(fi=(home?0:1);fi<2 && !f;fi++)
 	{
--- imwheel-1.0.0pre12/imwheel.c.pix	2006-09-01 14:28:41.000000000 +0200
+++ imwheel-1.0.0pre12/imwheel.c	2006-09-01 15:28:32.000000000 +0200
@@ -49,6 +49,7 @@
 	{"debug",			0,			0,		'D'},
 	{"detach",			0,			0,		'd'},
 	{"display",			1,			0,		'X'},
+	{"rc",			1,			0,		'F'},
 	{"flip-buttons",	0,			0,		'4'},
 	{"focus",			0,			0,		'f'},
 	{"focus-events",	0,			0,		'g'},
@@ -74,6 +75,7 @@
 	{NULL,				"Spit out all debugging info (it's a lot!)"},				//D
 	{NULL,				"IMWHeel process doesn't detach from terminal"},			//d
 	{"display-name",	"Sets X display to use (one per FIFO if FIFO used)"},		//X
+	{"rcfile",	"Use this rcfile instead of the standard one"},		//X
 	{NULL,				"Swaps buttons 4 and 5 events (same as -b 54"},				//4
 	{NULL,				"Use event subwindow instead of XGetInputFocus"},			//f
 	{NULL,				"Disable the use of Focus Events for button grabs"},		//g
@@ -97,6 +99,7 @@
 	keystyledefaults=0;
 int fifofd=-1;
 char *fifoName="/dev/gpmwheel", *displayName=NULL;
+char *rcfile="/etc/X11/imwheel/imwheelrc";
 Bool grabbed;
 Atom ATOM_NET_WM_NAME, ATOM_UTF8_STRING, ATOM_WM_NAME, ATOM_STRING;
 
--- imwheel-1.0.0pre12/imwheel.h.pix	2004-08-29 12:22:12.000000000 +0200
+++ imwheel-1.0.0pre12/imwheel.h	2006-09-01 15:28:10.000000000 +0200
@@ -21,7 +21,7 @@
 			focusOverride, sensitivity, transpose, handleFocusGrab, doConfig,
 			root_wheeling, autodelay, keystyledefaults;
 extern int fifofd;
-extern char *fifoName, *displayName;
+extern char *fifoName, *displayName, *rcfile;
 extern Stick stick;
 
 #endif