[comp.windows.x] Problem on xrdb -query

Z.Wang@CS.UCL.AC.UK (Zheng Wang, Ext: 3701) (02/15/89)

Dear All;

I have a problem with xrdb -query with X11R3. "xrdb -query" is
supposed to print the resource database file. But "xrdb -query"
on our system only produces the first line of the database file.

Any ideas?


Thanks in advance.


Zheng

dheller@cory.Berkeley.EDU (Dan Heller) (02/15/89)

In article <8902150128.AA29482@expo.lcs.mit.edu> Z.Wang@CS.UCL.AC.UK (Zheng Wang, Ext: 3701) writes:
>I have a problem with xrdb -query with X11R3. "xrdb -query" is
>supposed to print the resource database file. But "xrdb -query"
>on our system only produces the first line of the database file.


Lemme guess- you're running sunOS 4.0?  If so, there is a bug
with fputs where it plugs a null after the first newline.
xrdb -query outputs everything in one string and fputs it out.
since sunOS-4.0 has this bug, you are left with a one-line output.

My misc comment is in response to someone's request that responses
to questions be mailed to the original poster if possible.  I really
would appreciate the opposite -- many questions are frequently asked
and I'm very interested in the responses and whatever conversation
tangents from there.  for example, I still don't know how to convert
my sun fonts into fonts suitable for R3.  I figured out how to do it
in R2, but the same thing doesn't work in R3.  A few people asked this
yet there was no posted response.  I don't mind hitting 'n' on articles
that I'm not interested in.

And now for the cheap advertising... on expo.lcs.mit.edu, the contrib
directory has a new dclock.tar.Z -- this one works under both R2 and R3
and contains a new option for 24/hr time format (thanx to a suggestion
by your buddy and mine, Jordan Hubbard).

Dan Heller	<island!argv@sun.com>

Z.Wang@CS.UCL.AC.UK (Zheng Wang, Ext: 3701) (02/15/89)

It could be better if the responses to the questions be sent
to original mailing list after editing.

Zheng

****************************************************************
As Bob, Dan and other people guessed. The problem with
xrdb -query on our system is due to a bug in fputs in SUN OS4.0.
****************************************************************

From: Bob Scheifler <rws@edu.mit.lcs.expo>
Subject: Re: Problem on xrdb -query

You didn't say what system you were on.  I'm guessing SunOS 4.0.
If so, it's a bug in SunOS fputs, not in xrdb.

I think you can find the line with fputs

            fputs (xdefs, stdout);

and change it to

            printf ("%s", xdefs);       /* fputs broken in SunOS 4.0 */