Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!yale!mintaka!bloom-beacon!BRL.MIL!phil From: phil@BRL.MIL (Phil Dykstra) Newsgroups: comp.windows.x Subject: xrdb no longer strips trailing whitespace Message-ID: <9001110025.aa05436@SPARK.BRL.MIL> Date: 11 Jan 90 05:25:20 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 57 X Window System Bug Report xbugs@expo.lcs.mit.edu VERSION: R4 CLIENT MACHINE and OPERATING SYSTEM: Sun 3/50, SunOS 3.4, cc or gcc compiled. DISPLAY TYPE: N/A (Sun bwtwo) WINDOW MANAGER: N/A (twm or gwm) AREA: xrdb SYNOPSIS: xrdb no longer strips trailing whitespace on resources DESCRIPTION: Under R3, trailing whitespace after a resource value was stripped off. Now, under R4 it is maintained, which makes things like font string matches much more difficult. I am fully prepared to hear "This is a bug, not a feature, how else could you pass the string 'gronk' ?!" If so, might I suggest quotes? If not, see fix below. REPEAT BY: xrdb -load < .Xres Where .Xres contains say: xterm*VT100.font:myfont /* I like to put comments here */ And the font name ends up as "myfont ". SAMPLE FIX: I put back the trailing space stripper from R3: *** xrdb.c.mit Wed Dec 13 13:54:21 1989 --- xrdb.c Wed Jan 10 23:59:29 1990 *************** *** 233,238 **** --- 233,240 ---- while (temp[0] == ' ' || temp[0] == '\t') { temp++; length--; } + while (temp[length-1] == ' ' || temp[length-1] == '\t') + temp[--length] = '\0'; entry.value = temp; entry.lineno = lineno;