home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!Sirius.dfn.de!chx400!sicsun!slhp1.epfl.ch!lecom
- From: lecom@slhp1.epfl.ch (Claude Lecommandeur)
- Newsgroups: comp.sys.hp
- Subject: Re: Xlib bugs in HP-UX 8.07
- Message-ID: <3870@sicsun.epfl.ch>
- Date: 12 Aug 92 12:41:35 GMT
- References: <85922@netnews.upenn.edu>
- Sender: news@sicsun.epfl.ch
- Organization: Ecole Polytechnique Federale de Lausanne
- Lines: 81
-
- In article <85922@netnews.upenn.edu>, freeman@saul.cis.upenn.edu (Jon Freeman) writes:
- |> I have two specific complaints about Xlib functions under HP-UX 8.07.
- |>
- |> 1. For the life of me, I cannot figure out how to add a new font
- |> directory to a server's font path using XSetFontPath() (or
- |> equivalently, 'xset +fp' or 'xset fp+'). I wrote a small C program
- |> that calls XSetFontPath() but it keeps giving me BadValue errors. It
- |> is possible to "add" font directories that are already in the path
- |> (they will appear twice in the path), but adding a new directory
- |> simply doesn't work, no matter where that directory actually is. Does
- |> anybody else have this problem, or am I losing my mind?
- |>
-
- It seems that you can add directories only in {your_X11_path}/lib/fonts,
- i don't know why, but it works for me for these kind of directories.
-
- |> 2. Here's a simple Xlib program called xlib-test.c:
- |> --------------------------------------------------------
- |> #include <stdio.h>
- |> #include <X11/Xlib.h>
- |>
- |> int main(argc, argv)
- |> int argc;
- |> char *argv[];
- |> {
- |> Display *disp;
- |> char *fg, *bg, *rnd;
- |>
- |> if ((disp = XOpenDisplay(NULL)) == NULL) {
- |> printf("Can't open default display\n");
- |> exit(1);
- |> }
- |>
- |> fg = XGetDefault( disp, argv[0], "foreground" );
- |> bg = XGetDefault( disp, argv[0], "background" );
- |> rnd = XGetDefault( disp, argv[0], "random" );
- |>
- |> if( fg == NULL ) printf("fg is null.\n");
- |> else printf("fg is %s\n", fg);
- |>
- |> if( bg == NULL ) printf("bg is null.\n");
- |> else printf("bg is %s\n", bg);
- |>
- |> if( rnd == NULL ) printf("rnd is null.\n");
- |> else printf("rnd is %s\n", rnd);
- |>
- |> XCloseDisplay( disp );
- |>
- |> return 0;
- |>
- |> }
- |> --------------------------------------------------------
- |> And here's its output on an HP9000/710:
- |>
- |> hp710 /disk/plaid/freeman [ 4 ] xlib-test
- |> fg is #FFFFFFFFFFFF
- |> bg is #7848A075D500
- |> rnd is null.
- |> hp710 /disk/plaid/freeman [ 5 ]
- |>
- |> I have no .Xdefaults file in my home directory, and my XENVIRONMENT
- |> variable is not set, so all three calls to XGetDefault() should have
- |> returned null. I get the same results no matter what the name of the
- |> program is.
- |>
- |> Xlib is the lowest level of what's supposed to be the ultimate
- |> portable window system. It's very disappointing to discover that even
- |> basic functions like these have bugs.
- |>
-
- Did you try xrdb -q, HP/Vue loadss its own resources in the server.
-
- --
-
-
- Claude Lecommandeur
- Service Informatique Central
- Ecole Polytechnique Federale de Lausanne
- 1015 LAUSANNE (SWITZERLAND)
- E-Mail : lecom@sic.epfl.ch
- Tel : (41 21) 693-22-97
-