On Wed, Apr 28, 2004 at 02:38:57AM -0500, Branden Robinson wrote:
[...]
> I'd call the option and local variable "ignoreserver" instead of
> "noserver".  ("noserver" could lead to thoughts like as "What?  I don't
> *have* an X server?  What am I doing running an X client, then?")
> 
> Other than that, I don't see any problems.

Great, here is a revised patch.

Denis
Index: setxkbmap.c
===================================================================
RCS file: /cvs/xc/programs/setxkbmap/setxkbmap.c,v
retrieving revision 3.8
diff -u -r3.8 setxkbmap.c
--- setxkbmap.c 17 Nov 2003 22:20:50 -0000      3.8
+++ setxkbmap.c 28 Apr 2004 20:39:35 -0000
@@ -83,6 +83,7 @@
 /***====================================================================***/
 Bool                   print= False;
 Bool                   synch= False;
+Bool                   ignoreserver= False;
 int                    verbose= 5;
 
 Display *              dpy;
@@ -206,6 +207,7 @@
     MSG("-display <dpy>      Specifies display to use\n");
     MSG("-geometry <name>    Specifies geometry component name\n");
     MSG("-I[<dir>]           Add <dir> to list of directories to be used\n");
+    MSG("-ignoreserver       Ignores current server settings\n");
     MSG("-keycodes <name>    Specifies keycodes component name\n");
     MSG("-keymap <name>      Specifies name of keymap to load\n");
     MSG("-layout <name>      Specifies layout used to choose component 
names\n");
@@ -370,6 +372,8 @@
            ok= setOptString(&i,argc,argv,SYMBOLS_NDX,FROM_CMD_LINE);
        else if (streq(argv[i],"-synch"))
            synch= True;
+       else if (streq(argv[i],"-ignoreserver"))
+           ignoreserver= True;
        else if (streq(argv[i],"-types"))
            ok= setOptString(&i,argc,argv,TYPES_NDX,FROM_CMD_LINE);
        else if (streq(argv[i],"-verbose")||(streq(argv[i],"-v"))) {
@@ -835,9 +839,9 @@
     if ((!parseArgs(argc,argv))||(!getDisplay(argc,argv)))
        exit(-1);
     svValue[LOCALE_NDX]= setlocale(LC_ALL,svValue[LOCALE_NDX]);
-    svSrc[LOCALE_NDX]= FROM_SERVER;
+    svSrc[LOCALE_NDX]= (ignoreserver?FROM_CMD_LINE:FROM_SERVER);
     VMSG1(7,"locale is %s\n",svValue[LOCALE_NDX]);
-    if (dpy)
+    if (dpy && !ignoreserver)
         getServerValues();
     if (svValue[CONFIG_NDX] && (!applyConfig(svValue[CONFIG_NDX])))
        exit(-3);
Index: setxkbmap.man
===================================================================
RCS file: /cvs/xc/programs/setxkbmap/setxkbmap.man,v
retrieving revision 3.7
diff -u -r3.7 setxkbmap.man
--- setxkbmap.man       29 May 2003 22:16:23 -0000      3.7
+++ setxkbmap.man       28 Apr 2004 20:39:35 -0000
@@ -44,6 +44,9 @@
 Specifies the name of the geometry component used to construct
 a keyboard layout.
 .TP 8
+.B \-ignoreserver
+Ignores current server settings.  Warning: this is a Debian extension.
+.TP 8
 .B \-keymap \fIname\fP
 Specifies the name of the keymap description used to construct
 a keyboard layout.

Reply via email to