[comp.windows.x] option parsing in the X11 toolkit

swick@ATHENA.MIT.EDU (Ralph R. Swick) (03/21/88)

     Date: 17 Mar 88 04:33:16 GMT
     From: grady@postgres.Berkeley.EDU  (Steven Grady)

     I am confused by something.  I have used xrdb to set the main font
     of my xterm by default to 6x10, by using the following line:

	     xterm*VT100*font:       6x10

     This works fine, except that I can't override it on the command
     line.  If I say "xterm -fn fixed" or "xterm -font fixed", it should
     give me the "fixed" font, but it still gives me 6x10.

The bug (if any) is a little more subtle than you describe.  The
default option table used by the toolkit stores the resource identified
by -fn under xterm*font.  By the precedence rules for resource retrieval,
xterm*VT100*font is more specific than xterm*font and therefore continues
to be the resource value used.  The reason for the order of processing
that you describe is so that an application can over-ride the default
option table by specifying it's own entry for -fn.